Files
sdk/pkg/vm/testcases/bytecode/asserts.dart.expect
T
Alexander Markov da8cb470cc [vm/bytecode] Represent classes, libraries, scripts and recursive types in bytecode
Size of a large application:
Before: 26628600
After: 21480120 (-19.3%)

Size of snapshots:

isolate_snapshot_framework.bin
Before: 9322496
After: 6782976 (-27.2%)

isolate_snapshot_product_framework.bin
Before: 9166848
After: 6602752 (-27.9%)

Regressions in tests:

1) Test language_2/type_alias_equality_test/04 fails similarly to default mode, as VM
does not implement comparison of function types according to the specification.
Previously this test was passing as function types were canonicalized in bytecode,
which was not always correct. This CL fixes the problem with canonicalization of
function types in bytecode and the test starts failing again.

2) Tests standalone_2/entrypoints_verification_test, standalone_2/io/test_extension_test,
standalone_2/io/test_extension_fail_test fail as native extensions are not supported
in bytecode yet. These tests start passing after df5e7aac17,
which switched bytecode tests to kernel service (on x64), because kernel service doesn't
drop ASTs. This CL switches from reading AST library declarations to bytecode even if
AST is not removed, so tests fail again.

Change-Id: I8b7ba44bfa49d0b1599b2509553ff7c831a4e244
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104700
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-06-20 18:27:21 +00:00

95 lines
2.3 KiB
Plaintext

main = #lib::main;
[@vm.bytecode=
BytecodeMetadata {
Bytecode (version: stable)
Main library: #lib
Library '#lib'
name '#lib'
script '#lib'
Class '', script = '#lib'
Function 'test1', static, reflectable, debuggable
parameters [dart:core::bool 'condition'] (required: 1)
return-type void
Bytecode {
Entry 0
CheckStack 0
JumpIfNoAsserts L1
Push FP[-5]
AssertBoolean 0
JumpIfTrue L1
PushInt 0
PushInt 0
PushNull
DirectCall CP#0, 3
Drop1
L1:
PushNull
ReturnTOS
}
ConstantPool {
[0] = DirectCall 'dart:core::_AssertionError::_throwNew', ArgDesc num-args 3, num-type-args 0, names []
[1] = Reserved
}
Function 'test2', static, reflectable, debuggable
parameters [FunctionType () -> dart:core::bool 'condition', FunctionType () -> dart:core::String 'message'] (required: 2)
return-type void
Bytecode {
Entry 0
CheckStack 0
JumpIfNoAsserts L1
Push FP[-6]
DynamicCall CP#1, 1
AssertBoolean 0
JumpIfTrue L1
PushInt 0
PushInt 0
Push FP[-5]
DynamicCall CP#2, 1
DirectCall CP#3, 3
Drop1
L1:
PushNull
ReturnTOS
}
ConstantPool {
[0] = ObjectRef 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] = DirectCall 'dart:core::_AssertionError::_throwNew', ArgDesc num-args 3, num-type-args 0, names []
[4] = Reserved
}
Function 'main', static, reflectable, debuggable
parameters [] (required: 0)
return-type dynamic
Bytecode {
Entry 0
CheckStack 0
PushNull
ReturnTOS
}
ConstantPool {
}
}
]library #lib from "#lib" as #lib {
static method test1(dart.core::bool condition) → void {
assert(condition);
}
static method test2(() → dart.core::bool condition, () → dart.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());
}
static method main() → dynamic {}
}