Commit Graph

15405 Commits

Author SHA1 Message Date
Martin Kustermann 832668ff6c Reland "[Infra] Let run_vm_tests --list output a test expectation marker"
Due to not having support for __VA_OPT__ yet the CL introduces a new
wet of macros ..._WITH_EXPECTATIONS() which can be given an expectation
marker.

Change-Id: I33812937f1b226fa89b3ab17a8a3483914abf2e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100643
Reviewed-by: Stevie Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-04-26 12:15:19 +00:00
Martin Kustermann 119f937418 [vm/compiler] Make StoreIndexedInstr take unboxed values and make LoadIndexedInstr produce unboxed values
Currently the LoadIndexedInstr will mostly box resulting values which
might be untagged right after it to do binary int64 arithmetic on the
values.

Similarly StoreIndexedInstr takes only boxed values as inputs. Though
tight code using int64s will need to box just so the StoreIndexedInstr
unboxes it again.

To avoid the extra tagging/untagging we make the load return unboxed
values which can be optionally tagged afterwards if need be.

Issue https://github.com/dart-lang/sdk/issues/35154

Change-Id: I7e82107c2047e41699854e1534934a7cb9da691d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99149
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-04-26 10:34:19 +00:00
Daco Harkes a23def41f9 [vm/dbc] Support UnboxedWidthExtender on DBC
Change-Id: If6446665f65c0b39dc3a0496c85f367b7738d79a
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-simdbc64-try, vm-kernel-linux-release-simdbc64-try, vm-kernel-mac-debug-simdbc64-try, vm-kernel-mac-release-simdbc64-try, vm-kernel-reload-mac-debug-simdbc64-try, vm-kernel-reload-mac-release-simdbc64-try, vm-kernel-linux-debug-ia32-try, vm-dartkb-linux-debug-simarm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100541
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-04-26 07:21:28 +00:00
Aart Bik 7adad2a245 [dart/fuzzer] DartLibfuzzer README additions
More links, background, formatting

Change-Id: I5313cbbf30a6167a3533c9fd7a1fb4c31712cf49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100624
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-26 00:00:42 +00:00
Zichang Guo 33273b5b25 [vm] OperatingSystemVersion return Android OS version
OperatingSystemVersion on Android does not return OS version of Android.

Bug: https://github.com/dart-lang/sdk/issues/36625
Change-Id: Ia26bd5443b7eaf541f2c27c4e93d3c07a8613747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100567
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-04-25 23:08:43 +00:00
Aart Bik c5cdc4ed89 [dart/fuzzer] Add build rule to link Dart with libFuzzer
Rationale:
First step towards integrating libFuzzer with Dart.
The initial target function is proof-of-concept.


Change-Id: I21f6ebf70fec05719423fef61fa5a9609500dc95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96987
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-04-25 21:29:42 +00:00
Ryan Macnak 9a07ad88f4 [vm, irregexp] Cache the backtracking stack on the isolate to avoid memory leaks in jemalloc.
Bug: https://github.com/flutter/flutter/issues/29007
Change-Id: Ic08e6cdad087cb063350b0738a65f426e67864d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100500
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-04-25 20:08:52 +00:00
Aart Bik d0b236c319 [dart/fuzzer] restrict stmt depth and length
Rationale:
We have consistent failures with DBC reaching
the 64K constant limit. Although a true problem,
as this stage, it is not so useful to keep
DartFuzz nightly runs red constantly for this.
This CL reduces the length a bit, so that we
hit this restriction less often.

https://github.com/dart-lang/sdk/issues/36646
https://github.com/dart-lang/sdk/issues/36658

Change-Id: Ief2c7293b0159b798ee0426751899dc7fffd4f5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100464
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-25 17:17:20 +00:00
Ryan Macnak ccf7eac86d [vm, jit] Make unoptimized instance calls compatible with megamorphic calls.
This is preparation for switching the call's stub when polymorphism gets too high.

Bug: https://github.com/dart-lang/sdk/issues/26780
Bug: https://github.com/dart-lang/sdk/issues/29294
Bug: https://github.com/dart-lang/sdk/issues/36409
Change-Id: If601ea97a1942a567bee0847afeb3b4e9c11481a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99705
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-04-25 16:53:51 +00:00
Liam Appelbe 317a075d93 [vm] Fix DEGUG typo and a few other bugs it was hiding.
Bug: https://github.com/dart-lang/sdk/issues/36672
Change-Id: I553623e5ec2d378006f5b3d4e7af8f80ef9b7d72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99840
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-25 16:14:41 +00:00
Jason Simmons eeb7a92b21 Pass the authentication code when fetching timeline and CPU profile data
See https://github.com/flutter/flutter/issues/31565

Change-Id: I0e84df9539a8b25776b510148a7583294cf90c1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100521
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-25 15:49:51 +00:00
Martin Kustermann 76c6b86915 Revert "[Infra] Let run_vm_tests --list output a test expectation marker"
This reverts commit 7cb73d97d2.

Reason for revert: It caused windows build to fail (reason unknown):

c:\b\s\w\ir\cache\builder\sdk\runtime\vm\compiler\assembler\assembler_x64_test.cc(1097): error C3861: 'AssemblerTestGenerate_BitScanReverse': identifier not found
c:\b\s\w\ir\cache\builder\sdk\runtime\vm\compiler\assembler\assembler_x64_test.cc(5499): error C3861: 'AssemblerTestGenerate_bittest': identifier not found

Original change's description:
> [Infra] Let run_vm_tests --list output a test expectation marker
> 
> Due to not having support for __VA_OPT__ yet the CL introduces a new
> wet of macros ..._WITH_EXPECTATIONS() which can be given an expectation
> marker.
> 
> Change-Id: Icaac4672f04340fe4644d13a14c32704ba36daec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96940
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Jonas Termansen <sortie@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

TBR=sortie@google.com,kustermann@google.com,regis@google.com

Change-Id: Ica07ef5e7302e3d8e4b131427ff5ab20be8c6a63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100581
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-04-25 14:35:45 +00:00
Keerti Parthasarathy 9238e25305 Revert "[vm] Finish adding support for ECMAScript 2018 features."
This reverts commit 5ebb640a67.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [vm] Finish adding support for ECMAScript 2018 features.
> 
> This work pulls in v8 support for these features with
> appropriate changes for Dart and closes
> https://github.com/dart-lang/sdk/issues/34935.
> 
> This adds support for the following features:
> 
> * Interpreting patterns as Unicode patterns instead of
>   BMP patterns
> * the dotAll flag (`/s`) for changing the behavior
>   of '.' to also match line terminators
> * Escapes for character classes described by Unicode
>   property groups (e.g., \p{Greek} to match all Greek
>   characters, or \P{Greek} for all non-Greek characters).
> 
> The following TC39 proposals describe some of the added features:
> 
> * https://github.com/tc39/proposal-regexp-dotall-flag
> * https://github.com/tc39/proposal-regexp-unicode-property-escapes
> 
> These additional changes are included:
> 
> * Extends named capture group names to include the full
>   range of identifier characters supported by ECMAScript,
>   not just ASCII.
> * Changing the RegExp interface to return RegExpMatch
>   objects, not Match objects, so that downcasting is
>   not necessary to use named capture groups from Dart
> 
> **Note**: The changes to the RegExp interface are a
> breaking change for implementers of the RegExp interface.
> Current users of the RegExp interface (i.e., code using Dart
> RegExp objects) will not be affected.
> 
> Change-Id: I0709ed0a8d5db36680e32bbad585594857b9ace4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95651
> Commit-Queue: Stevie Strickland <sstrickl@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=lrn@google.com,kustermann@google.com,jmesserly@google.com,johnniwinther@google.com,sstrickl@google.com

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

Change-Id: I1eda0fee4fd9e94df095944049833a67b07277e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100560
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-25 14:29:51 +00:00
Martin Kustermann 7cb73d97d2 [Infra] Let run_vm_tests --list output a test expectation marker
Due to not having support for __VA_OPT__ yet the CL introduces a new
wet of macros ..._WITH_EXPECTATIONS() which can be given an expectation
marker.

Change-Id: Icaac4672f04340fe4644d13a14c32704ba36daec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96940
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-04-25 12:07:01 +00:00
Martin Kustermann a3c19d4ffc [vm/compiler] Move inlining/intrinsics pipeline passes to compiler_pass.h
This makes it easier to maintain since all of them are in one place.

Change-Id: If55a9fb4a703aee36889c3fbdb8dded9f6233cb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99467
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-04-25 10:55:40 +00:00
Ryan Macnak 3fd6fa4ff7 [vm] Fix errors compiling with GCC.
Change-Id: Ia3127ba9ef4ee1faf1f85a6eaa0dafd0cf187b2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99376
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-24 23:12:45 +00:00
Ryan Macnak 225516466f [vm, interpreter] noSuchMethod dispatchers as a bytecode.
Change-Id: I0e105a56b733322737b6f22a7641f7c6b8afac79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100283
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-24 22:58:35 +00:00
Aart Bik f7c67ee927 [dart/vm] Use EvenSRegisterOf() instead of unclear cast
https://github.com/dart-lang/sdk/issues/34472

Change-Id: Ia78a4a4d403dea8630e9ba6a2a5233117fcb90b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100441
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-24 20:13:15 +00:00
Ryan Macnak e7175ac2ed [vm, fuchsia] Consume specialized symbols for the Dart VM's profiler.
Bug: FL-238
Change-Id: Ie5e2786aeb47063ea1c534b2169b2547d6693a96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100200
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-24 19:53:35 +00:00
Aart Bik e6260f67b3 [dart/fuzzer] Remove hashCode from API table
Rationale:
Yields false dependences between 32-bit and 64-bit
implementations.

https://github.com/dart-lang/sdk/issues/36658

Change-Id: I61309628527cf859637643a943a68d8003873792
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100460
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-24 18:48:25 +00:00
Samir Jindel e429cba1ec [vm] Change FpuTMP to XMM15/XMM7 on X64/IA32.
Fixes https://github.com/dart-lang/sdk/issues/36655

It is inconvenient that XMM0 is FpuTMP currently on X64 because XMM0
is used for argument passing in most calling conventions.

Changed FpuTMP on IA32 for consistency.

Change-Id: I01d15f1a58938f97cb8037516f20e40209b5f80d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99680
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-04-24 18:15:25 +00:00
Martin Kustermann 663919e361 [vm] Free error if embedder failed to start service isolate
Closes https://github.com/dart-lang/sdk/issues/36727

Change-Id: Icc1cddaeacd0d679607bea41d1444ddf2b009841
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100360
Reviewed-by: Stevie Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-04-24 12:10:46 +00:00
Stevie Strickland 5ebb640a67 [vm] Finish adding support for ECMAScript 2018 features.
This work pulls in v8 support for these features with
appropriate changes for Dart and closes
https://github.com/dart-lang/sdk/issues/34935.

This adds support for the following features:

* Interpreting patterns as Unicode patterns instead of
  BMP patterns
* the dotAll flag (`/s`) for changing the behavior
  of '.' to also match line terminators
* Escapes for character classes described by Unicode
  property groups (e.g., \p{Greek} to match all Greek
  characters, or \P{Greek} for all non-Greek characters).

The following TC39 proposals describe some of the added features:

* https://github.com/tc39/proposal-regexp-dotall-flag
* https://github.com/tc39/proposal-regexp-unicode-property-escapes

These additional changes are included:

* Extends named capture group names to include the full
  range of identifier characters supported by ECMAScript,
  not just ASCII.
* Changing the RegExp interface to return RegExpMatch
  objects, not Match objects, so that downcasting is
  not necessary to use named capture groups from Dart

**Note**: The changes to the RegExp interface are a
breaking change for implementers of the RegExp interface.
Current users of the RegExp interface (i.e., code using Dart
RegExp objects) will not be affected.

Change-Id: I0709ed0a8d5db36680e32bbad585594857b9ace4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95651
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-04-24 09:24:16 +00:00
Aart Bik 2eb36e8879 [dart/vm] What's in a (register) name?
Rationale:
Under heavy register pressure, a Q register was
selected for which the corresponding D register
had no proper overlap with S registers, which
was required by integer division.

Test:
Real reproducer when use_integer_division=false.

Bug:
https://github.com/dart-lang/sdk/issues/36681
https://github.com/dart-lang/sdk/issues/34472

Change-Id: I54162f4d6aee6ef9827907d9e97f2a476e9cbe4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100272
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-04-24 00:21:55 +00:00
Alexander Markov d06121ea89 [vm/compiler] Remove AbortBackgroundCompilation from guard instructions
When generating code for guard instructions, EmitNativeCode() methods
were incorrectly checking if anything changed while compiling, by looking
into cloned copies of Field objects, which can't be changed by mutator.
Background compilation was aborted if those guards should not be
generated at all.

Change-Id: I00c397f71f8e7dc8b0150966004c964a78e4a6ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99821
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-04-23 23:50:45 +00:00
Zichang Guo 2298712d62 [vm] fix position of DebugStepCheck when building break statement in flowgraph
Debugger will retrieve the saved context object when looking for IsAtAsyncJump(). The saved context object does not match the context level if setting breakpoint on "break" statement.
It is because when flowgraph builds break statement, DebugStepCheck was put after context object was restored to its parent. Then activation frame got the parent context when pausing at breakpoint.

Bug: https://github.com/dart-lang/sdk/issues/36622
Change-Id: I07508eb42ab102f9697797ef15f914de8bd1af65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100087
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2019-04-23 19:59:15 +00:00
Ryan Macnak ab7e9500c7 [vm, arm64] Fix some assertions.
Change-Id: I6409013e09c607fd779dd86021053c909f20f833
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100281
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-23 19:27:35 +00:00
Ben Konyi 04e1b0d976 [ VM ] Updated standalone VM to display message about --disable-service-auth-codes when --help --verbose is provided.
Change-Id: I88d3215ccf567a8c965298b5c9c3f7604149e9f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100264
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-23 18:17:05 +00:00
Aart Bik dbfcb97fa5 [dart/vm]: sometimes a smi is just a smi
Rationale:
The IA32 codegen has the concept of "safe smis", which
can actually be larger "mints" that can be constructed
in a safe way (e.g. shifting). However, at a few places,
this caused confusion, since following code assumed
that such values can be casted to "smis" always.
This CL fixes that. Found with DartFuzz.

https://github.com/dart-lang/sdk/issues/36589

Change-Id: I6bf308897abfb0aad965c7fbaf8f374a1ba30d41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100089
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-23 16:39:02 +00:00
Jens Johansen a58aa6f705 Fix NoSuchMethodError in observatory when setting breakpoint via debugger console
Reproduction without this fix:
Create 2 files, test1.dart and test2.dart:

```
$ cat test1.dart
import "test2.dart";

main() {
  test();
  test();
}

$ cat test2.dart
test() {
  // blank line.
  print("hello");
}
```

Launch with observatory enabled and paused at start, e.g.
`out/ReleaseX64/dart --observe --pause-isolates-on-start test1.dart`

Set a breakpoint on the second (*not* the first!) call to `test()`.
Continue execution.
Now write `break test2.dart:2` into the debugger console and you will be
presented with a stack trace looking something like this:

```
Unexpected exception:

NoSuchMethodError: method not found: 'gi4'
Receiver: Instance of 'minified:hS'
Arguments: []

StackTrace:

main.dart.js 459:3      Object.n
main.dart.js 15752:9    hS.G
main.dart.js 15901:28   hS.gi4
main.dart.js 40703:10   GE.$1
main.dart.js 43127:29   Hz.$0
main.dart.js 43100:9    pN.lG
main.dart.js 43124:12   HA.$1
main.dart.js 43127:29   Hz.$0
main.dart.js 43100:9    pN.lG
main.dart.js 43124:12   HA.$1
===== asynchronous gap ===========================
main.dart.js 14033:115  LH.cG
main.dart.js 13585:17   qm.eB
main.dart.js 13571:3    qm.kC
main.dart.js 13870:3    cQ.aV
main.dart.js 13873:27   cQ.I
main.dart.js 40226:79   P.R
===== asynchronous gap ===========================
[...]
```

This CL fixes the issue by catching the NoSuchMethod
(it will succeed for UnresolvedSourceLocation for instance)
and then using the scriptref and token position on the
abstract class Location to get the actual line.

Change-Id: Id951e2727a5edb8ba52a65959c833dcbf923406c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98667
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-23 08:58:58 +00:00
Ryan Macnak 630058286f [build] Fix deps for dart_io.
Change-Id: If7d173e9f6d332273bb85e73f90673613d34a1d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99979
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-23 00:24:24 +00:00
Ryan Macnak 971f4845d7 [build] Remove last platform -> vm and bin -> vm dependencies. Fix some ODR violations.
Change some static_libraries to source_sets to make ODR violations link-time errors.

This is needed to enable (stop suppressing) -fvisibility=hidden in Fuchsia product builds.

Change-Id: I699cec8d4b516beab9cebf9db0a522a7ff99e004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99822
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-22 20:15:43 +00:00
Ryan Macnak dfa56c7031 [vm, interpreter] Invoke field as a bytecode.
Simplify invocation.

Fix missing AOT exclusion of Function::HasByteCode.

Change-Id: I71f698da3531a9f53d40fdaa5d77b25a9d1c9a59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100082
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-22 18:15:59 +00:00
Alexander Markov 449cdecda2 [vm/interpreter] Fix bytecode instruction formats in interpreter
Interpreter should use correct instructions formats to be able to
change instruction encoding in furture.

Change-Id: I1a096197cdf4d69e10a1a25fa2f2119daaf78627
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99922
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-04-22 17:04:29 +00:00
Ryan Macnak 3d1ca4ae39 Revert "[vm, interpreter] Invoke field as a bytecode."
This reverts commit c85631330d.

Reason for revert: precompilation build failure

Original change's description:
> [vm, interpreter] Invoke field as a bytecode.
> 
> Simplify invocation.
> 
> Change-Id: I2d605d5f2f17e0e98499a19b9d9b6059682100b5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99884
> Reviewed-by: Régis Crelier <regis@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>

TBR=rmacnak@google.com,alexmarkov@google.com,regis@google.com

Change-Id: If417cb83e55e392895cdbdd263757f3e877f5ee5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99961
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-19 23:38:24 +00:00
Ryan Macnak c85631330d [vm, interpreter] Invoke field as a bytecode.
Simplify invocation.

Change-Id: I2d605d5f2f17e0e98499a19b9d9b6059682100b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99884
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-04-19 23:05:07 +00:00
Zichang Guo cb4db33010 [vm/debugger] fix order of type arguments in debugger
Debugger will build array of type param(BuildParameters()) in an order that type param starts with type params of ancestor function and ends up with child function. But function with multiple type arguments is supposed to keep the same order instead of inserting reversely.

Bug: https://github.com/dart-lang/sdk/issues/35581
Change-Id: I861d8cf08ed90738dcaf18551eb1e5abd67067a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99721
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2019-04-19 21:53:21 +00:00
Zichang Guo 78340fdf82 [vm] Support ListInterfaces for android
Support ListInterfaces() for android. If android api level during build time
is greater than or equal to 24, it will use getifaddrs() from android ndk.
Since it didn't support until 24. Otherwise, use system call to query the
network interfaces.

Bug: https://github.com/dart-lang/sdk/issues/36449
Change-Id: I615b31b804b751382b775ad9c6af4411b123d5ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98949
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-04-19 16:38:44 +00:00
Ryan Macnak b352b5ffb7 [vm, jit] The hottest Smi ops are + < == not + - ==.
Bug: https://github.com/dart-lang/sdk/issues/36409
Change-Id: Id1a6a65b26c95fb3f56bf844943aa09cc4f13a2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99728
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-18 22:50:45 +00:00
Ben Konyi cf4444b803 Revert "[ VM / Service ] Temporarily disable VM service auth codes by default"
This reverts commit 98fc8ac7ff.

Change-Id: I4f9c1da8f216039017d954931d141fd267d71508
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99761
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-18 21:21:18 +00:00
Ryan Macnak 9d376de55a [vm] Remove code collection.
Code collection interacts badly with
 - warming up compiled code
 - retaining pre-compiled code
 - code coverage
 - hot reload (deopting to an old version of a function)

Change-Id: Id269a6c3281e577d4f600f0c158af9e62f6b49ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99722
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-18 20:12:09 +00:00
Ryan Macnak 503e20946c [vm] Start logging if shutdown takes too long.
Change-Id: I2280df660cfeefe600ed7d0323769efc84ba54e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99738
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-18 19:24:08 +00:00
Alexander Markov 73b917c014 [vm/compiler] Do not generate unnecessary field length guards
GuardFieldLengthInstr::EmitNativeCode aborts background compilation
if we're not tracking list length for a field
(guarded_list_length() == Field::kNoFixedLength).
I'm seeing a lot of aborted background compilations on a Flutter app with
the reason "GuardFieldLengthInstr: field state changed while compiling".

This CL avoids generating these useless (and harmful) GuardFieldLengthInstr
if not tracking list length for a field.

Change-Id: I2a083c5df35e89893c9e787bebe4e3e7d8177c83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99737
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-04-18 18:31:49 +00:00
Martin Kustermann 8093f73424 [vm/dbc] Add UNREACHABLE() stubs to simulator_dbc.cc in 32-bit mode to make 32-build work
Issue https://github.com/dart-lang/sdk/issues/36665

Change-Id: I3690bac0ad213ea1757a78a14e513ccd8967f92b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99741
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2019-04-18 10:33:28 +00:00
Ryan Macnak 6d91643073 [vm, interpreter] Handle closure case of invoke-field-dispatchers as bytecode.
This will appear to regress the "interp-only" mode on Golem because it will no longer cheat by inlining into a machine code version of the closure call method.

Bug: https://github.com/dart-lang/sdk/issues/36410
Change-Id: I5daa2cffb6d18b6dd2da61ce08d5bc90092a250a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99561
Reviewed-by: Régis Crelier <regis@google.com>
2019-04-17 21:28:51 +00:00
Ryan Macnak 38049f3cb6 [vm, interpreter] Handle implicit static getters as bytecode.
Handle bytecode without a function in stack trace collection.

Bug: https://github.com/dart-lang/sdk/issues/36410
Change-Id: I828fbc11fb0c7ad617ff7a31f44adb021f9b6edf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99378
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-04-17 19:48:37 +00:00
Zichang Guo 1eab04ed3f Reland "[VM-debugger] resolve column breakpoint tokenposition into a single value"
This is a reland of 2d1440b848

Original change's description:
> [VM-debugger] resolve column breakpoint tokenposition into a single value
> 
> The token positions of column breakpointlocation was the token position range of requested line.
> With column number given, the token position should be resolved into a single value. Therefore,
> FindInnermostClosure() can identify the closure precisely.
> 
> BUG= https://github.com/dart-lang/sdk/issues/35137
> 
> Change-Id: Ibbd273fcd85d49b441f2de7f3720e7889a6c1c22
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97341
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Zichang Guo <zichangguo@google.com>

Bug: https://github.com/dart-lang/sdk/issues/35137
Change-Id: I7b8f4a7ea266b4ad5c63d137cd256706885a7452
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99450
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-04-17 17:50:36 +00:00
Ryan Macnak ec27b09e68 [vm, service] Fix deferral of service extension invocation to not be mislead by other OOB messages.
This was the behavior intended in 7052bd6bed.

Bug: https://github.com/dart-lang/sdk/issues/24137
Bug: https://github.com/dart-lang/sdk/issues/36612
Change-Id: I2d0712d89ff45cd480580e73c4fd55ac4cf2ca59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99360
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2019-04-17 17:34:46 +00:00
Daco Harkes 1e30bb90dc [vm/dbc] Support unboxed Int64 on DBC
Note that this CL only implements the Box and Unbox instructions for 64 bit ints, but does not implement unboxed 64 bit int arithmetic.

Change-Id: I6205a900493ce526ef59d3e1f9c4887cae4d1f21
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-simdbc64-try, vm-kernel-linux-release-simdbc64-try, vm-kernel-mac-debug-simdbc64-try, vm-kernel-mac-release-simdbc64-try, vm-kernel-reload-mac-debug-simdbc64-try, vm-kernel-reload-mac-release-simdbc64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99025
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-04-17 16:41:06 +00:00
Martin Kustermann f0da03ca36 [vm/compiler] Do not include FPU registers on ARM if VFP is not supported
Closes https://github.com/dart-lang/sdk/issues/36636

Change-Id: I5a07edb12af8d012e9fcbdc058abb57102a56436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99462
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-04-17 09:28:46 +00:00