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

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

Issue 1156143003: Refactor Isolate -> Thread in NativeArguments and exception handler jump. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix comment; remove unused accessor. Created 5 years, 7 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
« no previous file with comments | « runtime/vm/native_entry.h ('k') | runtime/vm/object.cc » ('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/native_entry.h" 5 #include "vm/native_entry.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/dart_api_state.h" 10 #include "vm/dart_api_state.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 83
84 void NativeEntry::NativeCallWrapper(Dart_NativeArguments args, 84 void NativeEntry::NativeCallWrapper(Dart_NativeArguments args,
85 Dart_NativeFunction func) { 85 Dart_NativeFunction func) {
86 CHECK_STACK_ALIGNMENT; 86 CHECK_STACK_ALIGNMENT;
87 VERIFY_ON_TRANSITION; 87 VERIFY_ON_TRANSITION;
88 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 88 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
89 /* Tell MemorySanitizer 'arguments' is initialized by generated code. */ 89 /* Tell MemorySanitizer 'arguments' is initialized by generated code. */
90 MSAN_UNPOISON(arguments, sizeof(*arguments)); 90 MSAN_UNPOISON(arguments, sizeof(*arguments));
91 Isolate* isolate = arguments->isolate(); 91 Isolate* isolate = arguments->thread()->isolate();
92 92
93 ApiState* state = isolate->api_state(); 93 ApiState* state = isolate->api_state();
94 ASSERT(state != NULL); 94 ASSERT(state != NULL);
95 ApiLocalScope* current_top_scope = state->top_scope(); 95 ApiLocalScope* current_top_scope = state->top_scope();
96 ApiLocalScope* scope = state->reusable_scope(); 96 ApiLocalScope* scope = state->reusable_scope();
97 TRACE_NATIVE_CALL("0x%" Px "", reinterpret_cast<uintptr_t>(func)); 97 TRACE_NATIVE_CALL("0x%" Px "", reinterpret_cast<uintptr_t>(func));
98 if (scope == NULL) { 98 if (scope == NULL) {
99 scope = new ApiLocalScope(current_top_scope, 99 scope = new ApiLocalScope(current_top_scope,
100 isolate->top_exit_frame_info()); 100 isolate->top_exit_frame_info());
101 ASSERT(scope != NULL); 101 ASSERT(scope != NULL);
(...skipping 14 matching lines...) Expand all
116 state->set_reusable_scope(scope); 116 state->set_reusable_scope(scope);
117 } else { 117 } else {
118 ASSERT(state->reusable_scope() != scope); 118 ASSERT(state->reusable_scope() != scope);
119 delete scope; 119 delete scope;
120 } 120 }
121 DEOPTIMIZE_ALOT; 121 DEOPTIMIZE_ALOT;
122 VERIFY_ON_TRANSITION; 122 VERIFY_ON_TRANSITION;
123 } 123 }
124 124
125 } // namespace dart 125 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/native_entry.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698