Commit Graph

87 Commits

Author SHA1 Message Date
Stephen Adams 75f485d6d9 [dart2js] Fix for issue 33500
Fix check for whether to lower JSArray.add to Array.push.

Change-Id: I22149bf7d31442b8a4bba6b6431239f5f031e55b
Reviewed-on: https://dart-review.googlesource.com/61104
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-20 05:07:32 +00:00
Lasse R.H. Nielsen 973a1a0219 Remove uses of upper-case constants in remaining SDK code.
This includes Fasta, tools and observatory, so the checked-in SDK must
have the lower-case constants.

Change-Id: I8380ad041ad058f7d02ae19caccfecd434d13d75
Reviewed-on: https://dart-review.googlesource.com/50201
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-16 16:11:57 +00:00
Sigmund Cherem 07d2c9f287 Add server category for dart2js
Change-Id: I077da86aff4420aba1323e98d6cde08ac871f6f1
Reviewed-on: https://dart-review.googlesource.com/47721
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-23 00:40:55 +00:00
Peter von der Ahé 4f2bdff90b Rename Program to Component
Change-Id: I1a3cc03fba9783807fa637a9d42fdbad68ee7686
Reviewed-on: https://dart-review.googlesource.com/31040
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-03-15 12:22:23 +00:00
Peter von der Ahé 8a9956d4a7 [dart2js] Handle Windows file names correctly.
Closes https://github.com/dart-lang/sdk/issues/31899

Change-Id: I0577e9cd5bab7083df53ccbee7ffb2258f08a442
Reviewed-on: https://dart-review.googlesource.com/46080
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-03-13 09:15:48 +00:00
Sigmund Cherem 1ce131b317 fix section for update_from_log
TBR=sra@google.com

Change-Id: I60465498268cb7e8ffd5d824df70f794aa911613
Reviewed-on: https://dart-review.googlesource.com/44662
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-02 01:33:18 +00:00
Sigmund Cherem 9ed595b4b3 Use $fasta instead of $dart2js_with_kernel in our status files.
Note: $fasta is true when passing --dart2js-with-kernel. This change will make it
easier to flip the default: the plan is that $fasta will be true by default
later on, and passing --dart2js-old-frontend will make it false.

TBR=sra@google.com

Change-Id: Ib917d55b2d14db954c56513af057dd9a37b9c825
Reviewed-on: https://dart-review.googlesource.com/44601
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-01 21:02:18 +00:00
Johnni Winther c0e7f53041 Convert update_all.sh to a real language
Change-Id: I2b503694dab5b4d3f49f55bd83b9fb405b0f119b
Reviewed-on: https://dart-review.googlesource.com/34460
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-12 22:04:00 +00:00
Sigmund Cherem 7139df0e38 Add strong sections to language_2 and corelib_2, and change to run dart2js in
strong mode for those two suites

Bug:
Change-Id: I5e7b07c9497afd9f9f65fd0de609d5587d3bd9f1
Reviewed-on: https://dart-review.googlesource.com/33120
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-01-08 21:08:05 +00:00
Emily Fortuna 8ba52663d6 Update status script with the new canonical way of specifying test statuses.
Bug:
Change-Id: Id8ccd310a7f81a021788059ebea8590c3d20c203
Reviewed-on: https://dart-review.googlesource.com/27402
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-07 20:37:07 +00:00
Paul Berry b53e4e4302 Fix update_from_log.dart when the next section is preceded by a commented-out line.
Change-Id: I9b88279e73de783323bba6617ad00dbc24e81d45
Reviewed-on: https://dart-review.googlesource.com/26042
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-04 20:59:34 +00:00
Jens Johansen 22d0696d91 [CFE] Move front-end API under src/
This CL deprecates the front-end API and moves it into src/api_prototype.

For now all usages have been updated to point to the new location,
but they should be updated to use custom-client invocations instead (e.g.
one specific way for DDC, another for dart2js etc.)

Bug:
Change-Id: I9b4f41f6ebf55d42510fd35240d942d1dc7292d6
Reviewed-on: https://dart-review.googlesource.com/24822
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-01 08:42:16 +00:00
Sigmund Cherem 89aa45f7c7 Fixes in status-update script:
* Off by one error
 * Re-sort records: this explains why sometimes we inserted records in the wrong
   place.

TBR

Change-Id: Ie6bb404cc120cc4caced973a1e2f34dc5f55b835
Reviewed-on: https://dart-review.googlesource.com/21788
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-18 01:43:46 +00:00
Emily Fortuna d74e73d320 Fix the CQ -- gardening.
Bug:
Change-Id: If667c3f74e1314ec195a9a6edf64b6964fd334d2
Reviewed-on: https://dart-review.googlesource.com/21785
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-11-17 23:01:54 +00:00
Sigmund Cherem ba88fa0ad8 Add support to attach a message to the status file
Change-Id: Ia8b31040696fa597ce607f620b9d7a62713a2cb4
Reviewed-on: https://dart-review.googlesource.com/21780
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-17 20:36:03 +00:00
Sigmund Cherem 5b957000a8 Add script to update status files for dartk/dartkp in strong mode automatically.
This generalizes the dart2js script and adds a wrapper shell script to invoke
it.

Change-Id: I36e83f92204adc9f655619693b5841366edacaa7
Reviewed-on: https://dart-review.googlesource.com/21704
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-17 19:37:13 +00:00
Emily Fortuna c7dadec876 Capture this and type variables in closures in checked mode when needed.
Bug:
Change-Id: I9e3bbc658590bcb6ec04cff4323cc2a97c20fc6b
Reviewed-on: https://dart-review.googlesource.com/21321
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-11-16 21:22:41 +00:00
Emily Fortuna bf94e73568 Fix up type inference to run in checked mode and enable checked mode tests running with kernel script.
Bug:
Change-Id: If720b6868fbdf010f4aac614ceea1ddea533c277
Reviewed-on: https://dart-review.googlesource.com/21222
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-15 22:34:51 +00:00
Emily Fortuna 035c85580b Make fast-startup work with kernel!
Bug:
Change-Id: I88bf7fd7609bc816cc6d50daaa7e3a0ec5dc1934
Reviewed-on: https://dart-review.googlesource.com/19403
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-09 01:37:25 +00:00
Leaf Petersen 4270b99d75 Fix dynamic as bottom uses in front end and dart2js.
Re-enable the dynamic as bottom hint in analysis_options.yaml and fix
the code to be hint clean again.

Fixes #30589
Fixes #30590

Bug:
Change-Id: Idb7910b3ab1c6d931a3ead3eed885d8bd172e621
Reviewed-on: https://dart-review.googlesource.com/17062
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-30 19:54:26 +00:00
Harry Terkelsen c9aa3a688b Add custom element support to the kernel ssa builder
Change-Id: I06ec8bc2f53dd88116abb11655c83783de1d48cd
Reviewed-on: https://dart-review.googlesource.com/16328
Commit-Queue: Harry Terkelsen <het@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-10-25 16:36:29 +00:00
Emily Fortuna af3bbc194b Fix up dart2js argument passing of 'platform-binaries' so that it actually recognizes the flag.
Bug:
Change-Id: I632dc8ea1e1c145cbb93a8cb7ba061c0d2ebc948
Reviewed-on: https://dart-review.googlesource.com/14508
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-10-17 21:02:31 +00:00
Peter von der Ahé 6cc2014b3d Fix computePlatformBinariesLocation for Windows.
Change-Id: Ic64e9c7a10923fe2e3f99ef708c2f19bb9ae802e
Reviewed-on: https://dart-review.googlesource.com/14420
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-10-17 12:46:10 +00:00
Peter von der Ahé b96ac4520a Update most clients to use computePlatformBinariesLocation.
Change-Id: I6e6960c471b2fab3f0cd8a672da05d7699217410
Reviewed-on: https://dart-review.googlesource.com/12291
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-17 10:48:40 +00:00
Peter von der Ahé 2080faff8c Remove stale references to patched_dart2js_sdk/platform.dill.
Change-Id: I8b7b4274ef64f0b6f6c5a31ba654e8fb44843161
Reviewed-on: https://dart-review.googlesource.com/12283
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-09 14:36:55 +00:00
Peter von der Ahé 16aa720d27 Remove compiling platform.dill from patch_sdk.dart
This separates compiling platform.dill files from the patch_sdk.dart
script. The motivation for that is that I'm working on reading patch
files directly from Fasta, so we can completely remove the build step
for generating patched_sdk and dart2js_patched_sdk.

Short-term this should allow Paul to add a strong-mode version of
platform.dill without causing to many conflicts with my work on
patches.

Change-Id: I1150845b2986348d4fffe27092701d8a9b57ea54
Reviewed-on: https://dart-review.googlesource.com/11506
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-06 15:34:37 +00:00
Sigmund Cherem d96b29378a Delete use of rasta and dartk from perf.dart scripts.
Change-Id: Id8cd7f01c68dbcb6f814ef51627a2f4b377f6819
Reviewed-on: https://dart-review.googlesource.com/9790
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-10-03 23:12:21 +00:00
Dan Rubel 9527f37146 refactor parse import
* `as` clause and `deferred as` clause processing pushed
     into a new processImportPrefixOpt method.
* New handleImportPrefix event for communicating 
    `as` clause and `deferred as` clause to the listeners.
* Several new more detailed error messages for out of order
    clauses and keywords in the import directive.

Change-Id: I133842c7225403fa000ca1cf0e49af9f8a011386
Reviewed-on: https://dart-review.googlesource.com/8580
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-29 14:39:01 +00:00
Emily Fortuna 8bd22ffd28 Fix log parsing script to handle group names with spaces in them.
Bug:
Change-Id: If538d7e18af850e973ce0236e6949b7dbe36ba09
Reviewed-on: https://dart-review.googlesource.com/8733
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-09-27 18:13:54 +00:00
Emily Fortuna fe9d02855b Add html tests for dart2js kernel testing.
Bug:
Change-Id: I4d28af58a655f76ea639c8f048e86738afb2e108
Reviewed-on: https://dart-review.googlesource.com/8720
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-09-26 21:19:57 +00:00
Stephen Adams f065e8a4ee Add corelib to update_all.sh suites
TBR=sigmund@google.com

Bug:
Change-Id: I49293d88f1828cb5b661295d538ab67e327787ce
Reviewed-on: https://dart-review.googlesource.com/7638
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-21 21:47:06 +00:00
Stephen Adams 899e2eab15 update rank_stacks comment
TBR=sigmund@google.com

Bug:
Change-Id: I5acdcdc7573106c0eea51447862bce3a0f381c6f
Reviewed-on: https://dart-review.googlesource.com/7020
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-19 16:36:12 +00:00
Stephen Adams f6c50ca219 Allow update_all to take multiple named suites
Bug:
Change-Id: I568502690d8691d90e3ee8fbff3c2a0d0736f978
Reviewed-on: https://dart-review.googlesource.com/6341
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-09-15 21:55:47 +00:00
Stephen Adams dbcc7835a7 rank_stacks tweaks
- Cluster stacks on printed prefix instead of entire stack.
- Print records with a stack that is a prefix of another stack (this happens for d8 errors where there is no dart2js stack)

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3007023002 .
2017-09-01 10:26:10 -07:00
Janice Collins 51cc9689b3 Remove corelib and corelib_strong and migrate last two remaining tests.
This includes a migration of linked_hash_map_from_iterable_test and
stacktrace_current_test, which were migrated without changes.

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

Review-Url: https://codereview.chromium.org/3004073002 .
2017-09-01 08:11:15 -07:00
Stephen Adams c65d94d440 Add command line options to rank_stacks
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3005683002 .
2017-08-29 12:56:09 -07:00
Stephen Adams 2c6ae26aba update_all: remove user-dependent part of assertion file path
TBR=sigmund@google.com

Review-Url: https://codereview.chromium.org/3003273002 .
2017-08-23 16:02:55 -07:00
Sigmund Cherem 4af181dfd8 Allow passing a suite argument to the update script
BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2996893002 .
2017-08-11 13:42:58 -07:00
Stephen Adams 5597188067 Collate stacks in test output
Usage:

$ tools/test.py -m release \
       -c dart2js -r d8 --dart2js-batch --report \
       --host-checked \
       --dart2js_options="--library-root=out/ReleaseX64/dart-sdk/ --use-kernel" \
       language corelib library_2 corelib_2 \
       dart2js_native dart2js_extra \
  2>&1 > LOG

$ dart pkg/compiler/tool/status_files/stacks.dart LOG > STACKS.txt

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2999753002 .
2017-08-09 13:46:24 -07:00
Sigmund Cherem bcaff5e269 Filter unreachable libraries in kernel loader
BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2990233003 .
2017-08-09 11:01:02 -07:00
Sigmund Cherem 907fbcd694 Fix compile_from_dill test.
I recently changed the FE in how it loads sdk files. That internally fixed the
meaning of this flag and made it unnecessary for our script.

TBR=efortuna@google.com

Review-Url: https://codereview.chromium.org/2999553002 .
2017-08-07 11:13:51 -07:00
Sigmund Cherem 352dc54191 Update status files to make bots green, minor changes to the script
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2990303002 .
2017-08-04 14:04:37 -07:00
Sigmund Cherem 0e2a6bdef3 Add batch flag to update script
I don't believe it helps with --use-sdk, but why not.

Review-Url: https://codereview.chromium.org/2993733002 .
2017-08-04 13:41:36 -07:00
Sigmund Cherem 06a929434e add error message as a comment on the logs
BUG=

Review-Url: https://codereview.chromium.org/2996543002 .
2017-08-04 13:21:37 -07:00
Sigmund Cherem 78dc28606c Add utility tool to update .status files automatically
Usage: from the Dart repo run:

  ./pkg/compiler/tool/status_files/update_all.sh

Caveat: the bash script has only been tested in linux.

BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2996533002 .
2017-08-04 12:26:52 -07:00
Sigmund Cherem 09ff1b56f7 Add support for compiling Dart via the FE in dart2js.
This also:
 - replaces --use-kernel with --use-kernel-in-ssa
 - replaces --load-dill with --use-kernel
 - makes --use-kernel support both: compiling from .dill or from .dart
 - change the default of other options that are currently disabled when --use-kernel is on.
 - adds .status lines for all tests in language/corelib/dart2js_extra/dart2js_native

R=efortuna@google.com

 Note: this CL is built on top of another change
 (https://codereview.chromium.org/2981403002/) that adds preview_dart_2 to
 test.dart
Review-Url: https://codereview.chromium.org/2989453002 .
2017-07-24 17:10:11 -07:00
Sigmund Cherem 1aa139bc94 Unifying compiler context
Changes in this CL:
 - Updated CompilerContext:
    - it now contains a ProcessedOptions object

    - it no longer depends on CompilerCommandLine/CommandLine

    - it delegates to ProcessedOptions.report so all error reporting
      goes to one single place.

    - use "withContext" term instead of "withGlobalOptions" to be
      more clear about the intent

 - Changes in public API
    - added more options that correspond to flags in command-line
      fasta tools

    - default onError is different: we now use the
      command_line_reporting report, which prints and throws
      on fatal messages, but doesn't throw eagerly on all messages
      as before.

    - introduced "printMessages" option: make it easy to have
      both onError + command_line_reporting  (kernel-service.dart
      is the main use case at this time, other ideas welcome!)

    - renamed CompilationError to CompilationMessage

 - Other changes

    - set exit code is done on report, not on format
    - fixed corner cases not covered in previous CL
        - error reporting with missing-main needs to happen with
          a context
        - missing error cases when inferring .packages and input
          URIs are not file:* URIs

Ideas for follow up after this CL:
 - combine ProcessedOptions and CompilerContext into a single class
   (or extend one from the other)
 - switch onError to a stream

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2982093003 .
2017-07-18 17:02:59 -07:00
Sigmund Cherem d844dc8226 Move forward rolling FE public APIS (make bots green)
There were a couple issues found in the bots:
 - dart2js unit tests I accidentally missed earlier.
 - vmservice issues only show up in the debug-vm, I was testing locally with the
   release vm.
 - a small regression in detecting invalid .packages files. I marked the test
 failing for now and plan to follow up on this on Monday.

TBR=ahe@google.com,paulberry@google.com

Review-Url: https://codereview.chromium.org/2974703002 .
2017-07-07 21:15:07 -07:00
Sigmund Cherem b71bd543a9 Reapply "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service.""
Original CL had a bug that wasn't visible unless you delete your
out/ReleaseX64/patched_sdk folder.

Patchset #1 is the original CL, patchset #2 shows the fix.

This reverts commit 4aadfe09df.

BUG=

Review-Url: https://codereview.chromium.org/2976543002 .
2017-07-07 15:32:24 -07:00
Sigmund Cherem 4aadfe09df Revert "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service."
Reason: broke VM bots, still investigating.

This reverts commit 610d081947.

TBR= paulberry@google.com

Review-Url: https://codereview.chromium.org/2979463002 .
2017-07-07 15:21:37 -07:00