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 2598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2609 | 2609 |
2610 | 2610 |
2611 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( | 2611 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( |
2612 HIsConstructCallAndBranch* instr) { | 2612 HIsConstructCallAndBranch* instr) { |
2613 return new(zone()) LIsConstructCallAndBranch(TempRegister()); | 2613 return new(zone()) LIsConstructCallAndBranch(TempRegister()); |
2614 } | 2614 } |
2615 | 2615 |
2616 | 2616 |
2617 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { | 2617 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { |
2618 HEnvironment* env = current_block_->last_environment(); | 2618 HEnvironment* env = current_block_->last_environment(); |
2619 ASSERT(env != NULL); | 2619 instr->ReplayEnvironment(env); |
titzer
2013/08/26 16:49:44
Inline the local too...make it a one liner!
Michael Starzinger
2013/08/26 17:29:46
Done (also for the DoCapturedObject function).
| |
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 | 2620 |
2633 // If there is an instruction pending deoptimization environment create a | 2621 // If there is an instruction pending deoptimization environment create a |
2634 // lazy bailout instruction to capture the environment. | 2622 // lazy bailout instruction to capture the environment. |
2635 if (!pending_deoptimization_ast_id_.IsNone()) { | 2623 if (!pending_deoptimization_ast_id_.IsNone()) { |
2636 ASSERT(pending_deoptimization_ast_id_ == instr->ast_id()); | 2624 ASSERT(pending_deoptimization_ast_id_ == instr->ast_id()); |
2637 LLazyBailout* lazy_bailout = new(zone()) LLazyBailout; | 2625 LLazyBailout* lazy_bailout = new(zone()) LLazyBailout; |
2638 LInstruction* result = AssignEnvironment(lazy_bailout); | 2626 LInstruction* result = AssignEnvironment(lazy_bailout); |
2639 // Store the lazy deopt environment with the instruction if needed. Right | 2627 // Store the lazy deopt environment with the instruction if needed. Right |
2640 // now it is only used for LInstanceOfKnownGlobal. | 2628 // now it is only used for LInstanceOfKnownGlobal. |
2641 instruction_pending_deoptimization_environment_-> | 2629 instruction_pending_deoptimization_environment_-> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2726 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2714 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2727 LOperand* object = UseRegister(instr->object()); | 2715 LOperand* object = UseRegister(instr->object()); |
2728 LOperand* index = UseTempRegister(instr->index()); | 2716 LOperand* index = UseTempRegister(instr->index()); |
2729 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2717 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2730 } | 2718 } |
2731 | 2719 |
2732 | 2720 |
2733 } } // namespace v8::internal | 2721 } } // namespace v8::internal |
2734 | 2722 |
2735 #endif // V8_TARGET_ARCH_IA32 | 2723 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |