Commit graph

47896 commits

Author SHA1 Message Date
Alexander Aprelev 8cd713bed3 Introduce dart_host_toolchain argument for generate_patch_sdk.gni. This allows for Flutter build to make sure that host_toolchain used for patched_sdk generation word size matches target platform.
Flutter Dart in product configuration doesn't allow --checked option. So remove '--checked' from invocation.

R=rmacnak@google.com

BUG:https://github.com/flutter/flutter/issues/10841
Review-Url: https://codereview.chromium.org/2944103003 .
2017-06-22 12:41:31 -07:00
Paul Berry dd0a00f581 Infer the return types of local functions where appropriate.
Note that we do this in order to be consistent with type inference of
function expressions.  See https://codereview.chromium.org/2209293002.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2950213002 .
2017-06-22 12:17:10 -07:00
Brian Wilkerson ec8505fc79 Fix hints and clean-up obsolete comment syntax (TBR)
Review-Url: https://codereview.chromium.org/2952233002 .
2017-06-22 10:59:26 -07:00
Siva Chandra 8b40507be3 Reland "Load service isolate from a .dill file."
This reverts commit e90aa9cb5f.

Because of 2883d7f416, it is expected that
this change will do better on the bots.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2952913002 .
2017-06-22 10:10:45 -07:00
Devon Carew ae80af3abb Add a missing comma.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2949243002 .
2017-06-22 09:58:52 -07:00
Ryan Macnak bcb4fcfa11 [vm-service] Encode ticks directly as integers, since they are expect to stay in JS integer range.
Fixes #29957

R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/2951803004 .
2017-06-22 09:50:36 -07:00
Ryan Macnak 1daac1c651 [vm-service] Use consistent success response for _requestHeapSnapshot.
Fixes #29956

R=cbernaschina@google.com

Review-Url: https://codereview.chromium.org/2951903002 .
2017-06-22 09:47:07 -07:00
William Hesse 5aef1e640b Update browser statuses for co19 roll
BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2951273003 .
2017-06-22 18:14:47 +02:00
Zachary Anderson ac16656161 Remove MIPS support
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00
Brian Wilkerson a420a1fbb5 Remove more dead code from analysis server
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2949103003 .
2017-06-22 08:21:03 -07:00
Brian Wilkerson e28064f405 Restore partial analysis of analysis options files
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2946313003 .
2017-06-22 08:00:50 -07:00
Martin Kustermann ca6c60f447 More status file updates after co19 roll
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2953813002 .
2017-06-22 16:00:52 +02:00
danrubel ebdc0eda11 add Parser.withoutFasta constructor
This renames an existing private Parser constructor as a short term fix
so that the angular plugin can extend the Parser.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2952113002 .
2017-06-22 09:41:46 -04:00
Martin Kustermann 42e2ae40e8 Update status file for dartk-checked (status files are out-dated due to builder being on FYI)
Closes https://github.com/dart-lang/sdk/issues/29225

R=jensj@google.com

Review-Url: https://codereview.chromium.org/2948153005 .
2017-06-22 15:36:30 +02:00
Erik Corry 8378b8fdbf VM: Reland Inline instance object hash code into object header on 64bit.
Inline instance object hash code into object header on 64 bit.

64 bit objects have 32 bits of free space in the header word.
This is used for the hash code in string objects. We take it
for the default hash code on all objects that don't override
the hashCode getter.

This is both faster and a memory reduction. Eg it makes the
MegaHashCode part of the Megamorphic benchmark 6 times faster.

This is a reland of https://codereview.chromium.org/2912863006/
It fixes issues with the 32 bit compare-swap instruction on
ARM64 and fixes a fragile tree shaking test that is sensitive
to which private methods are in the core libraries.

R=kustermann@google.com, vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2954453002 .
2017-06-22 14:56:24 +02:00
William Hesse 3078734ff7 Correct merge errors in co19 roll
This corrects merge errors found in the commit of
https://codereview.chromium.org/2954443002/

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2948153004 .
2017-06-22 13:47:43 +02:00
Peter von der Ahé 94a44e0290 Refactor parseType in preparation for bigger changes.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2951463002 .
2017-06-22 12:47:53 +02:00
William Hesse 232684aac0 Update co19 to revision dec2b67aaab3bb7339b9764049707e71e601da3d
BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2954443002 .
2017-06-22 11:46:13 +02:00
William Hesse d8ec6450d0 Fix compiler==none case in browser testing (Dartium case)
Error was introduced in https://codereview.chromium.org/2947473002/

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2950173004 .
2017-06-22 11:30:23 +02:00
Aske Simon Christensen cec963f028 The current growth strategy for growable arrays allocates a backing array of size 2 at (empty) creation and doubles the size whenever the capacity is insufficient while adding elements.
I collected statistics for the sizes and capacities of growable arrays which are promoted to old-space or survive an old-space gc when running dart2js and Fasta. For these applications, the vast majority of arrays stay empty. More than half of the total object size of promoted backing arrays is backing for empty growable arrays.

Furthermore, since the overhead for an array is 3 words (header, type parameters and length), and object sizes are rounded up to an even number of words, we waste one word for all even-sized arrays.

This CL changes the growth strategy so that empty growable arrays are created with a shared, zero-sized array as backing, avoiding the allocation of a backing array if no elements are added. When the array needs to grow, it starts out at 3 and grows to double size plus one each time: 7, 15, 31, ...

A few places in the VM code need to handle these shared, zero-sized arrays specially. In particular, the Array::MakeArray function needs to allocate a new, empty array if its result is to be returned to Dart code.

Benchmarks suggest that the change improves memory usage by a few percent overall and does not significantly affect run time.

BUG=
R=erikcorry@google.com

Review-Url: https://codereview.chromium.org/2949803002 .
2017-06-22 10:51:54 +02:00
Erik Corry 847cd093ba Revert "Inline instance object hash code into object header on 64 bit."
This reverts commit ac6310d5f3 because
of test failures on real ARM64 hardware as opposed to the DartVM
simulator.  Original review: https://codereview.chromium.org/2912863006/

R=kustermann@google.com
BUG=

Review-Url: https://codereview.chromium.org/2953753002 .
2017-06-22 10:22:48 +02:00
Erik Corry ac6310d5f3 Inline instance object hash code into object header on 64 bit.
64 bit objects have 32 bits of free space in the header word.
This is used for the hash code in string objects. We take it
for the default hash code on all objects that don't override
the hashCode getter.

This is both faster and a memory reduction.  Eg it shaves about
70% off the running time of this microbenchmark:

List list = [];

class Thing {
  get hashCode => 42;
}

class Thing2 {
  get hashCode => 42;
}

class Thing3 { }
class Thing4 { }

main() {
  int sum = 103;
  for (int i = 0; i < 10000000; i++) {
    list = [];
    list.add("foo");
    list.add(123);
    list.add(1.23);
    list.add(new Object());
    list.add(new Thing());
    list.add(new Thing2());
    list.add(new Thing3());
    list.add(new Thing4());
    for (int j = 0; j < 2; j++) {
      sum ^= biz(list);
    }
  }
  print(sum);
}

int biz(List list) {
  int sum = 103;
  for (var x in list) {
    sum ^= x.hashCode;
  }
  return sum;
}

R=rmacnak@google.com, vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2912863006 .
2017-06-22 09:25:52 +02:00
Vijay Menon febded6052 Fix mocked operator methods
R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2949123002 .
2017-06-21 16:54:08 -07:00
Vijay Menon ecca1e1c2a Add FallThroughError patch
TBR=jensj@google.com,rnystrom@google.com

Review-Url: https://codereview.chromium.org/2953693002 .
2017-06-21 16:33:31 -07:00
Siva Chandra 2883d7f416 Remove API_TIMELINE_DURATION from Dart_ReadKernelBinary.
This allows Dart_ReadKernelBinary to be called before Dart_Initialize.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2951213002 .
2017-06-21 16:15:50 -07:00
Ryan Macnak 1eee6d8af3 Mostly revert "[fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries."
This reverts commit 9ab39ae099.

Keep removal of bad assert in loader.dart.  Keep using script snapshot in cross builds.

We expect to use a checked-in SDK in the Fuschia build instead.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2951133002 .
2017-06-21 15:19:21 -07:00
Paul Berry 945540c8bb Clean up duplicate type inference code for fetching parameter types.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2950193002 .
2017-06-21 14:57:43 -07:00
Régis Crelier eabcc23b33 Fix type argument finalization of some recursive generic types (fixes #29949).
Add regression test.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2952743003 .
2017-06-21 14:54:12 -07:00
Paul Berry 95aaba5085 In strong mode, properly infer the return types of setters as void
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2952873002 .
2017-06-21 14:51:40 -07:00
Paul Berry 348b42c98b Properly type infer for-in loops when the iterator type is a type parameter.
Also, fix a minor bug in variable declaration inference that was
preventing a local variable without an initializer from having its
type properly "inferred" as `dynamic`.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2949093002 .
2017-06-21 14:46:54 -07:00
Ben Konyi 86fdbde70a Added timeout parameter to RawSocket and Socket connect, which allows for the specification of a maximum time to wait for a valid connection to be established.
fixes #19120

R=zra@google.com

Review-Url: https://codereview.chromium.org/2946333002 .
2017-06-21 14:31:52 -07:00
Bob Nystrom 47aa77f139 Fix test.dart test.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2951163002 .
2017-06-21 14:09:21 -07:00
Ryan Macnak e1b31c6b4b [arm, arm64] Convince the Android toolchain not to bypass memcpy in Read/StoreUnaligned.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2953653002 .
2017-06-21 14:03:50 -07:00
Paul Berry b2c4b0ac0a Implement override-based type inference for instance methods.
Also, fix a rare infinite loop bug in analyzer exposed by one of the
tests.

R=brianwilkerson@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2946273002 .
2017-06-21 13:56:04 -07:00
Siva Chandra e90aa9cb5f Revert "Load service isolate from a .dill file."
This reverts commit b0c2a382ca as the
vm-kernel mac bots are unhappy.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2947243002 .
2017-06-21 13:46:17 -07:00
Bob Nystrom b452b39962 Basic support for dev_compiler in test.dart.
It can compile and run tests on Chrome. There are a lot of failing tests
that I (or the team) will need to triage, but I think at least basic
tests are working as expected.

There is code that could be cleaned up to more neatly factor how dart2js
and dartdevc are handled now that there are two separate compilers to
JS. There's also some redundant code between the path for testing
compile errors (enqueueStandardTest()) and the path for running a test
in the browser.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2947473002 .
2017-06-21 13:19:28 -07:00
Régis Crelier 1f5f3ed79f Set and keep parent function of signature functions.
Fix function type parameter comparison in type tests.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2951803005 .
2017-06-21 13:16:23 -07:00
Siva Chandra b0c2a382ca Load service isolate from a .dill file.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2925203002 .
2017-06-21 12:16:44 -07:00
Brian Wilkerson fcb23e967c Remove the unused class SingleContextManager
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2945313002 .
2017-06-21 11:21:25 -07:00
Emily Fortuna a721f87f99 More rearranging the deck chairs on the titanic.
According to the comments, only closures proper have free variables. Running tests support this. So let's move it into that branch.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2951923002 .
2017-06-21 10:47:54 -07:00
Brian Wilkerson 53e01faa43 Remove unused implementation of SearchEngine and rename the driver-based implementation
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2949823002 .
2017-06-21 09:33:51 -07:00
Brian Wilkerson 6e89075952 Disable finding plugin locations in the pubspec
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2947153002 .
2017-06-21 09:30:32 -07:00
Ryan Macnak dddd96cfd2 [arm] Avoid unaligned access fault in Int32x4/Float32x4::value().
R=zra@google.com

Review-Url: https://codereview.chromium.org/2947783002 .
2017-06-21 09:11:04 -07:00
Ryan Macnak 095ff155fd VM: Allow trailing comma in assert statements.
Issue #29959

R=regis@google.com

Review-Url: https://codereview.chromium.org/2946173002 .
2017-06-21 09:08:16 -07:00
Régis Crelier a62107cfaf Check for a passed-in type argument vector in the prolog of generic functions.
Do this in unoptimized code only, when --reify-generic-functions is specified.
This is still work in progress, and support in optimizer, in inliner, in DBC,
in kernel to ir, and other areas, will follow.
Many small fixes and added todos.

R=rmacnak@google.com, vegorov@google.com

Review-Url: https://codereview.chromium.org/2941643002 .
2017-06-21 09:02:16 -07:00
Brian Wilkerson ab8158f582 Revert status change after disabling problematic test
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2951773003 .
2017-06-21 08:45:12 -07:00
Janice Collins 517b0adbaf Update dartdoc to v0.13.0+1.
Also update markdown.  I have reviewed the changes from 0.11.2 to
0.11.3 and they LGTM.  With this change, dartdoc tests should
pass reliably from within the SDK.

BUG=
R=devoncarew@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/2950973002 .
2017-06-21 07:58:25 -07:00
Brian Wilkerson 6e8453ed94 Fix invalid initializing formal by adding a field
R=pquitslund@google.com

Review-Url: https://codereview.chromium.org/2946093002 .
2017-06-21 07:56:26 -07:00
Jens Johansen 80860e7fb7 [kernel] Stream kernel_reader
Mostly stream kernel_reader, i.e. the code that sets up the libraries,
classes, methods etc.

Mostly because it still takes a "Program" ast node, and looks at the
"Library" ast nodes to get their kernel offset in the binary.
Currently the scripts (containing breakable points etc) are also created
from the ast nodes.

The rest is now streamed.
This also means that more ast visitors could be deleted.

R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2931813002 .
2017-06-21 14:58:58 +02:00
Dmitry Stefantsov 8d583bde5b Revert "VM(RegExp): Allow OSR optimization of RegExp :matcher functions."
This reverts commit d87cc52c3e.

TBR=vegorov@google.com

Review-Url: https://codereview.chromium.org/2947143002 .
2017-06-21 14:17:21 +02:00