Files
sdk/pkg/vm/testcases/bytecode/asserts.dart.expect
T
Alexander Markov 3c32b32d56 [vm/bytecode] Enable OSR for unoptimized code compiled from bytecode
In order to enable OSR, CheckStackOverflow IL instructions are attributed
with a non-zero loop depth. The original loop depth is passed as operand
of CheckStack bytecode instruction.

Change-Id: I771f59ba9f8d071680a3b7156be380e0f606b7b2
Reviewed-on: https://dart-review.googlesource.com/c/84081
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-11-12 19:04:54 +00:00

70 lines
1.8 KiB
Plaintext

library #lib;
import self as self;
import "dart:core" as core;
[@vm.bytecode=
Bytecode (version: stable) {
Entry 0
CheckStack 0
JumpIfNoAsserts L1
Push FP[-5]
AssertBoolean 0
JumpIfTrue L1
PushInt 0
PushInt 0
PushNull
PushConstant CP#1
IndirectStaticCall 3, CP#0
Drop1
L1:
PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 3, num-type-args 0, names []
[1] = StaticICData target 'dart.core::_AssertionError::_throwNew', arg-desc CP#0
}
]static method test1(core::bool condition) → void {
assert(condition);
}
[@vm.bytecode=
Bytecode (version: stable) {
Entry 0
CheckStack 0
JumpIfNoAsserts L1
Push FP[-6]
InstanceCall 1, CP#1
AssertBoolean 0
JumpIfTrue L1
PushInt 0
PushInt 0
Push FP[-5]
InstanceCall 1, CP#2
PushConstant CP#4
IndirectStaticCall 3, CP#3
Drop1
L1:
PushNull
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = ICData dynamic target-name 'call', arg-desc CP#0
[2] = ICData dynamic target-name 'call', arg-desc CP#0
[3] = ArgDesc num-args 3, num-type-args 0, names []
[4] = StaticICData target 'dart.core::_AssertionError::_throwNew', arg-desc CP#3
}
]static method test2(() → core::bool condition, () → core::String message) → void {
assert([@vm.call-site-attributes.metadata=receiverType:() → dart.core::bool] condition.call(), [@vm.call-site-attributes.metadata=receiverType:() → dart.core::String] message.call());
}
[@vm.bytecode=
Bytecode (version: stable) {
Entry 0
CheckStack 0
PushNull
ReturnTOS
}
ConstantPool {
}
]static method main() → dynamic {}