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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 814 } else if (from_loc.IsDoubleStackSlot()) { | 814 } else if (from_loc.IsDoubleStackSlot()) { |
| 815 intptr_t from_index = (from_loc.stack_index() < 0) ? | 815 intptr_t from_index = (from_loc.stack_index() < 0) ? |
| 816 from_loc.stack_index() + num_args_ : | 816 from_loc.stack_index() + num_args_ : |
| 817 from_loc.stack_index() + num_args_ - kFirstLocalSlotIndex + 1; | 817 from_loc.stack_index() + num_args_ - kFirstLocalSlotIndex + 1; |
| 818 if (value->definition()->representation() == kUnboxedDouble) { | 818 if (value->definition()->representation() == kUnboxedDouble) { |
| 819 deopt_instr = new DeoptDoubleStackSlotInstr(from_index); | 819 deopt_instr = new DeoptDoubleStackSlotInstr(from_index); |
| 820 } else { | 820 } else { |
| 821 ASSERT(value->definition()->representation() == kUnboxedMint); | 821 ASSERT(value->definition()->representation() == kUnboxedMint); |
| 822 deopt_instr = new DeoptInt64StackSlotInstr(from_index); | 822 deopt_instr = new DeoptInt64StackSlotInstr(from_index); |
| 823 } | 823 } |
| 824 } else if (from_loc.IsQuadStackSlot()) { | |
| 825 intptr_t from_index = (from_loc.stack_index() < 0) ? | |
|
Vyacheslav Egorov (Google)
2013/04/15 11:09:35
This code is duplicated three times now. Consider
Cutch
2013/04/15 13:34:56
Done.
| |
| 826 from_loc.stack_index() + num_args_ : | |
| 827 from_loc.stack_index() + num_args_ - kFirstLocalSlotIndex + 1; | |
| 828 if (value->definition()->representation() == kUnboxedFloat32x4) { | |
| 829 deopt_instr = new DeoptFloat32x4StackSlotInstr(from_index); | |
| 830 } else { | |
| 831 ASSERT(value->definition()->representation() == kUnboxedUint32x4); | |
| 832 deopt_instr = new DeoptUint32x4StackSlotInstr(from_index); | |
| 833 } | |
| 824 } else { | 834 } else { |
| 825 UNREACHABLE(); | 835 UNREACHABLE(); |
| 826 } | 836 } |
| 827 ASSERT(to_index == instructions_.length()); | 837 ASSERT(to_index == instructions_.length()); |
| 828 ASSERT(deopt_instr != NULL); | 838 ASSERT(deopt_instr != NULL); |
| 829 instructions_.Add(deopt_instr); | 839 instructions_.Add(deopt_instr); |
| 830 } | 840 } |
| 831 | 841 |
| 832 | 842 |
| 833 void DeoptInfoBuilder::AddCallerFp(intptr_t to_index) { | 843 void DeoptInfoBuilder::AddCallerFp(intptr_t to_index) { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 915 Smi* offset, | 925 Smi* offset, |
| 916 DeoptInfo* info, | 926 DeoptInfo* info, |
| 917 Smi* reason) { | 927 Smi* reason) { |
| 918 intptr_t i = index * kEntrySize; | 928 intptr_t i = index * kEntrySize; |
| 919 *offset ^= table.At(i); | 929 *offset ^= table.At(i); |
| 920 *info ^= table.At(i + 1); | 930 *info ^= table.At(i + 1); |
| 921 *reason ^= table.At(i + 2); | 931 *reason ^= table.At(i + 2); |
| 922 } | 932 } |
| 923 | 933 |
| 924 } // namespace dart | 934 } // namespace dart |
| OLD | NEW |