Interesting changes:
- A static getter colliding with an inherited non-static setter is a
compile error, not a type warning.
- Trying to call a setter on what is only a getter is a compile error
with no runtime behavior.
- Add support to test.dart for negative tests in DDC.
BUG=
R=jcollins@google.com
Review-Url: https://codereview.chromium.org/3005643002 .
- multitest will generate a specific case of a multitest file
- luci_api is the start of a project, to make an api to ease the life of the gardener. At this point, it can answer, given a commit, which builds on bots does that commit belong to.
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/3005443002 .
Obfuscation is controlled by obfuscate flag in Dart_IsolateFlags.
Obfuscation of identifiers is performed during script tokenization - when TokenStream is generated from the source. All kIDENT and kINTERPOL_VAR tokens are renamed consistently using a persistent obfuscation map stored in ObjectStore::obfuscation_map.
Some identifiers (pseudo-keywords, arithmetic operators, builtin recognized methods and entry-points) are not renamed to keep name based lookups from breaking. All other identifiers are renamed.
Constant instances of Symbol-s (both created via literal syntax #ident and using constant constructor const Symbol("ident")) are renamed consistently with corresponding identifiers.
Script urls and Library urls and names are also obfuscated.
Obfuscation map can be dumped as a JSON array at the end of precompilation using Dart_GetObfuscationMap API.
BUG=https://github.com/dart-lang/sdk/issues/30524R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/3003583002 .
These will be used on Gerrit reviews, to trigger try bots and the
commit queue. The commit queue is currently set up to commit to
GitHub. This will be changed when the mirroring direction changes.
BUG=737149
R=athom@google.com
Review-Url: https://codereview.chromium.org/3003523002 .
With `dart bin/bot.dart compare-failures ..`, skipping a relative build
number (like -1) used to be supported (and reported with --verbose).
This CL uses the same treatment for absolute build numbers: The output
includes information about earlier builds anyway, so it makes sense to
skip in the same manner here.
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2997273002 .
This adds analyzer-strong-checked as distinct from analyzer-strong,
which seems to be how the bots run it. Also adds the d8 runtime to dart2js as that was the cause of some bot breakage.
Finally, you can now run one test by just passing a single parameter.
BUG=
R=bkonyi@google.com, jmesserly@google.com
Review-Url: https://codereview.chromium.org/2997673002 .
Both Flutter and Fuchsia expect stripped dart in standard out directory, so make that default too(while standalone build puts stripped into exe.stripped/).
BUG=
R=zra@google.com
Review-Url: https://codereview.chromium.org/2998503002 .
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 .
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 .
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 .
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 .
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 .
- Migrate over built_in_identifier_test since it imports a helper
library that was migrated.
- Fix some status file entries.
Also:
- Removed some old commented out status entries.
- Fix a bug in migration script.
R=jcollins@google.com
Review-Url: https://codereview.chromium.org/2992903002 .
This looks at all the files in the batch being migrated. It goes through
the status files in the 1.0 and strong directories. If it sees an entry
that matches that file, it adds it to the resulting "_2" status file.
It handles adding entries to an existing section if already present in
the new status file. Otherwise, it adds a new section at the end with
the entries.
R=bkonyi@google.com
Review-Url: https://codereview.chromium.org/2989033002 .
This will enable --use-kernel tests in the dart2js bots.
After this change, running our tests will change a little bit, either of these
would work:
Option A: --use-sdk (host-checked not allowed)
python tools/test.py -m release \
-c dart2js -r d8 --dart2js-batch --report \
--dart2js-with-kernel --use-sdk \
language corelib library_2 corelib_2 \
dart2js_native dart2js_extra
Option B: pass --library-root, --host-check works here.
python tools/test.py -m release \
-c dart2js -r d8 --dart2js-batch --report \
--dart2js-with-kernel --host-checked \
--dart2js_options="--library-root=out/ReleaseX64/dart-sdk/" \
language corelib library_2 corelib_2 \
dart2js_native dart2js_extra
In the future, when fasta supports compiling sdk with @patch files, we will
be able to remove the --library-root option and simply compile the SDK from
sources at that point.
BUG=
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2988063002 .
- Track files that only exist in the "_2" directories. That way we can
show what work still remains to be done even if the unmigrated files
are gone.
- Friendlier matching of command line arguments. Pass in any substring
of the test path and if only one test matches, it will be used.
- Make --dry-run not crash.
R=bkonyi@google.com
Review-Url: https://codereview.chromium.org/2988973002 .
This required munging a bit of test.dart code too to tease out some
dependencies, but the changes are minor. I considered moving all of
test.dart out into a package and making the status file library a
public one that other packages in the repo could import but this seemed
like the less intrusive change.
R=bkonyi@google.com
Review-Url: https://codereview.chromium.org/2984203002 .
Revert "Precompiler doesn't report Dart 2.0 static type errors yet."
This reverts commit 7af2d86ed3.
Revert "Move absstract_exact_selector back into the language tests. (#30169)"
This reverts commit 452d2d0840.
Revert "Set up directories for migrated Dart 2.0 tests and migrate a couple. (#30149)"
This reverts commit 47985d6dbd.
R=zra@google.com
BUG:dartbug.com/30171
Review-Url: https://codereview.chromium.org/2979073002 .
* Set up directories for migrated Dart 2.0 tests and migrate a couple.
- Create new "_2" directories where tests that have been validated as
ready for Dart 2.0 will end up.
- Create empty status files for each directory.
- Add those directories to the set of default selectors you get when you
run test.py. This gets the VM bots running them.
- Get the DDC bots running those suites.
- Move abstract_exact_selector_test over to dart2js since it's a
dart2js-specific regression test and not an actual language test.
- Migrate corelib/apply_test.dart.
- Delete abstract_beats_arguments[2]_test.dart since that code is
statically wrong in 2.0 and can't be run.
This doesn't get the dart2js bots running the new suites. I'll email
the relevant folks to get help with that.
* Resurrect abstract_beats_arguments_test.dart.
It usefully checked that an implementation reports an warning (now
error) if you construct an abstract class.
Also added support to test.dart to mark a test as expecting to
generate a compile error in the test itself. That way, the status file
reflects what is *wrong* about the current status, not what is *right*.
* Change static error syntax to match front_end notation.
* Migrate abstract_getter_test.
Flutter non-release should have vm_service package included into platform.dill to handle observatory requests, while release builds should not have it as they are not supposed to have observatory functionality enabled.
R=ahe@google.com, sigmund@google.com
BUG:dartbug.com/30112
Review-Url: https://codereview.chromium.org/2972323002 .
Turns out the args were swapped, so we were writing one of our output files with the contents of the deps file. Later the script overrode that output file, so we didn't notice it.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2980873003 .
This gets rid of the following messages in the build:
patched_dart2js_sdk/lib/_internal/js_runtime/lib/native_typed_data.dart: Nit: 'Symbol' is imported from both 'dart:_internal' and 'dart:core'.
patched_dart2js_sdk/lib/svg/dart2js/svg_dart2js.dart: Nit: 'Symbol' is imported from both 'dart:_internal' and 'dart:core'.
patched_dart2js_sdk/lib/web_audio/dart2js/web_audio_dart2js.dart: Nit: 'Symbol' is imported from both 'dart:_internal' and 'dart:core'.
patched_dart2js_sdk/lib/web_gl/dart2js/web_gl_dart2js.dart: Nit: 'Symbol' is imported from both 'dart:_internal' and 'dart:core'.
patched_dart2js_sdk/lib/web_sql/dart2js/web_sql_dart2js.dart: Nit: 'Symbol' is imported from both 'dart:_internal' and 'dart:core'.
BUG=
R=ahe@google.com, sigmund@google.com
Review-Url: https://codereview.chromium.org/2982503002 .
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 .
* Use "|" as the separator between module path and name.
":" is already a path character in Windows. This is why the
dartdevc tests aren't working on Windows. Because they try to do:
-sC:/some/path/blah.dart:blah
And it splits at the first ":". Oops.
* Switch to "=" for separating module path from name.
It looks a little funny when used with "--summary=", but it works fine
and is very unlikely to be used for anything else on any platform
(since we already use it as the separator between arg name and value).
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 .
This CL tweaks the public APIs in package:front_end, and
starts using those APIs outside the package. For example, this
removes 9 uses of DillTarget, so it is not longer mentioned
outside pkg/front_end and the analyzer_target.
Actual changes:
- in package:front_end
* added kernel_generator_impl: new file contains code that
used to be in kernel_generator. Code has some modifications:
it uses a single canonical-root when loading summaries, and
it supports generating both outlines and kernel in one go.
* removed code that didn't belong here:
a. most of calculating deps for .GN moved to patch_sdk
b. vm-specific outcomes moved to kernel-service
* updated how `native` is implemented, so we can more easily
support dart2js and ddc
* updated how we check where `int`, `bool`, etc can be implemented.
* added support "hermetic mode" in modular builds
('chaseDependencies = false' option)
* moved `trim` step out of fasta, and for now call it only within
the public API. This is not yet exposed, and I stopped covering it in
most tests (now only covered in shaker tests). The plan is to add
tests for the public API covering this in the future.
* removed `uriToSource` when serializing outlines
* added unit tests for public APIs
- patch_sdk
* use the public API to craete platform.dill, outline.dill (now
500K insted of 3Mb because it excludes sources), and vmservice_io.dill
* moved here logic internal to .GN
- kernel service
* use the public API
* moved here logic that depends on VM internals (e.g. status enum,
compilation results)
- package:compiler
* use the public API in tools and unit tests
* simplified patched-sdk generation: no more extending fasta's internals
- package:kernel
* fix bug in deserialization: initializers and other lists were
overwritten accidentally with external definitions.
* updated unit tests, moved shared logic to frontend/src/fasta/testing
R=johnniwinther@google.com, paulberry@google.com
Review-Url: https://codereview.chromium.org/2953703002 .
This CL also removes some compiler flags that increase space somewhat
that help the profiler find symbols, which isn't included in a PRODUCT
build.
Before:
zra@zach:~/dart/sdk$ ls -la out/ProductX64/exe.stripped/
-rwxr-x--- 1 zra eng 9693064 Jun 29 14:52 dart
-rwxr-x--- 1 zra eng 7391080 Jun 29 14:52 dart_precompiled_runtime
R=askesc@google.com, rmacnak@google.com
After:
-rwxr-x--- 1 zra eng 6809424 Jun 29 15:11 dart
-rwxr-x--- 1 zra eng 3299120 Jun 29 15:11 dart_precompiled_runtime
Review-Url: https://codereview.chromium.org/2964133002 .
This involves a few pieces:
- Add support to DDC for specifying the module name associated with a
given summary. This lets test.dart invoke DDC using summaries in the
build directory outside of the directory containing the test itself.
- Add support to the build scripts for building the packages. This adds
a new GN target that builds everything needed to run test.dart with
dartdevc. In particular, it invokes build_pkgs.dart to compile the
relevant packages to JS+summary so that the tests can use them.
This requires some changes to build_pkgs.dart so it can output to a
given directory.
- In test.dart, when tests are compiled with dartdevc, pass in the
summaries for the packages so they don't get compiled in. Then, when
the test is run, configure require.js with the right paths to their
JS files so they can be loaded.
I also removed a bunch of unneeded buildDir parameters being passed
around the various CompilerConfiguration class methods now that they
have direct access to the configuration.
Fix#29923.
R=vsm@google.com, whesse@google.com, zra@google.com
Review-Url: https://codereview.chromium.org/2955513002 .
_ChildNodeListLazy.removeRange used to throw UnsupportedError because ListMixin.removeRange calls setRange.
Make throwing UnsupportedError explicit to avoid relying on the implementation of ListMixin.removeRange
This will unblock the '_closeGap' change.
BUG=
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2955103003 .
It multiplexed a bunch of different events onto a single stream. But
every single listener on that stream immediately demuxed them and only
cared about a subset of the events.
So I made separate streams for each event. Other minor clean-ups too.
R=sigmund@google.com, whesse@google.com
Review-Url: https://codereview.chromium.org/2957703002 .
It's still big and monolithic, but it's not as big as it was before.
- Remove old unused Polymer stuff.
- Move some of the logic out into a helper function.
- Other small tweaks.
R=whesse@google.com
Review-Url: https://codereview.chromium.org/2949823003 .
- Merge CommandOutputImpl and CommandOutput. There were no classes that
implemented CommandOutput that didn't extend the Impl.
- Remove "Impl" from the other class names.
- Make stuff private when possible. Likewise final.
- Other tiny style changes.
R=whesse@google.com
Review-Url: https://codereview.chromium.org/2946783002 .
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 .
This new flag value specifies the directory in which the VM should look
up the platform.dill file. A future change will require the VM to load
another kernel binary from disk. This binary will also live in the same
directory that --kernel-binaries specifies. This way, we avoid adding a
different flag for each of the different binaries.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2933203004 .
- Get rid of separate CommandBuilder class and singleton pattern. It
was being passed around explicitly even though half of the places
that received a CommandBuilder as a parameter still directly called
CommandBuilder.instance instead of using it.
- Get rid of Command caching. As far as I can tell, it makes no
measurable difference in runtime performance or memory usage. Even
with a large invocation of a lot of configurations and tests, the
Command classes don't seem to be a significant use of memory.
- Shorten the factory names. "get" adds no value, and we know it
returns a "Command" since it's on Command.
R=whesse@google.com
Review-Url: https://codereview.chromium.org/2933973002 .
This directory has a libraries.json file pointing to vmservice_io and
_vmservice in the source tree. The script tools/patch_sdk.dart has been
updated to use this new directory as the sdk directory when compiling
dart:vmservice_io. This way, to build vmservice_io.dill, we
do not need to copy the dart files pertaining to vmservice_io and
_vmservice.
Fixes#29859R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2938903003 .
After status files are updated with failures from this run, we will try again.
R=brian.wilkerson@google.com
Revert "DEPS ans status files updated to the last co19 commit (#29604)"
This reverts commit 70b2b3f6b1.
Revert "Fix typos introduced in DEPS by 70b2b3f6b1bb2def061f80b7693cd89e23fa9134"
This reverts commit 9e9f7210d0.
BUG=
Review-Url: https://codereview.chromium.org/2933403002 .
This is a pretty massive change but my hope is it will make
test.dart easier to maintain going forward. Instead of
passing around a stringly-typed Map<String, dynamic> all
throughout the program, we parse the options and then create
a Configuration object that has typed getters for all of the
various bits of configuration data.
This is a little tedious because it means declaring a new
option requires also declaring a corresponding field in the
Configuration class and passing it through the constructor.
I think it's worth it.
Also, enum-like configuration properties like architecture
and runtime now have their own classes as well. Moved a
bunch of stuff from TestUtil into those classes now that
there is an object to hang those methods off of.
In the process, I found a few typos in string literals where
the code wasn't correctly looking up a configuration
property.
Added more sanity checking and validation to status file
parsing. You will get an error at parse time if you try to
refer to a variable that isn't in the whitelist of known
variables. Also, you'll get an error if you try to compare
a variable to a value that it isn't expected to have.
Many other small-scale cleanups.
Aside from the status file validation, this should behave
mostly the same as current test.dart except that tests
may be enqueued in a slightly different order. The
rewritten code for expanding configurations iterates
through the architecture, runtime, etc. options in a
slightly different order.
R=whesse@google.com
Review-Url: https://codereview.chromium.org/2901923003 .
Only include OSR and field guards in the features descriptor for JIT code to avoid gen_snapshot and dart having different default values.
Disabled since core snapshots with code break tests with non-default flags for type checks, assertions, strict errors, OSR, or field guards.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2902313004 .
This removes all implicit casts and many implicit uses of dynamic. It
adds a gratuitous number of explicit "as" casts and arguably makes the
code worse.
This is an interim step towards replacing the big configuration map
with an actual typed object. These "as" casts should help catch places
where the configuration object is being used and where the code will
need to be changed to use a new object.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2903703002 .
This doesn’t touch the resulting configuration map, which is what this
is leading up to, but it cleans up the specification and parsing of the
options and removes a lot of redundancy.
Behavior should be the same as it was before, except that all options
now allow both their underscore-separated and hyphen-separated names.
So this is now valid:
test.py --hot_reload --append-logs
Where before, you use to have to do --hot-reload (OK) and
--append_logs (bad, since almost all other options expect hyphens).
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2902023002 .
This reverts commit f62a2a9562.
Commit above [expectedly] broke runtime/vm tests since it uses DFE
instead of vm parser, but I didn't realize we actually test -cdartk
configuration. This has to be resubmitted with status file update to
mark 235 vm tests failing with DFE.
TBR=siva
BUG=
Review-Url: https://codereview.chromium.org/2901733002 .
This has a few advantages:
- We can track dependencies more precisely
- ninja can assemble things in parallel as they're ready rather than
sequentially all at once.
- It is easier to customize SDKs depending on target platform, e.g.
Fuchsia.
This CL also has a number of cleanups:
- Defining is_fuchsia and is_fuchsia host so we don't always have to check
- Piping through toolchain overrides in more places
- Fixing bugs in copy_tree.py, not using list_files.py, which is broken on Windows
related #29558R=whesse@google.com
Review-Url: https://codereview.chromium.org/2848943003 .
- Separate out parsing a status file from applying the environment to
determine which sections are active. This makes it possible to, for
example, generate expectation sets for multiple environments without
having to reparse each time.
- Simplify expression parsing. Remove set expressions since they weren't
used for anything useful. A test's expectations are a simple
comma-separated list and don't need anything beyond that. Merge
Scanner and Tokenizer since the latter was a glorified function.
- Make more names private so that it's clearer what's used outside of
various libraries.
- Generally modernize the style.
- Add *lots* of documentation.
Again, there should be no behavioral changes. I ran:
./tools/test.py -m release,debug -c none,dart2js,dart2analyzer -r none,vm,d8 corelib
Before and after the change and verified that the output was the same
(aside from timing).
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2891753003 .