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 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 } | 1236 } |
1237 } | 1237 } |
1238 | 1238 |
1239 | 1239 |
1240 intptr_t DeoptInfoBuilder::EmitMaterializationArguments(intptr_t dest_index) { | 1240 intptr_t DeoptInfoBuilder::EmitMaterializationArguments(intptr_t dest_index) { |
1241 ASSERT(dest_index == kDartFrameFixedSize); | 1241 ASSERT(dest_index == kDartFrameFixedSize); |
1242 for (intptr_t i = 0; i < materializations_.length(); i++) { | 1242 for (intptr_t i = 0; i < materializations_.length(); i++) { |
1243 MaterializeObjectInstr* mat = materializations_[i]; | 1243 MaterializeObjectInstr* mat = materializations_[i]; |
1244 // Class of the instance to allocate. | 1244 // Class of the instance to allocate. |
1245 AddConstant(mat->cls(), dest_index++); | 1245 AddConstant(mat->cls(), dest_index++); |
| 1246 AddConstant(Smi::Handle(Smi::New(mat->num_variables())), dest_index++); |
1246 for (intptr_t i = 0; i < mat->InputCount(); i++) { | 1247 for (intptr_t i = 0; i < mat->InputCount(); i++) { |
1247 if (!mat->InputAt(i)->BindsToConstantNull()) { | 1248 if (!mat->InputAt(i)->BindsToConstantNull()) { |
1248 // Emit offset-value pair. | 1249 // Emit offset-value pair. |
1249 AddConstant(Smi::Handle(Smi::New(mat->FieldOffsetAt(i))), | 1250 AddConstant(Smi::Handle(Smi::New(mat->FieldOffsetAt(i))), |
1250 dest_index++); | 1251 dest_index++); |
1251 AddCopy(mat->InputAt(i), mat->LocationAt(i), dest_index++); | 1252 AddCopy(mat->InputAt(i), mat->LocationAt(i), dest_index++); |
1252 } | 1253 } |
1253 } | 1254 } |
1254 } | 1255 } |
1255 return dest_index; | 1256 return dest_index; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 Smi* offset, | 1353 Smi* offset, |
1353 DeoptInfo* info, | 1354 DeoptInfo* info, |
1354 Smi* reason) { | 1355 Smi* reason) { |
1355 intptr_t i = index * kEntrySize; | 1356 intptr_t i = index * kEntrySize; |
1356 *offset ^= table.At(i); | 1357 *offset ^= table.At(i); |
1357 *info ^= table.At(i + 1); | 1358 *info ^= table.At(i + 1); |
1358 *reason ^= table.At(i + 2); | 1359 *reason ^= table.At(i + 2); |
1359 } | 1360 } |
1360 | 1361 |
1361 } // namespace dart | 1362 } // namespace dart |
OLD | NEW |