When the constant transformation is enabled on annotations, we need to fix handling
of @ExternalName annotations in the kernel_loader to ensure that we are setting
is_external = false on native methods.
The original revision is in patchset 1.
# Test Plan
The only regression was on benchmarks, Golem results are pending.
Change-Id: Ib80bb9f532299056e770a3b378cc5ad9ee451f57
Reviewed-on: https://dart-review.googlesource.com/56960
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
GrowableArrayMarker was a class that implemented int and was used to
enable implementation of default List factory constructor in pure Dart:
factory List([int length = GROWABLE_ARRAY_MARKER]) {
return identical(length, GROWABLE_ARRAY_MARKER) ? new _GrowableList<E>(0)
: new _List<E>(length);
}
Its existence complicated all kinds of things in the VM and it is finally
time to remove it.
Instead we build List factory body directly in IL.
This CL also provides inlining rule for `new List(n)` case.
Change-Id: I870751658a4ac17fce649c9ac70395ff88a5436c
Reviewed-on: https://dart-review.googlesource.com/57262
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
* Use 3-arg variant of open() to fix compilation on GCC and also to ensure
that created file is readable/writable by all users.
* Avoid changing protection on code pages emitted into VM isolate heap: this
allows to profile stubs.
Change-Id: I2b621596405ad78f54a63cfebde7a1af9fa15911
Reviewed-on: https://dart-review.googlesource.com/57263
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
- Forward only kImportTag requests to DFE. This restores the current handling of a kScriptTag request when loading the kernel isolate in the simulators.
- Mark dynamic_load_test as failing in the reload stress tests (reload fails to preserve library identity).
Change-Id: Ibe6f0a3505b99736a38d566abf3b2151505d7a7e
Reviewed-on: https://dart-review.googlesource.com/56706
Reviewed-by: Siva Annamalai <asiva@google.com>
Add a clause indicating that FunctionCallTreeNode (in
lib/src/sample_profile/sample_profile.dart) implements
M.FunctionCallTreeNode. This allows the two types for `root`
inherited by FunctionCallTree to be consistent with each other: the
type inherited from CallTree<FunctionCallTreeNode> is
FunctionCallTreeNode whereas the type inherited from
M.FunctionCallTree is M.FunctionCallTreeNode.
Change-Id: I0b48c57f84681a7d40afadfb59c72501cfe38577
Reviewed-on: https://dart-review.googlesource.com/57002
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Kernel mixin transformation desugars mixin applications into normal
classes. Mixed-in type is pulled into interfaces list.
However, dart:mirrors needs to know the original mixed-in type of
a mixin application.
This change solves this problem by propagating a 'isTransformedMixinApplication'
attribute of a class through kernel AST, kernel binary and VM objects
into dart:mirrors implementation.
Fixes: https://github.com/dart-lang/sdk/issues/33240
Change-Id: I98ca69294e1ad445402a5ca91d90c30447aabcb2
Reviewed-on: https://dart-review.googlesource.com/56721
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
This splits create_archive.py into two steps. One that creates the .tar
and one that creates the .cc for the .tar. This way on Fuchsia, the
second step will take the prebuilt instead of building it.
Change-Id: I7f407f9e70db3135884eeeb61aa5aec3091f1fcc
Reviewed-on: https://dart-review.googlesource.com/56291
Reviewed-by: Ryan Macnak <rmacnak@google.com>
The VM version's parser did not allow a leading BOM, and it failed to parse a top-level integer.
Added test to check this.
Fixes#33251
Bug: http://dartbug.com/33251
Change-Id: I51e429082f0e9baac81e20f73b0885922b40b0b8
Reviewed-on: https://dart-review.googlesource.com/56860
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
Change-Id: Iec5347b5f091b9fd6ff3c24047b011527f8b08ee
Reviewed-on: https://dart-review.googlesource.com/56802
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 3e50ea32b5.
Reason for revert: Severe performance regressions on many aot-v2 benchmarks.
Original change's description:
> [vm] Support definition of entry-points via @pragma('vm.extern') annotations.
>
> The `@pragma` annotations are evaluated by the constants transformation and
> visible to TFA and the precompiler, which match on the "options" field of the
> annotation to determine whether to mark the class/procedure as a root.
>
> This required enabling the transformation of annotation constants by default.
>
> # Test Plan
>
> The "vmservice_io.main" entry-point is removed from `main.cc` and annotated with
> `@pragma`. All precompiler tests will crash if "vmservice_io.main" is not
> available at runtime.
>
> Debug/release precompiler bots are visible in "cl-linux" button.
>
> Change-Id: I03c5d6ba7918672ed9905fcaee8dabe675a93a5d
> Reviewed-on: https://dart-review.googlesource.com/56660
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,alexmarkov@google.com,sjindel@google.com
Change-Id: I779c17d003659129a4b3fcf284423104948f60e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56820
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
The `@pragma` annotations are evaluated by the constants transformation and
visible to TFA and the precompiler, which match on the "options" field of the
annotation to determine whether to mark the class/procedure as a root.
This required enabling the transformation of annotation constants by default.
# Test Plan
The "vmservice_io.main" entry-point is removed from `main.cc` and annotated with
`@pragma`. All precompiler tests will crash if "vmservice_io.main" is not
available at runtime.
Debug/release precompiler bots are visible in "cl-linux" button.
Change-Id: I03c5d6ba7918672ed9905fcaee8dabe675a93a5d
Reviewed-on: https://dart-review.googlesource.com/56660
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
zx_port_wait and zx_port_queue no longer take an unused count parameter.
Change-Id: I62f03871282d076638c51527603473252821d316
Reviewed-on: https://dart-review.googlesource.com/56705
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Adam Barth <abarth@google.com>
Since the downcast is explicit (using "as") the type will be checked
even in unchecked mode, so technically there is a slight risk of
breakage. But since the callback is so near the creation of the
ButtonElement, I'm not concerned. Also, I'm not concerned about the
performance penalty of the explicit downcast because the cost is only
paid once per user click.
Change-Id: I64fbb442985f6ba6f745f665b36a3321498025e4
Reviewed-on: https://dart-review.googlesource.com/56704
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This allows code to access a VM object's target without having to
downcast it to a more specific type.
Change-Id: I42f329e205c2da0137be2440f0d3088a7137bc55
Reviewed-on: https://dart-review.googlesource.com/56703
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
For brevity we explicitly downcast the parameter type (using "as")
rather than implicitly downcasting it (by assigning to a fresh
variable). Since this is test code, I'm not concerned about the
performance penalty of the explicit downcast.
Change-Id: I2bf1556ec11db124978c6631df8fcdd5adbc298d
Reviewed-on: https://dart-review.googlesource.com/56701
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
In some cases we need to specify a type because the inferred type
would be too specific. For example, in the code:
final content = [new SampleBufferControlElement(...)];
...
content.addAll([new BRElement(), ...]);
Strong mode would infer a type of `List<SampleBufferControlElement>`
for `content`, making it impossible to add other kinds of HTML
elements to the list later. So we have to specify explicitly that the
list element type is meant to be `HTMLElement`.
In other cases we need to specify a type because the inferred type is
too general. For example, in the code:
Future<List<String>> complete(...) {
var result = [];
...add values of type String to `result`...
return new Future.value(result);
}
Strong mode would infer a type of `List<dynamic>` for `result`, making
it impossible to enclose in a `Future<List<String>>`. So we have to
specify explicitly that the list element type is meant to be `String`.
Change-Id: I1b1c884529de2775898dfff800d250cd10629811
Reviewed-on: https://dart-review.googlesource.com/56700
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The types now correspond in the two classes, so we avoid invalid
override errors.
Change-Id: Iceeb324e6adf7573ae39d7250184f7eb58656498
Reviewed-on: https://dart-review.googlesource.com/56021
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This CL makes the following changes, which should be safe since they
don't affect Dart 1.0 semantics:
- Explicitly declare the types of certain variables as `dynamic` to
avoid strong mode inferring a type that leads to errors.
- Explicitly cast certain expressions to `dynamic` to allow access to
members that are dynamically known to be present.
- Add `covariant` annotation to method parameters that are a subtype
of the corresponding parameter in the base class.
Change-Id: Ibefe4d9591f70ea954373ca4d521bc54179cca9b
Reviewed-on: https://dart-review.googlesource.com/55900
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This CL addresses a code pattern where a method expects its parameter
to have a certain type, but that method is torn off and passed as a
callback to another method expecting its parameter type to be more
general. For example:
void f(int i) { ... }
void g(void callback(Object o)) { ... }
void h() {
g(f); // Error: () -> int is not a subtype of () -> Object
}
This is a strong mode error because the type system cannot guarantee
that the value pased to f will be an int. The solution is to broaden
the type of the callback parameter so that it matches the type
expected for the callback. In most cases, we insert an implicit
downcast (by reassigning the parameter to a local variable with the
expected type), which in Dart 2.0 semantics will result in a runtime
check (similar to what happens in Dart 1.0 checked mode).
Since the downcasts are implicit, the Dart 1.0 semantics are
unchanged, so this should be a safe change.
Change-Id: I9583ea194343b89b39305c9796cfad299a47943f
Reviewed-on: https://dart-review.googlesource.com/55907
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
At a minimium, the image portion of the snapshot is sensitive to word size.
Change-Id: I1056a726c7b773f3ef65608f3244aaa01a366ec4
Reviewed-on: https://dart-review.googlesource.com/56023
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This reverts commit ad4cfa0260.
Reason for revert: Assertion failures on DBC
Original change's description:
> [mirrors] Add IsolateMirror.loadUri.
>
> This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.
>
> Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
> Reviewed-on: https://dart-review.googlesource.com/45363
> Reviewed-by: Zach Anderson <zra@google.com>
TBR=rmacnak@google.com,zra@google.com,asiva@google.com,kmillikin@google.com
Change-Id: I80669188b9f40b3b527e8e268ade0d0d514a8753
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.
Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
Reviewed-on: https://dart-review.googlesource.com/45363
Reviewed-by: Zach Anderson <zra@google.com>
Previously we would only mark immediate superinterfaces
as implemented which is not enough.
Bug: b/80154489
Change-Id: I0751d4326b1ac8930b7fdfb35e0c3fdd5d0b71dd
Reviewed-on: https://dart-review.googlesource.com/56485
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Summary:
When evaluating constants for direct inspection (and not for injection into the
FG), we store many intermediate values in ZoneHandles. This leaks memory, since
the only need for ZoneHandles is preserving constants which are referenced by
the FG.
Test Plan:
Existing coverage is sufficient since no functionality is changed.
Change-Id: I33951eab762a4ad626f07ebf11118247c5a9ad3e
Reviewed-on: https://dart-review.googlesource.com/56345
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
# Summary
As part of commit 772c9bb5f, we changed the representation of partially
instantiated closures to facilitate partial instantiation of local functions.
The compile-time constant evaluator was not updated -- this revision implements
that update.
Fixes task 33211.
# Test Plan
Updated `partial_tearoff_instantiation_test.dart` to test the case which caused
incorrect behavior in task 33211.
Change-Id: I7bbd4fb83a5aea86ffc85c1d9952f1202f098d6b
Reviewed-on: https://dart-review.googlesource.com/56346
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Without active class, kernel reader is not able to finalize types
and fails to parse type literals.
Fixes https://github.com/dart-lang/sdk/issues/33173
Change-Id: Iefe7f33a371f3d4f892f21f8ea0060d70887186c
Reviewed-on: https://dart-review.googlesource.com/56242
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Since commit 775eeece we use a kernel2kernel constant evaluator for
AOT compilations. We can now start to ensure we never hit the constant
evaluator in the VM anymore.
Issue https://github.com/dart-lang/sdk/issues/33185
Change-Id: If0e3b5c89fba64a7f93af606e7146e52c45b38df
Reviewed-on: https://dart-review.googlesource.com/56340
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This was pulled out of old revision by Slava.
Change-Id: I9fa276b0768f4aa908754fec8369b1272ec465be
Reviewed-on: https://dart-review.googlesource.com/56108
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Given IL like this:
t3 <- Constant(#null) <--\
// ... do something ... |
StoreLocal(:temp, t4) ---/
// Do something else
StoreIndexed(t1, t2, t3)
Graph builder would use Constant(#null) as an input definition for
StoreIndexed - which leads to wrong generated code in unoptimized mode
on X64 where StoreIndexed has specialization for constant values. In
optimized code SSA renaming would actually replace t3 with a correct
reaching definition.
This CL introduces a new IL instruction MakeTemp(...) which has exactly
the same effect as Constant(#null) on the expression stack, but is
not treated as a constant value by the backend.
The bug was unnoticed because of the loose assertions in the SSA
renaming which permitted replacing Constant-s with non-Constant
reaching definitions. This CL also tightens those assertions to
catch this issue.
Also cleanup the code in SSA renaming a bit to make it a bit easier
to understand.
Fixes https://github.com/dart-lang/sdk/issues/33195
Bug: 33195
Change-Id: I7c914c836d4af7a50e8a8e1a02d03e9413f87779
Reviewed-on: https://dart-review.googlesource.com/56112
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Change-Id: I1bd94725b4e4e44e706c6d22543bbea22649ec69
Reviewed-on: https://dart-review.googlesource.com/55680
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
With this change debugger requests yield(await) positions from kernel builder so it can confirm which frame handles what exceptions.
This also renames ':completer' to ':async_completer' in constructed kernel, so it is compliant with what VM expects to see(and updates test expectations accordingly).
Further it fixes async stack navigation for sync-async that became default in dart vm since first version went for the review((uses `future` getter, rather than property).
It also makes `future` getter non-debuggable to allow stepping-out of async methods.
Make Handle zone-scoped. Clean up frame counter var name.
Bug: https://github.com/dart-lang/sdk/issues/29056
Change-Id: Ia71f3c851a6b313655b57dad28c296f5dd081eda
Reviewed-on: https://dart-review.googlesource.com/54640
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This ensures that the resulting Iterable will have the proper type
when run with strong mode semantics.
In Dart 1.0 semantics, the type argument to .map is ignored, so this
change should be safe.
Change-Id: I34924bc7e803b1520af7d174cfe80f5be6b7ac0f
Reviewed-on: https://dart-review.googlesource.com/55908
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is necessary because many call sites invoke toUserString without
first casting to one of the derived classes.
This should be safe since both derived classes (SourceLocation and
UnresolvedSourceLocation) contain a definition of toUserString.
Change-Id: I69eeda326883d87fc4e8cedd732881d250cae8cb
Reviewed-on: https://dart-review.googlesource.com/55909
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is useful when embedder needs to kill an isolate that might be paused on a breakpoint.
Change-Id: If54decda5d16c694b81a25ae43d37f8eb41e8105
Reviewed-on: https://dart-review.googlesource.com/55276
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This CL fixes some cases where Observatory mistakenly tried to use a
C-style parameter declaration, e.g.
void foo(String);
The intent is to declare the parameter to have type `String`, but Dart
interprets the parameter as having *name* `String` and type `dynamic`.
In most cases the fix applies to abstract method declarations, whose
types aren't semantically relevant in Dart 1.0, so these parts of the
CL should be safe.
In one case it applies to a typedef, IsConnectedVMTargetDelegate. The
only use of this typedef is as the type of
TargetRepository._isConnectedVMTarget, whose value is always the
static function ObservatoryApplication.isConnectedVMTarget. The type
of ObservatoryApplication.isConnectedVMTarget matches the typedef
(according to Dart 1.0 rules) both before and after the change, so
this should be safe as well.
Change-Id: Ia67f5f14d5a012ccb8a44cbd88a8233f8c9ad171
Reviewed-on: https://dart-review.googlesource.com/55901
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This CL addresses a code pattern where a method has a more general
return type than it needs, causing a strong mode error at the site
where the method is called or torn off. For example:
Object f() => 'x';
void g(String callback()) { ... }
void h() {
g(f); // Error: () -> Object is not a subtype of () -> String
}
The solution is to tighen up the return type. In all cases in this
CL, it is obvious from the method definition that the value returned
at runtime will satisfy the tighter return type, so this should be a
safe change.
Change-Id: Ifbd476d969274342653d2619c1c81e2e014817c4
Reviewed-on: https://dart-review.googlesource.com/55904
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Summary:
The constants table contains a concatenation of the variable-length encodings of
each constant used in the serialized component. Previously, we referenced the
constants in the code by index into the constants table, which requires reading
potentially the entire constants table to dereference. Now, we refer to the
constant by the binary offset into the constants table, which allows us to peek
into it in constant time.
Test Plan:
The constants table is used by all the precompiler modes, so the new encoding
will inherit the coverage of the existing encoding.
Results from debug and release precompiler bots are available under the
"cl-linux-try" button.
Change-Id: I4782bc0035d0b0cbd5bd6b9d086561ea601286c8
Reviewed-on: https://dart-review.googlesource.com/55470
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
We have to close the fds we got from the namespace before destroying
the namespace.
Change-Id: I3298868a444d262b4ded147a1dc8eb1a99c92a1c
Reviewed-on: https://dart-review.googlesource.com/55983
Reviewed-by: Zach Anderson <zra@google.com>
- Fix for 'unable to read .packages file' error when generating
kernel file (script snapshot).
- Make sync-async an isolate specific flag and turn it off for
the kernel isolate as it runs in Dart 1 mode
- Include 'reify-generic-functions' and 'sync-async' flags to the
list of flags to check an app JIT snapshot against.
Change-Id: I2b16270f65705213660487f9c15fe0348fc84c8b
Reviewed-on: https://dart-review.googlesource.com/55589
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Dynamic invocations of generic functions might not pass type arguments.
The type arguments need to be filled in with the default type arguments
calculated by the CFE.
Change-Id: I5865e79b2975af97d1ca1680bd88ba8137208bb8
Reviewed-on: https://dart-review.googlesource.com/48423
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
This fixes an issue when a program got loaded via dill, a function
with a try-catch got optimized and the exception/stacktrace variables
got captured.
Change-Id: Icb8ea5f3557080f8274f7db2af09e33154820e5b
Reviewed-on: https://dart-review.googlesource.com/55721
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This reverts commit 23b4a505ec.
Reason for revert: The language_2/custom_await_stack_trace_test started failing.
Original change's description:
> Reland "[VM] Use IR for code in [CatchEntryInstr]s to populate captured exception/stacktrace variables"
>
> This fixes an issue when a program got loaded via dill, a function
> with a try-catch got optimized and the exception/stacktrace variables
> got captured.
>
> Change-Id: Icb626965019b248afe3b72a6679c5049ea7b7b00
> Reviewed-on: https://dart-review.googlesource.com/55681
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>
TBR=vegorov@google.com,kustermann@google.com
Change-Id: Ic825c1e3ed14c731da1d43aa6f27d37ed5d36b4c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/55720
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This fixes an issue when a program got loaded via dill, a function
with a try-catch got optimized and the exception/stacktrace variables
got captured.
Change-Id: Icb626965019b248afe3b72a6679c5049ea7b7b00
Reviewed-on: https://dart-review.googlesource.com/55681
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
It is quite slow on those builders and causes timeouts.
Change-Id: I876bba2c8e0d4e06dd9dff94e421d35e3f0236d1
Reviewed-on: https://dart-review.googlesource.com/55684
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 3531af383e.
Reason for revert: Caused many buildbot failures.
Original change's description:
> [VM] Use IR for code in [CatchEntryInstr]s to populate captured exception/stacktrace variables
>
> This fixes an issue when a program got loaded via dill, a function
> with a try-catch got optimized.
>
> Change-Id: I98b2a4aaa7e5472f3e37fd71c1276079102b0142
> Reviewed-on: https://dart-review.googlesource.com/54021
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,kustermann@google.com
Change-Id: If4b80128525754d30cec680ad5ff6bc4035296bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/55422
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This fixes an issue when a program got loaded via dill, a function
with a try-catch got optimized.
Change-Id: I98b2a4aaa7e5472f3e37fd71c1276079102b0142
Reviewed-on: https://dart-review.googlesource.com/54021
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reason for revert: Breaking API change blocks Flutter rolls. Reverting
to reconsider, work around, etc..
Revert "[ VM ] Fixed issue where backing array was deleted from an ExternalTypedData before the ExternalTypedData was used."
This reverts commit 916b9da48d.
Revert "[ VM ] Fixed tests for non-UTF8 paths on Windows / Macos."
This reverts commit 6327fe91c2.
Revert "[ VM ] Fix failing tests on Windows bots after non-UTF-8 paths change."
This reverts commit b51f4b7956.
Revert "[ VM ] Updated non-UTF-8 tests to expect exceptions on OSX/iOS."
This reverts commit bcb36247d2.
Revert "Revert "[ VM ] Updated non-UTF-8 tests to expect exceptions on OSX/iOS.""
This reverts commit 24450c79a5.
Change-Id: I756f74f4acdde168d0984fe130f05f9252366334
Reviewed-on: https://dart-review.googlesource.com/55441
Reviewed-by: Todd Volkert <tvolkert@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
The CL was originally committed in 039e8a175 (and reverted in
46ab040e5). The fix for the issue has landed in 9d9ce8d69 .
This time the CL will land in "disabled" form and will be enabled in a separate CL.
Change-Id: I3d5eb952230aee99875e3c58a6595691c5145e25
Reviewed-on: https://dart-review.googlesource.com/55361
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Move implementation details into patch files, it does not belong in the interface.
Actually implement NoSuchMethod.withInvocation in dart2js.
Change-Id: I37049c258067b962d18eff42196e37aa127f0dea
Reviewed-on: https://dart-review.googlesource.com/55166
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reland "Fix issues with FileSystemEntities which have non-UTF8 paths causing exceptions to be thrown when converting to/from a Dart VM String."
This reverts commit 4f549e2900.
Change-Id: Ia27c8c300beb178fa7b08ffe0bfcb2d61f65bbb5
Reviewed-on: https://dart-review.googlesource.com/55271
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
If this array is not snapshotted then optimized code is not invalidated
when new subclasses are finalized leading to execution of incorrect code.
Change-Id: Ib28609a5e6499aedb1b2c19de40ab00fd5a786bc
Reviewed-on: https://dart-review.googlesource.com/55240
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
This reverts commit b5154dd01e.
Original revision is in patchset 1.
Change-Id: Ic0776011c6fdbd64c025086535351474a9a88b6e
Reviewed-on: https://dart-review.googlesource.com/54407
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
The behavioral difference is that named and optional arguments are filled in
with their default values in the `Invocation` object passed to `noSuchMethod`.
On the implementation side we make NSM forwarders concrete and fill in their
bodies in the CFE. The custom (and somewhat hacky) VM support is no longer
needed, and Dart2JS can benefit from this implementation as well.
According to discussion on #33031 we will be able to re-land this soon without
breaking Mockito.
Prior failures on precompiler bots are fixed in Patchset 2.
Change-Id: If1b7fe4cf6da5ef38f330e1ad226121bcfc958a1
Reviewed-on: https://dart-review.googlesource.com/54401
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
In some cases, bailouts in the bg compiler, e.g. caused by class
finalization, mark functions as unoptimizable, which can significantly
slow down an application.
Instead of doing this, we mark these functions as non-optimizable on the
BG compiler and trigger re-compilations on the main thread.
Change-Id: Ifbb6aa7972818be8fa1313427e38d8b5576053e3
Reviewed-on: https://dart-review.googlesource.com/54886
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Metadata is no longer written ahead of all nodes. Instead, metadata for
each node is written in the same context as the node itself (into a separate
buffer). This allows metadata to contain (serialize) arbitrary nodes
(for example, arbitrary DartTypes) and use serialization context of parent
nodes (such as declared type parameters).
However, with this change metadata looses the ability to reference
arbitrary AST nodes. This ability was overly restricted and had no
practical uses. (It was not possible to reference nodes which are not
reachable from root Component. As a consequence, it was not possible to
write references to arbitrary DartTypes.)
This change aligns the serialization capabilities of metadata with
how kernel AST nodes are serialized.
Change-Id: I027299a33b599b62572eccd4aa7083ad1dd2b3b3
Reviewed-on: https://dart-review.googlesource.com/54481
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This reverts commit ba342a94ec.
Reason for revert: Bots are red.
Original change's description:
> Fix issues with FileSystemEntities which have non-UTF8 paths causing exceptions to be thrown when converting to/from a Dart VM String.
>
> Continuation of PR #32583 by powdercloud
>
> Fixes#29451
>
> Change-Id: I4bdf24f9c8ead425a4f0cad33b642908f1ec203d
> Reviewed-on: https://dart-review.googlesource.com/51580
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,zra@google.com,tvolkert@google.com
Change-Id: I12850f178a13a75289d18af4e565bd73c59b14ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/55060
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Continuation of PR #32583 by powdercloud
Fixes#29451
Change-Id: I4bdf24f9c8ead425a4f0cad33b642908f1ec203d
Reviewed-on: https://dart-review.googlesource.com/51580
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>