Commit graph

43340 commits

Author SHA1 Message Date
Jens Johansen
d591b59fcd Setup local var descriptors in kernel mode.
Closes https://github.com/dart-lang/sdk/issues/28054

R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2589733002 .
2017-01-03 10:23:31 +01:00
Jens Johansen
760c048798 Set correct script on fields in kernel.
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2583153002 .
2017-01-03 09:56:49 +01:00
William Hesse
1b6cff6585 Skip debugger test that leaves running Dart process on app-jit.
BUG=https://github.com/dart-lang/sdk/issues/28180
R=sortie@google.com

Review-Url: https://codereview.chromium.org/2611513002 .
2017-01-02 10:44:33 +01:00
Erik Corry
e0536c1f26 VM: x64: Use correct register in write barrier to avoid an extra loop iteration
R=regis@google.com
BUG=

Review-Url: https://codereview.chromium.org/2608903002 .
2017-01-02 09:28:05 +01:00
Michael Thomsen
55b62121b0 Update CHANGELOG.md (#28221) 2016-12-30 12:11:15 +01:00
Emily Fortuna
8d8f0c5578 Remove checked mode addition to sdk/bin/dart2js.
BUG=

Review-Url: https://codereview.chromium.org/2608803003 .
2016-12-29 15:46:33 -08:00
Emily Fortuna
9b7247e071 Some constructor quick fixes: implement redirecting constructors, work with finding default constructors (!).
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2607013003 .
2016-12-29 15:43:21 -08:00
Siva Annamalai
c78cb290df Adjust co19 status files for dartium.
Review-Url: https://codereview.chromium.org/2607223002 .
2016-12-29 15:12:22 -08:00
Siva Annamalai
d77809e15f Fix the following tsan errors:
1. Race updating the allocation stats for a class
WARNING: ThreadSanitizer: data race (pid=16346)
  Write of size 8 at 0x7bac00011930 by thread T4:
    #0 dart::AllocStats<long>::AddOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.h:56 (dart+0x000000769278)
    #1 dart::ClassTable::UpdateAllocatedOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:423 (dart+0x00000076923a)
    #2 dart::Object::Allocate(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:1880 (dart+0x00000092ddff)
    #3 dart::Array::New(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:21586 (dart+0x00000098d3fd)

  Previous write of size 8 at 0x7bac00011930 by thread T3:
    #0 dart::AllocStats<long>::AddOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.h:56 (dart+0x000000769278)
    #1 dart::ClassTable::UpdateAllocatedOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:423 (dart+0x00000076923a)
    #2 dart::Object::Allocate(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:1880 (dart+0x00000092ddff)
    #3 dart::Array::New(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:21586 (dart+0x00000098d3fd)
    #4 dart::Array::New(long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:21575 (dart+0x000000932f6d)

2. Race while updating c++ table entry into Object::builtin_vtables_
WARNING: ThreadSanitizer: data race (pid=16346)
  Atomic write of size 8 at 0x00000210c970 by main thread:
    #0 __tsan_atomic64_compare_exchange_val <null> (dart+0x0000005bad8a)
    #1 dart::AtomicOperations::CompareAndSwapWord(unsigned long*, unsigned long, unsigned long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/atomic_linux.h:63 (dart+0x00000074b744)
    #2 dart::ClassTable::Register(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:127 (dart+0x000000767cbc)
    #3 dart::Isolate::RegisterClass(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/isolate.cc:170 (dart+0x0000008e0046)
    #4 dart::RawClass* dart::Class::New<dart::Array>() /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:2037 (dart+0x000000931055)

  Previous read of size 8 at 0x00000210c970 by thread T3:
    #0 dart::ClassTable::Register(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:130 (dart+0x000000767cc9)
    #1 dart::Isolate::RegisterClass(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/isolate.cc:170 (dart+0x0000008e0046)
    #2 dart::RawClass* dart::Class::New<dart::Array>() /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:2037 (dart+0x000000931055)

BUG=
R=regis@google.com

Review-Url: https://codereview.chromium.org/2602123002 .
2016-12-29 13:20:58 -08:00
Siva Annamalai
c69cbb586f - report tear offs using the x#y syntax as a compilation error
(fixes issue 27520)
- adjust status files to reflect all tests which have the x#y syntax as
  compile time errors.

BUG=27520
R=regis@google.com

Review-Url: https://codereview.chromium.org/2607173002 .
2016-12-29 13:01:12 -08:00
Siva Annamalai
3db25d12bb Add assert in the precompiler tree shaker to ensure that no redirecting
constructors are added as we do not expect to see any of them.

BUG=
R=regis@google.com

Review-Url: https://codereview.chromium.org/2601903003 .
2016-12-29 10:32:32 -08:00
Siva Annamalai
625ead0329 Get rid of unused field has_compiled_code_ from the Isolate structure.
This gets rid of the racy data update being done in set_has_compiled_code
reported by TSAN.

BUG=
R=regis@google.com

Review-Url: https://codereview.chromium.org/2602913002 .
2016-12-29 10:08:09 -08:00
Florian Loitsch
968fcc5c62 Speed up _wouldBeTooManyUsers.
On my current dart-program, this reduced compilation time by a third.

$ # before applying the patch:
$ time sdk/bin/dart2js --packages=sdk/.packages --out=/tmp/foo.js /tmp/bug2.dart
Dart file (/tmp/bug2.dart) compiled to JavaScript: /tmp/foo.js

real    0m29.859s
user    0m33.931s
sys     0m1.530s

$ time sdk/bin/dart2js --packages=sdk/.packages --out=/tmp/foo.js /tmp/bug2.dart
Dart file (/tmp/bug2.dart) compiled to JavaScript: /tmp/foo.js

real    0m30.062s
user    0m34.012s
sys     0m1.558s

$ # ----------------- apply the patch.
$ git stash pop

$ time sdk/bin/dart2js --packages=sdk/.packages --out=/tmp/foo.js /tmp/bug2.dart
Dart file (/tmp/bug2.dart) compiled to JavaScript: /tmp/foo.js

real    0m20.782s
user    0m24.540s
sys     0m1.750s

$ time sdk/bin/dart2js --packages=sdk/.packages --out=/tmp/foo.js /tmp/bug2.dart
Dart file (/tmp/bug2.dart) compiled to JavaScript: /tmp/foo.js

real    0m21.042s
user    0m24.495s
sys     0m2.173s

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2602863002 .
2016-12-29 14:40:44 +01:00
Ben Konyi
e28b3e3c60 Revert "Added isolate + thread high watermark tracking to Observatory"
This reverts commit 0a1a534fd9.

BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2605933003 .
2016-12-28 16:49:47 -08:00
Ben Konyi
0a1a534fd9 Added isolate + thread high watermark tracking to Observatory
Added tracking of memory usage inside of threads. In addition, the max memory usage is kept track of using a high watermark for both the threads and the isolates. Isolate high watermark information is updated when a thread exits the isolate. The isolate high watermark consists of the sum of all thread high watermarks (including the high watermark of the exiting thread). High watermark information for both threads and isolates is now visible in the isolate view in the Observatory.

BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2608463002 .
2016-12-28 14:59:22 -08:00
Regis Crelier
3334c2402a Second try: Fix resolution and canonicalization of typedefs and function types
in preparation of the new typedef syntax.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2606993002 .
2016-12-28 14:53:23 -08:00
Sigmund Cherem
f06473e47f support constant juxtaposition.
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2604053002 .
2016-12-28 14:43:38 -08:00
Emily Fortuna
c8866ea65d Implement do-while in Kernel SSA.
BUG=https://github.com/dart-lang/sdk/issues/27394
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2607783002 .
2016-12-28 12:23:58 -08:00
Emily Fortuna
b4fcf784bd Make analyzer happy about CompilerImpl use of setupSdk.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2608533002 .
2016-12-28 11:33:18 -08:00
Sigmund Cherem
b8dbee257c Fix rasta unittests: now unit tests need to run the full compiler to use its
resolution queue.

Review-Url: https://codereview.chromium.org/2609433002 .
2016-12-28 09:32:29 -08:00
Sigmund Cherem
9c10363bd7 dart2js kernel: do less enqueuing.
Convert to kernel only classes and elements that have been resolved. For
anything else, pretend the member doesn't exist.

One exception: fields are added because an unused field might still be stored in
an initializer. This appears to only occur with constants in metadata. Creating the constant in code will not hit this issue.

This makes the compiler do work for the same set of elements that were included during resolution. Running all language tests with --dart2js-batch is now 2.5 min (down from 8 min)

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2604463002 .
2016-12-28 07:36:22 -08:00
Regis Crelier
4980107a96 Revert "Fix resolution and canonicalization of typedefs and function types..."
Review-Url: https://codereview.chromium.org/2600313002 .
2016-12-27 17:54:00 -08:00
Regis Crelier
291ed0c545 Fix resolution and canonicalization of typedefs and function types in
preparation of the new typedef syntax.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2592263004 .
2016-12-27 16:55:21 -08:00
Paul Berry
2805019038 Fix warnings in pkg/analyzer caused by be6a822daf
Dart's type promotion rules aren't sophisticated enough to understand
that (a is num && b is num) || (a is String && b is String) means that
it is safe to evaluate (a + b), so we have to split it into two
separate cases.

TBR=mfairhurst@google.com,scheglov@google.com

Review-Url: https://codereview.chromium.org/2605583002 .
2016-12-25 08:00:46 -08:00
Mike Fairhurst
be6a822daf Support + concatenation in constant expressions with strings
BUG=
R=paulberry@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2586363004 .
2016-12-23 11:26:19 -08:00
Florian Schneider
f995513880 Temorarily update status for two flaky tests
Filed issues #28198 and #28197.

Review-Url: https://codereview.chromium.org/2600543003 .
2016-12-23 14:05:59 +01:00
Florian Loitsch
76e600aea6 Fix type warning.
Review-Url: https://codereview.chromium.org/2597303003 .
2016-12-23 12:39:51 +01:00
Florian Loitsch
59ffd06f15 Update status file.
Review-Url: https://codereview.chromium.org/2598183002 .
2016-12-23 11:51:28 +01:00
Florian Schneider
7615e899be Cache hash code for closures.
Computing the hash code for closures is fairly expensive since
it involves the function name and signature strings.

This CL caches the hash code in the ClosureData object.

Fixes #28161.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2598623002 .
2016-12-23 11:39:23 +01:00
Dan Rubel
0863ac0b2c cmdline flags override analysis options in file
Update command line arguments processing so that any analysis options
flags specified on the command line (e.g. --supermixin) take precedence
over corresponding flags in the analysis_options.yaml file.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2598523003 .
2016-12-22 20:36:01 -05:00
Emily Fortuna
bf52b33b14 More kernel-ification of type variables passed around constructors.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2599213002 .
2016-12-22 16:34:42 -08:00
Sigmund Cherem
98a3c52575 mark a couple flaky tests
Review-Url: https://codereview.chromium.org/2600463004 .
2016-12-22 16:21:06 -08:00
Zachary Anderson
02447e5b80 Revert "GN: Make GN the default"
This reverts commit ca864e93a1.

Reverting for unforseen failures in dart2js testing.

Review-Url: https://codereview.chromium.org/2599673004 .
2016-12-22 13:43:01 -08:00
Zachary Anderson
ca864e93a1 GN: Make GN the default
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2592153002 .
2016-12-22 12:10:27 -08:00
Emily Fortuna
04d67056f7 Kernel-ify buildIsNode logic and add generics type variable checking in buildIsNode.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2588263004 .
2016-12-22 11:53:30 -08:00
Sigmund Cherem
7c3c297a8a dart2js rti fix: functions are subtypes of Object
closes https://github.com/dart-lang/sdk/issues/28045

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2599073002 .
2016-12-22 11:16:13 -08:00
Ben Konyi
638a53e715 Added entry for thread information in the isolate view of the observatory. Current information shown is: -List of active threads w/ their associated ID and task kinds -All zones active under a given thread, including their allocated capacity and current usage.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2600533002 .
2016-12-22 10:25:54 -08:00
Zachary Anderson
566ed7ff55 GN: Fix armsimdbc target. Add armsimdbc64
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2596333002 .
2016-12-22 10:24:24 -08:00
Florian Loitsch
5464ae2c93 Update status file.
Review-Url: https://codereview.chromium.org/2598993003 .
2016-12-22 18:47:24 +01:00
Florian Loitsch
411e0d60ac Update status file.
Review-Url: https://codereview.chromium.org/2600543002 .
2016-12-22 18:07:28 +01:00
Zachary Anderson
2ad9b921be Reland: Make File.create() fail when a directory exists at the same path
related #28170

Review-Url: https://codereview.chromium.org/2594413002 .
2016-12-22 08:12:53 -08:00
Johnni Winther
dd1a470dda No luck at status-bingo
Review-Url: https://codereview.chromium.org/2600503002 .
2016-12-22 15:27:52 +01:00
Johnni Winther
f6b5361adb Support for Null as bottom in dart2js
Closes #28026

R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2595363002 .
2016-12-22 15:01:33 +01:00
Kasper Lund
3ecfa62385 Widen marker. Flakiness is also present on simdbc.
TBR'ed.

R=whesse@google.com
BUG=

Review-Url: https://codereview.chromium.org/2597183002 .
2016-12-22 14:19:50 +01:00
Kasper Lund
b85f0906a4 Mark isContentEditable_A01_t01 as flaky on Safari.
TBR'ed.

R=sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2599743004 .
2016-12-22 14:01:20 +01:00
Kasper Lund
a424d65ecd Mark more service tests as flaky.
TBR'ed.

R=johnmccutchan@google.com
BUG=

Review-Url: https://codereview.chromium.org/2597983002 .
2016-12-22 12:49:58 +01:00
Kevin Millikin
96227c8bc3 Mark a Dartium test as failing
An HTML test has started failing due to a change in the VM's
implementation of typed data.

This is issue https://github.com/dart-lang/sdk/issues/28183.

R=kasperl@google.com
BUG=

Review-Url: https://codereview.chromium.org/2600483002 .
2016-12-22 12:30:01 +01:00
Johnni Winther
6f4c3c569f Refactor *WorldBuilder.registerDynamicUse
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2597663002 .
2016-12-22 11:50:07 +01:00
Kasper Lund
4e4e2eed4c Skip test that sometimes hangs on Mac.
TBR'ed.

R=asiva@google.com, zra@google.com
BUG=

Review-Url: https://codereview.chromium.org/2597973002 .
2016-12-22 11:49:39 +01:00
Martin Kustermann
b8d549e759 VM: Clear all *_to_retain maps when resetting the precompiler state
We often do work when adding entries to these maps but when entries already
exist we skip the work. When running the precompiler multiple times we should
clear the maps to ensure we always to the necessary work.

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2592083002 .
2016-12-22 11:47:41 +01:00