Compiler-Interpreter.st 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914
  1. Smalltalk current createPackage: 'Compiler-Interpreter'!
  2. BlockClosure subclass: #AIBlockClosure
  3. instanceVariableNames: 'node outerContext'
  4. package: 'Compiler-Interpreter'!
  5. !AIBlockClosure commentStamp!
  6. I am a special `BlockClosure` subclass used by an interpreter to interpret a block node.
  7. While I am polymorphic with `BlockClosure`, some methods such as `#new` will raise interpretation errors. Unlike a `BlockClosure`, my instance are not JavaScript functions.
  8. Evaluating an instance will result in interpreting the `node` instance variable (instance of `BlockNode`).!
  9. !AIBlockClosure methodsFor: 'accessing'!
  10. compiledSource
  11. "Unlike blocks, the receiver doesn't represent a JS function"
  12. ^ '[ AST Block closure ]'
  13. !
  14. numArgs
  15. ^ node temps size
  16. ! !
  17. !AIBlockClosure methodsFor: 'converting'!
  18. currySelf
  19. self interpreterError
  20. ! !
  21. !AIBlockClosure methodsFor: 'error handling'!
  22. interpreterError
  23. AIInterpreterError signal: 'Method cannot be interpreted by the interpreter.'
  24. ! !
  25. !AIBlockClosure methodsFor: 'evaluating'!
  26. applyTo: anObject arguments: aCollection
  27. self interpreterError
  28. !
  29. value
  30. ^ self valueWithPossibleArguments: #()
  31. !
  32. value: anArgument
  33. ^ self valueWithPossibleArguments: {anArgument}
  34. !
  35. value: firstArgument value: secondArgument
  36. ^ self valueWithPossibleArguments: {firstArgument . secondArgument}
  37. !
  38. value: firstArgument value: secondArgument value: thirdArgument
  39. ^ self valueWithPossibleArguments: {firstArgument . secondArgument . thirdArgument}
  40. !
  41. valueWithPossibleArguments: aCollection
  42. | context sequenceNode |
  43. context := outerContext newBlockContext.
  44. "Interpret a copy of the sequence node to avoid creating a new AIBlockClosure"
  45. sequenceNode := node nodes first copy
  46. parent: nil;
  47. yourself.
  48. "Populate the arguments into the context locals"
  49. node parameters withIndexDo: [ :each :index |
  50. context localAt: each put: (aCollection at: index ifAbsent: [ nil ]) ].
  51. "Interpret the first node of the BlockSequenceNode"
  52. context interpreter
  53. node: sequenceNode nextChild;
  54. proceed.
  55. outerContext interpreter
  56. setNonLocalReturnFromContext: context.
  57. ^ context interpreter pop
  58. ! !
  59. !AIBlockClosure methodsFor: 'initialization'!
  60. initializeWithContext: aContext node: aNode
  61. node := aNode.
  62. outerContext := aContext
  63. ! !
  64. !AIBlockClosure class methodsFor: 'instance creation'!
  65. forContext: aContext node: aNode
  66. ^ self new
  67. initializeWithContext: aContext node: aNode;
  68. yourself
  69. ! !
  70. Object subclass: #AIContext
  71. instanceVariableNames: 'outerContext innerContext pc locals method index ast interpreter'
  72. package: 'Compiler-Interpreter'!
  73. !AIContext commentStamp!
  74. I am like a `MethodContext`, used by the `ASTInterpreter`.
  75. Unlike a `MethodContext`, my instances are not read-only.
  76. When debugging, my instances are created by copying the current `MethodContext` (thisContext)!
  77. !AIContext methodsFor: 'accessing'!
  78. index
  79. ^ index ifNil: [ 0 ]
  80. !
  81. index: anInteger
  82. index := anInteger
  83. !
  84. innerContext
  85. ^ innerContext
  86. !
  87. innerContext: anAIContext
  88. innerContext := anAIContext
  89. !
  90. localAt: aString
  91. "Lookup the local value up to the method context"
  92. ^ self locals at: aString ifAbsent: [
  93. self outerContext ifNotNil: [ :context |
  94. context localAt: aString ] ]
  95. !
  96. localAt: aString put: anObject
  97. self locals at: aString put: anObject
  98. !
  99. locals
  100. locals ifNil: [ self initializeLocals ].
  101. ^ locals
  102. !
  103. method
  104. ^ method
  105. !
  106. method: aCompiledMethod
  107. method := aCompiledMethod
  108. !
  109. methodContext
  110. self isBlockContext ifFalse: [ ^ self ].
  111. ^ self outerContext ifNotNil: [ :outer |
  112. outer methodContext ]
  113. !
  114. outerContext
  115. ^ outerContext
  116. !
  117. outerContext: anAIContext
  118. outerContext := anAIContext.
  119. outerContext innerContext: self
  120. !
  121. selector
  122. ^ self method ifNotNil: [
  123. self method selector ]
  124. ! !
  125. !AIContext methodsFor: 'converting'!
  126. asString
  127. ^self isBlockContext
  128. ifTrue: [ 'a block (in ', self methodContext asString, ')' ]
  129. ifFalse: [ self receiver class name, ' >> ', self selector ]
  130. ! !
  131. !AIContext methodsFor: 'factory'!
  132. newBlockContext
  133. ^ self class new
  134. outerContext: self;
  135. yourself
  136. ! !
  137. !AIContext methodsFor: 'initialization'!
  138. initializeAST
  139. ast := self method ast.
  140. (SemanticAnalyzer on: self method methodClass)
  141. visit: ast
  142. !
  143. initializeFromMethodContext: aMethodContext
  144. self
  145. pc: aMethodContext pc;
  146. index: aMethodContext index;
  147. receiver: aMethodContext receiver;
  148. method: aMethodContext method.
  149. aMethodContext outerContext ifNotNil: [ :outer |
  150. "If the method context is nil, the block was defined in JS, so ignore it"
  151. outer methodContext ifNotNil: [
  152. self outerContext: (self class fromMethodContext: aMethodContext outerContext) ].
  153. aMethodContext locals keysAndValuesDo: [ :key :value |
  154. self locals at: key put: value ] ]
  155. !
  156. initializeInterpreter
  157. interpreter := ASTInterpreter new
  158. context: self;
  159. yourself.
  160. ast ifNotNil: [ interpreter node: self retrieveNode ].
  161. (self innerContext notNil and: [
  162. self innerContext isBlockContext not ]) ifTrue: [
  163. self setupInterpreter: interpreter ]
  164. !
  165. initializeLocals
  166. locals := Dictionary new.
  167. locals at: 'thisContext' put: self.
  168. ! !
  169. !AIContext methodsFor: 'interpreting'!
  170. arguments
  171. ^ self ast arguments collect: [ :each |
  172. self localAt: each ]
  173. !
  174. ast
  175. self isBlockContext ifTrue: [ ^ self outerContext ast ].
  176. ast ifNil: [ self initializeAST ].
  177. ^ ast
  178. !
  179. interpreter
  180. interpreter ifNil: [ self initializeInterpreter ].
  181. ^ interpreter
  182. !
  183. interpreter: anInterpreter
  184. interpreter := anInterpreter
  185. !
  186. pc
  187. ^ pc ifNil: [ pc := 0 ]
  188. !
  189. pc: anInteger
  190. pc := anInteger
  191. !
  192. receiver
  193. ^ self localAt: 'self'
  194. !
  195. receiver: anObject
  196. self localAt: 'self' put: anObject
  197. !
  198. retrieveNode
  199. ^ ASTPCNodeVisitor new
  200. context: self;
  201. visit: self ast;
  202. currentNode
  203. !
  204. setupInterpreter: anInterpreter
  205. "Push the send args and receiver to the interpreter stack"
  206. self innerContext arguments reversed do: [ :each |
  207. anInterpreter push: each ].
  208. anInterpreter push: (self innerContext receiver)
  209. ! !
  210. !AIContext methodsFor: 'testing'!
  211. isBlockContext
  212. "Block context have an outer context."
  213. ^ self outerContext notNil
  214. ! !
  215. !AIContext class methodsFor: 'instance creation'!
  216. fromMethodContext: aMethodContext
  217. ^ self new
  218. initializeFromMethodContext: aMethodContext;
  219. yourself
  220. ! !
  221. Error subclass: #AIInterpreterError
  222. instanceVariableNames: ''
  223. package: 'Compiler-Interpreter'!
  224. !AIInterpreterError commentStamp!
  225. I get signaled when an AST interpreter is unable to interpret a node.!
  226. Object subclass: #ASTDebugger
  227. instanceVariableNames: 'interpreter context'
  228. package: 'Compiler-Interpreter'!
  229. !ASTDebugger commentStamp!
  230. I am a stepping debugger interface for Amber code.
  231. I internally use an instance of `ASTSteppingInterpreter` to actually step through node and interpret them.
  232. My instances are created from a `MethodContext` with `ASTDebugger class >> context:`.
  233. They hold an `AIContext` instance internally, recursive copy of the `MethodContext`.
  234. ## API
  235. Use the methods of the `'stepping'` protocol to do stepping.!
  236. !ASTDebugger methodsFor: 'accessing'!
  237. context
  238. ^ context
  239. !
  240. context: aContext
  241. context := aContext
  242. !
  243. interpreter
  244. ^ interpreter ifNil: [ interpreter := self defaultInterpreterClass new ]
  245. !
  246. interpreter: anInterpreter
  247. interpreter := anInterpreter
  248. !
  249. method
  250. ^ self context method
  251. !
  252. nextNode
  253. ^ self interpreter nextNode
  254. ! !
  255. !ASTDebugger methodsFor: 'defaults'!
  256. defaultInterpreterClass
  257. ^ ASTSteppingInterpreter
  258. ! !
  259. !ASTDebugger methodsFor: 'initialization'!
  260. buildAST
  261. "Build the AST tree from the method source code.
  262. The AST is annotated with a SemanticAnalyzer,
  263. to know the semantics and bindings of each node needed for later debugging"
  264. | ast |
  265. ast := Smalltalk current parse: self method source.
  266. (SemanticAnalyzer on: self context receiver class)
  267. visit: ast.
  268. ^ ast
  269. !
  270. initializeInterpreter
  271. | ast next |
  272. ast := self buildAST.
  273. next := ASTPCNodeVisitor new
  274. context: self context;
  275. visit: ast;
  276. currentNode.
  277. self interpreter interpret: next
  278. !
  279. initializeWithContext: aContext
  280. "TODO: do we need to handle block contexts?"
  281. self context: aContext.
  282. self initializeInterpreter
  283. ! !
  284. !ASTDebugger methodsFor: 'stepping'!
  285. proceed
  286. self shouldBeImplemented
  287. !
  288. restart
  289. self shouldBeImplemented
  290. !
  291. step
  292. "The ASTSteppingInterpreter stops at each node interpretation.
  293. One step will interpret nodes until:
  294. - we get at the end
  295. - the next node is a stepping node (send, assignment, etc.)"
  296. [ (self interpreter nextNode notNil and: [ self interpreter nextNode stopOnStepping ])
  297. or: [ self interpreter atEnd not ] ]
  298. whileFalse: [
  299. self interpreter step.
  300. self step ]
  301. !
  302. stepInto
  303. self shouldBeImplemented
  304. !
  305. stepOver
  306. self step
  307. ! !
  308. !ASTDebugger methodsFor: 'testing'!
  309. atEnd
  310. ^ self interpreter atEnd
  311. ! !
  312. !ASTDebugger class methodsFor: 'instance creation'!
  313. context: aContext
  314. ^ self new
  315. initializeWithContext: aContext;
  316. yourself
  317. ! !
  318. NodeVisitor subclass: #ASTInterpreter
  319. instanceVariableNames: 'node context stack returnValue returned'
  320. package: 'Compiler-Interpreter'!
  321. !ASTInterpreter methodsFor: 'accessing'!
  322. context
  323. ^ context
  324. !
  325. context: aContext
  326. context := aContext
  327. !
  328. node
  329. "Answer the next node, ie the node to be evaluated in the next step"
  330. ^ node
  331. !
  332. node: aNode
  333. node := aNode
  334. !
  335. result
  336. ^ self hasReturned
  337. ifTrue: [ self returnValue ]
  338. ifFalse: [ self context receiver ]
  339. !
  340. returnValue
  341. ^ returnValue
  342. !
  343. returnValue: anObject
  344. returnValue := anObject
  345. !
  346. stack
  347. ^ stack ifNil: [ stack := OrderedCollection new ]
  348. ! !
  349. !ASTInterpreter methodsFor: 'interpreting'!
  350. interpret
  351. "Interpret the next node to be evaluated"
  352. self visit: self node
  353. !
  354. interpret: aNode
  355. self node: aNode.
  356. self interpret
  357. !
  358. next
  359. self node: self node nextNode
  360. !
  361. proceed
  362. "Eagerly evaluate the ast"
  363. [ self atEnd ] whileFalse: [
  364. self step ]
  365. !
  366. restart
  367. self node: self context ast nextChild
  368. !
  369. setNonLocalReturnFromContext: aContext
  370. aContext interpreter hasReturned ifTrue: [
  371. returned := true.
  372. self returnValue: aContext interpreter returnValue ]
  373. !
  374. skip
  375. self next
  376. !
  377. step
  378. self
  379. interpret;
  380. next
  381. !
  382. stepOver
  383. self step.
  384. [ self node isSteppingNode ] whileFalse: [
  385. self step ]
  386. ! !
  387. !ASTInterpreter methodsFor: 'private'!
  388. assign: aNode to: anObject
  389. aNode binding isInstanceVar
  390. ifTrue: [ self context receiver instVarAt: aNode value put: anObject ]
  391. ifFalse: [ self context localAt: aNode value put: anObject ]
  392. !
  393. eval: aString
  394. "Evaluate aString as JS source inside an JS function.
  395. aString is not sandboxed."
  396. | source function |
  397. source := String streamContents: [ :str |
  398. str nextPutAll: '(function('.
  399. self context locals keys
  400. do: [ :each | str nextPutAll: each ]
  401. separatedBy: [ str nextPutAll: ',' ].
  402. str
  403. nextPutAll: '){ return (function() {';
  404. nextPutAll: aString;
  405. nextPutAll: '})() })' ].
  406. function := Compiler new eval: source.
  407. ^ function valueWithPossibleArguments: self context locals values
  408. !
  409. messageFromSendNode: aSendNode arguments: aCollection
  410. ^ Message new
  411. selector: aSendNode selector;
  412. arguments: aCollection;
  413. yourself
  414. !
  415. messageNotUnderstood: aMessage receiver: anObject
  416. MessageNotUnderstood new
  417. meesage: aMessage;
  418. receiver: anObject;
  419. signal
  420. !
  421. sendMessage: aMessage to: anObject superSend: aBoolean
  422. | method |
  423. aBoolean ifFalse: [ ^ aMessage sendTo: anObject ].
  424. anObject class superclass ifNil: [ ^ self messageNotUnderstood: aMessage receiver: anObject ].
  425. method := anObject class superclass methodDictionary
  426. at: aMessage selector
  427. ifAbsent: [ ^ self messageNotUnderstood: aMessage receiver: anObject ].
  428. ^ method sendTo: anObject arguments: aMessage arguments
  429. ! !
  430. !ASTInterpreter methodsFor: 'stack'!
  431. peek
  432. "Peek the top object of the context stack"
  433. self stack ifEmpty: [ ^ nil ].
  434. ^ self stack last
  435. !
  436. pop
  437. "Pop an object from the context stack"
  438. | peekedValue |
  439. peekedValue := self peek.
  440. self stack removeLast.
  441. ^ peekedValue
  442. !
  443. push: anObject
  444. "Push an object to the context stack"
  445. ^ self stack add: anObject
  446. ! !
  447. !ASTInterpreter methodsFor: 'testing'!
  448. atEnd
  449. ^ self hasReturned or: [ self node isNil ]
  450. !
  451. hasReturned
  452. ^ returned ifNil: [ false ]
  453. ! !
  454. !ASTInterpreter methodsFor: 'visiting'!
  455. visit: aNode
  456. self hasReturned ifFalse: [ super visit: aNode ]
  457. !
  458. visitAssignmentNode: aNode
  459. | poppedValue |
  460. poppedValue := self pop.
  461. "Pop the left side of the assignment.
  462. It already has been visited, and we don't need its value."
  463. self pop.
  464. self push: poppedValue.
  465. self assign: aNode left to: poppedValue
  466. !
  467. visitBlockNode: aNode
  468. "Do not evaluate the block node.
  469. Instead, put all instructions into a block that we push to the stack for later evaluation"
  470. | block |
  471. block := AIBlockClosure forContext: self context node: aNode.
  472. self push: block
  473. !
  474. visitClassReferenceNode: aNode
  475. self push: (Smalltalk current
  476. at: aNode value
  477. ifAbsent: [ PlatformInterface globals at: aNode value ])
  478. !
  479. visitDynamicArrayNode: aNode
  480. | array |
  481. array := #().
  482. aNode nodes do: [ :each |
  483. array addFirst: self pop ].
  484. self push: array
  485. !
  486. visitDynamicDictionaryNode: aNode
  487. | associations hashedCollection |
  488. associations := OrderedCollection new.
  489. hashedCollection := HashedCollection new.
  490. aNode nodes do: [ :each |
  491. associations add: self pop ].
  492. associations reversed do: [ :each |
  493. hashedCollection add: each ].
  494. self push: hashedCollection
  495. !
  496. visitJSStatementNode: aNode
  497. returned := true.
  498. self returnValue: (self eval: aNode source)
  499. !
  500. visitNode: aNode
  501. "Do nothing by default. Especially, do not visit children recursively."
  502. !
  503. visitReturnNode: aNode
  504. returned := true.
  505. self returnValue: self pop
  506. !
  507. visitSendNode: aNode
  508. | receiver args message result |
  509. args := aNode arguments collect: [ :each | self pop ].
  510. receiver := self pop.
  511. message := self
  512. messageFromSendNode: aNode
  513. arguments: args reversed.
  514. result := self sendMessage: message to: receiver superSend: aNode superSend.
  515. self context pc: self context pc + 1.
  516. "For cascade sends, push the reciever if the send is not the last one"
  517. (aNode isCascadeSendNode and: [ aNode isLastChild not ])
  518. ifTrue: [ self push: receiver ]
  519. ifFalse: [ self push: result ]
  520. !
  521. visitValueNode: aNode
  522. self push: aNode value
  523. !
  524. visitVariableNode: aNode
  525. aNode binding isUnknownVar ifTrue: [
  526. ^ self push: (PlatformInterface globals at: aNode value ifAbsent: [ self error: 'Unknown variable' ]) ].
  527. self push: (aNode binding isInstanceVar
  528. ifTrue: [ self context receiver instVarAt: aNode value ]
  529. ifFalse: [ self context localAt: aNode value ])
  530. ! !
  531. NodeVisitor subclass: #ASTPCNodeVisitor
  532. instanceVariableNames: 'useInlinings pc context blockIndex currentNode'
  533. package: 'Compiler-Interpreter'!
  534. !ASTPCNodeVisitor commentStamp!
  535. I visit an AST until I get to the current pc node and answer it.
  536. ## API
  537. My instances must be filled with a context object using `#context:`.
  538. After visiting the AST the current node corresponding to the `pc` is answered by `#currentNode`!
  539. !ASTPCNodeVisitor methodsFor: 'accessing'!
  540. blockIndex
  541. ^ blockIndex ifNil: [ blockIndex := 0 ]
  542. !
  543. context
  544. ^ context
  545. !
  546. context: aContext
  547. context := aContext
  548. !
  549. currentNode
  550. ^ currentNode
  551. !
  552. increaseBlockIndex
  553. blockIndex := self blockIndex + 1
  554. !
  555. pc
  556. ^ pc ifNil: [ 0 ]
  557. !
  558. pc: anInteger
  559. pc := anInteger
  560. !
  561. useInlinings
  562. ^ useInlinings ifNil: [ true ]
  563. !
  564. useInlinings: aBoolean
  565. useInlinings := aBoolean
  566. ! !
  567. !ASTPCNodeVisitor methodsFor: 'visiting'!
  568. visitBlockNode: aNode
  569. "Inlined send node. Assume that the block is inlined"
  570. (aNode parent isSendNode and: [ aNode parent shouldBeInlined ])
  571. ifFalse: [
  572. self blockIndex >= self context index ifFalse: [
  573. self increaseBlockIndex.
  574. super visitBlockNode: aNode ] ]
  575. ifTrue: [ super visitBlockNode: aNode ]
  576. !
  577. visitJSStatementNode: aNode
  578. currentNode := aNode
  579. !
  580. visitSendNode: aNode
  581. super visitSendNode: aNode.
  582. self pc = self context pc ifFalse: [
  583. aNode shouldBeInlined ifFalse: [
  584. self blockIndex = self context index ifTrue: [
  585. self pc: self pc + 1.
  586. currentNode := aNode ] ] ]
  587. ! !
  588. !Node methodsFor: '*Compiler-Interpreter'!
  589. interpreter: anInterpreter continue: aBlock
  590. ^ anInterpreter interpretNode: self continue: aBlock
  591. !
  592. isSteppingNode
  593. ^ false
  594. ! !
  595. !AssignmentNode methodsFor: '*Compiler-Interpreter'!
  596. interpreter: anInterpreter continue: aBlock
  597. ^ anInterpreter interpretAssignmentNode: self continue: aBlock
  598. !
  599. isSteppingNode
  600. ^ true
  601. ! !
  602. !BlockNode methodsFor: '*Compiler-Interpreter'!
  603. interpreter: anInterpreter continue: aBlock
  604. ^ anInterpreter interpretBlockNode: self continue: aBlock
  605. !
  606. isSteppingNode
  607. ^ true
  608. ! !
  609. !CascadeNode methodsFor: '*Compiler-Interpreter'!
  610. interpreter: anInterpreter continue: aBlock
  611. ^ anInterpreter interpretCascadeNode: self continue: aBlock
  612. ! !
  613. !DynamicArrayNode methodsFor: '*Compiler-Interpreter'!
  614. interpreter: anInterpreter continue: aBlock
  615. ^ anInterpreter interpretDynamicArrayNode: self continue: aBlock
  616. !
  617. isSteppingNode
  618. ^ true
  619. ! !
  620. !DynamicDictionaryNode methodsFor: '*Compiler-Interpreter'!
  621. interpreter: anInterpreter continue: aBlock
  622. ^ anInterpreter interpretDynamicDictionaryNode: self continue: aBlock
  623. !
  624. isSteppingNode
  625. ^ true
  626. ! !
  627. !JSStatementNode methodsFor: '*Compiler-Interpreter'!
  628. interpreter: anInterpreter continue: aBlock
  629. ^ anInterpreter interpretJSStatementNode: self continue: aBlock
  630. !
  631. isSteppingNode
  632. ^ true
  633. ! !
  634. !MethodNode methodsFor: '*Compiler-Interpreter'!
  635. interpreter: anInterpreter continue: aBlock
  636. ^ anInterpreter interpretMethodNode: self continue: aBlock
  637. ! !
  638. !ReturnNode methodsFor: '*Compiler-Interpreter'!
  639. interpreter: anInterpreter continue: aBlock
  640. ^ anInterpreter interpretReturnNode: self continue: aBlock
  641. ! !
  642. !SendNode methodsFor: '*Compiler-Interpreter'!
  643. interpreter: anInterpreter continue: aBlock
  644. ^ anInterpreter interpretSendNode: self continue: aBlock
  645. !
  646. isSteppingNode
  647. ^ true
  648. ! !
  649. !SequenceNode methodsFor: '*Compiler-Interpreter'!
  650. interpreter: anInterpreter continue: aBlock
  651. ^ anInterpreter interpretSequenceNode: self continue: aBlock
  652. ! !
  653. !BlockSequenceNode methodsFor: '*Compiler-Interpreter'!
  654. interpreter: anInterpreter continue: aBlock
  655. ^ anInterpreter interpretBlockSequenceNode: self continue: aBlock
  656. ! !
  657. !ValueNode methodsFor: '*Compiler-Interpreter'!
  658. interpreter: anInterpreter continue: aBlock
  659. ^ anInterpreter interpretValueNode: self continue: aBlock
  660. ! !
  661. !VariableNode methodsFor: '*Compiler-Interpreter'!
  662. interpreter: anInterpreter continue: aBlock
  663. ^ anInterpreter interpretVariableNode: self continue: aBlock
  664. ! !
  665. !ClassReferenceNode methodsFor: '*Compiler-Interpreter'!
  666. interpreter: anInterpreter continue: aBlock
  667. ^ anInterpreter interpretClassReferenceNode: self continue: aBlock
  668. ! !