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

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

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 26 matching lines...) Expand all
37 namespace internal { 37 namespace internal {
38 38
39 #define DEFINE_COMPILE(type) \ 39 #define DEFINE_COMPILE(type) \
40 void L##type::CompileToNative(LCodeGen* generator) { \ 40 void L##type::CompileToNative(LCodeGen* generator) { \
41 generator->Do##type(this); \ 41 generator->Do##type(this); \
42 } 42 }
43 LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE) 43 LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
44 #undef DEFINE_COMPILE 44 #undef DEFINE_COMPILE
45 45
46 LOsrEntry::LOsrEntry() { 46 LOsrEntry::LOsrEntry() {
47 for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) { 47 for (int i = 0; i < Register::NumAllocatableRegisters(); ++i) {
48 register_spills_[i] = NULL; 48 register_spills_[i] = NULL;
49 } 49 }
50 for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; ++i) { 50 for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) {
51 double_register_spills_[i] = NULL; 51 double_register_spills_[i] = NULL;
52 } 52 }
53 } 53 }
54 54
55 55
56 void LOsrEntry::MarkSpilledRegister(int allocation_index, 56 void LOsrEntry::MarkSpilledRegister(int allocation_index,
57 LOperand* spill_operand) { 57 LOperand* spill_operand) {
58 ASSERT(spill_operand->IsStackSlot()); 58 ASSERT(spill_operand->IsStackSlot());
59 ASSERT(register_spills_[allocation_index] == NULL); 59 ASSERT(register_spills_[allocation_index] == NULL);
60 register_spills_[allocation_index] = spill_operand; 60 register_spills_[allocation_index] = spill_operand;
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 453 }
454 454
455 455
456 LPlatformChunk* LChunkBuilder::Build() { 456 LPlatformChunk* LChunkBuilder::Build() {
457 ASSERT(is_unused()); 457 ASSERT(is_unused());
458 chunk_ = new(zone()) LPlatformChunk(info(), graph()); 458 chunk_ = new(zone()) LPlatformChunk(info(), graph());
459 HPhase phase("L_Building chunk", chunk_); 459 HPhase phase("L_Building chunk", chunk_);
460 status_ = BUILDING; 460 status_ = BUILDING;
461 461
462 // Reserve the first spill slot for the state of dynamic alignment. 462 // Reserve the first spill slot for the state of dynamic alignment.
463 int alignment_state_index = chunk_->GetNextSpillIndex(false); 463 if (info()->IsOptimizing()) {
464 ASSERT_EQ(alignment_state_index, 0); 464 int alignment_state_index = chunk_->GetNextSpillIndex(false);
465 USE(alignment_state_index); 465 ASSERT_EQ(alignment_state_index, 0);
466 USE(alignment_state_index);
467 }
466 468
467 const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); 469 const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
468 for (int i = 0; i < blocks->length(); i++) { 470 for (int i = 0; i < blocks->length(); i++) {
469 HBasicBlock* next = NULL; 471 HBasicBlock* next = NULL;
470 if (i < blocks->length() - 1) next = blocks->at(i + 1); 472 if (i < blocks->length() - 1) next = blocks->at(i + 1);
471 DoBasicBlock(blocks->at(i), next); 473 DoBasicBlock(blocks->at(i), next);
472 if (is_aborted()) return NULL; 474 if (is_aborted()) return NULL;
473 } 475 }
474 status_ = DONE; 476 status_ = DONE;
475 return chunk_; 477 return chunk_;
(...skipping 11 matching lines...) Expand all
487 Register::ToAllocationIndex(reg)); 489 Register::ToAllocationIndex(reg));
488 } 490 }
489 491
490 492
491 LUnallocated* LChunkBuilder::ToUnallocated(XMMRegister reg) { 493 LUnallocated* LChunkBuilder::ToUnallocated(XMMRegister reg) {
492 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, 494 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER,
493 XMMRegister::ToAllocationIndex(reg)); 495 XMMRegister::ToAllocationIndex(reg));
494 } 496 }
495 497
496 498
499 LUnallocated* LChunkBuilder::ToUnallocated(X87TopOfStackRegister reg) {
500 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER,
501 X87TopOfStackRegister::ToAllocationIndex(reg));
502 }
503
504
497 LOperand* LChunkBuilder::UseFixed(HValue* value, Register fixed_register) { 505 LOperand* LChunkBuilder::UseFixed(HValue* value, Register fixed_register) {
498 return Use(value, ToUnallocated(fixed_register)); 506 return Use(value, ToUnallocated(fixed_register));
499 } 507 }
500 508
501 509
502 LOperand* LChunkBuilder::UseFixedDouble(HValue* value, XMMRegister reg) { 510 LOperand* LChunkBuilder::UseFixedDouble(HValue* value, XMMRegister reg) {
503 return Use(value, ToUnallocated(reg)); 511 return Use(value, ToUnallocated(reg));
504 } 512 }
505 513
506 514
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 627
620 628
621 template<int I, int T> 629 template<int I, int T>
622 LInstruction* LChunkBuilder::DefineFixedDouble( 630 LInstruction* LChunkBuilder::DefineFixedDouble(
623 LTemplateInstruction<1, I, T>* instr, 631 LTemplateInstruction<1, I, T>* instr,
624 XMMRegister reg) { 632 XMMRegister reg) {
625 return Define(instr, ToUnallocated(reg)); 633 return Define(instr, ToUnallocated(reg));
626 } 634 }
627 635
628 636
637 template<int I, int T>
638 LInstruction* LChunkBuilder::DefineX87TOS(
639 LTemplateInstruction<1, I, T>* instr) {
640 return Define(instr, ToUnallocated(x87tos));
641 }
642
643
629 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { 644 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
630 HEnvironment* hydrogen_env = current_block_->last_environment(); 645 HEnvironment* hydrogen_env = current_block_->last_environment();
631 int argument_index_accumulator = 0; 646 int argument_index_accumulator = 0;
632 instr->set_environment(CreateEnvironment(hydrogen_env, 647 instr->set_environment(CreateEnvironment(hydrogen_env,
633 &argument_index_accumulator)); 648 &argument_index_accumulator));
634 return instr; 649 return instr;
635 } 650 }
636 651
637 652
638 LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, 653 LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
639 HInstruction* hinstr, 654 HInstruction* hinstr,
640 CanDeoptimize can_deoptimize) { 655 CanDeoptimize can_deoptimize) {
656 info()->MarkAsNonDeferredCalling();
657
641 #ifdef DEBUG 658 #ifdef DEBUG
642 instr->VerifyCall(); 659 instr->VerifyCall();
643 #endif 660 #endif
644 instr->MarkAsCall(); 661 instr->MarkAsCall();
645 instr = AssignPointerMap(instr); 662 instr = AssignPointerMap(instr);
646 663
647 if (hinstr->HasObservableSideEffects()) { 664 if (hinstr->HasObservableSideEffects()) {
648 ASSERT(hinstr->next()->IsSimulate()); 665 ASSERT(hinstr->next()->IsSimulate());
649 HSimulate* sim = HSimulate::cast(hinstr->next()); 666 HSimulate* sim = HSimulate::cast(hinstr->next());
650 ASSERT(instruction_pending_deoptimization_environment_ == NULL); 667 ASSERT(instruction_pending_deoptimization_environment_ == NULL);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 LArithmeticT* result = 813 LArithmeticT* result =
797 new(zone()) LArithmeticT(op, context, left_operand, right_operand); 814 new(zone()) LArithmeticT(op, context, left_operand, right_operand);
798 return MarkAsCall(DefineFixed(result, eax), instr); 815 return MarkAsCall(DefineFixed(result, eax), instr);
799 } 816 }
800 817
801 818
802 void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) { 819 void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
803 ASSERT(is_building()); 820 ASSERT(is_building());
804 current_block_ = block; 821 current_block_ = block;
805 next_block_ = next_block; 822 next_block_ = next_block;
806 if (block->IsStartBlock()) { 823 if (graph()->info()->IsOptimizing()) {
Jakob Kummerow 2012/11/28 16:28:22 I guess the changes to this method need porting (w
danno 2012/11/30 16:23:24 It looks like subsequent changes obviated the need
807 block->UpdateEnvironment(graph_->start_environment()); 824 if (block->IsStartBlock()) {
808 argument_count_ = 0; 825 block->UpdateEnvironment(graph_->start_environment());
809 } else if (block->predecessors()->length() == 1) { 826 argument_count_ = 0;
810 // We have a single predecessor => copy environment and outgoing 827 } else if (block->predecessors()->length() == 1) {
811 // argument count from the predecessor. 828 // We have a single predecessor => copy environment and outgoing
812 ASSERT(block->phis()->length() == 0); 829 // argument count from the predecessor.
813 HBasicBlock* pred = block->predecessors()->at(0); 830 ASSERT(block->phis()->length() == 0);
814 HEnvironment* last_environment = pred->last_environment(); 831 HBasicBlock* pred = block->predecessors()->at(0);
815 ASSERT(last_environment != NULL); 832 HEnvironment* last_environment = pred->last_environment();
816 // Only copy the environment, if it is later used again. 833 ASSERT(last_environment != NULL);
817 if (pred->end()->SecondSuccessor() == NULL) { 834 // Only copy the environment, if it is later used again.
818 ASSERT(pred->end()->FirstSuccessor() == block); 835 if (pred->end()->SecondSuccessor() == NULL) {
836 ASSERT(pred->end()->FirstSuccessor() == block);
837 } else {
838 if (pred->end()->FirstSuccessor()->block_id() > block->block_id() ||
839 pred->end()->SecondSuccessor()->block_id() > block->block_id()) {
840 last_environment = last_environment->Copy();
841 }
842 }
843 block->UpdateEnvironment(last_environment);
844 ASSERT(pred->argument_count() >= 0);
845 argument_count_ = pred->argument_count();
819 } else { 846 } else {
820 if (pred->end()->FirstSuccessor()->block_id() > block->block_id() || 847 // We are at a state join => process phis.
821 pred->end()->SecondSuccessor()->block_id() > block->block_id()) { 848 HBasicBlock* pred = block->predecessors()->at(0);
822 last_environment = last_environment->Copy(); 849 // No need to copy the environment, it cannot be used later.
850 HEnvironment* last_environment = pred->last_environment();
851 for (int i = 0; i < block->phis()->length(); ++i) {
852 HPhi* phi = block->phis()->at(i);
853 last_environment->SetValueAt(phi->merged_index(), phi);
823 } 854 }
855 for (int i = 0; i < block->deleted_phis()->length(); ++i) {
856 last_environment->SetValueAt(block->deleted_phis()->at(i),
857 graph_->GetConstantUndefined());
858 }
859 block->UpdateEnvironment(last_environment);
860 // Pick up the outgoing argument count of one of the predecessors.
861 argument_count_ = pred->argument_count();
824 } 862 }
825 block->UpdateEnvironment(last_environment);
826 ASSERT(pred->argument_count() >= 0);
827 argument_count_ = pred->argument_count();
828 } else {
829 // We are at a state join => process phis.
830 HBasicBlock* pred = block->predecessors()->at(0);
831 // No need to copy the environment, it cannot be used later.
832 HEnvironment* last_environment = pred->last_environment();
833 for (int i = 0; i < block->phis()->length(); ++i) {
834 HPhi* phi = block->phis()->at(i);
835 last_environment->SetValueAt(phi->merged_index(), phi);
836 }
837 for (int i = 0; i < block->deleted_phis()->length(); ++i) {
838 last_environment->SetValueAt(block->deleted_phis()->at(i),
839 graph_->GetConstantUndefined());
840 }
841 block->UpdateEnvironment(last_environment);
842 // Pick up the outgoing argument count of one of the predecessors.
843 argument_count_ = pred->argument_count();
844 } 863 }
845 HInstruction* current = block->first(); 864 HInstruction* current = block->first();
846 int start = chunk_->instructions()->length(); 865 int start = chunk_->instructions()->length();
847 while (current != NULL && !is_aborted()) { 866 while (current != NULL && !is_aborted()) {
848 // Code for constants in registers is generated lazily. 867 // Code for constants in registers is generated lazily.
849 if (!current->EmitAtUses()) { 868 if (!current->EmitAtUses()) {
850 VisitInstruction(current); 869 VisitInstruction(current);
851 } 870 }
852 current = current->next(); 871 current = current->next();
853 } 872 }
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 // All HForceRepresentation instructions should be eliminated in the 1692 // All HForceRepresentation instructions should be eliminated in the
1674 // representation change phase of Hydrogen. 1693 // representation change phase of Hydrogen.
1675 UNREACHABLE(); 1694 UNREACHABLE();
1676 return NULL; 1695 return NULL;
1677 } 1696 }
1678 1697
1679 1698
1680 LInstruction* LChunkBuilder::DoChange(HChange* instr) { 1699 LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1681 Representation from = instr->from(); 1700 Representation from = instr->from();
1682 Representation to = instr->to(); 1701 Representation to = instr->to();
1702 // Only mark conversions that might need to allocate as calling rather than
1703 // all changes. This makes simple, non-allocating conversion not have to force
1704 // building a stack frame.
1683 if (from.IsTagged()) { 1705 if (from.IsTagged()) {
1684 if (to.IsDouble()) { 1706 if (to.IsDouble()) {
1707 info()->MarkAsDeferredCalling();
1685 LOperand* value = UseRegister(instr->value()); 1708 LOperand* value = UseRegister(instr->value());
1686 // Temp register only necessary for minus zero check. 1709 // Temp register only necessary for minus zero check.
1687 LOperand* temp = instr->deoptimize_on_minus_zero() 1710 LOperand* temp = instr->deoptimize_on_minus_zero()
1688 ? TempRegister() 1711 ? TempRegister()
1689 : NULL; 1712 : NULL;
1690 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp); 1713 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp);
1691 return AssignEnvironment(DefineAsRegister(res)); 1714 return AssignEnvironment(DefineAsRegister(res));
1692 } else { 1715 } else {
1693 ASSERT(to.IsInteger32()); 1716 ASSERT(to.IsInteger32());
1694 LOperand* value = UseRegister(instr->value()); 1717 LOperand* value = UseRegister(instr->value());
1695 if (instr->value()->type().IsSmi()) { 1718 if (instr->value()->type().IsSmi()) {
1696 return DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); 1719 return DefineSameAsFirst(new(zone()) LSmiUntag(value, false));
1697 } else { 1720 } else {
1698 bool truncating = instr->CanTruncateToInt32(); 1721 bool truncating = instr->CanTruncateToInt32();
1699 LOperand* xmm_temp = 1722 LOperand* xmm_temp =
1700 (truncating && CpuFeatures::IsSupported(SSE3)) 1723 (truncating && CpuFeatures::IsSupported(SSE3))
1701 ? NULL 1724 ? NULL
1702 : FixedTemp(xmm1); 1725 : FixedTemp(xmm1);
1703 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); 1726 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp);
1704 return AssignEnvironment(DefineSameAsFirst(res)); 1727 return AssignEnvironment(DefineSameAsFirst(res));
1705 } 1728 }
1706 } 1729 }
1707 } else if (from.IsDouble()) { 1730 } else if (from.IsDouble()) {
1708 if (to.IsTagged()) { 1731 if (to.IsTagged()) {
1709 LOperand* value = UseRegister(instr->value()); 1732 info()->MarkAsDeferredCalling();
1733 LOperand* value = CpuFeatures::IsSupported(SSE2)
1734 ? UseRegisterAtStart(instr->value())
1735 : UseAtStart(instr->value());
1710 LOperand* temp = TempRegister(); 1736 LOperand* temp = TempRegister();
1711 1737
1712 // Make sure that temp and result_temp are different registers. 1738 // Make sure that temp and result_temp are different registers.
1713 LUnallocated* result_temp = TempRegister(); 1739 LUnallocated* result_temp = TempRegister();
1714 LNumberTagD* result = new(zone()) LNumberTagD(value, temp); 1740 LNumberTagD* result = new(zone()) LNumberTagD(value, temp);
1715 return AssignPointerMap(Define(result, result_temp)); 1741 return AssignPointerMap(Define(result, result_temp));
1716 } else { 1742 } else {
1717 ASSERT(to.IsInteger32()); 1743 ASSERT(to.IsInteger32());
1718 bool truncating = instr->CanTruncateToInt32(); 1744 bool truncating = instr->CanTruncateToInt32();
1719 bool needs_temp = truncating && !CpuFeatures::IsSupported(SSE3); 1745 bool needs_temp = truncating && !CpuFeatures::IsSupported(SSE3);
1720 LOperand* value = needs_temp ? 1746 LOperand* value = needs_temp ?
1721 UseTempRegister(instr->value()) : UseRegister(instr->value()); 1747 UseTempRegister(instr->value()) : UseRegister(instr->value());
1722 LOperand* temp = needs_temp ? TempRegister() : NULL; 1748 LOperand* temp = needs_temp ? TempRegister() : NULL;
1723 return AssignEnvironment( 1749 return AssignEnvironment(
1724 DefineAsRegister(new(zone()) LDoubleToI(value, temp))); 1750 DefineAsRegister(new(zone()) LDoubleToI(value, temp)));
1725 } 1751 }
1726 } else if (from.IsInteger32()) { 1752 } else if (from.IsInteger32()) {
1753 info()->MarkAsDeferredCalling();
1727 if (to.IsTagged()) { 1754 if (to.IsTagged()) {
1728 HValue* val = instr->value(); 1755 HValue* val = instr->value();
1729 LOperand* value = UseRegister(val); 1756 LOperand* value = UseRegister(val);
1730 if (val->HasRange() && val->range()->IsInSmiRange()) { 1757 if (val->HasRange() && val->range()->IsInSmiRange()) {
1731 return DefineSameAsFirst(new(zone()) LSmiTag(value)); 1758 return DefineSameAsFirst(new(zone()) LSmiTag(value));
1732 } else if (val->CheckFlag(HInstruction::kUint32)) { 1759 } else if (val->CheckFlag(HInstruction::kUint32)) {
1733 LOperand* temp = FixedTemp(xmm1); 1760 LOperand* temp = FixedTemp(xmm1);
1734 LNumberTagU* result = new(zone()) LNumberTagU(value, temp); 1761 LNumberTagU* result = new(zone()) LNumberTagU(value, temp);
1735 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); 1762 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
1736 } else { 1763 } else {
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 2260
2234 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { 2261 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
2235 ASSERT(argument_count_ == 0); 2262 ASSERT(argument_count_ == 0);
2236 allocator_->MarkAsOsrEntry(); 2263 allocator_->MarkAsOsrEntry();
2237 current_block_->last_environment()->set_ast_id(instr->ast_id()); 2264 current_block_->last_environment()->set_ast_id(instr->ast_id());
2238 return AssignEnvironment(new(zone()) LOsrEntry); 2265 return AssignEnvironment(new(zone()) LOsrEntry);
2239 } 2266 }
2240 2267
2241 2268
2242 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { 2269 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
2243 int spill_index = chunk()->GetParameterStackSlot(instr->index()); 2270 LParameter* result = new(zone()) LParameter;
2244 return DefineAsSpilled(new(zone()) LParameter, spill_index); 2271 if (info()->IsOptimizing()) {
2272 int spill_index = chunk()->GetParameterStackSlot(instr->index());
2273 return DefineAsSpilled(result, spill_index);
2274 } else {
2275 ASSERT(info()->IsStub());
2276 CodeStubInterfaceDescriptor* descriptor =
2277 info()->code_stub()->GetInterfaceDescriptor(info()->isolate());
2278 Register reg = descriptor->register_params[instr->index()];
2279 return DefineFixed(result, reg);
2280 }
2245 } 2281 }
2246 2282
2247 2283
2248 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { 2284 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
2249 int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width. 2285 int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width.
2250 if (spill_index > LUnallocated::kMaxFixedIndex) { 2286 if (spill_index > LUnallocated::kMaxFixedIndex) {
2251 Abort("Too many spill slots needed for OSR"); 2287 Abort("Too many spill slots needed for OSR");
2252 spill_index = 0; 2288 spill_index = 0;
2253 } 2289 }
2254 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); 2290 return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 instruction_pending_deoptimization_environment_ = NULL; 2371 instruction_pending_deoptimization_environment_ = NULL;
2336 pending_deoptimization_ast_id_ = BailoutId::None(); 2372 pending_deoptimization_ast_id_ = BailoutId::None();
2337 return result; 2373 return result;
2338 } 2374 }
2339 2375
2340 return NULL; 2376 return NULL;
2341 } 2377 }
2342 2378
2343 2379
2344 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { 2380 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
2381 info()->MarkAsDeferredCalling();
2345 if (instr->is_function_entry()) { 2382 if (instr->is_function_entry()) {
2346 LOperand* context = UseFixed(instr->context(), esi); 2383 LOperand* context = UseFixed(instr->context(), esi);
2347 return MarkAsCall(new(zone()) LStackCheck(context), instr); 2384 return MarkAsCall(new(zone()) LStackCheck(context), instr);
2348 } else { 2385 } else {
2349 ASSERT(instr->is_backwards_branch()); 2386 ASSERT(instr->is_backwards_branch());
2350 LOperand* context = UseAny(instr->context()); 2387 LOperand* context = UseAny(instr->context());
2351 return AssignEnvironment( 2388 return AssignEnvironment(
2352 AssignPointerMap(new(zone()) LStackCheck(context))); 2389 AssignPointerMap(new(zone()) LStackCheck(context)));
2353 } 2390 }
2354 } 2391 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
2425 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2462 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2426 LOperand* object = UseRegister(instr->object()); 2463 LOperand* object = UseRegister(instr->object());
2427 LOperand* index = UseTempRegister(instr->index()); 2464 LOperand* index = UseTempRegister(instr->index());
2428 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2465 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2429 } 2466 }
2430 2467
2431 2468
2432 } } // namespace v8::internal 2469 } } // namespace v8::internal
2433 2470
2434 #endif // V8_TARGET_ARCH_IA32 2471 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698