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

Side by Side Diff: src/x87/lithium-codegen-x87.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/x64/lithium-codegen-x64.cc ('k') | no next file » | 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_X87 7 #if V8_TARGET_ARCH_X87
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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 Label needs_frame; 362 Label needs_frame;
363 if (jump_table_.length() > 0) { 363 if (jump_table_.length() > 0) {
364 Comment(";;; -------------------- Jump table --------------------"); 364 Comment(";;; -------------------- Jump table --------------------");
365 } 365 }
366 for (int i = 0; i < jump_table_.length(); i++) { 366 for (int i = 0; i < jump_table_.length(); i++) {
367 Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i]; 367 Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i];
368 __ bind(&table_entry->label); 368 __ bind(&table_entry->label);
369 Address entry = table_entry->address; 369 Address entry = table_entry->address;
370 Deoptimizer::BailoutType type = table_entry->bailout_type; 370 Deoptimizer::BailoutType type = table_entry->bailout_type;
371 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); 371 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
372 if (id == Deoptimizer::kNotDeoptimizationEntry) { 372 DCHECK_NE(Deoptimizer::kNotDeoptimizationEntry, id);
373 Comment(";;; jump table entry %d.", i); 373 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
374 } else {
375 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
376 }
377 DeoptComment(table_entry->mnemonic, table_entry->reason); 374 DeoptComment(table_entry->mnemonic, table_entry->reason);
378 if (table_entry->needs_frame) { 375 if (table_entry->needs_frame) {
379 DCHECK(!info()->saves_caller_doubles()); 376 DCHECK(!info()->saves_caller_doubles());
380 __ push(Immediate(ExternalReference::ForDeoptEntry(entry))); 377 __ push(Immediate(ExternalReference::ForDeoptEntry(entry)));
381 if (needs_frame.is_bound()) { 378 if (needs_frame.is_bound()) {
382 __ jmp(&needs_frame); 379 __ jmp(&needs_frame);
383 } else { 380 } else {
384 __ bind(&needs_frame); 381 __ bind(&needs_frame);
385 __ push(MemOperand(ebp, StandardFrameConstants::kContextOffset)); 382 __ push(MemOperand(ebp, StandardFrameConstants::kContextOffset));
386 // This variant of deopt can only be used with stubs. Since we don't 383 // This variant of deopt can only be used with stubs. Since we don't
(...skipping 5386 matching lines...) Expand 10 before | Expand all | Expand 10 after
5773 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5770 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5774 RecordSafepoint(Safepoint::kNoLazyDeopt); 5771 RecordSafepoint(Safepoint::kNoLazyDeopt);
5775 } 5772 }
5776 5773
5777 5774
5778 #undef __ 5775 #undef __
5779 5776
5780 } } // namespace v8::internal 5777 } } // namespace v8::internal
5781 5778
5782 #endif // V8_TARGET_ARCH_X87 5779 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698