OLD | NEW |
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 2546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { | 2557 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { |
2558 // There are no real uses of the arguments object. | 2558 // There are no real uses of the arguments object. |
2559 // arguments.length and element access are supported directly on | 2559 // arguments.length and element access are supported directly on |
2560 // stack arguments, and any real arguments object use causes a bailout. | 2560 // stack arguments, and any real arguments object use causes a bailout. |
2561 // So this value is never used. | 2561 // So this value is never used. |
2562 return NULL; | 2562 return NULL; |
2563 } | 2563 } |
2564 | 2564 |
2565 | 2565 |
2566 LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) { | 2566 LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) { |
2567 HEnvironment* env = current_block_->last_environment(); | 2567 instr->ReplayEnvironment(current_block_->last_environment()); |
2568 instr->ReplayEnvironment(env); | |
2569 | 2568 |
2570 // There are no real uses of a captured object. | 2569 // There are no real uses of a captured object. |
2571 return NULL; | 2570 return NULL; |
2572 } | 2571 } |
2573 | 2572 |
2574 | 2573 |
2575 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { | 2574 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { |
2576 info()->MarkAsRequiresFrame(); | 2575 info()->MarkAsRequiresFrame(); |
2577 LOperand* args = UseRegister(instr->arguments()); | 2576 LOperand* args = UseRegister(instr->arguments()); |
2578 LOperand* length; | 2577 LOperand* length; |
(...skipping 29 matching lines...) Expand all Loading... |
2608 } | 2607 } |
2609 | 2608 |
2610 | 2609 |
2611 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( | 2610 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( |
2612 HIsConstructCallAndBranch* instr) { | 2611 HIsConstructCallAndBranch* instr) { |
2613 return new(zone()) LIsConstructCallAndBranch(TempRegister()); | 2612 return new(zone()) LIsConstructCallAndBranch(TempRegister()); |
2614 } | 2613 } |
2615 | 2614 |
2616 | 2615 |
2617 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { | 2616 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { |
2618 HEnvironment* env = current_block_->last_environment(); | 2617 instr->ReplayEnvironment(current_block_->last_environment()); |
2619 ASSERT(env != NULL); | |
2620 | |
2621 env->set_ast_id(instr->ast_id()); | |
2622 | |
2623 env->Drop(instr->pop_count()); | |
2624 for (int i = instr->values()->length() - 1; i >= 0; --i) { | |
2625 HValue* value = instr->values()->at(i); | |
2626 if (instr->HasAssignedIndexAt(i)) { | |
2627 env->Bind(instr->GetAssignedIndexAt(i), value); | |
2628 } else { | |
2629 env->Push(value); | |
2630 } | |
2631 } | |
2632 | 2618 |
2633 // If there is an instruction pending deoptimization environment create a | 2619 // If there is an instruction pending deoptimization environment create a |
2634 // lazy bailout instruction to capture the environment. | 2620 // lazy bailout instruction to capture the environment. |
2635 if (!pending_deoptimization_ast_id_.IsNone()) { | 2621 if (!pending_deoptimization_ast_id_.IsNone()) { |
2636 ASSERT(pending_deoptimization_ast_id_ == instr->ast_id()); | 2622 ASSERT(pending_deoptimization_ast_id_ == instr->ast_id()); |
2637 LLazyBailout* lazy_bailout = new(zone()) LLazyBailout; | 2623 LLazyBailout* lazy_bailout = new(zone()) LLazyBailout; |
2638 LInstruction* result = AssignEnvironment(lazy_bailout); | 2624 LInstruction* result = AssignEnvironment(lazy_bailout); |
2639 // Store the lazy deopt environment with the instruction if needed. Right | 2625 // Store the lazy deopt environment with the instruction if needed. Right |
2640 // now it is only used for LInstanceOfKnownGlobal. | 2626 // now it is only used for LInstanceOfKnownGlobal. |
2641 instruction_pending_deoptimization_environment_-> | 2627 instruction_pending_deoptimization_environment_-> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2726 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2712 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2727 LOperand* object = UseRegister(instr->object()); | 2713 LOperand* object = UseRegister(instr->object()); |
2728 LOperand* index = UseTempRegister(instr->index()); | 2714 LOperand* index = UseTempRegister(instr->index()); |
2729 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2715 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2730 } | 2716 } |
2731 | 2717 |
2732 | 2718 |
2733 } } // namespace v8::internal | 2719 } } // namespace v8::internal |
2734 | 2720 |
2735 #endif // V8_TARGET_ARCH_IA32 | 2721 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |