- 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>
Towards #37318
- appJit has been replaced by appJitk and is no longer.
- precompiled has been replaced by dartkp and is no longer used.
- For the precompiled runtime, default to dartkp.
- Remove status file references to these compiler options and normalize
status files.
Change-Id: I48728db13dc84737092a92314e2f474a9309f4d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106942
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Instead, we set a bit on force-optimized code so that deoptimization knows to skip it and exception
handling will execute catch-entry moves.
In addition we don't throw away deoptimization info for these codes, so that exception handling
works.
Bug: dartbug.com/37311
Change-Id: If5bcff41a98c0053c581648a9ee22b3302ceea04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106740
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Not done yet:
1. Switching all unit tests to `performFlowAnalysis()`.
2. Updating the error code and renaming tests.
3. Writing more language_2/ tests.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: I0936f2daa4ab1cd91edeaca3eef9544eced5b443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106982
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
There were compilation errors reported because of missing default
values for non-required optional non-nullable parameters.
R=brianwilkerson@google.com, danrubel@google.com
Change-Id: If0454988219a7fece317c86124a81a2a8ce8bea4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106963
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Also, standalone_2/causal_async_stack_test is updated to actually
test --causal_async_stacks after Dart 2 sync-async.
Change-Id: I28a7a281963828707461652f19494ff54bdd21c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106760
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
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>
Run `pkg/status_file/bin/normalize.dart` across all status files.
This should solve most presubmit warnings about "existing and possibly
new status file issues".
There are remaining issues in pkg/front_end/testcases/strong.status and
pkg/front_end/testcases/text_serialization.status which will need to be
fixed manually.
Change-Id: Iceae8992c4907442481590d75c1b0a84ce29521b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106726
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>