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

Side by Side Diff: src/deoptimizer.cc

Issue 2534893002: [runtime] Simplify handler table lookup semantics. (Closed)
Patch Set: Rebased. Created 4 years 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') | no next file with comments »
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 <memory> 7 #include <memory>
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 HandlerTable::cast(non_optimized_code->handler_table()); 635 HandlerTable::cast(non_optimized_code->handler_table());
636 DCHECK_EQ(0, table->NumberOfRangeEntries()); 636 DCHECK_EQ(0, table->NumberOfRangeEntries());
637 #endif 637 #endif
638 break; 638 break;
639 } 639 }
640 case TranslatedFrame::kInterpretedFunction: { 640 case TranslatedFrame::kInterpretedFunction: {
641 int bytecode_offset = translated_frame->node_id().ToInt(); 641 int bytecode_offset = translated_frame->node_id().ToInt();
642 JSFunction* function = 642 JSFunction* function =
643 JSFunction::cast(translated_frame->begin()->GetRawValue()); 643 JSFunction::cast(translated_frame->begin()->GetRawValue());
644 BytecodeArray* bytecode = function->shared()->bytecode_array(); 644 BytecodeArray* bytecode = function->shared()->bytecode_array();
645 return bytecode->LookupRangeInHandlerTable(bytecode_offset, data_out, 645 HandlerTable* table = HandlerTable::cast(bytecode->handler_table());
646 nullptr); 646 return table->LookupRange(bytecode_offset, data_out, nullptr);
647 } 647 }
648 default: 648 default:
649 break; 649 break;
650 } 650 }
651 return -1; 651 return -1;
652 } 652 }
653 653
654 } // namespace 654 } // namespace
655 655
656 // We rely on this function not causing a GC. It is called from generated code 656 // We rely on this function not causing a GC. It is called from generated code
(...skipping 3354 matching lines...) Expand 10 before | Expand all | Expand 10 after
4011 CHECK(value_info->IsMaterializedObject()); 4011 CHECK(value_info->IsMaterializedObject());
4012 4012
4013 value_info->value_ = 4013 value_info->value_ =
4014 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4014 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4015 } 4015 }
4016 } 4016 }
4017 } 4017 }
4018 4018
4019 } // namespace internal 4019 } // namespace internal
4020 } // namespace v8 4020 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698