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

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

Issue 195733009: Basic tag infrastructure (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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return native_call_label; 44 return native_call_label;
45 } 45 }
46 46
47 47
48 void NativeEntry::NativeCallWrapper(Dart_NativeArguments args, 48 void NativeEntry::NativeCallWrapper(Dart_NativeArguments args,
49 Dart_NativeFunction func) { 49 Dart_NativeFunction func) {
50 CHECK_STACK_ALIGNMENT; 50 CHECK_STACK_ALIGNMENT;
51 VERIFY_ON_TRANSITION; 51 VERIFY_ON_TRANSITION;
52 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 52 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
53 Isolate* isolate = arguments->isolate(); 53 Isolate* isolate = arguments->isolate();
54 VMTagScope tagScope(isolate, VMTag::kRuntimeNativeTagId);
siva 2014/03/13 23:18:47 This switches the tag to Native but we need to swi
54 ApiState* state = isolate->api_state(); 55 ApiState* state = isolate->api_state();
55 ASSERT(state != NULL); 56 ASSERT(state != NULL);
56 ApiLocalScope* current_top_scope = state->top_scope(); 57 ApiLocalScope* current_top_scope = state->top_scope();
57 ApiLocalScope* scope = state->reusable_scope(); 58 ApiLocalScope* scope = state->reusable_scope();
58 TRACE_NATIVE_CALL("0x%" Px "", reinterpret_cast<uintptr_t>(func)); 59 TRACE_NATIVE_CALL("0x%" Px "", reinterpret_cast<uintptr_t>(func));
59 if (scope == NULL) { 60 if (scope == NULL) {
60 scope = new ApiLocalScope(current_top_scope, 61 scope = new ApiLocalScope(current_top_scope,
61 isolate->top_exit_frame_info()); 62 isolate->top_exit_frame_info());
62 ASSERT(scope != NULL); 63 ASSERT(scope != NULL);
63 } else { 64 } else {
(...skipping 13 matching lines...) Expand all
77 state->set_reusable_scope(scope); 78 state->set_reusable_scope(scope);
78 } else { 79 } else {
79 ASSERT(state->reusable_scope() != scope); 80 ASSERT(state->reusable_scope() != scope);
80 delete scope; 81 delete scope;
81 } 82 }
82 DEOPTIMIZE_ALOT; 83 DEOPTIMIZE_ALOT;
83 VERIFY_ON_TRANSITION; 84 VERIFY_ON_TRANSITION;
84 } 85 }
85 86
86 } // namespace dart 87 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698