Add more expression test cases, fix bugs

Also added a few more comments + reorganized exceptions that are
invoke-internal.

(cherry picked from commit cbd686548fd62248fabbaab551a6875a14170957)
This commit is contained in:
Octavia Togami
2020-02-24 03:33:49 -05:00
committed by MattBDev
parent cd1948648c
commit eb950bd75e
2 changed files with 12 additions and 5 deletions

View File

@ -678,13 +678,10 @@ class CompilingVisitor extends ExpressionBaseVisitor<MethodHandle> {
// MH:oldResult,result = (ExecutionData)Double
// Execute `oldResult` but ignore its return value, then execute result and return that.
// If either result is `defaultResult`, it's bogus, so just skip it
// If `oldResult` (the old value) is `defaultResult`, it's bogus, so just skip it
if (oldResult == DEFAULT_RESULT) {
return result;
}
if (result == DEFAULT_RESULT) {
return oldResult;
}
// Add a dummy Double parameter to the end
// MH:dummyDouble = (ExecutionData, Double)Double
MethodHandle dummyDouble = MethodHandles.dropArguments(