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/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/intermediate_language.h" | 10 #include "vm/intermediate_language.h" |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 *dest_addr = Smi::RawValue(0); | 416 *dest_addr = Smi::RawValue(0); |
417 deopt_context->DeferRetAddrMaterialization( | 417 deopt_context->DeferRetAddrMaterialization( |
418 object_table_index_, deopt_id_, dest_addr); | 418 object_table_index_, deopt_id_, dest_addr); |
419 } | 419 } |
420 | 420 |
421 intptr_t object_table_index() const { return object_table_index_; } | 421 intptr_t object_table_index() const { return object_table_index_; } |
422 intptr_t deopt_id() const { return deopt_id_; } | 422 intptr_t deopt_id() const { return deopt_id_; } |
423 | 423 |
424 private: | 424 private: |
425 static const intptr_t kFieldWidth = kBitsPerWord / 2; | 425 static const intptr_t kFieldWidth = kBitsPerWord / 2; |
426 class ObjectTableIndex : public BitField<intptr_t, 0, kFieldWidth> { }; | 426 class ObjectTableIndex : |
427 class DeoptId : public BitField<intptr_t, kFieldWidth, kFieldWidth> { }; | 427 public BitField<intptr_t, intptr_t, 0, kFieldWidth> { }; |
| 428 class DeoptId : |
| 429 public BitField<intptr_t, intptr_t, kFieldWidth, kFieldWidth> { }; |
428 | 430 |
429 const intptr_t object_table_index_; | 431 const intptr_t object_table_index_; |
430 const intptr_t deopt_id_; | 432 const intptr_t deopt_id_; |
431 | 433 |
432 DISALLOW_COPY_AND_ASSIGN(DeoptRetAddressInstr); | 434 DISALLOW_COPY_AND_ASSIGN(DeoptRetAddressInstr); |
433 }; | 435 }; |
434 | 436 |
435 | 437 |
436 // Deoptimization instruction moving a constant stored at 'object_table_index'. | 438 // Deoptimization instruction moving a constant stored at 'object_table_index'. |
437 class DeoptConstantInstr : public DeoptInstr { | 439 class DeoptConstantInstr : public DeoptInstr { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 hi_.ToCString()); | 542 hi_.ToCString()); |
541 } | 543 } |
542 | 544 |
543 virtual int64_t GetValue(DeoptContext* deopt_context) { | 545 virtual int64_t GetValue(DeoptContext* deopt_context) { |
544 return Utils::LowHighTo64Bits( | 546 return Utils::LowHighTo64Bits( |
545 lo_.Value<uint32_t>(deopt_context), hi_.Value<int32_t>(deopt_context)); | 547 lo_.Value<uint32_t>(deopt_context), hi_.Value<int32_t>(deopt_context)); |
546 } | 548 } |
547 | 549 |
548 private: | 550 private: |
549 static const intptr_t kFieldWidth = kBitsPerWord / 2; | 551 static const intptr_t kFieldWidth = kBitsPerWord / 2; |
550 class LoRegister : public BitField<intptr_t, 0, kFieldWidth> { }; | 552 class LoRegister : public BitField<intptr_t, intptr_t, 0, kFieldWidth> { }; |
551 class HiRegister : public BitField<intptr_t, kFieldWidth, kFieldWidth> { }; | 553 class HiRegister : |
| 554 public BitField<intptr_t, intptr_t, kFieldWidth, kFieldWidth> { }; |
552 | 555 |
553 const CpuRegisterSource lo_; | 556 const CpuRegisterSource lo_; |
554 const CpuRegisterSource hi_; | 557 const CpuRegisterSource hi_; |
555 | 558 |
556 DISALLOW_COPY_AND_ASSIGN(DeoptMintPairInstr); | 559 DISALLOW_COPY_AND_ASSIGN(DeoptMintPairInstr); |
557 }; | 560 }; |
558 | 561 |
559 | 562 |
560 template<DeoptInstr::Kind K, typename T> | 563 template<DeoptInstr::Kind K, typename T> |
561 class DeoptIntInstr : public DeoptIntegerInstrBase { | 564 class DeoptIntInstr : public DeoptIntegerInstrBase { |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 Smi* offset, | 1307 Smi* offset, |
1305 TypedData* info, | 1308 TypedData* info, |
1306 Smi* reason) { | 1309 Smi* reason) { |
1307 intptr_t i = index * kEntrySize; | 1310 intptr_t i = index * kEntrySize; |
1308 *offset ^= table.At(i); | 1311 *offset ^= table.At(i); |
1309 *info ^= table.At(i + 1); | 1312 *info ^= table.At(i + 1); |
1310 *reason ^= table.At(i + 2); | 1313 *reason ^= table.At(i + 2); |
1311 } | 1314 } |
1312 | 1315 |
1313 } // namespace dart | 1316 } // namespace dart |
OLD | NEW |