| 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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 | 1370 |
| 1371 | 1371 |
| 1372 intptr_t DeoptInfoBuilder::EmitMaterializationArguments(intptr_t dest_index) { | 1372 intptr_t DeoptInfoBuilder::EmitMaterializationArguments(intptr_t dest_index) { |
| 1373 ASSERT(dest_index == kDartFrameFixedSize); | 1373 ASSERT(dest_index == kDartFrameFixedSize); |
| 1374 for (intptr_t i = 0; i < materializations_.length(); i++) { | 1374 for (intptr_t i = 0; i < materializations_.length(); i++) { |
| 1375 MaterializeObjectInstr* mat = materializations_[i]; | 1375 MaterializeObjectInstr* mat = materializations_[i]; |
| 1376 // Class of the instance to allocate. | 1376 // Class of the instance to allocate. |
| 1377 AddConstant(mat->cls(), dest_index++); | 1377 AddConstant(mat->cls(), dest_index++); |
| 1378 for (intptr_t i = 0; i < mat->InputCount(); i++) { | 1378 for (intptr_t i = 0; i < mat->InputCount(); i++) { |
| 1379 if (!mat->InputAt(i)->BindsToConstantNull()) { | 1379 if (!mat->InputAt(i)->BindsToConstantNull()) { |
| 1380 // Emit field-value pair. | 1380 // Emit offset-value pair. |
| 1381 AddConstant(mat->FieldAt(i), dest_index++); | 1381 AddConstant(Smi::Handle(Smi::New(mat->FieldOffsetAt(i))), |
| 1382 dest_index++); |
| 1382 AddCopy(mat->InputAt(i), mat->LocationAt(i), dest_index++); | 1383 AddCopy(mat->InputAt(i), mat->LocationAt(i), dest_index++); |
| 1383 } | 1384 } |
| 1384 } | 1385 } |
| 1385 } | 1386 } |
| 1386 return dest_index; | 1387 return dest_index; |
| 1387 } | 1388 } |
| 1388 | 1389 |
| 1389 | 1390 |
| 1390 intptr_t DeoptInfoBuilder::FindMaterialization( | 1391 intptr_t DeoptInfoBuilder::FindMaterialization( |
| 1391 MaterializeObjectInstr* mat) const { | 1392 MaterializeObjectInstr* mat) const { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1482 Smi* offset, | 1483 Smi* offset, |
| 1483 DeoptInfo* info, | 1484 DeoptInfo* info, |
| 1484 Smi* reason) { | 1485 Smi* reason) { |
| 1485 intptr_t i = index * kEntrySize; | 1486 intptr_t i = index * kEntrySize; |
| 1486 *offset ^= table.At(i); | 1487 *offset ^= table.At(i); |
| 1487 *info ^= table.At(i + 1); | 1488 *info ^= table.At(i + 1); |
| 1488 *reason ^= table.At(i + 2); | 1489 *reason ^= table.At(i + 2); |
| 1489 } | 1490 } |
| 1490 | 1491 |
| 1491 } // namespace dart | 1492 } // namespace dart |
| OLD | NEW |