Compiler-Interpreter.st 17 KB

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