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 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2057 | 2057 |
2058 env->Drop(instr->pop_count()); | 2058 env->Drop(instr->pop_count()); |
2059 for (int i = 0; i < instr->values()->length(); ++i) { | 2059 for (int i = 0; i < instr->values()->length(); ++i) { |
2060 HValue* value = instr->values()->at(i); | 2060 HValue* value = instr->values()->at(i); |
2061 if (instr->HasAssignedIndexAt(i)) { | 2061 if (instr->HasAssignedIndexAt(i)) { |
2062 env->Bind(instr->GetAssignedIndexAt(i), value); | 2062 env->Bind(instr->GetAssignedIndexAt(i), value); |
2063 } else { | 2063 } else { |
2064 env->Push(value); | 2064 env->Push(value); |
2065 } | 2065 } |
2066 } | 2066 } |
2067 ASSERT(env->length() == instr->environment_length()); | |
2068 | 2067 |
2069 // If there is an instruction pending deoptimization environment create a | 2068 // If there is an instruction pending deoptimization environment create a |
2070 // lazy bailout instruction to capture the environment. | 2069 // lazy bailout instruction to capture the environment. |
2071 if (pending_deoptimization_ast_id_ == instr->ast_id()) { | 2070 if (pending_deoptimization_ast_id_ == instr->ast_id()) { |
2072 LLazyBailout* lazy_bailout = new LLazyBailout; | 2071 LLazyBailout* lazy_bailout = new LLazyBailout; |
2073 LInstruction* result = AssignEnvironment(lazy_bailout); | 2072 LInstruction* result = AssignEnvironment(lazy_bailout); |
2074 instruction_pending_deoptimization_environment_-> | 2073 instruction_pending_deoptimization_environment_-> |
2075 set_deoptimization_environment(result->environment()); | 2074 set_deoptimization_environment(result->environment()); |
2076 ClearInstructionPendingDeoptimizationEnvironment(); | 2075 ClearInstructionPendingDeoptimizationEnvironment(); |
2077 return result; | 2076 return result; |
(...skipping 23 matching lines...) Expand all Loading... |
2101 | 2100 |
2102 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2101 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2103 HEnvironment* outer = current_block_->last_environment()->outer(); | 2102 HEnvironment* outer = current_block_->last_environment()->outer(); |
2104 current_block_->UpdateEnvironment(outer); | 2103 current_block_->UpdateEnvironment(outer); |
2105 return NULL; | 2104 return NULL; |
2106 } | 2105 } |
2107 | 2106 |
2108 } } // namespace v8::internal | 2107 } } // namespace v8::internal |
2109 | 2108 |
2110 #endif // V8_TARGET_ARCH_X64 | 2109 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |