Commit Graph

9296 Commits

Author SHA1 Message Date
John McCutchan 33aaf940e5 Output TimelineEventBlocks in sorted order
- Before outputting to JSON sort TimelineEventBlocks by earliest event time.
- Output using sorted block order.
- Works around a bug in mojo (https://github.com/domokit/mojo/issues/649)

R=zra@google.com

Review URL: https://codereview.chromium.org/1657843003 .
2016-02-01 13:12:34 -08:00
Siva Annamalai cab435bd03 Fix gen snapshot code to use Dart_LoadLibrary instead of Dart_LoadScript so that the root library value is not set when creating the bootstrap snapshot. The root library gets set when the application is loaded in later.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1653143002 .
2016-02-01 12:57:04 -08:00
Siva Annamalai 2a2c34abd7 Fix windows build compilation error.
Review URL: https://codereview.chromium.org/1659553002 .
2016-02-01 11:22:03 -08:00
Siva Annamalai e72c1fb47d Implement safepointing of threads :
- uses thread execution status transition to track when a thread is in a safepoint or needs to block for a safepoint
 - introduces a monitor per Thread object
 - uses a per thread safepoint handshake between the thread requesting a safepoint and the requested thread.

The ThreadRegistry class now contains only the thread list for an isolate and the functionality of scheduling a thread onto an Isolate and unscheduling it from teh isolate. We could fold this functionality into the Isolate class in a different CL.

R=rmacnak@google.com, zra@google.com

Review URL: https://codereview.chromium.org/1541073002 .
2016-02-01 10:57:34 -08:00
Todd Turnidge 2232a52ff8 Print stack trace when Dart_SetReturnValue is passed UnwindError.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1652873004 .
2016-02-01 10:46:49 -08:00
Siva Annamalai eece23fe67 Use InterlockedExchangeAdd varient instead of InterlockedAdd which doesn't seem to be available on some windows platforms.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1644393003 .
2016-01-29 17:09:03 -08:00
Todd Turnidge dacb44079a If testeeBefore returns a future, wait for it.
This fixes some flakiness in a bunch of service tests that assumed this
would work.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1656483002 .
2016-01-29 16:41:16 -08:00
Todd Turnidge 250773cb65 Improve the error message when an import fails.
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1641383003 .
2016-01-29 16:30:08 -08:00
Siva Annamalai 38fc488d8a Fix dartium build break.
Review URL: https://codereview.chromium.org/1653613002 .
2016-01-29 15:48:20 -08:00
Regis Crelier daf672405c Relax assert when applying a mixin application alias (fixes #25617).
Update status file.

R=hausner@google.com

Review URL: https://codereview.chromium.org/1653593002 .
2016-01-29 15:17:35 -08:00
Siva Annamalai 02568023f8 Fix typo in tranferring from regular add to Atomic increment.
Review URL: https://codereview.chromium.org/1644223004 .
2016-01-29 14:22:22 -08:00
Siva Annamalai 74f5dc2d7a Fix build break.
Review URL: https://codereview.chromium.org/1644223003 .
2016-01-29 13:31:12 -08:00
Todd Turnidge 1911f508dd "Pass Slow" -> "Pass, Slow". Add a debugging print.
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1649123002 .
2016-01-29 12:54:44 -08:00
Siva Annamalai 7e05c6c1f0 Use atomic operations to increment/decrement memory usage counts as multiple threads could be allocating at the same time.
Review URL: https://codereview.chromium.org/1580813003 .
2016-01-29 12:46:22 -08:00
Adam Barth 94570789c9 Fix gn build
This function name had a typo.

R=zra@google.com, zra

Review URL: https://codereview.chromium.org/1654443002 .
2016-01-29 12:27:00 -08:00
Todd Turnidge 0f1d73fd07 Add --warn-on-pause-with-no-debugger flag. Add this to --observe behavior.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1649843002 .
2016-01-29 12:19:33 -08:00
Todd Eisenberger ca85ec7955 Stop initializing code pages with RWX permissions
We shouldn't need to execute the code pages until after we're done
writing to them, so we can drop the initial execute bit.  Without
this, part of a mapping can sit in a freelist with RWX permissions
indefinitely, which makes for an easier target under certain
exploits.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1635343002 .
2016-01-29 11:21:06 -08:00
John McCutchan ce650790a1 Return an error in many service RPCs if the isolate is not runnable
- Return kIsolateMustBeRunnable error when an isolate must be runnable for a service RPC to complete.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1645423002 .
2016-01-29 11:16:23 -08:00
Todd Turnidge bf385e448c Document the getSourceReport rpc in service.md. Bump version to 3.1.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1641133004 .
2016-01-29 10:40:18 -08:00
Siva Annamalai b0e8c4bb05 Do not set root library to null while creating the snapshot, just use whatever is there, it is set to null when creating the full snapshot, when we start doing full application snapshots this might not be null.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1648633003 .
2016-01-29 10:35:22 -08:00
Zachary Anderson 98771a083f Adds SecurityContext.usePrivateKeyBytes
This is the first step toward removing blocking IO calls from
the implementation of the SecurityContext API.

Using a buffer rather than a file name API will probably be needed
for implementing SecurityContext and SecureSocket with platform
specific built-in APIs on iOS/Mac/Windows rather than BoringSSL.

related #8227

R=whesse@google.com

Review URL: https://codereview.chromium.org/1616073004 .
2016-01-29 08:52:18 -08:00
John McCutchan 87d8d3a719 Make it possible to share the embedder's dart sources for the service isolate.
- Cleanups to the embedder's Dart sources for the service isolate. This lets us stop keeping a local copy in the mojo and flutter trees.
- Let the VM know Observatory's server address.

R=zra@google.com

Review URL: https://codereview.chromium.org/1640773005 .
2016-01-29 07:43:21 -08:00
John McCutchan c4bbf89fe1 Fix Timeline reporting crash when reusing timeline events with preserialized json
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1644023003 .
2016-01-28 16:20:30 -08:00
Ryan Macnak 1e2d3e1d69 Precompilation: canonicalize lists of stackmaps.
precompiled dart2js x64 22533288 -> 22333257 (-0.88%)

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1644543004 .
2016-01-28 15:42:08 -08:00
Regis Crelier 220f8c57b3 Resolve signature from correct scope class (fix #25609).
Add regression test.

R=asiva@google.com

Review URL: https://codereview.chromium.org/1647653007 .
2016-01-28 13:29:28 -08:00
Ryan Macnak c7efe5a756 Precompilation: compact the symbol table.
Also, don't leak handles out of the precompiler.

dart2js/x64:
symbols 62126 -> 38668 (-37.8%)
snapshot 22534723 -> 21740838 (-3.5%)

R=asiva@google.com

Review URL: https://codereview.chromium.org/1638143002 .
2016-01-28 10:23:14 -08:00
Todd Turnidge bf130de6c0 Fix a bug where breakpoints where not getting properly deleted.
This bug was causing it to be impossible to single-step to locations
which had deleted breakpoints.

In fixing this problem, another issue was exposed, where, if we single
step while at a breakpoint, we would hit the same pc twice in the
debugger.  I have added a "skip step" mechanism which allows us to
skip the next single-step after a breakpoint.

Added a test.

Closes #25465

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1641793002 .
2016-01-27 11:49:56 -08:00
John McCutchan 109e9e2c2d Initialize byte_index_
BUG=

Review URL: https://codereview.chromium.org/1632343002 .
2016-01-26 13:13:50 -08:00
John McCutchan b5259257bd Introduce CodeSourceMap object to hold pc -> token position mappings
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1634863002 .
2016-01-26 13:07:22 -08:00
Matthias Hausner 851b4a995c Compile-time error if mixin class has a factory
The VM now reports the location of the mixin application as well as
the location of the illegal constructor in the mixin class.

Update test language/mixin_illegal_constructor_test to follow the spec.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1638923002 .
2016-01-26 12:43:48 -08:00
John McCutchan ec020a301b Improve Observatory debugger behaviour when an isolate exits with unhandled exceptions
- When an isolate is paused at exit and has a sticky error, have the debugger display the error.
- Add --pause-isolates-on-unhandled-exceptions flag which sets a default value for break-on-exception.
- Have the debugger display help text about 'set break-on-exception' and '--pause-isolates-on-unhandled-exceptions'
- Signal an unhandled exception even if no client is connected to Observatory.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1636083002 .
2016-01-26 10:12:46 -08:00
Regis Crelier de0e16d477 Remove restriction with method resolution in background compilation, now that
signature classes are gone.

R=asiva@google.com

Review URL: https://codereview.chromium.org/1634903003 .
2016-01-26 09:22:08 -08:00
Regis Crelier b116694c84 Fix building of closure type arguments (fixes #25543).
Re-enable skipped test with --noopt.

R=hausner@google.com

Review URL: https://codereview.chromium.org/1631803003 .
2016-01-25 13:58:00 -08:00
Matthias Hausner 4ca8417725 Allow methods to be named ‘factory’
Because it’s the law.

BUG=25489
R=regis@google.com

Review URL: https://codereview.chromium.org/1636583003 .
2016-01-25 13:46:52 -08:00
John McCutchan 146efcfde0 Mark coverage_test as Pass Slow and enable tracing
BUG=

Review URL: https://codereview.chromium.org/1630993002 .
2016-01-25 13:02:56 -08:00
Lasse R.H. Nielsen 75d1366dbd Use WeakMap to support Expando if available.
Retains the existing code as fallback for settings without WeakMap for now.

Fixes issue #5144

BUG= http://dartbug.com/5144
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1599393003 .
2016-01-25 12:06:06 +01:00
Matthias Hausner 9a751bec88 Remove stale comment in ImmutableList implementation
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1620923002 .
2016-01-22 15:53:07 -08:00
Zachary Anderson 80f358dede Adds targets for simarmv6 and armv6
related #25562

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1624593002 .
2016-01-22 13:07:48 -08:00
Matthias Hausner 783cc8acae Parser recursion check
Let the parser issue a compile-time error when the C stack is about to overflow, instead of crashing the VM.

BUG=24476
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1620493002 .
2016-01-22 08:59:45 -08:00
Lasse R.H. Nielsen 693628e99e Implement ?? as compile-time constant in VM.
Extracted from https://codereview.chromium.org/1493693002/

R=hausner@google.com

Review URL: https://codereview.chromium.org/1575383002 .
2016-01-22 12:39:16 +01:00
Ryan Macnak 6001f608d8 Precompilation: drop list of dynamic targets with a unique selector.
precompiled dart2js x64 22470686 -> 22307607 (-0.73%)

R=hausner@google.com

Review URL: https://codereview.chromium.org/1612233002 .
2016-01-21 16:08:22 -08:00
Ryan Macnak f3b364ec9a Precompilation: Class::SetFunctions can shrink the number of functions, remember to clear the hash table if it isn't needed anymore.
precompiled dart2js x64 23054428 -> 22598925 (-1.97%)

R=hausner@google.com

Review URL: https://codereview.chromium.org/1621433002 .
2016-01-21 14:58:03 -08:00
Ryan Macnak 44d9653901 Precompilation: drop the const object cache.
precompiled dart2js x64 23053749 -> 22926210 (-0.55%)

R=hausner@google.com

Review URL: https://codereview.chromium.org/1612193002 .
2016-01-21 14:55:04 -08:00
Ryan Macnak bbee77d591 Precompilation: drop Field objects unless they are an entry point or referenced from a constant pool.
Don't record stores when deserializing message snapshots when field guards aren't enabled.

precompiled dart2js x64 23232236 -> 23068873 (-0.70%)

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1609983002 .
2016-01-20 10:43:59 -08:00
Regis Crelier 3bf3f483a5 Fix non-optimized instanceof check after removal of signature classes.
Review URL: https://codereview.chromium.org/1602423002 .
2016-01-19 21:13:39 -08:00
Regis Crelier 7f57ebcfa1 Remove signature classes from the VM.
They were used as the class of closure instances and as the type class of
function types.
All closure instances now have class _Closure and function types are represented
by a new class FunctionType extending AbstractType.
Fix issue 24567 and add regression test.

R=asiva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/1584223006 .
2016-01-19 16:32:59 -08:00
Regis Crelier 096843b648 Allow super type to be malformed (fixes issue 25426).
Update co19 status file.

Review URL: https://codereview.chromium.org/1588723002 .
2016-01-19 15:45:30 -08:00
John McCutchan 77101d63e3 Source positions for constructors and lots of async machinery
- Rework token position address space.
- Use ClassifyingTokenPositions::kMethodExtractor for the token position of a method extractor.
- Plumb token positions through all of Ast Transformer.
- Plumb token positions for temporary expressions, etc in Flow Graph Builder.
- Add token positions for parts of the await machinery.
- Move ClassifyingTokenPositions into token.h.
- Remove default token position of Scanner::kNoSourcePos for many IR instructions.
- A couple of unit tests.
- Use synthetic token positions for synthetic AstNodes.
- Fix SLEB128 encoding / decoding + test
- s/Scanner::kNoSourcePos/Token::kNoSourcePos.
- Remove >= 0 and < 0 checks against token positions and use helpers instead.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1589643002 .
2016-01-19 15:01:08 -08:00
Ryan Macnak 238c01b943 Precompilation: omit pc descriptors without a try index.
precompiled dart2js x64 24749045 -> 23713811 (-4.18%)

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1584393003 .
2016-01-19 14:53:23 -08:00
Florian Schneider f47839ba09 Rename DART_PRECOMPILED -> DART_PRECOMPILED_RUNTIME
To avoid future confusion with precompiler compiler-related macros/build targets

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1581393008 .
2016-01-19 13:59:49 -08:00