This reverts commit a515a0c256.
Reason for revert: There are still issues here, the flutter engine build for ios_debug again fails with this error:
ld: warning: arm64 function not 4-byte aligned: FfiTrampolineCall from obj/third_party/dart/runtime/vm/compiler/libdart_vm_jit.ffi_dbc_trampoline_arm64.o
ld: warning: arm64 function not 4-byte aligned: .loop from obj/third_party/dart/runtime/vm/compiler/libdart_vm_jit.ffi_dbc_trampoline_arm64.o
ld: warning: arm64 function not 4-byte aligned: .done from obj/third_party/dart/runtime/vm/compiler/libdart_vm_jit.ffi_dbc_trampoline_arm64.o
Undefined symbols for architecture arm64:
"_FfiTrampolineCall", referenced from:
dart::Simulator::Call(dart::Code const&, dart::Array const&, dart::Array const&, dart::Thread*) in libdart_vm_jit.simulator_dbc.o
ld: symbol(s) not found for architecture arm64
Original change's description:
> Reland "[vm/ffi] SimDBC on Arm64 Android"
>
> This reverts commit 0abff7b2bb and fixes the assembly file.
>
> Change-Id: Ibef58c932c843aebb4de227ac5fc7664d463173f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107746
> Auto-Submit: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
TBR=sjindel@google.com,asiva@google.com,dacoharkes@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ia5fd52180f7d9dfce588db361ce17dfb6f05254d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108206
Reviewed-by: Siva Annamalai <asiva@google.com>
Mostly just implementing existing interface LocalVariableTypeProvider,
and moving type promotion tests into a separate file.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: If864cb2c300f01a152f40c51cffa7f17028ad200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108080
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
These were probably added in Dart 1 because --checked carried a much
higher performance penalty. Today, most tests finish within 1 minute. If
certain configs need longer timeouts these should be specified in the
named configuration in test_matrix.json.
Change-Id: I91c456475971059297e16b9902dc16c2b23f9c9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107880
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
- Fix expectations for dart2js generic function types
- Split out Type canonicalization tests
- Do some partial checking for dart2js minification
Change-Id: Ifb6e38c1138311baf1a9852286e208c59aaa03fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107686
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
They don't do anything yet, but the syntax is supported and tested.
Change-Id: I67e3c72babd8e272b28b434dfb0cf6028f472676
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107568
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Moves a test that tries to allocate a too large amount of memory to a file which is not executed on asan.
Fixes: https://github.com/dart-lang/sdk/issues/37388
Change-Id: I91101c05be509b670ff9ba82ee25424554468ec5
Cq-Include-Trybots: luci.dart.try:vm-kernel-asan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107508
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Teagan Strickland <sstrickl@google.com>
This is a regression test for Dart 1.x behaviour on the pre-Kernel
front end.
TBR=fishythefish@google.com
Change-Id: I2cd9cb989ad70bd1765e74bb749c3f027668112b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107620
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Auto-Submit: Stephen Adams <sra@google.com>
Emit type literals in the constant pool using recipes.
Change-Id: Ia5ea024b444596844e94afbe2a34ce33e8557604
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107454
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
This CL changes the semantics of Pointer.allocate() to not do any range or overflow checks. This is consistent with the truncating behavior that the rest of the FFI has.
Fixes: https://github.com/dart-lang/sdk/issues/37250
Change-Id: Icc2b53e229cd6a2faae99c833ea5df372eb35b74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107503
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
This CL changes the static checks and runtime behavior of Pointer<T>.store<T>(T v) and T Pointer<T>.load() behavior to be consistent with the way Dart handles instances methods with generics. For more details see the issue.
Fixes: https://github.com/dart-lang/sdk/issues/37254
Change-Id: Ifcf89646f8e357d8592c38bb340942d522dac941
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107404
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
HInstanceEnvironment returns the type of an instance, which gives access to all
type variables of the supertypes. HInstanceEnvironment is currently lowered to a
call to 'instanceType', but we expect to lower to a field access in
most cases, or a constant type which can be folded into subsequent operations.
The type_builder builds a type environment for each type expression. The
environment is build from the instance type scope and the function type scopes.
GVN optimizations already introduce more sharing, but it might be advantageous to
pre-compute the environment and sink the operations instead.
Later we will pass multiple type arguments as tuples which will reduce the number
of operations, especially in factory constructors.
There are some tweaks removing types in rti.dart to avoid re-entrant code.
Change-Id: I004adf7a8a464e575b32d59476c888db46542fde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107460
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Previously, core snapshot was generated from AST
(because --enable-interpreter/--use-bytecode-compiler was not specified
when building core snapshot).
As the result, CL
https://dart.googlesource.com/sdk/+/da8cb470cc94830a98d49532e8d5d1a5b3d80f8b
which declared libraries in bytecode also removed bytecode entirely from
core snapshot in Dart SDK.
This CL enables bytecode by default if --bytecode argument is
specified for gn.py. This enables JIT compiler from bytecode
(interpreter is still disabled by default but can be enabled
using --enable-interpreter). Core snapshot and other
snapshots now have bytecode.
This change revealed a bunch of bugs which are fixed in this CL:
* _Closure fields were treated as unboxing candidates which triggered
assertion in LoadFieldTOS in interpreter.
* Several places should load class declarations if they are not loaded yet.
* Canonicalization of TypeRef objects which are not fully initialized
may cause duplicate entries in the hash table of canonical
TypeArguments. This triggers assertions when hash table is rehashed.
The solution is to avoid canonicalization of non-root recursive types
and recursive type arguments. Also, TypeRef::Canonicalize and
TypeRef::Hash are reverted to assert and work only if type was set.
* Native wrapper classes are eagerly stamped as type-finalized
which caused assertion failures when reading their class declarations
from bytecode.
* When building flow graph for FFI trampolines kernel offset of library
(which is now declared in bytecode) was queried. Added special case
to Function::KernelDataProgramOffset().
* In interpreter-only mode with simulator (e.g. SIMARM64) if simulator
is not called before code is interrupted with stack overflow check,
simulator returns get_sp() = 0, which was treated as stack overflow.
* test standalone_2/io/platform_resolved_executable_test.dart
spawns sub-process but it didn't pass VM options.
Change-Id: I81bc4f1a4c6725cfa246a435ebe5d8abe43abc67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107199
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
This CL is intentionally light on coverage, because we put most of
testing in analyzer unit / functional tests.
This CL intentionally does not use multi-tests, because they are
harder to read.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: Ib48cd02fc93a9d7f8cfa3803d0c51e96c013a99f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107197
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>