| 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/disassembler.h" | 10 #include "vm/disassembler.h" |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 intptr_t object_table_index = FindOrAddObjectInTable(source_loc.constant()); | 1070 intptr_t object_table_index = FindOrAddObjectInTable(source_loc.constant()); |
| 1071 deopt_instr = new (zone()) DeoptConstantInstr(object_table_index); | 1071 deopt_instr = new (zone()) DeoptConstantInstr(object_table_index); |
| 1072 } else if (source_loc.IsInvalid() && | 1072 } else if (source_loc.IsInvalid() && |
| 1073 value->definition()->IsMaterializeObject()) { | 1073 value->definition()->IsMaterializeObject()) { |
| 1074 const intptr_t index = | 1074 const intptr_t index = |
| 1075 FindMaterialization(value->definition()->AsMaterializeObject()); | 1075 FindMaterialization(value->definition()->AsMaterializeObject()); |
| 1076 ASSERT(index >= 0); | 1076 ASSERT(index >= 0); |
| 1077 deopt_instr = new (zone()) DeoptMaterializedObjectRefInstr(index); | 1077 deopt_instr = new (zone()) DeoptMaterializedObjectRefInstr(index); |
| 1078 } else { | 1078 } else { |
| 1079 ASSERT(!source_loc.IsInvalid()); | 1079 ASSERT(!source_loc.IsInvalid()); |
| 1080 switch (value->definition()->representation()) { | 1080 #if defined(TARGET_ARCH_DBC) |
| 1081 Representation rep = |
| 1082 (value == NULL) ? kTagged : value->definition()->representation(); |
| 1083 #else |
| 1084 Representation rep = value->definition()->representation(); |
| 1085 #endif |
| 1086 switch (rep) { |
| 1081 case kTagged: | 1087 case kTagged: |
| 1082 deopt_instr = | 1088 deopt_instr = |
| 1083 new (zone()) DeoptWordInstr(ToCpuRegisterSource(source_loc)); | 1089 new (zone()) DeoptWordInstr(ToCpuRegisterSource(source_loc)); |
| 1084 break; | 1090 break; |
| 1085 case kUnboxedMint: { | 1091 case kUnboxedMint: { |
| 1086 if (source_loc.IsPairLocation()) { | 1092 if (source_loc.IsPairLocation()) { |
| 1087 PairLocation* pair = source_loc.AsPairLocation(); | 1093 PairLocation* pair = source_loc.AsPairLocation(); |
| 1088 deopt_instr = | 1094 deopt_instr = |
| 1089 new (zone()) DeoptMintPairInstr(ToCpuRegisterSource(pair->At(0)), | 1095 new (zone()) DeoptMintPairInstr(ToCpuRegisterSource(pair->At(0)), |
| 1090 ToCpuRegisterSource(pair->At(1))); | 1096 ToCpuRegisterSource(pair->At(1))); |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 Smi* offset, | 1325 Smi* offset, |
| 1320 TypedData* info, | 1326 TypedData* info, |
| 1321 Smi* reason) { | 1327 Smi* reason) { |
| 1322 intptr_t i = index * kEntrySize; | 1328 intptr_t i = index * kEntrySize; |
| 1323 *offset ^= table.At(i); | 1329 *offset ^= table.At(i); |
| 1324 *info ^= table.At(i + 1); | 1330 *info ^= table.At(i + 1); |
| 1325 *reason ^= table.At(i + 2); | 1331 *reason ^= table.At(i + 2); |
| 1326 } | 1332 } |
| 1327 | 1333 |
| 1328 } // namespace dart | 1334 } // namespace dart |
| OLD | NEW |