You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: prd.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -439,8 +439,8 @@
439
439
"Typecheck passes"
440
440
],
441
441
"priority": 26,
442
-
"passes": false,
443
-
"notes": ""
442
+
"passes": true,
443
+
"notes": "Updated Express4Runner to use new parser via SyntaxTreeFactory and ASTCompiler. Modified InstructionGenerator to not pop result of last expression. Modified QLambdaInner to return stack value on normal completion. Fixed ParseException handling by converting to QLSyntaxException. Updated ClearDfaCacheTest to use correct method name. Basic execution test passes."
- src/main/java/com/alibaba/qlexpress4/parser/visitor/InstructionGenerator.java (modified - fixed ProgramNode and BlockNode to not pop last expression result)
584
+
- src/main/java/com/alibaba/qlexpress4/runtime/QLambdaInner.java (modified - return stack value on normal completion)
585
+
- src/test/java/com/alibaba/qlexpress4/ClearDfaCacheTest.java (modified - method name update)
586
+
- Typecheck passes (mvn compile)
587
+
- Basic test passes (docQuickStartTest)
588
+
- **Learnings for future iterations:**
589
+
- The QLambdaInner.callInner() method returns QResult.NEXT_INSTRUCTION by default which has Value.NULL_VALUE as result
590
+
- To support expression-as-value in scripts, need to return the actual value on top of the stack
591
+
- Use runtime.getCurrentScope().peek() to get the top value from the stack
592
+
- ProgramNode and BlockNode should NOT pop the result of the last expression/statement
593
+
- The pattern for last-statement detection: `if (result.isExpressionValue() && i < numStatements - 1)` - don't pop if i == numStatements - 1
594
+
- ParseException from new parser needs to be caught and converted to QLSyntaxException for public API
595
+
- clearDFACache() was renamed to clearCompileCache() - likely during a previous refactoring
0 commit comments