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

Side by Side Diff: src/arm/lithium-arm.cc

Issue 596783002: Refactor bailout reasons and disable optimization in more cases. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove bogus assertion Created 6 years, 2 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-arm.h ('k') | src/arm/macro-assembler-arm.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 #include "src/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/hydrogen-osr.h" 8 #include "src/hydrogen-osr.h"
9 #include "src/lithium-inl.h" 9 #include "src/lithium-inl.h"
10 10
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 HBasicBlock* next = NULL; 416 HBasicBlock* next = NULL;
417 if (i < blocks->length() - 1) next = blocks->at(i + 1); 417 if (i < blocks->length() - 1) next = blocks->at(i + 1);
418 DoBasicBlock(blocks->at(i), next); 418 DoBasicBlock(blocks->at(i), next);
419 if (is_aborted()) return NULL; 419 if (is_aborted()) return NULL;
420 } 420 }
421 status_ = DONE; 421 status_ = DONE;
422 return chunk_; 422 return chunk_;
423 } 423 }
424 424
425 425
426 void LChunkBuilder::Abort(BailoutReason reason) {
427 info()->set_bailout_reason(reason);
428 status_ = ABORTED;
429 }
430
431
432 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { 426 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
433 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, 427 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER,
434 Register::ToAllocationIndex(reg)); 428 Register::ToAllocationIndex(reg));
435 } 429 }
436 430
437 431
438 LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) { 432 LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) {
439 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, 433 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER,
440 DoubleRegister::ToAllocationIndex(reg)); 434 DoubleRegister::ToAllocationIndex(reg));
441 } 435 }
(...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { 2463 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
2470 // Use an index that corresponds to the location in the unoptimized frame, 2464 // Use an index that corresponds to the location in the unoptimized frame,
2471 // which the optimized frame will subsume. 2465 // which the optimized frame will subsume.
2472 int env_index = instr->index(); 2466 int env_index = instr->index();
2473 int spill_index = 0; 2467 int spill_index = 0;
2474 if (instr->environment()->is_parameter_index(env_index)) { 2468 if (instr->environment()->is_parameter_index(env_index)) {
2475 spill_index = chunk()->GetParameterStackSlot(env_index); 2469 spill_index = chunk()->GetParameterStackSlot(env_index);
2476 } else { 2470 } else {
2477 spill_index = env_index - instr->environment()->first_local_index(); 2471 spill_index = env_index - instr->environment()->first_local_index();
2478 if (spill_index > LUnallocated::kMaxFixedSlotIndex) { 2472 if (spill_index > LUnallocated::kMaxFixedSlotIndex) {
2479 Abort(kTooManySpillSlotsNeededForOSR); 2473 Retry(kTooManySpillSlotsNeededForOSR);
2480 spill_index = 0; 2474 spill_index = 0;
2481 } 2475 }
2482 } 2476 }
2483 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); 2477 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index);
2484 } 2478 }
2485 2479
2486 2480
2487 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { 2481 LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) {
2488 LOperand* context = UseFixed(instr->context(), cp); 2482 LOperand* context = UseFixed(instr->context(), cp);
2489 return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), r0), instr); 2483 return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), r0), instr);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 LInstruction* LChunkBuilder::DoAllocateBlockContext( 2633 LInstruction* LChunkBuilder::DoAllocateBlockContext(
2640 HAllocateBlockContext* instr) { 2634 HAllocateBlockContext* instr) {
2641 LOperand* context = UseFixed(instr->context(), cp); 2635 LOperand* context = UseFixed(instr->context(), cp);
2642 LOperand* function = UseRegisterAtStart(instr->function()); 2636 LOperand* function = UseRegisterAtStart(instr->function());
2643 LAllocateBlockContext* result = 2637 LAllocateBlockContext* result =
2644 new(zone()) LAllocateBlockContext(context, function); 2638 new(zone()) LAllocateBlockContext(context, function);
2645 return MarkAsCall(DefineFixed(result, cp), instr); 2639 return MarkAsCall(DefineFixed(result, cp), instr);
2646 } 2640 }
2647 2641
2648 } } // namespace v8::internal 2642 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698