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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/arm64/lithium-codegen-arm64.cc ('k') | src/mips/lithium-codegen-mips.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_IA32 7 #if V8_TARGET_ARCH_IA32
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 Label needs_frame; 381 Label needs_frame;
382 if (jump_table_.length() > 0) { 382 if (jump_table_.length() > 0) {
383 Comment(";;; -------------------- Jump table --------------------"); 383 Comment(";;; -------------------- Jump table --------------------");
384 } 384 }
385 for (int i = 0; i < jump_table_.length(); i++) { 385 for (int i = 0; i < jump_table_.length(); i++) {
386 Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i]; 386 Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i];
387 __ bind(&table_entry->label); 387 __ bind(&table_entry->label);
388 Address entry = table_entry->address; 388 Address entry = table_entry->address;
389 Deoptimizer::BailoutType type = table_entry->bailout_type; 389 Deoptimizer::BailoutType type = table_entry->bailout_type;
390 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); 390 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
391 if (id == Deoptimizer::kNotDeoptimizationEntry) { 391 DCHECK_NE(Deoptimizer::kNotDeoptimizationEntry, id);
392 Comment(";;; jump table entry %d.", i); 392 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
393 } else {
394 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
395 }
396 DeoptComment(table_entry->mnemonic, table_entry->reason); 393 DeoptComment(table_entry->mnemonic, table_entry->reason);
397 if (table_entry->needs_frame) { 394 if (table_entry->needs_frame) {
398 DCHECK(!info()->saves_caller_doubles()); 395 DCHECK(!info()->saves_caller_doubles());
399 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); 396 __ push(Immediate(ExternalReference::ForDeoptEntry(entry)));
400 if (needs_frame.is_bound()) { 397 if (needs_frame.is_bound()) {
401 __ jmp(&needs_frame); 398 __ jmp(&needs_frame);
402 } else { 399 } else {
403 __ bind(&needs_frame); 400 __ bind(&needs_frame);
404 __ push(MemOperand(ebp, StandardFrameConstants::kContextOffset)); 401 __ push(MemOperand(ebp, StandardFrameConstants::kContextOffset));
405 // This variant of deopt can only be used with stubs. Since we don't 402 // This variant of deopt can only be used with stubs. Since we don't
(...skipping 5299 matching lines...) Expand 10 before | Expand all | Expand 10 after
5705 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5702 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5706 RecordSafepoint(Safepoint::kNoLazyDeopt); 5703 RecordSafepoint(Safepoint::kNoLazyDeopt);
5707 } 5704 }
5708 5705
5709 5706
5710 #undef __ 5707 #undef __
5711 5708
5712 } } // namespace v8::internal 5709 } } // namespace v8::internal
5713 5710
5714 #endif // V8_TARGET_ARCH_IA32 5711 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/mips/lithium-codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698