Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1522)

Side by Side Diff: src/deoptimizer.cc

Issue 1763783003: [Interpreter] Fixes translation from bailout id to code offset. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/frames.cc » ('j') | src/frames.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/frames.cc » ('j') | src/frames.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698