Commit graph

19330 commits

Author SHA1 Message Date
Stephen Adams
4babccd988 Fix non-web integer literals in corelib_2/bigint_test
Change-Id: I9cb66de2db293a033073ced7e6b9e3d19a1f3fb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108204
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-07-04 02:49:29 +00:00
Stephen Adams
738d9f9666 Avoid non-web integer literal in language2/list_test
Change-Id: I926dc7b9e9eabd098c4561ea95e1e3568522902f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107922
Commit-Queue: Stephen Adams <sra@google.com>
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-07-04 01:01:26 +00:00
Siva Annamalai
b5aeaa6796 Revert "Reland "[vm/ffi] SimDBC on Arm64 Android""
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>
2019-07-04 00:57:23 +00:00
Stephen Adams
02fe07bbd3 [dart2js] new-rti: Set Array instance type
TBR=fishythefish@google.com

Change-Id: I6268ae5c67ef0e3632e6c46cc7f17a72b2ca4964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108020
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-04 00:29:28 +00:00
Stephen Adams
327f5eb826 Fix for issue 37429
Fix by not tracking very large or negative sizes.

TBR=johnniwinther@google.com

Bug: 37429
Change-Id: Ibb3c7499f0afaec8cbb9398f780294ad0befeab2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108202
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-03 22:24:57 +00:00
Konstantin Shcheglov
2ea7e5513b Perform type promotion when NNBD, using flow analysis.
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>
2019-07-03 20:33:08 +00:00
Stephen Adams
c100308ba6 Repro for inferring arrays with out of range lengths
See https://github.com/dart-lang/sdk/issues/37429

We will change the bogus number(s) to something better when the bug is fixed.

TBR=johnniwinther@google.com

Change-Id: Ibcc085a14770acd61ac2bb596910254a6f2f3219
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108060
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-03 18:30:21 +00:00
Stephen Adams
052874e93e Avoid non-web integer literal in corelib_2/int_round_test
Also fix precedence bug.

Change-Id: I4b4746e0adfd0ff354d85519665ae23742f8703a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107838
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-03 16:20:07 +00:00
Alexander Thomas
744bb47361 [infra] Remove custom timeouts for dart2js compiler config
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>
2019-07-03 12:48:47 +00:00
Samir Jindel
fc6cb0ac21 [vm/ffi] Revamp struct representation in FFI.
See dartbug.com/37229 for details.

Change-Id: I63490e41c512ffc9312803985a6f6d4be1586c0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101291
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-07-02 23:12:13 +00:00
Stephen Adams
1f02c10b9a Update language_2/const_map4_test for type inference
Change-Id: Id81d974b0889e7c469ed40c85955f9b18265c634
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107927
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-02 19:23:18 +00:00
asiva
182a59cebb Skip all tests that use spawnUri when running in simulator mode as it makes no sense to run the CFE on the simulator.
Change-Id: Ie3457e67fe4ddb3170bf4654effdc5b21dff2450
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107942
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-07-02 17:32:23 +00:00
asiva
585794ab75 Fix status file line.
Change-Id: Idf62118cda425ea0e56439dd78515a1e9de4d2bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107940
Auto-Submit: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-07-02 15:49:15 +00:00
asiva
4a69ef4a50 Skip all spawnURI tests for the simulator architectures as these tests involve invoking the front end for compilation which would mean the front end has to run in simulated mode.
Change-Id: Idce29ff924fb88c909e0faf2dc1107506659dc6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107832
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-07-02 15:06:37 +00:00
Stephen Adams
822de210b5 fix branch_canonicalization_test
Change-Id: Icd26e9edf3dbf513c614743a97c696ed88df00db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107570
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-07-02 06:15:02 +00:00
Stephen Adams
90c88d984e Fix large integer literals in dart2js_extra/round_constant_folding_test
Change-Id: Idf09515e7d31c1e778c8fa99c94d40e9939d286f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107831
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-02 00:14:40 +00:00
Stephen Adams
1db0b4436c [dart2js] new-rti: Implement type bounds check
TBR=fishythefish@google.com

Change-Id: Id6978b8453de639fa403436487edb849e4074206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107681
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-01 20:52:59 +00:00
Stephen Adams
ca4b6e533a [dart2js] new-rti: Implement basic is-test
Also add a few more type literal tests.

TBR=fishythefish@google.co,

Change-Id: Iab5ca4a5f8d224f67deaf1fe391e17ece46bde59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107600
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-07-01 19:12:20 +00:00
Lorenz Nickel
79e478e50e Fixed some links
**I fixed some links and some other minor flaws.**

I also found the following outdated links, which I didn't fix:

- [This link](https://github.com/dart-lang/pool/tree/zone.strong) in [this file](https://github.com/dart-lang/sdk/blob/master/docs/newsletter/20170728.md) (didn't fix because don't know new location and this is some sort of archive so the link should probably stay the original)
- [This link](https://www.dartlang.org/tools/analyzer) in [this file](https://github.com/dart-lang/sdk/blob/master/pkg/analyzer_cli/lib/src/options.dart) (didn't fix since the link is still working, it just gets redirected and the link is part of the programm, I don't want to break anything by changing it, all other links are in comments)
- [This link](https://github.com/domokit/mojo/issues/728) in [this file](https://github.com/dart-lang/sdk/blob/master/build/config/compiler/BUILD.gn) (didn't fix since probably has no new location and is part of TODO, which I don't want to change)

While doing all this I also noticed that [these tests](https://github.com/dart-lang/sdk/tree/master/tests/compiler/dart2js_extra) contain a lot of other inconsistencies in their comments and the location of the import-statements (I only fixed one which was not link-related), could be target of another PR.

Closes #36927
https://github.com/dart-lang/sdk/pull/36927

GitOrigin-RevId: 71d05d0b52d8ec5b92d077a070e066d1fdd4bbfa
Change-Id: Ide4b2424fccad8ae2e06c788efd4443dc0de997b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102222
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-07-01 16:21:41 +00:00
Daco Harkes
a515a0c256 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>
2019-07-01 13:55:02 +00:00
Stephen Adams
000cf0560c clean up type_literal_test
TBR=leafp@google.com

Change-Id: Id8eebf4893103b187e981ccaf6c671ccdf659824
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107690
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-06-29 14:44:21 +00:00
Stephen Adams
0f20911022 Improve type_literal_test
- 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>
2019-06-29 06:36:36 +00:00
Robert Nystrom
13b470ac46 Parse error expectations in tests.
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>
2019-06-29 00:54:11 +00:00
Siva Annamalai
0abff7b2bb Revert "[vm/ffi] SimDBC on Arm64 Android"
This reverts commit 9e3b44b299.

Reason for revert: Breaks the Mac iOS Flutter Engine build
../../third_party/dart/runtime/vm/compiler/ffi_dbc_trampoline_arm64.S:5:1: error: unknown directive
.type FfiTrampolineCall, %function

Original change's description:
> [vm/ffi] SimDBC on Arm64 Android
> 
> Bug: https://github.com/dart-lang/sdk/issues/35773
> 
> Change-Id: I6f1f85239b0ffe5c310b9aeea4a4edcd97362bca
> Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, app-kernel-linux-debug-x64-try, vm-kernel-linux-debug-simdbc64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-reload-mac-debug-simdbc64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104565
> Reviewed-by: Samir Jindel <sjindel@google.com>
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Commit-Queue: Daco Harkes <dacoharkes@google.com>

TBR=sjindel@google.com,dacoharkes@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/35773
Change-Id: Ibc968bb2077f66da70a0034b45908e8d24e822f2
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, app-kernel-linux-debug-x64-try, vm-kernel-linux-debug-simdbc64-try, vm-kernel-mac-debug-simdbc64-try, vm-kernel-reload-mac-debug-simdbc64-try, vm-kernel-linux-debug-ia32-try, vm-dartkb-linux-debug-simarm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107700
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-06-28 22:38:51 +00:00
Daco Harkes
9ae79e26bc [vm/ffi] Make overflow checks consistent - fix asan
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>
2019-06-28 09:37:35 +00:00
Stephen Adams
4ae7e2e088 Remove useless dart2js_extra test
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>
2019-06-28 04:59:53 +00:00
Stephen Adams
062df390e1 Remove obsolete dart2js_extra/typed_locals_test.dart
Change-Id: Ife035eccde6754e11d83ff9be0965bd6da735327
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107541
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-06-28 01:20:13 +00:00
Samir Jindel
db3135ab9d [vm/ffi] Fix multitests in function_callbacks_test and update raw_object_fields.cc
Change-Id: Idb969f9d3cdd58fde02e1e9fab5cbfdf7c09f1ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107507
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-06-27 21:44:42 +00:00
Alexander Markov
1eb113ba27 [vm/bytecode] Support native extensions
Change-Id: I224f740db674e20d643191605d0a7463bf85d39f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107451
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-06-27 20:24:25 +00:00
Samir Jindel
496345e2e1 [vm/ffi] Update exception behavior of FFI callbacks and fix callbacks returning void
Issues dartbug.com/36856 and dartbug.com/37301

Change-Id: I96595b0781a3a6ddf73bba5595ed5c1aa08be257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106352
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-06-27 18:26:27 +00:00
Stephen Adams
c6f708d2bf [dart2js] new-rti: Implement type literals
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>
2019-06-27 16:39:36 +00:00
Daco Harkes
04c984ce3f [vm/ffi] Make overflow checks consistent
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>
2019-06-27 14:26:33 +00:00
Daco Harkes
3cce6fc8d6 [vm/ffi] Fix direct interaction with Pointer<Native>
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>
2019-06-27 13:14:11 +00:00
Lasse R.H. Nielsen
9edecbc803 Add test checking that const contexts are not applied where they shouldn't.
Change-Id: I39782577b7555dc63311531ca17f61f8deec5b4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98854
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2019-06-27 12:47:31 +00:00
Todd Volkert
ddfde57069 Update File.openRead to return Stream<Uint8List>
Bug: https://github.com/dart-lang/sdk/issues/36900
Change-Id: Ib2e417f4baa0048e2d4c2156c250d0cf454fdf87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104523
Commit-Queue: Todd Volkert <tvolkert@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-06-27 00:22:17 +00:00
Todd Volkert
c92af46433 Update HttpRequest and HttpClientResponse to be Stream<Uint8List>
Bug: https://github.com/dart-lang/sdk/issues/36900
Change-Id: I1306b2df7c789597e49d2033b660a3ea62d6c1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104525
Commit-Queue: Todd Volkert <tvolkert@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-06-27 00:21:07 +00:00
Vijay Menon
74643f65c2 [dartdevc] add unit test for subtyping op
Change-Id: I704e7b566fe76fa320c68eadd89611517c3641af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107446
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Vijay Menon <vsm@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-06-26 21:42:47 +00:00
Stephen Adams
f5892dafe6 [dart2js] new-rti: bindings
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>
2019-06-26 21:11:27 +00:00
Alexander Markov
7b50b7a8e6 [vm/bytecode] Bootstrapping VM from bytecode
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>
2019-06-26 18:25:26 +00:00
Daco Harkes
9e3b44b299 [vm/ffi] SimDBC on Arm64 Android
Bug: https://github.com/dart-lang/sdk/issues/35773

Change-Id: I6f1f85239b0ffe5c310b9aeea4a4edcd97362bca
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, app-kernel-linux-debug-x64-try, vm-kernel-linux-debug-simdbc64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-reload-mac-debug-simdbc64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104565
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-06-26 10:43:45 +00:00
Daco Harkes
603293f92a [vm/ffi] Regression test for dartbug.com/37254
Issue: https://github.com/dart-lang/sdk/issues/37254

Change-Id: Ic8ede0f8b7a6de0a6862ef8748a7330232950239
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107281
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-06-26 09:24:25 +00:00
Mayank Patke
7b39dede0e [dart2js] Define canonical recipes in terms of recipe_syntax.
Change-Id: I4e5e4fea81dbef9bf0d2994d8dcbec23a4f1fb01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107309
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-06-25 22:59:24 +00:00
Mayank Patke
069d76a58e [dart2js] Split up RTI subtype tests.
Change-Id: Id0bc61d295edfc25709aa4ff1bf9fa3c9bde5691
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107221
Reviewed-by: Stephen Adams <sra@google.com>
2019-06-25 22:59:24 +00:00
Mayank Patke
9b7bcfd1ce [dart2js] Support Future/FutureOr in RTI.
Change-Id: Ib0d849947d023a421d682061920faac8e6d7d352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107220
Reviewed-by: Stephen Adams <sra@google.com>
2019-06-25 22:59:24 +00:00
Konstantin Shcheglov
177f543fa8 Add language_2 tests covering some cases of definite assignment.
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>
2019-06-25 20:43:24 +00:00
Konstantin Shcheglov
1f992408c8 Report NOT_INITIALIZED_NON_NULLABLE_STATIC_FIELD.
Change-Id: I0e2b46df212d2534498a181b36066cd05f635700
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107260
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-25 17:41:22 +00:00
Dmitry Stefantsov
5948a2419f Update status files after CL 100580
Change-Id: I01efd49885e4c8cca81e2521cbcd45f1a79ba035
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100849
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-06-25 08:02:46 +00:00
Ryan Macnak
5c1d5444d6 [vm, bytecode] Fix some source position discrepancies.
Fix most cases of accessing metadata; parameter annotations still missing.

Change-Id: Ie78c3d817a86a656548cdc5775f837250a710095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106967
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-06-25 00:57:26 +00:00
Konstantin Shcheglov
bc9a6a74e0 Rename the error code for not assigned potentially non-nullable local variable.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Id377fc7693975137c72593fa76dd50df6ef1d5db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107189
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-24 21:05:49 +00:00
Mayank Patke
637cae2486 [dart2js] Add ability to check if RTIs are Object, Function, or Null.
Change-Id: Ia893c688fa619a87fd9ab97cf881f35763a48bdf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107080
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-06-24 20:36:59 +00:00