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

Side by Side Diff: runtime/vm/isolate.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "lib/mirrors.h" 10 #include "lib/mirrors.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 112
113 bool IsolateMessageHandler::HandleMessage(Message* message) { 113 bool IsolateMessageHandler::HandleMessage(Message* message) {
114 StartIsolateScope start_scope(isolate_); 114 StartIsolateScope start_scope(isolate_);
115 StackZone zone(isolate_); 115 StackZone zone(isolate_);
116 HandleScope handle_scope(isolate_); 116 HandleScope handle_scope(isolate_);
117 // TODO(turnidge): Rework collection total dart execution. This can 117 // TODO(turnidge): Rework collection total dart execution. This can
118 // overcount when other things (gc, compilation) are active. 118 // overcount when other things (gc, compilation) are active.
119 TIMERSCOPE(time_dart_execution); 119 TIMERSCOPE(time_dart_execution);
120 VMTagScope tagScope(VMTag::kScriptTagId, isolate_);
120 121
121 // If the message is in band we lookup the receive port to dispatch to. If 122 // If the message is in band we lookup the receive port to dispatch to. If
122 // the receive port is closed, we drop the message without deserializing it. 123 // the receive port is closed, we drop the message without deserializing it.
123 Object& receive_port = Object::Handle(); 124 Object& receive_port = Object::Handle();
124 if (!message->IsOOB()) { 125 if (!message->IsOOB()) {
125 receive_port = DartLibraryCalls::LookupReceivePort(message->dest_port()); 126 receive_port = DartLibraryCalls::LookupReceivePort(message->dest_port());
126 if (receive_port.IsError()) { 127 if (receive_port.IsError()) {
127 return ProcessUnhandledException(Object::null_instance(), 128 return ProcessUnhandledException(Object::null_instance(),
128 Error::Cast(receive_port)); 129 Error::Cast(receive_port));
129 } 130 }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 gc_prologue_callback_(NULL), 326 gc_prologue_callback_(NULL),
326 gc_epilogue_callback_(NULL), 327 gc_epilogue_callback_(NULL),
327 defer_finalization_count_(0), 328 defer_finalization_count_(0),
328 deopt_context_(NULL), 329 deopt_context_(NULL),
329 stacktrace_(NULL), 330 stacktrace_(NULL),
330 stack_frame_index_(-1), 331 stack_frame_index_(-1),
331 cha_used_(false), 332 cha_used_(false),
332 object_id_ring_(NULL), 333 object_id_ring_(NULL),
333 profiler_data_(NULL), 334 profiler_data_(NULL),
334 thread_state_(NULL), 335 thread_state_(NULL),
336 vm_tag_(VMTag::kVMTagId),
335 next_(NULL), 337 next_(NULL),
336 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS) 338 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
337 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT) 339 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
338 reusable_handles_() { 340 reusable_handles_() {
339 } 341 }
340 #undef REUSABLE_HANDLE_SCOPE_INIT 342 #undef REUSABLE_HANDLE_SCOPE_INIT
341 #undef REUSABLE_HANDLE_INITIALIZERS 343 #undef REUSABLE_HANDLE_INITIALIZERS
342 344
343 345
344 Isolate::~Isolate() { 346 Isolate::~Isolate() {
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 return func.raw(); 1087 return func.raw();
1086 } 1088 }
1087 1089
1088 1090
1089 void IsolateSpawnState::Cleanup() { 1091 void IsolateSpawnState::Cleanup() {
1090 SwitchIsolateScope switch_scope(isolate()); 1092 SwitchIsolateScope switch_scope(isolate());
1091 Dart::ShutdownIsolate(); 1093 Dart::ShutdownIsolate();
1092 } 1094 }
1093 1095
1094 } // namespace dart 1096 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698