Compiler-Interpreter.st 18 KB

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