Commit graph

67383 commits

Author SHA1 Message Date
Brian Wilkerson
af671211ab Add more ffi related checks
There are still two checks that I'm aware of that are not being performed
(there are TODOs for them) and two diagnostics that need to be removed
because `Struct` will soon not take a type argument.

Change-Id: I17424a32225eeff7e3b2c0e0f36cfc6ccd45e0a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121640
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-14 18:36:25 +00:00
Ari Aye
70a7ef3f58 Implement pointer mixture network
Here we can see the mixture network is assigning probability mass
to a new, project-specific name by reference https://i.imgur.com/6Zbs2qf.png.

I also took this opportunity to decrease model size targeting 100M, in line
with our original size goals.

My initial strategy was to implement a separate pointer network
in https://dart-review.googlesource.com/c/sdk/+/117005 but having
a single network that can assign probability mass across local
references and vocabulary lexemes is better since

1) only one network and model file
2) no need to coalesce predictions from multiple models

Change-Id: I23cfc2ece61ce30bb69785149a5a6cf1604af18d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121461
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-14 18:25:56 +00:00
Brian Wilkerson
263bfd9635 Use relative URLs for navigation to enable publishing the output
Change-Id: I6948fb10ec44abbb87c72dfc3f1a7277ec1ee7c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-14 18:19:36 +00:00
Alexander Markov
3c3bd8d7c9 [vm,aot,bytecode] Support obfuscation
In order to support obfuscation, string constants are decoupled
from public names in bytecode (names are obfuscated, but string
constants aren't). List of protected names is written in a separate
section in bytecode component.

Obfuscator is extended to support getter and setter
names coming from bytecode.

Change-Id: I8e8d820d1a8b97e32e8ad1b064b827bdb017430b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121261
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-10-14 18:12:29 +00:00
Konstantin Shcheglov
dc0db066e6 Remove ChangeSet from engine.dart
Change-Id: I289c5edd0c3e52a873013f8c52d8202bf29cf3be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-14 17:45:56 +00:00
Konstantin Shcheglov
aeacf565ab Check for missing required arguments using parameter elements.
Bug: https://buganizer.corp.google.com/issues/140314870
Change-Id: I42a615fbd17af2b3d3b424f847a4b75463415377
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-14 17:40:36 +00:00
Ryan Macnak
b5bbc97566 Revert "[vm, linux] Try to attach names to all VirtualMemory allocations using memfd."
This reverts commit 48e93d3d3b.

Reason for revert: ~10% regression on Isolate.SendReceiveBytes benchmarks, likely heavy allocation and freeing of large heap pages

Original change's description:
> [vm, linux] Try to attach names to all VirtualMemory allocations using memfd.
>
> For example,
>
> $ cat /proc/<pid>/smaps
> ...
> 7fe527158000-7fe527be0000 rw-s 00000000 00:05 35765318                   /memfd:dart-profiler (deleted)
> 7fe527be0000-7fe527ea5000 rw-s 00000000 00:05 35765317                   /memfd:dart-timeline (deleted)
> 7fe528a40000-7fe528a51000 rw-s 00000000 00:05 35762832                   /memfd:dart-heap (deleted)
> ...
>
> Change-Id: I10452a1261cec26719ceadf569aadd864be5378e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120981
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

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

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

Change-Id: Ic839bd0ce67d8ac438916d6b4c626f0f7d6991d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121412
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-10-14 16:59:31 +00:00
Konstantin Shcheglov
6ad5c2e0b9 Combine elements building with TypeName(s) resolution.
This CL passes presubmit in google3.
https://test.corp.google.com/ui#id=OCL:273879967:BASE:274371532:1570918058929:7943e848

Change-Id: Icea75f6544dcdb01602ff3ef1a899bb59729c6a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120820
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-14 16:57:51 +00:00
Keerti Parthasarathy
6d468d1377 Add a script and target to run dartfix
Change-Id: I68df635359b898ef4b6054292f6523d81f46448a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121149
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-10-14 15:50:21 +00:00
Ben Konyi
85093bed12 [ dartfuzz ] Initial refactor of Dartfuzz
- Started cleaning up places where we emit matching parens/braces manually
- Started handling indentation in less places
- Started de-duping code
- Started using constants where possible

Output code is still logically and structurally the same, although it formats
differently.

Change-Id: I367c8629174139c7083f6a12b7221230d884e628
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120742
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-10-14 15:47:43 +00:00
Stephen Adams
892fcf2c45 Avoid constructing RegExp for every BigInt.tryParse
Change-Id: I323089a17b4fa167ac3d660f5313cc1e6873a994
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118681
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-10-14 14:04:11 +00:00
Daco Harkes
b4751d5e16 [vm/ffi] Pointer.asExternalTypedData to extension method - Fix Flutter
Fixes imports (the order of patch files is not defined, so the imports need to be equal in all files).

Change-Id: I2dc16f4930253b25c7ae6ab6b0699581f9e2dd46
Cq-Include-Trybots: luci.dart.try:flutter-engine-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121428
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-14 13:04:00 +00:00
Daco Harkes
91c6dc15de [vm/ffi] Pointer.asExternalTypedData to extension method
Issue: https://github.com/dart-lang/sdk/issues/38610

Change-Id: Ib07f50b23e3be2bce2d7b973c0f0196884397952
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121384
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-14 09:52:58 +00:00
Mark Egli
545a06b19e Fix typo in zone documentation.
Closes #38848
https://github.com/dart-lang/sdk/pull/38848

GitOrigin-RevId: 646ee0189aaa25aced290aff2134f70e920b5bb9
Change-Id: I76ca2106011fdc43c7ab0b1da0a2162e68d79243
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121413
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2019-10-12 21:28:25 +00:00
Paul Berry
1e3cbd4344 Migration: Add IndexExpression support to FixBuilder.
Change-Id: I870047d12304c70cfe89e64d4864cc1809b7e4ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121408
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry
5594981c2a Migration: add isCompound parameter to FixBuilder.visitAssignmentTarget.
When visiting an assignment target that is an index expression
(`x[y]`) we'll need to know whether we are doing a compound assignment
or not, because this will influence whether the type context for the
index expression (`y`) should come from `operator[]` or `operator[]=`.

So before adding index expression support to FixBuilder, let's add an
`isCompound` boolean to indicate whether the assignment context is a
compound assignment or not.

Change-Id: I26a41544e10ef9c9ba042c1d7862563bd9d18b68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121407
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry
13f6d8213b Migration: add FixBuilder support for prefix/postfix expressions.
Change-Id: I62a705af1c8d9944a417d074373aca4c93e99b6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121402
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry
0121a1fce1 Migration: finish EdgeBuilder support for prefix/postfix expressions.
A few changes here:

- Prefix expressions didn't support dynamic invocations.

- Prefix expressions didn't support generic types.

- Postfix expressions were handled incorrectly (we used the return
  type of operator+ for `x++`, whereas the type should have been the
  same as the type of `x`).

Change-Id: I35077b82a6e9c4e4f6ad8bb1264f5d725ec0d9a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121401
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry
d2f9e83861 Migration: integrate flow analysis of ?? into FixBuilder
Change-Id: I3d576c704ffd0b3b44fff0ceb442e355790ecb84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121342
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry
04d800af49 Migration: add fixBuilder support for throw and conditional expressions
Change-Id: Iea9bc71cb7f173340b7eb56f241985bd2c90f609
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121341
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry
4f4d1bdf10 Migration: Add if-statement and block-statement support to FixBuilder.
Change-Id: I3e3f0b3824a9a51b63f9ee8ffbe414415fc2b2e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121340
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry
27967490f6 Migration: add FixBuilder support for typed lists of expressions.
Change-Id: I30a36e9925fdd5a409b87a98962709de1ed3168b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121263
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry
14d4b93349 Migration: update FixBuilder to handle simple statements.
We now handle expression statements and variable declaration
statements where the variable type is an interface type.

Change-Id: I00f53a326495bcbeeba785b25c46abf1f3e9ab49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121260
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry
61790a17b6 Flow analysis: add support for non-null assertion operator.
Change-Id: I7a60944a4389b6f7c8e182d5c9b402fcbb05b624
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry
4e9220efdb Flow analysis: change the way parenthesized expressions are handled.
Instead of forcing the client to provide a way to de-parenthesize an
expression, the client informs flow analysis when a parenthesized
expression is encountered.  This reduces the runtime overhead to zero
for non-parenthesized expressions, and it saves the front end from
having to worry about support for parenthesized expressions (since its
internal representation doesn't care about parentheses).

Change-Id: I0bb6e91c87acaa05591e1b075da18700b11e4aae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121080
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Régis Crelier
5fad012d02 [gardening] Skip slow vm test in hot-reload mode.
Change-Id: Ib3bc25f3fe7c5261daa117aa1287aea4b98c84b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121415
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-10-11 23:39:29 +00:00
Mayank Patke
fe0b56fdd1 [dart2js] New RTI: Remove TODO from thrown string.
Change-Id: If3659d50d64a45c832bc2ed56b395f8a603bd351
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121464
Auto-Submit: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-10-11 23:19:19 +00:00
Aart Bik
6f9a9f083e [vm/compiler] push arguments assert in flow graph checker
Rationale:
Adds stricter asserts on push arguments to flow graph
checker and fixes various places where the environment
assumptions on push arguments were violated.

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

Change-Id: I30b827c6400daaa8597e7957bd71b5d91d729cd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120722
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-10-11 23:11:49 +00:00
Ryan Macnak
20dd7c88e9 [vm] Use VirtualMemory with a cache for small Zone::Segements.
tcmalloc and jemalloc have both been observed to hold onto lots of free'd zone segments (jemalloc to the point of causing OOM), so instead of using malloc to allocate segments, we allocate directly from mmap/zx_vmo_create/VirtualAlloc, and cache a small number of the normal sized segments.

flutter doctor at exit ("idle")
Process::MaxRSS()     261009408 -> 258756608 (-0.86%)
Process::CurrentRSS() 252932096 -> 205881344 (-18.6%)

Bug: https://github.com/dart-lang/sdk/issues/38820
Change-Id: I319069678b9d44383a9921ec03a963517991dd11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121264
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-10-11 22:25:23 +00:00
Aart Bik
cf60eb48b9 [vm/compiler] reduced regression test size
https://github.com/dart-lang/sdk/issues/38741

Change-Id: Ief99230c19dd55fb300f94049f320f276461c86c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121409
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-10-11 21:15:20 +00:00
Alexander Markov
8f679ab9f9 [vm,bytecode] Swap == operands in switch cases
For a switch statement

  switch(foo) {
    case c_1: ...
    ...
    case c_N: ...
  }

Bytecode was calling foo.operator==(c_i). This is less efficient than
c_i.operator==(foo), as c_i is a constant with a known actual type
and operator== can be always devirtualized and inlined.

Change-Id: I786ea193de1fa1830854602318e436f601296f5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121405
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-10-11 21:11:40 +00:00
Robert Nystrom
90ff37e011 Plumb the configuration's experiments flags through to tools.
Both a test file and now a test configuration can specify that
experiment flags should be enabled. Since they both can, passing those
to the tools is a little tricky because we need to merge the two
command line arguments. It's made worse by the fact that this corner of
test_runner is riddled with poorly factored code.

This doesn't fix the redundant code, but does merge and pass the flags
through. Right now, it parses them from the test file by looking for
them in the SharedOptions line, which is where they currently appear.

That's pretty hacky. Eventually, we should change these tests to use:

// Requirements=

Fixes #38386, #38387, #38388, and #38389.

Change-Id: I1aea1482b30b9ba19c427319f895822d81ee12ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121262
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-10-11 20:33:36 +00:00
Stephen Adams
a7d95d4755 [dart2js] Defer ground type recipes until assembly
Change-Id: I9f2ba6c0feec1600b3dbbf3828a4954b35608f9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120621
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-10-11 20:12:06 +00:00
Alexander Aprelev
5f198ae1c8 [vm/benchmarks] Add IsolateSpawn spawn latency and memory benchmarks.
The benchmark spawns an isolate that compiles hello world app with dart2js, measures time it takes for spawned isolate to get up and running, measures delta rss when isolate is spawned.

This also adds analysis_options.yaml that helps with keeping the code lint-free.

Change-Id: I5f1ffa9706766cd00bf1ea3fdad76957952de8a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119538
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-10-11 19:52:12 +00:00
jonahwilliams
a9e1e7e4fd Remove 'new' from frontend_server
Change-Id: I23afa1ab5d9e722f355eabaaa0491b3f08f261eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121404
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
2019-10-11 19:47:40 +00:00
Kallen Tu
b3df8aaa12 Change subtype checking with variance for assignments and methods.
Change-Id: I2594c8749ee445a02e06f82c65cd34a62fc77a29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120744
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-10-11 19:44:05 +00:00
Vyacheslav Egorov
46cef9bfdd [vm/compiler] Drop redundant initializing stores of null
Dart objects are allocated null-initialized so initializing stores of
null value can be removed from the graph.

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

Change-Id: I692398b67a5f9d27ebc6e6c90c68838c1135de4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121330
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-11 19:37:40 +00:00
Devon Carew
c54750fd8e [sdk] add a gn file for the JS dart:_interceptors library
Bug: https://github.com/flutter/flutter/issues/41649
Change-Id: I4b482dd6a20114d39aae705c1fc625c365aa0844
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121462
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-10-11 19:31:00 +00:00
Johnni Winther
42dcdf903c [cfe] Handle promoted type variables in getStaticType
Change-Id: I05a748ec800c7c18a52f8444ad030208ea14d268
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121325
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-10-11 19:04:48 +00:00
Vyacheslav Egorov
39e7da9ca4 [cfe] Fix ConstructorBuilder.prepareInitializers to refer to actual constructor.
Instead of referring to target constructor that is going to be patched.

Change-Id: Ic98146b69c9e5fbdcc13df86f3293f3d9d4462f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121328
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-11 18:44:18 +00:00
Kallen Tu
ff8c704e9b Clean up handleVarianceModifier error handling and move to endTypeVariable.
Change-Id: I526e41511f57b48010d52dbcb7f7d7feb79600da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120932
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-10-11 18:39:28 +00:00
Brian Wilkerson
a2e00066ff Add an error if a field in a struct class does not have a type annotation
Change-Id: Ie38354045f0b5d1d8a335c6bb2d14689c2b49d6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121460
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-11 18:11:58 +00:00
Jonas Termansen
35ae88e200 [infra] Fix build cursor when there're no more builds.
There is a case where the API returns a cursor for the next set of results,
but the next page of results is empty when requested and the builds array
is absent. This change adds support for that case and avoids a crash.

Change-Id: I56b419990617ea407c05abb561eeb969f49ecb5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121220
Reviewed-by: Alexander Thomas <athom@google.com>
2019-10-11 18:05:17 +00:00
Brian Wilkerson
3f80de6dc5 Generate errors rather than hints for ffi conformance checks
Change-Id: Icb3a3b393200ae7b2cd0d0b603472e90174c970b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121403
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-11 17:18:09 +00:00
Aart Bik
9515301418 [vm/compiler] fix bug on need for check
Rationale:
When the static class type does not match information found
in ICData, we require a check on a mismatch. However,
unused data should not be considered

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

Change-Id: If7717bfbce2f2a09014ce3e7cdcbf34816102b9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121141
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-10-11 16:45:52 +00:00
Daco Harkes
9f33e8da04 [vm/ffi] Pointer optimize indexed load and store
Follow up of https://dart-review.googlesource.com/c/sdk/+/117547

This gets rid of unnecessary allocations in hot loops with indexed loads and stores.

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

Change-Id: I37a4b1aba00084e465d47cce79bb9963e1afc104
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119645
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-11 15:54:01 +00:00
Samir Jindel
e1c159d5fe [vm/ffi] Add missing sharded library dependency to ffi/data_test.dart.
Change-Id: I399882d0911b3e5de86b752048a22e96d2415e3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121420
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-10-11 15:52:37 +00:00
Samir Jindel
4ee5ef9f10 [vm/ffi] Use Pointer<Null> as the type of nullptr.
Also clean up test/benchmark/sample code using nullptr and fix pubspec.yaml in the SQLite sample.

Fixes https://github.com/dart-lang/sdk/issues/37362

Change-Id: I6fa0522374af28020ef8f096ac22b23712aedb5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121122
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-11 14:39:47 +00:00
Michael Thomsen
e6a856a3b3 Update CHANGELOG.md with dart2native
Fixes https://github.com/dart-lang/sdk/issues/38768

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

GitOrigin-RevId: 233a7297f53f53fc0cc6823259ba8ddaf011879f
Change-Id: I54fa5f5f1da165a85751e3d7ce6d37950b685136
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121360
Reviewed-by: Clement Skau <cskau@google.com>
2019-10-11 14:21:04 +00:00
Jens Johansen
d374ff8cbc [parser] Allow parser test to add trace to output for easier debugging
With this, once can for instance run
out/ReleaseX64/dart pkg/front_end/test/parser_test.dart -DupdateExpectations=true -Dtrace=true -- parser_test/nnbd/nullCheckOnIndex
and from the output see where stuff was called, e.g.

beginFormalParameters((, MemberKind.TopLevelMethod) (package:front_end/src/fasta/parser/parser.dart:1227:14)

and

       parseGetterOrFormalParameters(f, f, false, MemberKind.TopLevelMethod) (package:front_end/src/fasta/parser/parser.dart:2484:13)
         parseFormalParameters(f, MemberKind.TopLevelMethod) (package:front_end/src/fasta/parser/parser.dart:1153:15)
           parseFormalParametersRest((, MemberKind.TopLevelMethod) (package:front_end/src/fasta/parser/parser.dart:1216:12)
             listener: beginFormalParameters((, MemberKind.TopLevelMethod) (package:front_end/src/fasta/parser/parser.dart:1227:14)

This output should obviouslys not be committed, but is great for debugging.

Change-Id: I42db55ff928bde783d652b6338b54e6dba1550db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121326
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-11 14:05:16 +00:00