| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 | 1131 |
| 1132 // --- Scopes ---- | 1132 // --- Scopes ---- |
| 1133 | 1133 |
| 1134 | 1134 |
| 1135 DART_EXPORT void Dart_EnterScope() { | 1135 DART_EXPORT void Dart_EnterScope() { |
| 1136 Isolate* isolate = Isolate::Current(); | 1136 Isolate* isolate = Isolate::Current(); |
| 1137 CHECK_ISOLATE(isolate); | 1137 CHECK_ISOLATE(isolate); |
| 1138 ApiState* state = isolate->api_state(); | 1138 ApiState* state = isolate->api_state(); |
| 1139 ASSERT(state != NULL); | 1139 ASSERT(state != NULL); |
| 1140 ApiLocalScope* new_scope = new ApiLocalScope(state->top_scope(), | 1140 ApiLocalScope* new_scope = new ApiLocalScope(state->top_scope(), |
| 1141 reinterpret_cast<uword>(&state)); | 1141 isolate->top_exit_frame_info()); |
| 1142 ASSERT(new_scope != NULL); | 1142 ASSERT(new_scope != NULL); |
| 1143 state->set_top_scope(new_scope); // New scope is now the top scope. | 1143 state->set_top_scope(new_scope); // New scope is now the top scope. |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 | 1146 |
| 1147 DART_EXPORT void Dart_ExitScope() { | 1147 DART_EXPORT void Dart_ExitScope() { |
| 1148 Isolate* isolate = Isolate::Current(); | 1148 Isolate* isolate = Isolate::Current(); |
| 1149 CHECK_ISOLATE_SCOPE(isolate); | 1149 CHECK_ISOLATE_SCOPE(isolate); |
| 1150 ApiState* state = isolate->api_state(); | 1150 ApiState* state = isolate->api_state(); |
| 1151 ApiLocalScope* scope = state->top_scope(); | 1151 ApiLocalScope* scope = state->top_scope(); |
| (...skipping 3370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4522 } | 4522 } |
| 4523 { | 4523 { |
| 4524 NoGCScope no_gc; | 4524 NoGCScope no_gc; |
| 4525 RawObject* raw_obj = obj.raw(); | 4525 RawObject* raw_obj = obj.raw(); |
| 4526 isolate->heap()->SetPeer(raw_obj, peer); | 4526 isolate->heap()->SetPeer(raw_obj, peer); |
| 4527 } | 4527 } |
| 4528 return Api::Success(isolate); | 4528 return Api::Success(isolate); |
| 4529 } | 4529 } |
| 4530 | 4530 |
| 4531 } // namespace dart | 4531 } // namespace dart |
| OLD | NEW |