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

Side by Side Diff: src/x64/lithium-codegen-x64.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/mips64/lithium-codegen-mips64.cc ('k') | src/x87/lithium-codegen-x87.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 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 Label needs_frame; 301 Label needs_frame;
302 if (jump_table_.length() > 0) { 302 if (jump_table_.length() > 0) {
303 Comment(";;; -------------------- Jump table --------------------"); 303 Comment(";;; -------------------- Jump table --------------------");
304 } 304 }
305 for (int i = 0; i < jump_table_.length(); i++) { 305 for (int i = 0; i < jump_table_.length(); i++) {
306 Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i]; 306 Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i];
307 __ bind(&table_entry->label); 307 __ bind(&table_entry->label);
308 Address entry = table_entry->address; 308 Address entry = table_entry->address;
309 Deoptimizer::BailoutType type = table_entry->bailout_type; 309 Deoptimizer::BailoutType type = table_entry->bailout_type;
310 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); 310 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
311 if (id == Deoptimizer::kNotDeoptimizationEntry) { 311 DCHECK_NE(Deoptimizer::kNotDeoptimizationEntry, id);
312 Comment(";;; jump table entry %d.", i); 312 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
313 } else {
314 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
315 }
316 DeoptComment(table_entry->mnemonic, table_entry->reason); 313 DeoptComment(table_entry->mnemonic, table_entry->reason);
317 if (table_entry->needs_frame) { 314 if (table_entry->needs_frame) {
318 DCHECK(!info()->saves_caller_doubles()); 315 DCHECK(!info()->saves_caller_doubles());
319 __ Move(kScratchRegister, ExternalReference::ForDeoptEntry(entry)); 316 __ Move(kScratchRegister, ExternalReference::ForDeoptEntry(entry));
320 if (needs_frame.is_bound()) { 317 if (needs_frame.is_bound()) {
321 __ jmp(&needs_frame); 318 __ jmp(&needs_frame);
322 } else { 319 } else {
323 __ bind(&needs_frame); 320 __ bind(&needs_frame);
324 __ movp(rsi, MemOperand(rbp, StandardFrameConstants::kContextOffset)); 321 __ movp(rsi, MemOperand(rbp, StandardFrameConstants::kContextOffset));
325 __ pushq(rbp); 322 __ pushq(rbp);
(...skipping 5560 matching lines...) Expand 10 before | Expand all | Expand 10 after
5886 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5883 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5887 RecordSafepoint(Safepoint::kNoLazyDeopt); 5884 RecordSafepoint(Safepoint::kNoLazyDeopt);
5888 } 5885 }
5889 5886
5890 5887
5891 #undef __ 5888 #undef __
5892 5889
5893 } } // namespace v8::internal 5890 } } // namespace v8::internal
5894 5891
5895 #endif // V8_TARGET_ARCH_X64 5892 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698