Ryan Macnak
6b5f29fb70
Reload: Don't free the saved class table while another thread may be reading it.
...
Fixes #27016 .
R=asiva@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2240283002 .
2016-08-12 16:12:25 -07:00
Siva Annamalai
cb36467568
- Fix for issue 27054 (leak when removing element from _GrowableList)
...
- _GrowableList.removeLast was not shrinking the backing array
BUG=27054
R=johnmccutchan@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/2240313002 .
2016-08-12 16:06:12 -07:00
Ryan Macnak
d98ddbfcca
Fix unsimulated ARM/ARM64/MIPS builds.
...
Review URL: https://codereview.chromium.org/2238363002 .
2016-08-12 15:46:25 -07:00
John McCutchan
3aba8355f3
Dump information when we hit a FATAL in become
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2240663004 .
2016-08-12 13:48:21 -07:00
Carlo Bernaschina
a58c34254d
Compacting _GetRetainingPath result avoiding some internal structures.
...
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2231313002 .
2016-08-12 13:42:04 -07:00
Ryan Macnak
e09f2f940e
Reload: Don't crash when a tearoff adds arguments and is called with too few.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2241603004 .
2016-08-12 13:06:35 -07:00
Ryan Macnak
7ff2dd4117
Optimize AOT's switchable calls for the monomorphic case.
...
The call sequence is very similar to a classic IC call, except the guarded class and the target are loaded indirectly from the constant pool instead of as immediates. In the monomorphic case, we call directly to the expected target with a class check in the callee. In the unlinked, polymorphic and megamorphic cases, we call a stub; these case are now call-through instead of call-and-return.
Every code, except stubs involved in switchable calls, includes the class check sequence at the beginning. So we now distinguish between a checked and an unchecked entry point. Generated code except the switchable call continues to use the unchecked entry point.
PC offsets are calculated relative to the beginning of the instruction stream, rather than either entry point.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2226893002 .
2016-08-12 11:18:35 -07:00
Ryan Macnak
87360dc375
Revert asserting only 1 arg ICs are generated in precompilation.
...
Review URL: https://codereview.chromium.org/2244743002 .
2016-08-12 10:09:02 -07:00
Martin Kustermann
4a88439e34
Reduce generated ARM code size for ReturnInstr by one instruction
...
Savings on flutter seem to be ~0.9%
R=vegorov@google.com
Review URL: https://codereview.chromium.org/2238233002 .
2016-08-12 12:58:39 +02:00
Ryan Macnak
acf68a7126
Don't mark closurized natives as natives.
...
We used to implement implicit closures by duplicating the body, but now they perform a call to the parent function.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2237113003 .
2016-08-11 16:05:54 -07:00
Florian Schneider
f26b130de9
VM: Fix math intrinsic code.
...
The functions where we have intrinsics were always inlined, so the intrinsic
code was actually not used. Move these functions to the inline black list instead to
ensure the intrinsic code is used instead. Inlining these in the generic inliner would
not help anyway since they are inlined as recognized methods by the optimizer.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2239903002 .
2016-08-11 15:48:57 -07:00
Ryan Macnak
7244b5de0e
Fail gracefully when attempting to evaluate against a VM internal class such a Field.
...
We can't evaluate against these classes because they don't have Dart source, belong to a library, etc.
Fixes #27052 .
R=cbernaschina@google.com
Review URL: https://codereview.chromium.org/2237953002 .
2016-08-11 15:08:59 -07:00
Ryan Macnak
0ad1b4e923
Guard against re-entrant requests for stack traces.
...
R=zra@google.com
Review URL: https://codereview.chromium.org/2230713005 .
2016-08-11 09:46:20 -07:00
Florian Schneider
cc08ecce13
Fix ARM intrinsic code for integer <<.
...
The argument smi-check would always fail because of the pushed code register, thus triggering the slow path.
Use a different register to avoid pushing completely.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2230123004 .
2016-08-10 14:06:03 -07:00
Matthias Hausner
1a6d1eca32
Implement @patch annotation for patch class members
...
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.
Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2230383003 .
2016-08-10 12:54:57 -07:00
Florian Schneider
eb600a9af6
VM: Add more array intrinsics.
...
Make building array intrinsics a little easier for future additions.
For now I added a few that are frequently used in Flutter.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2235433002 .
2016-08-09 17:38:53 -07:00
Ryan Macnak
a0df7275d6
Use log prints for simulation tracing and fix --disassemble-stubs.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2229553005 .
2016-08-09 14:03:29 -07:00
Matthias Hausner
f56654e882
Put patch syntax warning behind a flag
...
Fixes Dartium tests, which choke on the additional output introduced
by the warning.
TBR=vegorov
Review URL: https://codereview.chromium.org/2233493002 .
2016-08-09 13:01:12 -07:00
Adam Barth
fac99f35b3
Switch Dart_Initialize to use a struct
...
The number of NULL parameters was getting out of hand.
R=zra@google.com
Review URL: https://codereview.chromium.org/2223463003
2016-08-09 12:25:39 -07:00
Adam Barth
bd41127c7f
Revert "Switch Dart_Initialize to use a struct"
...
I landed the wrong version of my patch.
This reverts commit bdc25d5695 .
2016-08-09 12:24:13 -07:00
Adam Barth
bdc25d5695
Switch Dart_Initialize to use a struct
...
The number of NULL parameters was getting out of hand.
R=zra@google.com
Review URL: https://codereview.chromium.org/2223463003 .
2016-08-09 12:20:16 -07:00
Matthias Hausner
e11ca24053
Use metadata annotation @patch for patch classes
...
Annotate patch classes and top-level patch functions with @patch
instead of the pseudo-keyword patch. This allows the analyzer
to read patch files, and matches the syntax that dart2js uses.
The deprecated syntax is still supported, but a warning is printed when detected.
BUG=
Review URL: https://codereview.chromium.org/2220883004 .
2016-08-09 09:48:03 -07:00
Zachary Anderson
1c6d8fd4ec
Fuchsia: Fix arm64 build
...
R=asiva@google.com
Review URL: https://codereview.chromium.org/2226843002 .
2016-08-08 12:43:13 -07:00
John McCutchan
5a2193ecc4
Fix Windows build
...
BUG=
Review URL: https://codereview.chromium.org/2223863003 .
2016-08-08 12:30:37 -07:00
John McCutchan
800b1352ce
Add an API for setting the sticky error
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2223913002 .
2016-08-08 12:14:33 -07:00
Carlo Bernaschina
1d0ec7b74c
Always send typeClass field, if it is resolved
...
R=johnmccutchan@google.com , regis@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/2223543002 .
2016-08-05 12:44:55 -07:00
Terry Lucas
c811e3c26e
Currently breaks Dartium. Will investigate with John.
...
Revert "Clear isolate callback data before running shutdowncallback"
This reverts commit aed6dd844d .
TBR=jacobr@google.com ,johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2224543002 .
2016-08-05 11:01:51 -07:00
Ryan Macnak
7a12b0cb60
Fix IA32 build.
...
Review URL: https://codereview.chromium.org/2214313002 .
2016-08-04 17:52:52 -07:00
Ryan Macnak
19716b351a
Reset most ICs by returning to the canonical empty data arrays.
...
We can't do this for the binary operators because they must be writable and not shared for the fast Smi op stubs to record invocation counts.
Suspected to help avoid races, see Issue #26946 .
Also remove some dead code and avoid TLS.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2217733002 .
2016-08-04 17:41:03 -07:00
Todd Turnidge
f8ff7bd5c4
Delete NativeMessageHandler once a native port closes.
...
Closes #27002
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2217693002 .
2016-08-04 15:34:24 -07:00
Siva Annamalai
99baa3de32
Fix for issue 27019 (Safepoint assertion failure in Flutter)
...
BUG=27019
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2215523002 .
2016-08-04 13:56:04 -07:00
John McCutchan
aed6dd844d
Clear isolate callback data before running shutdowncallback
...
BUG=
R=turnidge@google.com
Review URL: https://codereview.chromium.org/2212083002 .
2016-08-04 13:09:24 -07:00
Matthias Hausner
643fdb9dc8
Implement the language change that makes initializing formal parameters visible in the initializer list, but not in the constructor's body.
...
The feature is enabled with the flag --initializing-formal-access.
BUG=26655, 26656
R=regis@google.com
Review URL: https://codereview.chromium.org/2051213005 .
2016-08-04 11:24:25 -07:00
Ryan Macnak
5f4a685cd7
Reload: Have dangling extracted properties raise NoSuchMethod.
...
Closes #26995
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2204593011 .
2016-08-04 09:54:40 -07:00
John McCutchan
9f2a883739
Fix reload service protocol reporting
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2213753002 .
2016-08-04 09:34:04 -07:00
Ryan Macnak
978abe4e32
Tree-shaker: Use insertion in the work queue instead of "was compiled" as the criterion to retain a function.
...
Don't AddTypesOf(function) before the work queue is empty, or we may miss types in exception handlers that are not computed until the function is compiled.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2209893003 .
2016-08-03 16:57:55 -07:00
Todd Turnidge
4bcc85e37e
From Regis: Remove regexp pattern from function name to avoid crash in debug mode. Fix service object to properly support regexp. Add regression test. (Review by Todd)
...
From Todd: Fix a problem in caching that Regis's change discovered in
the Observatory. (Review by Regis)
From Ryan: Added teest.
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org/2207883004 .
2016-08-03 15:24:22 -07:00
Ryan Macnak
ecbf3f7b31
Disable canonical verifier for precompiled.
...
Issue #27003
TBR=asiva@google.com
Review URL: https://codereview.chromium.org/2201163004 .
2016-08-03 13:43:06 -07:00
John McCutchan
133c087cdb
Become the old E.values into the new E.values
...
Fixes https://github.com/dart-lang/sdk/issues/26988
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2199173002 .
2016-08-03 10:46:40 -07:00
Ryan Macnak
8c87121afe
Revert "Tree-shaker: Use insertion in the work queue instead of "was compiled" as the criterion to retain a function."
...
This reverts commit 908309fe6d .
Review URL: https://codereview.chromium.org/2199263004 .
2016-08-03 09:34:10 -07:00
John McCutchan
a547fd531c
Propagate UnhandledExceptionErrors returned by the tag handler in Reload
...
TBR=rmacnak
Review URL: https://codereview.chromium.org/2205573005 .
2016-08-02 19:08:45 -07:00
John McCutchan
35146c688e
Fix reload handling of unwind / stackoverflow errors
...
BUG=
Review URL: https://codereview.chromium.org/2201283002 .
2016-08-02 18:27:35 -07:00
John McCutchan
b8500cdd2d
More reload status and bug fixes
...
TBR=rmacnak
Review URL: https://codereview.chromium.org/2209513003 .
2016-08-02 17:26:13 -07:00
Ryan Macnak
908309fe6d
Tree-shaker: Use insertion in the work queue instead of "was compiled" as the criterion to retain a function.
...
Allows dropping const constructors never used as non-const constructors nor roots.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2203843003 .
2016-08-02 16:30:57 -07:00
John McCutchan
24b6264c13
Silence service isolate startup error unless --trace-service is enabled
...
Fixes https://github.com/flutter/flutter/issues/5186
Review URL: https://codereview.chromium.org/2205953003 .
2016-08-02 16:19:24 -07:00
John McCutchan
a6114c23cd
Simplify reload error reporting
...
- [x] Rationalize the load failure code path.
- [x] Remove support for reload to be aborted via a callback.
- [x] If a reload fails due to an unwind error, ignore it as the isolate is dead anyway.
- [x] Move more allocations into the zone.
Review URL: https://codereview.chromium.org/2208553002 .
2016-08-02 16:11:30 -07:00
Ryan Macnak
cdae2f2783
Revert "Also attempt to symbolize dart frames in Profiler::DumpStackTrace."
...
This reverts commit d215693513 .
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2201953003 .
2016-08-02 15:14:43 -07:00
Matthias Hausner
478e0db389
Eliminate remaining case of ambiguous context level info
...
When generating the scopes in an await-for loop, make sure the scope
of the loop block is a proper sub-range of the block surrounding
the loop.
This eliminates the last case where the compiler generated context
info of the same range, but with contradicting context level info.
BUG=26941
R=regis@google.com
Review URL: https://codereview.chromium.org/2201203002 .
2016-08-02 14:44:29 -07:00
Zachary Anderson
081718c198
Fuchsia Fix FindCodeObject test.
...
It can't handle having the large array on the stack.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2202023007 .
2016-08-02 13:10:45 -07:00
John McCutchan
757b7d094c
Revert "Fix NativeMessageHandler leak"
...
This reverts commit 425efb9808 .
BUG=
Review URL: https://codereview.chromium.org/2207663002 .
2016-08-02 11:33:12 -07:00