Commit Graph

29 Commits

Author SHA1 Message Date
Ryan Macnak 07f43510a2 [vm] Fix some cases of dropped errors and confusion between Exceptions::PropagateError and LongJumpScope::Jump.
Assert against Exceptions::PropagateError skipping over LongJumpScopes and LongJumpScope::Jump skipping over exit frames.

Bug: https://github.com/dart-lang/sdk/issues/35224
Change-Id: I67004a73265882191cb1945cb5a049559b747e89
Reviewed-on: https://dart-review.googlesource.com/c/85411
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-12-05 18:57:02 +00:00
Régis Crelier 14f3982a1f [VM runtime] Remove broken LongJumpScope::IsSafeToJump().
Over the years, this debug-only code evolved to check that the current stack
pointer is below the last exit frame, which is obviously always the case.

Change-Id: I9b5e1a5462df5b3392b4541e40a9c57d33d25055
Reviewed-on: https://dart-review.googlesource.com/70960
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-08-21 19:29:09 +00:00
Régis Crelier 686fd133a7 [VM interpreter] Propagate unhandled exception returned from jitted code to interpreter.
Change-Id: I1d6426b6af7a0efbda1ef3a9b8c838d3b0119063
Reviewed-on: https://dart-review.googlesource.com/60520
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-06-18 19:22:05 +00:00
Régis Crelier 6d7d6fdf01 [VM interpreter] Recover EntryOptional bytecode, improve interpreter tracing.
Change-Id: I51a4bd6ac5b55ff0250965386199057c723d7fdb
Reviewed-on: https://dart-review.googlesource.com/54742
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-11 22:39:49 +00:00
Ryan Macnak d01d0ea8e6 [vm] Check for stack headroom before starting a hot reload.
Split up the StackOverflow runtime entry.

Bug: https://github.com/dart-lang/sdk/issues/31578
Change-Id: Ibe26101db1651d6e776c3da5fde6b44fd27cd00e
Reviewed-on: https://dart-review.googlesource.com/27414
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-08 18:07:31 +00:00
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Zachary Anderson a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Siva Annamalai 56e888d4cd - Move
stack_limit_,
   stack_overflow_flags_,
   saved_stack_limit_,
   stack_overflow_count_ and
   other interrupts mask fields from Isolate structure to Thread structure

- Change the stack overflow check in the prolog to load the stack limit
  from the THR register, this removes the back to back dependent loads to
  load the stack limit from the Isolate structure

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

Review URL: https://codereview.chromium.org/1812753002 .
2016-03-17 12:57:36 -07:00
Srdjan Mitrovic 823d30a80c Fix simulator with background compilation on.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1686303002 .
2016-02-11 09:25:01 -08:00
Srdjan Mitrovic 4316d1bd17 Move sticky_error_ from isolate to thread
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1672853002 .
2016-02-05 15:46:55 -08:00
Siva Annamalai 9731bac3f6 Fix build break, ensure the simulator is created and setup before accessing it in LongJumpScope::IsSafeToJump
Review URL: https://codereview.chromium.org/1415753004 .
2015-11-03 12:41:48 -08:00
Siva Annamalai 82161396ee Fix arm build break.
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1419173003 .
2015-10-26 13:46:28 -07:00
Siva Annamalai 5e4a3d7a65 Add IsMutatorThread to the Thread class and use it instead of MutatorThreadIsCurrentThread
Review URL: https://codereview.chromium.org/1408923005 .
2015-10-26 13:12:10 -07:00
Srdjan Mitrovic 53e814f0dd Move reusable handles from isolate to thread.
BUG=
R=koda@google.com

Review URL: https://codereview.chromium.org/1394673002 .
2015-10-09 10:10:34 -07:00
Daniel Andersson 00ef260503 Enable concurrent optimization test after migrating scopes to Thread*
Also move static call target table allocation into old space.

Note that stats are not thread-safe, so running two compilers concurrently may lead to inaccurate stats.

BUG=https://github.com/dart-lang/sdk/issues/24109

Review URL: https://codereview.chromium.org//1291803009 .
2015-08-19 15:16:47 -07:00
Daniel Andersson 0fe9feefa2 Fix simulators.
BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1289883004 .
2015-08-17 13:46:24 -07:00
Daniel Andersson 76ff397c1c Migrate LongJumpScope to Thread.
This was one of the blockers for concurrent compilation (issue 24109).

BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1299653003 .
2015-08-17 13:29:17 -07:00
Daniel Andersson 32046b2eb8 Migrate stack resource unwinding to Thread.
Also remove some uses of deprecated StackResource constructor.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1261873005 .
2015-07-31 12:57:19 -07:00
koda@google.com c1008f15c0 Save top StackResource in entry frame.
This avoids relying on stack address order, which enables us to benefit from AddressSanitizer's detect_stack_use_after_return feature.

R=iposva@google.com

Review URL: https://codereview.chromium.org//944783002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43927 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 20:46:31 +00:00
koda@google.com 554f25b53c Verify/document assumption about stack resource addresses.
We assume that addresses of stack resources refer to the actual stack and are ordered accordingly.
Using the AddressSanitizer with detect_stack_use_after_return will break this assumption.

R=zra@google.com

Review URL: https://codereview.chromium.org//927363004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43858 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 23:21:32 +00:00
asiva@google.com 3af18cc4c0 1. Restructure reusable handles to make individual Scopes for each handle type
2. Add a convenience macro to make use of reusable handle scopes easier

R=iposva@google.com

Review URL: https://codereview.chromium.org//187503002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33471 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-08 00:26:29 +00:00
zra@google.com fdeff1ba17 Replaces LongJump with LongJumpScope.
LongJump required explicitly restoring the old
long jump base before function return. This was
sometimes forgotten, leading to crashes. This
change puts the base restoration into the
destructor so that it happens automatically on
return.

R=iposva@google.com

Review URL: https://codereview.chromium.org//108383007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31463 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-04 01:23:43 +00:00
regis@google.com 05e2ba9540 Support FrameLookup vm test on ARM, requiring among other things:
Maintain a separate top_exit_frame_info for simulated frames and use it to
verify that longjumps are safe.
Make sure unwinding of scopes works in the presence of a simulator.
Support inline allocation of objects.
Support checking of inline cache and instance calls.
Support subtype test cache.
Support (some) equality checks.
Support for (some) conditional branches.
Support for pool pointer setup in stubs.
Review URL: https://codereview.chromium.org//13502002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20890 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 20:17:14 +00:00
turnidge@google.com 0ddd4c04e9 Dart_PropagateError, take 2.
This change hopefully takes care of the non-mac build issues.  The
checked mode failures are fixed in a separate cl.
Review URL: https://chromiumcodereview.appspot.com//9316071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3863 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 19:05:06 +00:00
turnidge@google.com ae88492093 Revert Dart_PropagateError until I can track down the problems in
checked mode tests.

Sorry for the hubbub.
Review URL: https://chromiumcodereview.appspot.com//9314053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3823 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 23:39:28 +00:00
turnidge@google.com 26e24ede55 More fixes for non-mac builds.
- Don't use NULL in arithmetic in LongJump::IsSafeToJump
- Various functions need to return a faux value on unreachable branches.
Review URL: https://chromiumcodereview.appspot.com//9315041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3819 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 22:49:36 +00:00
turnidge@google.com 9da62c5fea Add Dart_PropagateError.
This function can be used in native functions to properly pass all
errors up the stack.

Set the long jump base in the Compiler instead of outside of the
compiler.  A bunch of errors that used to be propagated through the
sticky_error are now propagated through return values.  This includes
all of the DartEntry and DartLibraryCall functions.

In particular, we no longer use the long jump to cross dart frames.
Instead errors are propagated across dart frames using the same
mechanism that we use for unhandled exceptions.  I've added assertions
to make sure that we only use the long jump when it is "safe".
Review URL: https://chromiumcodereview.appspot.com//9169102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3815 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 22:34:16 +00:00
turnidge@google.com 53ba5c402e Make the "sticky error" an Error instead of a String.
I do this in preparation for using the sticky error to implement
isolate unwinding.
Review URL: https://chromiumcodereview.appspot.com//9186058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3367 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 19:54:02 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00