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

Side by Side Diff: runtime/vm/dart_api_impl.h

Issue 177733002: Revert r32930 (Add more timing information in the VM to track time...) (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/dart.cc ('k') | runtime/vm/dart_api_impl.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 #ifndef VM_DART_API_IMPL_H_ 5 #ifndef VM_DART_API_IMPL_H_
6 #define VM_DART_API_IMPL_H_ 6 #define VM_DART_API_IMPL_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/native_arguments.h" 9 #include "vm/native_arguments.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
11 #include "vm/timer.h"
12 #include "vm/timer_scope.h"
13 11
14 namespace dart { 12 namespace dart {
15 13
16 DECLARE_FLAG(bool, trace_api); 14 DECLARE_FLAG(bool, trace_api);
17 15
18 class ApiLocalScope; 16 class ApiLocalScope;
19 class ApiState; 17 class ApiState;
20 class FinalizablePersistentHandle; 18 class FinalizablePersistentHandle;
21 class LocalHandle; 19 class LocalHandle;
22 class PersistentHandle; 20 class PersistentHandle;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #define CHECK_ISOLATE_SCOPE(isolate) \ 58 #define CHECK_ISOLATE_SCOPE(isolate) \
61 do { \ 59 do { \
62 Isolate* tmp = (isolate); \ 60 Isolate* tmp = (isolate); \
63 CHECK_ISOLATE(tmp); \ 61 CHECK_ISOLATE(tmp); \
64 ApiState* state = tmp->api_state(); \ 62 ApiState* state = tmp->api_state(); \
65 ASSERT(state); \ 63 ASSERT(state); \
66 if (state->top_scope() == NULL) { \ 64 if (state->top_scope() == NULL) { \
67 FATAL1("%s expects to find a current scope. Did you forget to call " \ 65 FATAL1("%s expects to find a current scope. Did you forget to call " \
68 "Dart_EnterScope?", CURRENT_FUNC); \ 66 "Dart_EnterScope?", CURRENT_FUNC); \
69 } \ 67 } \
70 } while (0); \ 68 } while (0)
71 NativeToVmTimerScope __temp_isolate_timer__(isolate);
72 69
73 #define DARTSCOPE(isolate) \ 70 #define DARTSCOPE(isolate) \
74 Isolate* __temp_isolate__ = (isolate); \ 71 Isolate* __temp_isolate__ = (isolate); \
75 CHECK_ISOLATE_SCOPE(__temp_isolate__); \ 72 CHECK_ISOLATE_SCOPE(__temp_isolate__); \
76 HANDLESCOPE(__temp_isolate__); 73 HANDLESCOPE(__temp_isolate__);
77 74
78 75
79 #define RETURN_TYPE_ERROR(isolate, dart_handle, type) \ 76 #define RETURN_TYPE_ERROR(isolate, dart_handle, type) \
80 do { \ 77 do { \
81 const Object& tmp = \ 78 const Object& tmp = \
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (isolate->no_callback_scope_depth() != 0) { \ 272 if (isolate->no_callback_scope_depth() != 0) { \
276 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ 273 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \
277 } \ 274 } \
278 275
279 #define ASSERT_CALLBACK_STATE(isolate) \ 276 #define ASSERT_CALLBACK_STATE(isolate) \
280 ASSERT(isolate->no_callback_scope_depth() == 0) 277 ASSERT(isolate->no_callback_scope_depth() == 0)
281 278
282 } // namespace dart. 279 } // namespace dart.
283 280
284 #endif // VM_DART_API_IMPL_H_ 281 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698