OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/deoptimizer.h" | 5 #include "src/deoptimizer.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/ast/prettyprinter.h" | 8 #include "src/ast/prettyprinter.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/disasm.h" | 10 #include "src/disasm.h" |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 WriteValueToOutput(smi_bytecode_offset, 0, frame_index, output_offset, | 1270 WriteValueToOutput(smi_bytecode_offset, 0, frame_index, output_offset, |
1271 "bytecode offset "); | 1271 "bytecode offset "); |
1272 | 1272 |
1273 // Translate the rest of the interpreter registers in the frame. | 1273 // Translate the rest of the interpreter registers in the frame. |
1274 for (unsigned i = 0; i < height - 1; ++i) { | 1274 for (unsigned i = 0; i < height - 1; ++i) { |
1275 output_offset -= kPointerSize; | 1275 output_offset -= kPointerSize; |
1276 WriteTranslatedValueToOutput(&value_iterator, &input_index, frame_index, | 1276 WriteTranslatedValueToOutput(&value_iterator, &input_index, frame_index, |
1277 output_offset); | 1277 output_offset); |
1278 } | 1278 } |
1279 | 1279 |
1280 // Set the accumulator. If we are lazy deopting to a catch handler, | 1280 // Put the accumulator on the stack. It will be popped by the |
1281 // we set the accumulator to the exception (which lives in the result | 1281 // InterpreterNotifyDeopt builtin (possibly after materialization). |
1282 // register). | |
1283 output_offset -= kPointerSize; | 1282 output_offset -= kPointerSize; |
1284 if (goto_catch_handler) { | 1283 if (goto_catch_handler) { |
| 1284 // If we are lazy deopting to a catch handler, we set the accumulator to |
| 1285 // the exception (which lives in the result register). |
1285 intptr_t accumulator_value = | 1286 intptr_t accumulator_value = |
1286 input_->GetRegister(FullCodeGenerator::result_register().code()); | 1287 input_->GetRegister(FullCodeGenerator::result_register().code()); |
1287 WriteValueToOutput(reinterpret_cast<Object*>(accumulator_value), 0, | 1288 WriteValueToOutput(reinterpret_cast<Object*>(accumulator_value), 0, |
1288 frame_index, output_offset, "accumulator "); | 1289 frame_index, output_offset, "accumulator "); |
1289 value_iterator++; | 1290 value_iterator++; |
1290 } else { | 1291 } else { |
1291 WriteTranslatedValueToOutput(&value_iterator, &input_index, frame_index, | 1292 WriteTranslatedValueToOutput(&value_iterator, &input_index, frame_index, |
1292 output_offset); | 1293 output_offset); |
1293 } | 1294 } |
1294 CHECK_EQ(0u, output_offset); | 1295 CHECK_EQ(0u, output_offset); |
(...skipping 2454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3749 CHECK(value_info->IsMaterializedObject()); | 3750 CHECK(value_info->IsMaterializedObject()); |
3750 | 3751 |
3751 value_info->value_ = | 3752 value_info->value_ = |
3752 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 3753 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
3753 } | 3754 } |
3754 } | 3755 } |
3755 } | 3756 } |
3756 | 3757 |
3757 } // namespace internal | 3758 } // namespace internal |
3758 } // namespace v8 | 3759 } // namespace v8 |
OLD | NEW |