Commit graph

1144 commits

Author SHA1 Message Date
Erik Corry 029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Alexander Aprelev 4f9b25e410 Fix previous CL where dart_bootstrap was accidently changed to dart_bootstrap_host_arch.
Also fix two missed places where host_toolchain should be replaced with dart_host_toolchain.

R=rmacnak@google.com

BUG:flutter/flutter#10841
Review-Url: https://codereview.chromium.org/2953873002 .
2017-06-22 13:17:53 -07:00
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
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
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
Ryan Macnak 9ab39ae099 Reapply "[fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries."
Add missing config to run_vm_tests.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2937503003 .
2017-06-13 08:49:00 -07:00
Ryan Macnak 3383c4ac25 Revert "[fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries."
This reverts commit 54e80a8c32.

Review-Url: https://codereview.chromium.org/2940513002 .
2017-06-12 15:19:23 -07:00
Ryan Macnak 54e80a8c32 [fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries.
Build another varient of dart_bootstrap targeting the host architecture to ensure reasonable Observatory build times.

Remove assert assuming a root script, which does not exist when gen_snapshot builds core snapshots.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2924173005 .
2017-06-12 14:33:10 -07:00
Sigmund Cherem ebdb0af64f Add integration test: hot reload + incremental compiler
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2925953002 .
2017-06-07 12:47:27 -07:00
Sigmund Cherem edd835c5bb Fix vm tests: introduce a hybrid file system so that the vm tests can find the
sdk files.

The reason the tests broke is that they use a memory-file-system which only
contains the test file and a mock .packages file.

BUG= https://github.com/dart-lang/sdk/issues/29723
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2910473003 .
2017-05-25 12:25:15 -07:00
Jacob Richman 728f71f740 Ship dart2js output for dev_compiler/web in the sdk.
These tools are used to support applying source maps to stack traces
and running the Dart dev compiler in the browser as part of an extension.

This CL adds the following files
dart-sdk/lib/dev_compiler/web/ddc_web_compiler.js
dart-sdk/lib/dev_compiler/web/dart_stack_trace_mapper

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

Review-Url: https://codereview.chromium.org/2889253002 .
2017-05-19 13:21:53 -07:00
Alexander Aprelev b0c6a59731 Fix analyzer tests in checked mode.
BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2884023002 .
2017-05-15 10:25:59 -07:00
Alexander Aprelev 089a355766 Build up and pass MemoryFileSystem to fasta frontend.
Allow kernel service request to provide source files(filename, content), which will be used to build up MemoryFileSystem instance. MemoryFileSystem instance will be used instead of PhysicalFileSystem instance.

Immediate need for this is to support VM unit testing, where small Dart scripts that have to be parsed are hardcoded in the unit tests.

BUG=https://github.com/dart-lang/sdk/issues/28264
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2880453005 .
2017-05-15 08:44:34 -07:00
Vijay Menon 96f9287c0b Regenerate DDC artifacts
I had to put --unsafe-force-compile back to get the snapshot to build.  Investigating...

TBR=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2873013003 .
2017-05-09 14:08:47 -07:00
Ryan Macnak 98d31056a7 Change build.py to be like ninja.py and only use a single GN/Ninja invocation to cross-build the SDK. This step alone would fix #29580. This breaks cross-building the SDK with GYP.
Remove hack in bin/snapshot_utils.cc that avoided building a true app-jit snapshot for ARM, ARM64 and MIPS because of the multiple invocations above.

Add GN flags to choose to build script snapshots instead of app-jit snapshots, avoiding a slow training run inside a simulator.

Fixes #29580.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2871713002 .
2017-05-08 13:06:09 -07:00
Sigmund Cherem de36d11817 Add support for building patched_sdk and platform.dill for dart2js:
- defines a .gn target for patched_dart2js_sdk
 - changes patch_sdk.dart to handle a dart2js target
 - adds support in fasta to understand the `native` clause still used by dart2js
 - add option to fasta to know whether it is generating kernel for the vm or dart2js

I'm not excited about how I added the target distinction in fasta, the reason I
did so is that it affects the behavior in several ways: in how we handle
`native`, in the libraries that are included by default in the platform.dill file,
and in the transformations that need to be done.  I'm happy to change the
approach.

BUG=
R=ahe@google.com, vegorov@google.com, zra@google.com

Committed: 714523b103
Review-Url: https://codereview.chromium.org/2832353002 .
2017-05-01 17:23:02 -07:00
Zachary Anderson c5751b27e0 [GN] Change a filesystem absolute path deps to be source absolute
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2856713003 .
2017-05-01 15:58:35 -07:00
Sigmund Cherem e9cd0b0fa5 Revert "Add support for building patched_sdk and platform.dill for dart2js:"
This reverts commit 714523b103.

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

Review-Url: https://codereview.chromium.org/2849183002 .
2017-05-01 10:29:26 -07:00
Sigmund Cherem 714523b103 Add support for building patched_sdk and platform.dill for dart2js:
- defines a .gn target for patched_dart2js_sdk
 - changes patch_sdk.dart to handle a dart2js target
 - adds support in fasta to understand the `native` clause still used by dart2js
 - add option to fasta to know whether it is generating kernel for the vm or dart2js

I'm not excited about how I added the target distinction in fasta, the reason I
did so is that it affects the behavior in several ways: in how we handle
`native`, in the libraries that are included by default in the platform.dill file,
and in the transformations that need to be done.  I'm happy to change the
approach.

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

Review-Url: https://codereview.chromium.org/2832353002 .
2017-05-01 10:11:42 -07:00
Vijay Menon 75b7bea014 Snapshot DDC trained on itself
Note: path.canonicalize appears to normalize windows paths (c:/ vs c:\).

Fixes #29119

R=jmesserly@google.com, rnystrom@google.com

Review-Url: https://codereview.chromium.org/2836483002 .
2017-04-21 16:19:57 -07:00
Jacob Richman 119b2d58ce Format all files under tools and utils directory.
BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2827793002 .
2017-04-20 09:08:31 -07:00
Peter von der Ahé 2d9956a93d Move kernel baseline tests to front_end.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2825063002 .
2017-04-19 10:57:58 +02:00
William Hesse 011a5a6a66 Remove ie10 and opera sections from status files
BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2783653002 .
2017-03-28 16:38:59 +02:00
Vijay Menon 6854dec8a7 Revert "Train ddc snapshot on itself"
This reverts commit 1bd92d4f04.

Breaking on windows.

TBR=jakemac@google.com
BUG=

Review-Url: https://codereview.chromium.org/2762043002 .
2017-03-20 18:57:22 -07:00
Vijay Menon 1bd92d4f04 Train ddc snapshot on itself
This speeds up dartdevc on hello world from about 600ms to about 150ms.

OTOH, it also increases the snapshot size from ~4.6M to ~31M (the
latter is just under the size of the dart2js snapshot).

I tried this before.  This may break again on windows - if so, i'll revert.

R=jakemac@google.com

Review-Url: https://codereview.chromium.org/2760043002 .
2017-03-20 18:51:37 -07:00
Peter von der Ahé d1bdc9596d Improve detection of compile-time errors.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2739213004 .
2017-03-10 14:14:49 +01:00
Peter von der Ahé c19b49ff26 Move most of kernel-service.dart to package:front_end.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2738253003 .
2017-03-10 13:10:28 +01:00
Peter von der Ahé 6176847e36 Consolidate analyzer dependencies.
This allows us to create a smaller .dill file for Fasta.

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2723113002 .
2017-03-02 12:59:47 +01:00
Peter von der Ahé c59ecd801c Remove package imports from itself.
Without this, we risk creating two different libraries at runtime. One
named file:///something/ and one named package:front_end/something.
These libraries are different and if enums from one gets mixed with
the other, you get very confusing errors (to apparently identical enums
aren't equal).

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2726793003 .
2017-03-02 12:34:46 +01:00
Vyacheslav Egorov 3b7a956e0c VM: [Kernel] Pass correct parameters to fasta's TranslateUri.parse.
Signature is TranslateUri.parse(Uri sdk, [Uri uri]) so path to the packages
file should be passed as a second argument and not the first one.

R=kustermann@google.com
BUG=

Review-Url: https://codereview.chromium.org/2720693003 .
2017-02-27 14:00:54 +01:00
Vyacheslav Egorov b026aed3cf Remove dartk and DFE workers support from testing scripts and kernel-service.
We only support running -c dark and -c dartkp configuration through Kernel isolate and fasta in non-batch mode.

R=kustermann@google.com
BUG=

Review-Url: https://codereview.chromium.org/2721543003 .
2017-02-27 13:31:03 +01:00
Asger Feldthaus 8bfc4b47c0 Implement canonical name scheme in kernel.
This adds a class CanonicalName that can represent a library, class,
or member.  All references now go through a Reference object, which is
linked to both the AST node and its CanonicalName, so either can be
created first.

dartk now accepts multiple input files:
- If multiple dart files are given, they are all compiled.
- If multiple binaries are given, they are linked together.
Mixed dart and binary input is not supported by dartk.

dartk now has a flag --include-sdk which includes the entire SDK in
the output.  This is so the SDK can be compiled alone and then linked.

Example of compiling separately and then linking:
  dartk foo.dart -o foo.dill
  dartk main.dart -o main.dill
  dartk --include-sdk -o sdk.dill
  dartk main.dill foo.dill sdk.dill --target=vm --link -o program.dill

dartk still has incredibly slow cold start due to the analyzer loading
the dart sdk, so this does not actually speed things up at the moment.

BUG=
R=ahe@google.com, kmillikin@google.com, kustermann@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2665723002 .
2017-02-23 14:12:10 +01:00
Vijay Menon 019e16a7ad Rerun format
Looks like I forgot to do this on my last cl.

TBR=jmesserly@google.com

Committed: 0c8704e1c7
Review-Url: https://codereview.chromium.org/2709613003 .
2017-02-21 16:07:01 -08:00
Vijay Menon e4733ac145 Train ddc snapshot on itself
This speeds up dartdevc on hello world from about 600ms to about 150ms.

OTOH, it also increases the snapshot size from ~4.6M to ~31M (the
latter is just under the size of the dart2js snapshot).

R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2707023002 .
2017-02-21 15:56:19 -08:00
Peter von der Ahé d32f47b293 Implement line and column numbers.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2704753002 .
2017-02-20 10:04:12 +01:00
Martin Kustermann d93928a6ce Make dartk-{release,debug} builders work properly again
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2696613003 .
2017-02-14 14:01:58 +01:00
Peter von der Ahé c13730e8ea Pay some naming debt.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2682993002 .
2017-02-09 13:10:24 +01:00
Vyacheslav Egorov d5a11f3d34 [Kernel] Enable Kernel Isolate to use Fasta instead of DartK.
We are not switching yet, but now everybody can try fasta by doing:

$ dart -DDFE_USE_FASTA=true --dfe=utils/kernel-service.dart hello.dart

Note that when using fasta we expect that patched_sdk contains platform.dill
Kernel binary containing compiled patched sdk. This file can be obtained by
doing:

$ export DART_AOT_SDK=<path-to-patched_sdk>
$ dart pkg/front_end/lib/src/fasta/bin/compile_platform.dart \
  ${DART_AOT_SDK}/platform.dill

We are also adding --use-fasta to testing script to allow end-to-end testing
of fasta (though platform.dill file needs to be generated manually prior to
running tests):

$ tools/test.py -c dartk -m release -a x64 --nobatch --use-fasta

Current test status:

$ tools/test.py -c dartk -m release -a x64 --nobatch --use-fasta
[27:34 | 100% | +12566 | - 1941]

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

Review-Url: https://codereview.chromium.org/2684943003 .
2017-02-08 16:48:35 +01:00
Kevin Millikin 3057283f0c Split the Kernel transformations into modular and global ones
Target-specific modular transformations have to be able to cope with
external libraries.  Target-specific global transformations should be
optimizations, and not required for correctness, since a simple linker
may choose not to perform them.

Make mixin resolution modular by making it fail when a mixed-in class
comes from an external library.  (We cannot mix in such a class because
we do not necessarily have all class members.)

R=asgerf@google.com

Review-Url: https://codereview.chromium.org/2671653003 .
2017-02-02 13:08:27 +01:00
Ryan Macnak 9eb216a495 Reapply "Create an app snapshot of the Dart front end."
Skip training on Windows, issue #28532.

R=hausner@google.com

Review-Url: https://codereview.chromium.org/2665753002 .
2017-01-31 09:47:51 -08:00
Ryan Macnak 728f460798 Revert "Create an app snapshot of the Dart front end."
This reverts commit 8c7111c967.
This reverts commit 27c8e59d2e.

Review-Url: https://codereview.chromium.org/2657123002 .
2017-01-26 17:42:25 -08:00
Ryan Macnak 8c7111c967 Create an app snapshot of the Dart front end.
R=asiva@google.com, hausner@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2655173002 .
2017-01-26 16:28:59 -08:00
Ryan Macnak 26a364f998 Support spawnUri in app snapshots.
- Don't mark core_isolate_snapshot_buffer as a const pointer.
 - Update app snapshots without code to not rewrite the VM isolate snapshot, as already done by app snapshots with code.

Fixes #28368

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2637193002 .
2017-01-17 15:59:41 -08:00
Ryan Macnak 12a3699301 Revert "Support spawnUri in app snapshots."
Failures on IA32.

This reverts commit c6ecfe1746.

Review-Url: https://codereview.chromium.org/2631893002 .
2017-01-13 15:52:36 -08:00
Ryan Macnak c6ecfe1746 Support spawnUri in app snapshots.
Don't mark core_isolate_snapshot_buffer as a const pointer.

Fixes #28368

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2623423007 .
2017-01-13 15:18:27 -08:00
Ryan Macnak f89056f6cd Revert "Support spawnUri in app snapshots."
This reverts commit 593d4504b0.
This reverts commit 113aa64b98.
This reverts commit 422afa2ead.

Review-Url: https://codereview.chromium.org/2633543003 .
2017-01-13 11:02:44 -08:00
Ryan Macnak 593d4504b0 Support spawnUri in app snapshots.
Fixes #28368

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2628283002 .
2017-01-13 10:37:51 -08:00
Ryan Macnak 5062baffb6 Revert pub to script snapshots in the GN build. Fixes #28346.
App snapshots do not yet support spawnUri (issue #28368).

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2621423004 .
2017-01-12 13:07:29 -08:00
Zachary Anderson 7f55ad8b86 Fuchsia: Allows building the full SDK for host and target.
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2571713004 .
2016-12-13 13:02:52 -08:00
Zachary Anderson ccfafee023 Make list_files.py and list_dart_files.py return absolute paths for GN
This makes doing an SDK build in the Fuchsia tree easier.

The previous attempt at this change failed in gyp builds targeting xcode.
They failed because input lists for actions of the same target (e.g. the
actions for dartanalyzer) are merged and de-duped when the lists contain
relative paths, but merged and *not* de-duped when the lists contain
absolute paths. gyp rejects xcode files that it generated itself
when they contain duplicate entries.

This CL works around that bug, by using absolute paths in the GN build
and keeping relative paths in the gyp build.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2567213002 .
2016-12-13 10:01:28 -08:00