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

Side by Side Diff: src/arm64/lithium-codegen-arm64.cc

Issue 587473003: Removed confusing defensive programming in GenerateJumpTable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 Register entry_offset = temps.AcquireX(); 835 Register entry_offset = temps.AcquireX();
836 836
837 int length = jump_table_.length(); 837 int length = jump_table_.length();
838 for (int i = 0; i < length; i++) { 838 for (int i = 0; i < length; i++) {
839 Deoptimizer::JumpTableEntry* table_entry = jump_table_[i]; 839 Deoptimizer::JumpTableEntry* table_entry = jump_table_[i];
840 __ Bind(&table_entry->label); 840 __ Bind(&table_entry->label);
841 841
842 Deoptimizer::BailoutType type = table_entry->bailout_type; 842 Deoptimizer::BailoutType type = table_entry->bailout_type;
843 Address entry = table_entry->address; 843 Address entry = table_entry->address;
844 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); 844 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
845 if (id == Deoptimizer::kNotDeoptimizationEntry) { 845 DCHECK_NE(Deoptimizer::kNotDeoptimizationEntry, id);
846 Comment(";;; jump table entry %d.", i); 846 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
847 } else {
848 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
849 }
850 DeoptComment(table_entry->mnemonic, table_entry->reason); 847 DeoptComment(table_entry->mnemonic, table_entry->reason);
851 848
852 // Second-level deopt table entries are contiguous and small, so instead 849 // Second-level deopt table entries are contiguous and small, so instead
853 // of loading the full, absolute address of each one, load the base 850 // of loading the full, absolute address of each one, load the base
854 // address and add an immediate offset. 851 // address and add an immediate offset.
855 __ Mov(entry_offset, entry - base); 852 __ Mov(entry_offset, entry - base);
856 853
857 // The last entry can fall through into `call_deopt_entry`, avoiding a 854 // The last entry can fall through into `call_deopt_entry`, avoiding a
858 // branch. 855 // branch.
859 bool last_entry = (i + 1) == length; 856 bool last_entry = (i + 1) == length;
(...skipping 5180 matching lines...) Expand 10 before | Expand all | Expand 10 after
6040 Handle<ScopeInfo> scope_info = instr->scope_info(); 6037 Handle<ScopeInfo> scope_info = instr->scope_info();
6041 __ Push(scope_info); 6038 __ Push(scope_info);
6042 __ Push(ToRegister(instr->function())); 6039 __ Push(ToRegister(instr->function()));
6043 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6040 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6044 RecordSafepoint(Safepoint::kNoLazyDeopt); 6041 RecordSafepoint(Safepoint::kNoLazyDeopt);
6045 } 6042 }
6046 6043
6047 6044
6048 6045
6049 } } // namespace v8::internal 6046 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698