Size of a large application:
Before: 26628600
After: 21480120 (-19.3%)
Size of snapshots:
isolate_snapshot_framework.bin
Before: 9322496
After: 6782976 (-27.2%)
isolate_snapshot_product_framework.bin
Before: 9166848
After: 6602752 (-27.9%)
Regressions in tests:
1) Test language_2/type_alias_equality_test/04 fails similarly to default mode, as VM
does not implement comparison of function types according to the specification.
Previously this test was passing as function types were canonicalized in bytecode,
which was not always correct. This CL fixes the problem with canonicalization of
function types in bytecode and the test starts failing again.
2) Tests standalone_2/entrypoints_verification_test, standalone_2/io/test_extension_test,
standalone_2/io/test_extension_fail_test fail as native extensions are not supported
in bytecode yet. These tests start passing after df5e7aac17,
which switched bytecode tests to kernel service (on x64), because kernel service doesn't
drop ASTs. This CL switches from reading AST library declarations to bytecode even if
AST is not removed, so tests fail again.
Change-Id: I8b7ba44bfa49d0b1599b2509553ff7c831a4e244
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104700
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This improves the missing class, mixin, and extension method body
error messages and lays the groundwork for improving other
missing body error messages such as switch statement, finally clause,
and others.
Change-Id: I0a4d1338fe91eee3cfe7d61652e168df1302d212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103570
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This adds a new "conflicting modifiers" error code for new NNBD
modifier errors and replaces the existing "const and var" error
code with the new error code.
Change-Id: I1997bbb7f66e62d2de3c5042b6ea85861f2e00d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Given an experiment named foo, it doesn't make sense to ask the user
to enable experiment --foo, since that's not the syntax for enabling
an experiment (the syntax is --enable-experiment=foo). Changed to
'foo'.
Change-Id: I055461fb389a4338578fc7f260e252b8e3fe9a13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99286
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Invocation of == and != is only constant on receivers of types bool, int, double, and String or null operands. This is now handled correctly in constant evaluation. The case for method invocation of `a != b` is removed since it is parsed as `!(a == b)`.
Change-Id: I65d8ddf2716f319f61fc0609803a5237f4aba644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98349
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This acts as a stable backstop for situations where Fasta fails to
rewrite various erroneous constructs into invalid expressions.
Change-Id: Ibaac3d62b9cfdc597c0f85aadf9aec2920689222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97511
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
This reverts commit 9db4119b67.
Revert "Change default of 'keepFields' in constant transformation to true"
This reverts commit b1e14cbe5f.
Revert "[fasta] Don't create forwarding stub if there's already a member"
This reverts commit 51da94da76.
These commits are reverted to unblock rolls into Flutter.
b1e14cbe5f is reverted because it contained
changes that prevented clean revert of the other CLs.
Change-Id: I8d3c00f0c1b146f4debe7f1a1a7de75be154e265
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97802
Commit-Queue: Alexander Aprelev <aam@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
TBR=askesc@google.com
Revert "[CFE] Move constant evaluator to Fasta."
This reverts commit 845b5b2df1.
Revert "[CFE] Always call the constant evaluator by the evaluate method."
This reverts commit 91bc4ec2b9.
Revert "[CFE] Use Fasta diagnostics in the constant evaluator."
This reverts commit c7b572aa29.
Revert "[CFE] Check for null in constant evaluation"
This reverts commit e6d2751e9c.
Revert "Rename import after moving file."
This reverts commit a6e2c5eb4c.
Change-Id: Iadfe087c0110f6f331b82d990213f95d3ef4541b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97223
Reviewed-by: William Hesse <whesse@google.com>
Since Fasta is only concerned with compile-time behavior, the option
only affects asserts in initializers in const constructors when
evaluated during constant evaluation.
Change-Id: I534cc7cc1f33f9b34d15550d38ea930ed7ac6709
Reviewed-on: https://dart-review.googlesource.com/c/94740
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Prototype for `dart:ffi` on Linux/MacOS x64 in JIT mode.
`dart:ffi` is experimental and its API is likely to change in the future.
Progress and design decisions are tracked in https://github.com/dart-lang/sdk/projects/13
issue: https://github.com/dart-lang/sdk/issues/34452
Change-Id: Ifa4566388e42c8757f154741d11e303465ef305d
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-mac-debug-x64-try, vm-kernel-asan-linux-release-x64
Reviewed-on: https://dart-review.googlesource.com/c/80124
Reviewed-by: Samir Jindel <sjindel@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Previously, if failing when trying to load from a dill it would say
something like
Warning: Tried to initialize from a previous compilation
(build/app.dill), but couldn't. Error message was
'NoSuchMethodError: The method 'getReference' was called on null.
Receiver: null
Tried calling: getReference()'. This might be a bug.
The Dart team would greatly appreciate if you would take a moment to
report this problem at http://dartbug.com/new.
Which really doesn't give us a lot to go on.
This CL changes that to also give us a little go to on, and report
something like
Warning: Tried to initialize from a previous compilation
(org-dartlang-test:///initializeFrom.dill), but couldn't.
Error message was 'NoSuchMethodError: The method 'getReference' was
called on null.
Receiver: null
Tried calling: getReference()'. Stacktrace included '#0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
#1 BinaryBuilder.readLibraryReference (package:kernel/binary/ast_from_binary.dart:692:9)
#2 BinaryBuilder.readLibraryDependency (package:kernel/binary/ast_from_binary.dart:837:25)
#3 BinaryBuilder._readLibraryDependencies (package:kernel/binary/ast_from_binary.dart:829:33)
#4 BinaryBuilder.readLibrary (package:kernel/binary/ast_from_binary.dart:803:5)
#5 BinaryBuilder._readOneComponent (package:kernel/binary/ast_from_binary.dart:634:7)
#6 BinaryBuilder.readComponent (package:kernel/binary/ast_from_binary.dart:441:7)
#7 IncrementalCompiler.initializeFromDill (package:front_end/src/fasta/incremental_compiler.dart:395:14)
<asynchronous suspension>
#8 IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:126:23)
<asynchronous suspension>
#9 CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:120:46)
#10 new Future.sync (dart:async/future.dart:224:31)
#11 CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:120:19)
#12 _rootRun (dart:async/zone.dart:1124:13)
#13 _CustomZone.run (dart:async/zone.dart:1021:19)
#14 _runZoned (dart:async/zone.dart:1516:10)
#15 runZoned (dart:async/zone.dart:1463:12)
#16 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:119:12)
#17 IncrementalCompiler.computeDelta (package:front_end/src/fasta/incremental_compiler.dart:108:20)
<asynchronous suspension>
#18 initializedCompile (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/incremental_load_from_dill_test.dart:397:51)
<asynchronous suspension>
#19 basicTest (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/incremental_load_from_dill_test.dart:167:34)
<asynchronous suspension>
#20 RunCompilations.run (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/incremental_load_from_dill_test.dart:101:15)
<asynchronous suspension>
#21 ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:180:33)
<asynchronous suspension>
#22 new Future.<anonymous closure> (dart:async/future.dart:176:37)
#23 _rootRun (dart:async/zone.dart:1120:38)
#24 _CustomZone.run (dart:async/zone.dart:1021:19)
#25 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#26 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#27 _rootRun (dart:async/zone.dart:1124:13)
#28 _CustomZone.run (dart:async/zone.dart:1021:19)
#29 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#30 Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#31 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#32 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#33 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
'. This might be a bug. The Dart team would greatly appreciate if you would take a moment to report this problem at http://dartbug.com/new.
which will hopefully allow us to actually debug any such reports.
Change-Id: I13bdd4f96c1e4bb2dcce91e533442b48c87c9e0c
Reviewed-on: https://dart-review.googlesource.com/c/85348
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>