OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2110 | 2110 |
2111 env->Drop(instr->pop_count()); | 2111 env->Drop(instr->pop_count()); |
2112 for (int i = 0; i < instr->values()->length(); ++i) { | 2112 for (int i = 0; i < instr->values()->length(); ++i) { |
2113 HValue* value = instr->values()->at(i); | 2113 HValue* value = instr->values()->at(i); |
2114 if (instr->HasAssignedIndexAt(i)) { | 2114 if (instr->HasAssignedIndexAt(i)) { |
2115 env->Bind(instr->GetAssignedIndexAt(i), value); | 2115 env->Bind(instr->GetAssignedIndexAt(i), value); |
2116 } else { | 2116 } else { |
2117 env->Push(value); | 2117 env->Push(value); |
2118 } | 2118 } |
2119 } | 2119 } |
2120 ASSERT(env->length() == instr->environment_length()); | |
2121 | 2120 |
2122 // If there is an instruction pending deoptimization environment create a | 2121 // If there is an instruction pending deoptimization environment create a |
2123 // lazy bailout instruction to capture the environment. | 2122 // lazy bailout instruction to capture the environment. |
2124 if (pending_deoptimization_ast_id_ != AstNode::kNoNumber) { | 2123 if (pending_deoptimization_ast_id_ != AstNode::kNoNumber) { |
2125 ASSERT(pending_deoptimization_ast_id_ == instr->ast_id()); | 2124 ASSERT(pending_deoptimization_ast_id_ == instr->ast_id()); |
2126 LLazyBailout* lazy_bailout = new LLazyBailout; | 2125 LLazyBailout* lazy_bailout = new LLazyBailout; |
2127 LInstruction* result = AssignEnvironment(lazy_bailout); | 2126 LInstruction* result = AssignEnvironment(lazy_bailout); |
2128 instruction_pending_deoptimization_environment_-> | 2127 instruction_pending_deoptimization_environment_-> |
2129 set_deoptimization_environment(result->environment()); | 2128 set_deoptimization_environment(result->environment()); |
2130 ClearInstructionPendingDeoptimizationEnvironment(); | 2129 ClearInstructionPendingDeoptimizationEnvironment(); |
(...skipping 25 matching lines...) Expand all Loading... |
2156 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2155 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2157 HEnvironment* outer = current_block_->last_environment()->outer(); | 2156 HEnvironment* outer = current_block_->last_environment()->outer(); |
2158 current_block_->UpdateEnvironment(outer); | 2157 current_block_->UpdateEnvironment(outer); |
2159 return NULL; | 2158 return NULL; |
2160 } | 2159 } |
2161 | 2160 |
2162 | 2161 |
2163 } } // namespace v8::internal | 2162 } } // namespace v8::internal |
2164 | 2163 |
2165 #endif // V8_TARGET_ARCH_IA32 | 2164 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |