Commit graph

49034 commits

Author SHA1 Message Date
Sigmund Cherem b48584d3d0 Switch FE to use the libraries.json format.
This CL:
  * introduces the Dart API to operate over libraries specifications and describes
    the format we intend to use (see libraries_spec.dart)

  * implements serialization/deserialization for this API

  * switches over the front_end to use these APIs
    * public options accept a URI to the JSON file and no longer
       accept a `dartLibraries` map
    * internal code uses the LibrariesSpecification API

  * switches other dependencies on these APIs (resynthesizer_test and patch_sdk.dart)

This is the first step in migrating over to use the libraries.json format and
eventually remove the patched_sdk step. In particular, some of the next steps
include:
  * add a build step to generate .json files from .yaml files
  * add a libraries.yaml file for the sdk
  * split the patched_sdk step in two:
     * patching files
     * generating .dill files
  * add any missing support for patch-files in fasta
  * finally remove the patching files step, and only have a build step for generating
   .dill files

BUG=
R=ahe@google.com, paulberry@google.com, scheglov@google.com

Committed: abf2d23af2
Review-Url: https://codereview.chromium.org/2986303003 .
2017-08-07 08:41:28 -07:00
Peter von der Ahé dbe482caac Share code for parsing local functions.
R=danrubel@google.com, johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2999523002 .
2017-08-07 16:06:04 +02:00
Peter von der Ahé 98422979ac Parse type variables of local functions before return type.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2985673002 .
2017-08-07 13:46:47 +02:00
William Hesse d109fe7f1a Update status for dartdevc on Windows.
BUG=https://github.com/dart-lang/sdk/issues/30336
BUG=https://github.com/dart-lang/sdk/issues/21527
R=sortie@google.com

Review-Url: https://codereview.chromium.org/2998553002 .
2017-08-07 13:37:15 +02:00
Lasse R.H. Nielsen 969ad4f622 Mark vm/cc/IsolateReload_ClassFieldRemoved as crashing on dartk-vm.
Gardening.

R=eernst@google.com

Committed: 51229000e3
Review-Url: https://codereview.chromium.org/2993783002 .
2017-08-07 11:05:15 +02:00
Lasse R.H. Nielsen 51229000e3 Mark vm/cc/IsolateReload_ClassFieldRemoved as crashing on dartk-vm.
Gardening.

R=eernst@google.com

Review-Url: https://codereview.chromium.org/2993783002 .
2017-08-07 09:57:33 +02:00
Diogenes Nunez 7568e1f18e Attempts to fix bugs introduced in 8b6fcf50e8.
Removes a call that erroneously changes top_ in Scavenger.
Removes FlushTLS and UnflushTLS from UsedInWords.
Reverts commit 0b0f07d303.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2992343002 .
2017-08-05 09:46:04 -07:00
Zach Anderson 0394d3a0cf [infra] Begin removing gyp
This CL begins removing gyp from Dart's tree.

Removing gyp will go in three stages:
1. Remove unused .gyp and .gypi files.
2. Translate *_sources.gypi files to *_sources.gni files
3. Remove //third_party/gyp from DEPS

This CL is stage 1.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2992593002 .
2017-08-04 22:19:35 -07:00
Sigmund Cherem b6d08264a3 Revert "Switch FE to use the libraries.json format."
This reverts commit abf2d23af2.

Reason for revert:
 - win build failed in patched_sdk (likely storing paths and not uris)
 - dart2js bots failed (missing flag)

Will fix the issues and reland shortly.

Review-Url: https://codereview.chromium.org/2993113003 .
2017-08-04 19:46:17 -07:00
Bob Nystrom 850b80a84e Fix analyzer status for cast_test.
Also add another configuration in the migration test runner to catch
this in the future.

Review-Url: https://codereview.chromium.org/2993123003 .
2017-08-04 18:37:18 -07:00
Jennifer Messerly 89578574d0 mark call_test failing for DDC travis bot
TBR= @munificent
2017-08-04 18:27:33 -07:00
Paul Berry 1b9ba53fb6 Implement type inference for asserts in constructor initializers.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2995553002 .
2017-08-04 17:55:11 -07:00
Jennifer Messerly 4cb87e6f1e Update language_tests.js
The test was fixed shortly after the fail marker was added
2017-08-04 17:48:31 -07:00
Sigmund Cherem abf2d23af2 Switch FE to use the libraries.json format.
This CL:
  * introduces the Dart API to operate over libraries specifications and describes
    the format we intend to use (see libraries_spec.dart)

  * implements serialization/deserialization for this API

  * switches over the front_end to use these APIs
    * public options accept a URI to the JSON file and no longer
       accept a `dartLibraries` map
    * internal code uses the LibrariesSpecification API

  * switches other dependencies on these APIs (resynthesizer_test and patch_sdk.dart)

This is the first step in migrating over to use the libraries.json format and
eventually remove the patched_sdk step. In particular, some of the next steps
include:
  * add a build step to generate .json files from .yaml files
  * add a libraries.yaml file for the sdk
  * split the patched_sdk step in two:
     * patching files
     * generating .dill files
  * add any missing support for patch-files in fasta
  * finally remove the patching files step, and only have a build step for generating
   .dill files

BUG=
R=ahe@google.com, paulberry@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2986303003 .
2017-08-04 17:41:27 -07:00
Ben Konyi 56ee9f86d6 Updated status file to fix failures on the vm-kernel bots caused by migration of test block 13.
TBR=jcollins@google.com,rnystrom@google.com
BUG=

Review-Url: https://codereview.chromium.org/2993753002 .
2017-08-04 17:31:12 -07:00
Bob Nystrom ff563dbe3e Remove three tests that were migrated to language_2 already.
Review-Url: https://codereview.chromium.org/2992363002 .
2017-08-04 17:19:54 -07:00
Bob Nystrom f2b8669a0b Output test results in diff mode.
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2996563002 .
2017-08-04 17:16:45 -07:00
Bob Nystrom 50c087d5a6 Migrate language block 45 - call_argument ... call_with.
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2998493002 .
2017-08-04 17:15:26 -07:00
Jennifer Messerly e1f4de9a6e fix corelib_2/iterable_to_set_test to reflect strong mode runtime checks
`Set<dynamic>` should not be a subtype of `Set<int>` in strong mode.

R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2993743002 .
2017-08-04 17:06:14 -07:00
Konstantin Shcheglov f5d2688206 Add documentation comments for enum and enum values. Resynthesize in analyzer.
R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2997473002 .
2017-08-04 16:53:52 -07:00
Bob Nystrom 243d1c74eb Migrate language block 46 - canonical_const ... char_escape.
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2996533003 .
2017-08-04 16:52:13 -07:00
Jennifer Messerly fdf8c22e23 fix Travis bot runtime status
Review-Url: https://codereview.chromium.org/2995563002 .
2017-08-04 16:41:13 -07:00
Stephen Adams bb1e91b597 Redo "Work-around for missing mixin-application charOffset"
TBR=sigmund@google.com

BUG=

Review-Url: https://codereview.chromium.org/2991403002 .
2017-08-04 15:35:38 -07:00
Leaf Petersen d3344ed466 Fix incorrect nullability inference for ??
Fix bug where (a?.foo) was being incorrectly inferred to be
non-nullable if `foo` was non-nullable.

BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2996523003 .
2017-08-04 15:31:01 -07:00
Stephen Adams df3110df54 Remove obsolete bailout tests
R=sigmund@google.com

BUG=

Review-Url: https://codereview.chromium.org/2995513003 .
2017-08-04 14:52:39 -07:00
Jacob MacDonald 41fd862217 Call StringToken.canonicalizer.clear() in AnalysisEngine#clearCaches() (#30325) 2017-08-04 14:48:12 -07:00
Jennifer Messerly dcc5f0a873 fix ddc travis bot
Review-Url: https://codereview.chromium.org/2998483002 .
2017-08-04 14:08:27 -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
Ben Konyi 234de19b22 Removed tests that have already been migrated as part of block 13.
TBR=jcollins@google.com, rnystrom@google.com
BUG=

Review-Url: https://codereview.chromium.org/2996553002 .
2017-08-04 13:52:21 -07:00
Bob Nystrom 6b7819ec5a Handle migration status entries into split up status files.
R=jcollins@google.com

Review-Url: https://codereview.chromium.org/2994573002 .
2017-08-04 13:49:30 -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
Emily Fortuna 97e57c0209 More status file fixes.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2994653002 .
2017-08-04 13:34:59 -07:00
Ben Konyi df3238ef2d Migrated test block 12 to Dart 2.0.
Modified json_map_test to not expect the maps to be of type Map<int,
dynamic>, and marked iterable_to_list_test and iterable_to_set_test as
failing on DDC in the status files.

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2996513002 .
2017-08-04 13:34:48 -07:00
Alexander Markov 69817eea18 [vm] Revert changes related to triggering the 1st GC
This is the partial revert of the
8d6bc876f0

That CL caused noticeable slowdown of gen_snapshot on Mac and Windows.
Reverting this part of the CL fixes regression.

Closes https://github.com/dart-lang/sdk/issues/30317

R=zra@google.com

Review-Url: https://codereview.chromium.org/2998473002 .
2017-08-04 13:31:59 -07:00
Emily Fortuna 15fdc7ceb0 Handful of closure issues.
Implement forEachParameter in closures, deal with not all closures being localFunctions, and point to the constructor head instead of body when calling "getConstructorBody"

This reverts commit b74f53aa74.

BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2999453002 .
2017-08-04 13:31:14 -07:00
Sigmund Cherem 4d53ef3449 Add crash comments in dart2js_extra and dart2js_native
BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2993113002 .
2017-08-04 13:30:52 -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
Ben Konyi 5241f37143 Fixed test failures caused by overly aggressive merging of test block 13.
TBR=rnystrom@google.com,jcollins@google.com
BUG=

Review-Url: https://codereview.chromium.org/2993103002 .
2017-08-04 12:56:13 -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
Konstantin Shcheglov 4ef7fd14c1 Record Typedef reference into Kernel FunctionType and resynthesyze typedefs in Analyzer.
R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2986393002 .
2017-08-04 12:02:26 -07:00
Konstantin Shcheglov 41bcfaa4a4 Add createDirectory() to MemoryFileSystemEntity.
We need this API to create a mock SDK in a way that makes
ProcessedOptions.validateOptions() to accept it - the SDK root
must exist.

Alternatively (or in addition to) we could make writeXYZ create parent
directories implicitly. So, to "create" a directory, you would need
to create a file in this directory.

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2994643002 .
2017-08-04 11:46:02 -07:00
Bob Nystrom 9a0c11c26b Split language_2.status into multiple files.
This mainly splits along compiler lines, but uses runtime for a couple
of things -- VM and Flutter mainly.

I did most of the work automatically by hacking up the migration script
to re-migrate the existing file, but I also went through and manually
cleaned the result up as best I could.

R=bkonyi@google.com, jcollins@google.com

Review-Url: https://codereview.chromium.org/2993043002 .
2017-08-04 11:33:01 -07:00
Ben Konyi b1bca14dab Migrated test block 13 to Dart 2.0.
Removed list_index_of2_test as it shouldn't be valid in Dart 2.0.

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

Review-Url: https://codereview.chromium.org/2994543002 .
2017-08-04 11:21:22 -07:00
Kevin Moore d53e53c568 Fix path to pkg/path – .packages resolution works to the root of repo 2017-08-04 11:14:23 -07:00
Diogenes Nunez 0b0f07d303 Reverted due to vm test failure.
Revert "Makes new space iterable by filling up the mutator's TLAB"

This reverts commit 8b6fcf50e8.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2998453002 .
2017-08-04 10:56:36 -07:00
Ryan Macnak 544713bced Fix flake in code_collection_test.
foo's code may be detached twice if the machine is slow/loaded and GC happens during shutdown.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2993683002 .
2017-08-04 10:52:05 -07:00
Bob Nystrom 526245b565 Run DDC tests on Chrome on the bots.
Taking over this patch since Bill is out: https://codereview.chromium.org/2991343004/

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2992333002 .
2017-08-04 10:45:39 -07:00
Diogenes Nunez 8b6fcf50e8 Makes new space iterable by filling up the mutator's TLAB
This reverts commit bb6203dade and
adds changes FlushTLS.

Now, FlushTLS will fill the mutator thread's TLAB instead of
changing top_ in the Scavenger. This should prevent the assertion

(thread->end() == 0) || (thread->end() == top_)

in TryAllocateInTLAB in runtime/vm/scavenger.h due to a race on top_.

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

Review-Url: https://codereview.chromium.org/2991343003 .
2017-08-04 10:36:45 -07:00
Florian Loitsch d94cecba3c Newsletter 2017-08-04.
Review-Url: https://codereview.chromium.org/2995543002 .
2017-08-04 19:06:10 +02:00
Sigmund Cherem edc1054ae1 Normalize status files for dart2js_with_kernel
This is only moving status lines around to ensure we only have 2 sections for
$dart2js_with_kernel per file: minified and host-checked.  Some entries are now
duplicated because we no longer have the $dart2js_with_kernel (non-checked)
section.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2993083002 .
2017-08-04 09:41:08 -07:00