| 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 2474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2485 return isolate->factory()->undefined_value(); | 2485 return isolate->factory()->undefined_value(); |
| 2486 } | 2486 } |
| 2487 } | 2487 } |
| 2488 return it->GetValue(); | 2488 return it->GetValue(); |
| 2489 } | 2489 } |
| 2490 | 2490 |
| 2491 int ComputeSourcePosition(Handle<SharedFunctionInfo> shared, | 2491 int ComputeSourcePosition(Handle<SharedFunctionInfo> shared, |
| 2492 BailoutId node_id) { | 2492 BailoutId node_id) { |
| 2493 if (shared->HasBytecodeArray()) { | 2493 if (shared->HasBytecodeArray()) { |
| 2494 BytecodeArray* bytecodes = shared->bytecode_array(); | 2494 BytecodeArray* bytecodes = shared->bytecode_array(); |
| 2495 return bytecodes->SourcePosition(node_id.ToInt()); | 2495 return bytecodes->SourcePosition(node_id.ToInt() - 1); |
| 2496 } else { | 2496 } else { |
| 2497 Code* non_optimized_code = shared->code(); | 2497 Code* non_optimized_code = shared->code(); |
| 2498 FixedArray* raw_data = non_optimized_code->deoptimization_data(); | 2498 FixedArray* raw_data = non_optimized_code->deoptimization_data(); |
| 2499 DeoptimizationOutputData* data = DeoptimizationOutputData::cast(raw_data); | 2499 DeoptimizationOutputData* data = DeoptimizationOutputData::cast(raw_data); |
| 2500 unsigned pc_and_state = Deoptimizer::GetOutputInfo(data, node_id, *shared); | 2500 unsigned pc_and_state = Deoptimizer::GetOutputInfo(data, node_id, *shared); |
| 2501 unsigned pc_offset = FullCodeGenerator::PcField::decode(pc_and_state); | 2501 unsigned pc_offset = FullCodeGenerator::PcField::decode(pc_and_state); |
| 2502 return non_optimized_code->SourcePosition(pc_offset); | 2502 return non_optimized_code->SourcePosition(pc_offset); |
| 2503 } | 2503 } |
| 2504 } | 2504 } |
| 2505 | 2505 |
| (...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3738 CHECK(value_info->IsMaterializedObject()); | 3738 CHECK(value_info->IsMaterializedObject()); |
| 3739 | 3739 |
| 3740 value_info->value_ = | 3740 value_info->value_ = |
| 3741 Handle<Object>(previously_materialized_objects->get(i), isolate_); | 3741 Handle<Object>(previously_materialized_objects->get(i), isolate_); |
| 3742 } | 3742 } |
| 3743 } | 3743 } |
| 3744 } | 3744 } |
| 3745 | 3745 |
| 3746 } // namespace internal | 3746 } // namespace internal |
| 3747 } // namespace v8 | 3747 } // namespace v8 |
| OLD | NEW |