[vm/bytecode] Fix last source position in a function

Change-Id: Id3b9c6476cc3745a39a7010b7ae09d2422467e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107182
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
Alexander Markov
2019-06-24 19:25:07 +00:00
committed by commit-bot@chromium.org
parent efc85cac7c
commit bc8b6fb94d
+4 -1
View File
@@ -700,6 +700,9 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
// BytecodeAssembler eliminates this bytecode if it is unreachable.
asm.emitPushNull();
}
if (node.function != null) {
_recordSourcePosition(node.function.fileEndOffset);
}
_genReturnTOS();
}
} else {
@@ -1931,9 +1934,9 @@ class BytecodeGenerator extends RecursiveVisitor<Null> {
_generateNode(function.body);
// BytecodeAssembler eliminates this bytecode if it is unreachable.
_recordSourcePosition(function.fileEndOffset);
asm.emitPushNull();
_genReturnTOS();
_recordSourcePosition(function.fileEndOffset);
if (locals.isSyncYieldingFrame) {
_genSyncYieldingEpilogue(