Pragmas on local functions are used internally by FFI.
TEST=ci
Change-Id: I3ffb9984d8fcd943b22a98746faa915b2ce7c9fa
Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446121
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Postpone loading of Code and ConstantPool objects during hot reload
until ReloadPhase4CommitFinish in order to avoid creating
constants too early, before class table is switched to use new classes
(otherwise heap would contain a mix of objects with new and old
layouts).
TEST=ci (vm/cc/IsolateReload)
Change-Id: I602987d194c5eb00b2e2a0e070dcd7b50cea0212
Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441660
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Also, support reading local variables information from bytecode.
TEST=pkg/vm_service
Change-Id: Iab482316891f0e474af0011e9b1765c4e8312bc9
Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437281
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Profiler does not allow 2 distinct Bytecode objects to use the same
range of bytecode, as it needs to map PC to a Bytecode unambiguously.
So this change removes reuse of the field initializer bytecodes for
a field getter (in case of const fields).
TEST=pkg/vm_service/test/get_perfetto_cpu_samples_rpc_test
Change-Id: I758286f6f4fcfe2e2169bbc19ae233594e263522
Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436740
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
dart2bytecode can optionally add source position information
(including line starts) to the generated bytecode
(when '--bytecode-options=source-positions' flag is specified).
If bytecode has source positions, they are now shown in stack traces
involving interpreter frames.
TEST=ci
Change-Id: I1ae3326bac21201040be32c712514e71e96f51e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433760
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
* Never unbox fields loaded from bytecode as interpreter works with
boxed fields only.
* Ensure classes are allocate-finalized in AllocateObject
runtime entry as interpreter may allocate instances of certain
built-in classes (such as _Closure, _Double etc) without prior
allocate-finalization.
* Fix type arguments vector in constant instances when class doesn't
have type parameters but extends a generic class (so its instances
have type arguments vector).
TEST=ci
Change-Id: I488287f84572a79ca7f1fddbd53aed1c3a038cea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412981
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
When creating function types, VM takes number of parent function type
arguments into account. So function types with distinct number of
parent function type arguments should not be merged in the bytecode
object table and should be represented as distinct types.
TEST=language/mixin/type_parameter_inference_test
Fixes https://github.com/dart-lang/sdk/issues/59633
Change-Id: I9c8b0923c52b1b95628ff8daa3bbfa135c559912
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398500
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
* Switch UInt32 from big-endian to little-endian encoding.
* Reorder object kinds, constant tags, type tags and constant pool tags.
* Reorder field and function flags.
* Cleanup yield point marker from source positions.
TEST=ci
Change-Id: I05ee940b6393a478831af11ac93fee9ec1441c4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384040
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
* Make dynamic module entry point fully compatible to script main
function (allow taking optional parameters and up to 2 arguments).
* Fix reading of function types within generic members.
* Add crashing tests to status files to avoid generation of
core dumps on the bots.
TEST=ci (vm-aot-dyn-linux-debug-x64)
Change-Id: Ibe8651ca13734101f2df2c8634f70ebf421dccef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382640
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
When reading function types from bytecode, number of implicit
parameters should be set in the FunctionType.
Capture variable holding a local function when local function
invocation happens from a different function scope.
Also remove debug prints from bytecode reader.
TEST=corelib/list_for_each_test
TEST=language/closure/closure6_test
Change-Id: I69c92ba2749509a24d13e8b2a10c5dea76973a56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381081
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>