Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/deopt_instructions.h" | 5 #include "vm/deopt_instructions.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 #include "vm/locations.h" | 10 #include "vm/locations.h" |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 331 } | 331 } |
| 332 | 332 |
| 333 return deopt_arg_count; | 333 return deopt_arg_count; |
| 334 } | 334 } |
| 335 | 335 |
| 336 | 336 |
| 337 RawArray* DeoptContext::DestFrameAsArray() { | 337 RawArray* DeoptContext::DestFrameAsArray() { |
| 338 ASSERT(dest_frame_ != NULL && dest_frame_is_allocated_); | 338 ASSERT(dest_frame_ != NULL && dest_frame_is_allocated_); |
| 339 const Array& dest_array = | 339 const Array& dest_array = |
| 340 Array::Handle(Array::New(dest_frame_size_)); | 340 Array::Handle(Array::New(dest_frame_size_)); |
| 341 Object& obj = Object::Handle(); | 341 PassiveObject& obj = PassiveObject::Handle(); |
|
Ivan Posva
2014/08/28 19:31:53
Handle(isolate())
siva
2014/08/29 00:17:01
Done.
| |
| 342 for (intptr_t i = 0; i < dest_frame_size_; i++) { | 342 for (intptr_t i = 0; i < dest_frame_size_; i++) { |
| 343 obj = reinterpret_cast<RawObject*>(dest_frame_[i]); | 343 obj = reinterpret_cast<RawObject*>(dest_frame_[i]); |
| 344 dest_array.SetAt(i, obj); | 344 dest_array.SetAt(i, obj); |
| 345 } | 345 } |
| 346 return dest_array.raw(); | 346 return dest_array.raw(); |
| 347 } | 347 } |
| 348 | 348 |
| 349 | 349 |
| 350 // Deoptimization instruction creating return address using function and | 350 // Deoptimization instruction creating return address using function and |
| 351 // deopt-id stored at 'object_table_index'. | 351 // deopt-id stored at 'object_table_index'. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 424 | 424 |
| 425 virtual intptr_t source_index() const { return object_table_index_; } | 425 virtual intptr_t source_index() const { return object_table_index_; } |
| 426 virtual DeoptInstr::Kind kind() const { return kConstant; } | 426 virtual DeoptInstr::Kind kind() const { return kConstant; } |
| 427 | 427 |
| 428 virtual const char* ArgumentsToCString() const { | 428 virtual const char* ArgumentsToCString() const { |
| 429 return Isolate::Current()->current_zone()->PrintToString( | 429 return Isolate::Current()->current_zone()->PrintToString( |
| 430 "%" Pd "", object_table_index_); | 430 "%" Pd "", object_table_index_); |
| 431 } | 431 } |
| 432 | 432 |
| 433 void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) { | 433 void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) { |
| 434 const Object& obj = Object::Handle( | 434 const PassiveObject& obj = PassiveObject::Handle( |
| 435 deopt_context->isolate(), deopt_context->ObjectAt(object_table_index_)); | 435 deopt_context->isolate(), deopt_context->ObjectAt(object_table_index_)); |
| 436 *reinterpret_cast<RawObject**>(dest_addr) = obj.raw(); | 436 *reinterpret_cast<RawObject**>(dest_addr) = obj.raw(); |
| 437 } | 437 } |
| 438 | 438 |
| 439 private: | 439 private: |
| 440 const intptr_t object_table_index_; | 440 const intptr_t object_table_index_; |
| 441 | 441 |
| 442 DISALLOW_COPY_AND_ASSIGN(DeoptConstantInstr); | 442 DISALLOW_COPY_AND_ASSIGN(DeoptConstantInstr); |
| 443 }; | 443 }; |
| 444 | 444 |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1336 Smi* offset, | 1336 Smi* offset, |
| 1337 DeoptInfo* info, | 1337 DeoptInfo* info, |
| 1338 Smi* reason) { | 1338 Smi* reason) { |
| 1339 intptr_t i = index * kEntrySize; | 1339 intptr_t i = index * kEntrySize; |
| 1340 *offset ^= table.At(i); | 1340 *offset ^= table.At(i); |
| 1341 *info ^= table.At(i + 1); | 1341 *info ^= table.At(i + 1); |
| 1342 *reason ^= table.At(i + 2); | 1342 *reason ^= table.At(i + 2); |
| 1343 } | 1343 } |
| 1344 | 1344 |
| 1345 } // namespace dart | 1345 } // namespace dart |
| OLD | NEW |