| OLD | NEW |
| 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 return 0; // No interrupt was requested. | 304 return 0; // No interrupt was requested. |
| 305 } | 305 } |
| 306 uword interrupt_bits = stack_limit_ & kInterruptsMask; | 306 uword interrupt_bits = stack_limit_ & kInterruptsMask; |
| 307 stack_limit_ = saved_stack_limit_; | 307 stack_limit_ = saved_stack_limit_; |
| 308 return interrupt_bits; | 308 return interrupt_bits; |
| 309 } | 309 } |
| 310 | 310 |
| 311 | 311 |
| 312 ICData* Isolate::GetICDataForDeoptId(intptr_t deopt_id) const { | 312 ICData* Isolate::GetICDataForDeoptId(intptr_t deopt_id) const { |
| 313 if (ic_data_array() == Array::null()) { | 313 if (ic_data_array() == Array::null()) { |
| 314 return NULL; | 314 return &ICData::ZoneHandle(); |
| 315 } | 315 } |
| 316 const Array& array_handle = Array::Handle(ic_data_array()); | 316 const Array& array_handle = Array::Handle(ic_data_array()); |
| 317 if (deopt_id >= array_handle.Length()) { | 317 if (deopt_id >= array_handle.Length()) { |
| 318 // For computations being added in the optimizing compiler. | 318 // For computations being added in the optimizing compiler. |
| 319 return NULL; | 319 return &ICData::ZoneHandle(); |
| 320 } | 320 } |
| 321 ICData& ic_data_handle = ICData::ZoneHandle(); | 321 ICData& ic_data_handle = ICData::ZoneHandle(); |
| 322 ic_data_handle ^= array_handle.At(deopt_id); | 322 ic_data_handle ^= array_handle.At(deopt_id); |
| 323 return &ic_data_handle; | 323 return &ic_data_handle; |
| 324 } | 324 } |
| 325 | 325 |
| 326 | 326 |
| 327 static int MostUsedFunctionFirst(const Function* const* a, | 327 static int MostUsedFunctionFirst(const Function* const* a, |
| 328 const Function* const* b) { | 328 const Function* const* b) { |
| 329 if ((*a)->usage_counter() > (*b)->usage_counter()) { | 329 if ((*a)->usage_counter() > (*b)->usage_counter()) { |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 493 |
| 494 | 494 |
| 495 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, | 495 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, |
| 496 bool visit_prologue_weak_handles) { | 496 bool visit_prologue_weak_handles) { |
| 497 if (api_state() != NULL) { | 497 if (api_state() != NULL) { |
| 498 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); | 498 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); |
| 499 } | 499 } |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace dart | 502 } // namespace dart |
| OLD | NEW |