Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: runtime/vm/longjump.cc

Issue 187503002: 1. Restructure reusable handles to make individual Scopes for each handle type (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/longjump.h" 5 #include "vm/longjump.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 26 matching lines...) Expand all
37 37
38 38
39 void LongJumpScope::Jump(int value, const Error& error) { 39 void LongJumpScope::Jump(int value, const Error& error) {
40 // A zero is the default return value from setting up a LongJumpScope 40 // A zero is the default return value from setting up a LongJumpScope
41 // using Set. 41 // using Set.
42 ASSERT(value != 0); 42 ASSERT(value != 0);
43 ASSERT(IsSafeToJump()); 43 ASSERT(IsSafeToJump());
44 44
45 Isolate* isolate = Isolate::Current(); 45 Isolate* isolate = Isolate::Current();
46 46
47 #if defined(DEBUG)
48 #define CHECK_REUSABLE_HANDLE(name) \
49 ASSERT(!isolate->reusable_##name##_handle_scope_active());
50 REUSABLE_HANDLE_LIST(CHECK_REUSABLE_HANDLE)
51 #undef CHECK_REUSABLE_HANDLE
52 #endif // defined(DEBUG)
53
47 // Remember the error in the sticky error of this isolate. 54 // Remember the error in the sticky error of this isolate.
48 isolate->object_store()->set_sticky_error(error); 55 isolate->object_store()->set_sticky_error(error);
49 56
50 // Destruct all the active StackResource objects. 57 // Destruct all the active StackResource objects.
51 StackResource* current_resource = isolate->top_resource(); 58 StackResource* current_resource = isolate->top_resource();
52 while (current_resource != top_) { 59 while (current_resource != top_) {
53 current_resource->~StackResource(); 60 current_resource->~StackResource();
54 current_resource = isolate->top_resource(); 61 current_resource = isolate->top_resource();
55 } 62 }
56 longjmp(environment_, value); 63 longjmp(environment_, value);
57 UNREACHABLE(); 64 UNREACHABLE();
58 } 65 }
59 66
60 } // namespace dart 67 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698