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

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

Issue 10832150: Get rid of ast node ids. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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.h ('k') | runtime/vm/object.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "lib/mirrors.h" 9 #include "lib/mirrors.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 top_context_(Context::null()), 150 top_context_(Context::null()),
151 random_seed_(Random::kDefaultRandomSeed), 151 random_seed_(Random::kDefaultRandomSeed),
152 top_exit_frame_info_(0), 152 top_exit_frame_info_(0),
153 init_callback_data_(NULL), 153 init_callback_data_(NULL),
154 library_tag_handler_(NULL), 154 library_tag_handler_(NULL),
155 api_state_(NULL), 155 api_state_(NULL),
156 stub_code_(NULL), 156 stub_code_(NULL),
157 debugger_(NULL), 157 debugger_(NULL),
158 long_jump_base_(NULL), 158 long_jump_base_(NULL),
159 timer_list_(), 159 timer_list_(),
160 ast_node_id_(AstNode::kNoId), 160 deopt_id_(0),
161 computation_id_(AstNode::kNoId),
162 ic_data_array_(Array::null()), 161 ic_data_array_(Array::null()),
163 mutex_(new Mutex()), 162 mutex_(new Mutex()),
164 stack_limit_(0), 163 stack_limit_(0),
165 saved_stack_limit_(0), 164 saved_stack_limit_(0),
166 message_handler_(NULL), 165 message_handler_(NULL),
167 spawn_data_(NULL), 166 spawn_data_(NULL),
168 gc_prologue_callbacks_(), 167 gc_prologue_callbacks_(),
169 gc_epilogue_callbacks_(), 168 gc_epilogue_callbacks_(),
170 deopt_registers_copy_(NULL), 169 deopt_registers_copy_(NULL),
171 deopt_frame_copy_(NULL), 170 deopt_frame_copy_(NULL),
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 MutexLocker ml(mutex_); 297 MutexLocker ml(mutex_);
299 if (stack_limit_ == saved_stack_limit_) { 298 if (stack_limit_ == saved_stack_limit_) {
300 return 0; // No interrupt was requested. 299 return 0; // No interrupt was requested.
301 } 300 }
302 uword interrupt_bits = stack_limit_ & kInterruptsMask; 301 uword interrupt_bits = stack_limit_ & kInterruptsMask;
303 stack_limit_ = saved_stack_limit_; 302 stack_limit_ = saved_stack_limit_;
304 return interrupt_bits; 303 return interrupt_bits;
305 } 304 }
306 305
307 306
308 ICData* Isolate::GetICDataForCid(intptr_t cid) const { 307 ICData* Isolate::GetICDataForDeoptId(intptr_t deopt_id) const {
309 if (ic_data_array() == Array::null()) { 308 if (ic_data_array() == Array::null()) {
310 return NULL; 309 return NULL;
311 } 310 }
312 const Array& array_handle = Array::Handle(ic_data_array()); 311 const Array& array_handle = Array::Handle(ic_data_array());
313 if (cid >= array_handle.Length()) { 312 if (deopt_id >= array_handle.Length()) {
314 // For computations being added in the optimizing compiler. 313 // For computations being added in the optimizing compiler.
315 return NULL; 314 return NULL;
316 } 315 }
317 ICData& ic_data_handle = ICData::ZoneHandle(); 316 ICData& ic_data_handle = ICData::ZoneHandle();
318 ic_data_handle ^= array_handle.At(cid); 317 ic_data_handle ^= array_handle.At(deopt_id);
319 return &ic_data_handle; 318 return &ic_data_handle;
320 } 319 }
321 320
322 321
323 static int MostUsedFunctionFirst(const Function* const* a, 322 static int MostUsedFunctionFirst(const Function* const* a,
324 const Function* const* b) { 323 const Function* const* b) {
325 if ((*a)->usage_counter() > (*b)->usage_counter()) { 324 if ((*a)->usage_counter() > (*b)->usage_counter()) {
326 return -1; 325 return -1;
327 } else if ((*a)->usage_counter() < (*b)->usage_counter()) { 326 } else if ((*a)->usage_counter() < (*b)->usage_counter()) {
328 return 1; 327 return 1;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 468
470 469
471 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, 470 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor,
472 bool visit_prologue_weak_handles) { 471 bool visit_prologue_weak_handles) {
473 if (api_state() != NULL) { 472 if (api_state() != NULL) {
474 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); 473 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles);
475 } 474 }
476 } 475 }
477 476
478 } // namespace dart 477 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698