Commit Graph

1162 Commits

Author SHA1 Message Date
Martin Kustermann 8c38a415de Use batch mode compilation for -cdartkp --strong
Preliminary testing shows, this increases performance by around 20%. The
main benefit is by re-using a warmed-up VM and not start one from
scratch for every compilation.

Going forward we can do more optimizations, e.g. reading the platform
dill file only once into memory (instead of repeatedly) ...

  => This requires us using the new state-full IKG compiler.

Change-Id: I74db7dbb1aa79289d1045ef41f960215cf5b3b35
Reviewed-on: https://dart-review.googlesource.com/28240
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-11 15:55:31 +00:00
Vyacheslav Egorov 50865e9387 [vm/testing] Make --strong -c dartk configuration a Dart 2.0 configuration.
Switch it to use pkg/vm/tool/dart2 which is the source of truth for what
Dart 2 VM configuration means. Don't pass any additional flags from
tools/test.py itself.

Align pkg/vm/tool/dart2 with what tools/test.py was passing to VM on _2 suites.

Make default invocation `tools/test.py -c dartk --strong -m release,debug`
green by updating status files and skipping suites that are not Dart 2.0
compliant. I have filed issues #31588 for isolate suite and #31587 for
service suite.

Change-Id: I882b28f6a011eabf69c349ff0792b275434e39ff
Reviewed-on: https://dart-review.googlesource.com/27820
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-12-11 12:49:22 +00:00
Martin Kustermann a95995c311 Direct all output from the compiler to stderr
Change-Id: Ib6a9c954f8e99b5d5c77a2c35922b4fb705d429e
Reviewed-on: https://dart-review.googlesource.com/25341
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-07 13:31:35 +00:00
Alexander Markov da61c326ed [VM/Kernel] Move devirtualization to pkg/vm, cleanup target-options
* The package:kernel/transformations/precompiler.dart is moved to
  package:vm and split into 2 libraries: metadata/direct_call and
  transformations/cha_devrtualization.

* Fasta 'target-options' command line argument and
  package:kernel/target/implementation_option.dart are cleaned up
  as they are no longer used.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I21a7b6bc62a036a9694e62a5dae890f6120d79ab
Reviewed-on: https://dart-review.googlesource.com/26360
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-06 18:49:33 +00:00
Alexander Markov 421ed32f54 [VM] Support generating kernel for JIT mode
* The tool pkg/vm/bin/precompiler_kernel_front_end.dart is renamed to
  gen_kernel.dart and extended with --aot option (off by default).

Change-Id: I0aaa6c6b4acd1600beba736193fa2ee2d723a581
Reviewed-on: https://dart-review.googlesource.com/26363
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-06 18:48:50 +00:00
keertip f821818d8e Add support for passing in platform kernel location to kernel service
Bug:
Change-Id: If3672e992d2446edce60d5e84782624230e7cbb6
Reviewed-on: https://dart-review.googlesource.com/26120
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2017-12-05 17:54:51 +00:00
Alexander Markov 2cd25f0210 [VM] Wire up package:vm/kernel_front_end in precompiler2 and test.py
This CL introduces a tool for compiling Dart sources to kernel
files specifically for Dart 2.0 AOT compiler (precompiler).

Internally, the new tool uses package:vm/kernel_front_end which invokes
kernel front-end to produce kernel Program and then runs additional
whole-program transformations specific to AOT.

The new tool is used in pkg/vm/tool/precompiler2 and in tools/test.py
when running tests in '-c dartkp --strong' mode.

This CL re-enables AOT-specific transformations disabled by
6cfc0558ec, so it silences several
tests for https://github.com/dart-lang/sdk/issues/31424#issuecomment-347996235

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

Issue: https://github.com/dart-lang/sdk/issues/30480

Change-Id: I4860f2adad17be9dcb1ca4609a4a10ad29ec51cd
Reviewed-on: https://dart-review.googlesource.com/25720
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-04 22:28:39 +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
Alexander Markov 39f049d643 [Kernel/VM] Introduce VM-specific translation of Dart sources to kernel
This CL introduces compileToKernel() function in package:vm/kernel_front_end
as the replacement for kernelForProgram() from package:front_end/kernel_generator.

The new function will be used to customize kernel Programs for VM need.
For example, it will perform additional AOT-specific global transformations.
In future, compileToKernel() will be used from Flutter and precompiler2.

Also, this CL cleans up Target.strongModeSdk as it is no longer used.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: Ib9c2b5d0af955475292df8e456073a5f0e6a64be
Reviewed-on: https://dart-review.googlesource.com/25080
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-11-30 20:44:45 +00:00
Alexander Markov 58ffdbf5fc [VM] Move kernel service to pkg/vm, populate pkg/vm with necessary files
* kernel-service.dart is moved to pkg/vm/bin and renamed to
  kernel_service.dart

* LICENSE, pubspec.yaml and analysis_options.yaml added to pkg/vm.

* Kernel isolate name is corrected to be independent of URI passed
  in --dfe VM option.

Change-Id: I5b7b860297314e240e557af80913e7ac3e6324ad
Reviewed-on: https://dart-review.googlesource.com/21260
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-11-17 17:45:03 +00:00
Vyacheslav Egorov 1aa81ee849 [vm] Fix small issues in pkg/vm/tool scripts.
* consistently quote $BIN_DIR;
* remove convoluted logic that tries to guess DART_CONFIGURATION;
* fix issue with how $PACKAGES were passed to fasta in precompiler2.

Bug:
Change-Id: I3073330fe3397100406d9ad6dcab2a86f9e1825f
Reviewed-on: https://dart-review.googlesource.com/21082
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-11-15 14:29:41 +00:00
Vyacheslav Egorov 09c1bea97a [VM] Add VM specific package pkg/vm and use it to host transitionary wrappers.
These wrapper scripts centralize the notion of what Dart 2 means for VM.

They enable relevant flags and use relevant intermediate code generation steps
where necessary.

* pkg/vm/tool/dart2 invokes dart binary with DFE and strong mode.
* pkg/vm/tool/precompiler2 uses Fasta and AOT specific Kernel-to-Kernel
transformations to generate Kernel binary which then will be compiled with
normal Dart VM precompiler.
* pkg/vm/tool/dart_precompiled_runtime2 is similar to dart2 wrapper but for running
AOT snapshots.

Bug:
Change-Id: I1f96d545d800f676679fb1058f7905ba0f68df8f
Reviewed-on: https://dart-review.googlesource.com/20702
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-11-14 21:06:54 +00:00