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

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

Issue 200693002: Set VMTag from stubs when transitioning between Dart and Native (Closed) Base URL: https://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/stack_frame_arm.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/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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 return native_call_label; 46 return native_call_label;
47 } 47 }
48 48
49 49
50 void NativeEntry::NativeCallWrapper(Dart_NativeArguments args, 50 void NativeEntry::NativeCallWrapper(Dart_NativeArguments args,
51 Dart_NativeFunction func) { 51 Dart_NativeFunction func) {
52 CHECK_STACK_ALIGNMENT; 52 CHECK_STACK_ALIGNMENT;
53 VERIFY_ON_TRANSITION; 53 VERIFY_ON_TRANSITION;
54 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 54 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
55 Isolate* isolate = arguments->isolate(); 55 Isolate* isolate = arguments->isolate();
56 VMTagScope tagScope(isolate, VMTag::kRuntimeNativeTagId); 56
57 ApiState* state = isolate->api_state(); 57 ApiState* state = isolate->api_state();
58 ASSERT(state != NULL); 58 ASSERT(state != NULL);
59 ApiLocalScope* current_top_scope = state->top_scope(); 59 ApiLocalScope* current_top_scope = state->top_scope();
60 ApiLocalScope* scope = state->reusable_scope(); 60 ApiLocalScope* scope = state->reusable_scope();
61 TRACE_NATIVE_CALL("0x%" Px "", reinterpret_cast<uintptr_t>(func)); 61 TRACE_NATIVE_CALL("0x%" Px "", reinterpret_cast<uintptr_t>(func));
62 if (scope == NULL) { 62 if (scope == NULL) {
63 scope = new ApiLocalScope(current_top_scope, 63 scope = new ApiLocalScope(current_top_scope,
64 isolate->top_exit_frame_info()); 64 isolate->top_exit_frame_info());
65 ASSERT(scope != NULL); 65 ASSERT(scope != NULL);
66 } else { 66 } else {
(...skipping 13 matching lines...) Expand all
80 state->set_reusable_scope(scope); 80 state->set_reusable_scope(scope);
81 } else { 81 } else {
82 ASSERT(state->reusable_scope() != scope); 82 ASSERT(state->reusable_scope() != scope);
83 delete scope; 83 delete scope;
84 } 84 }
85 DEOPTIMIZE_ALOT; 85 DEOPTIMIZE_ALOT;
86 VERIFY_ON_TRANSITION; 86 VERIFY_ON_TRANSITION;
87 } 87 }
88 88
89 } // namespace dart 89 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/stack_frame_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698