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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 hydrogen_env->frame_type() != JS_FUNCTION); | 855 hydrogen_env->frame_type() != JS_FUNCTION); |
856 int value_count = hydrogen_env->length(); | 856 int value_count = hydrogen_env->length(); |
857 LEnvironment* result = new(zone()) LEnvironment( | 857 LEnvironment* result = new(zone()) LEnvironment( |
858 hydrogen_env->closure(), | 858 hydrogen_env->closure(), |
859 hydrogen_env->frame_type(), | 859 hydrogen_env->frame_type(), |
860 ast_id, | 860 ast_id, |
861 hydrogen_env->parameter_count(), | 861 hydrogen_env->parameter_count(), |
862 argument_count_, | 862 argument_count_, |
863 value_count, | 863 value_count, |
864 outer, | 864 outer, |
| 865 hydrogen_env->entry(), |
865 zone()); | 866 zone()); |
866 int argument_index = *argument_index_accumulator; | 867 int argument_index = *argument_index_accumulator; |
867 for (int i = 0; i < value_count; ++i) { | 868 for (int i = 0; i < value_count; ++i) { |
868 if (hydrogen_env->is_special_index(i)) continue; | 869 if (hydrogen_env->is_special_index(i)) continue; |
869 | 870 |
870 HValue* value = hydrogen_env->values()->at(i); | 871 HValue* value = hydrogen_env->values()->at(i); |
871 LOperand* op = NULL; | 872 LOperand* op = NULL; |
872 if (value->IsArgumentsObject()) { | 873 if (value->IsArgumentsObject()) { |
873 op = NULL; | 874 op = NULL; |
874 } else if (value->IsPushArgument()) { | 875 } else if (value->IsPushArgument()) { |
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2188 HConstant* undefined = graph()->GetConstantUndefined(); | 2189 HConstant* undefined = graph()->GetConstantUndefined(); |
2189 HEnvironment* inner = outer->CopyForInlining(instr->closure(), | 2190 HEnvironment* inner = outer->CopyForInlining(instr->closure(), |
2190 instr->arguments_count(), | 2191 instr->arguments_count(), |
2191 instr->function(), | 2192 instr->function(), |
2192 undefined, | 2193 undefined, |
2193 instr->call_kind(), | 2194 instr->call_kind(), |
2194 instr->inlining_kind()); | 2195 instr->inlining_kind()); |
2195 if (instr->arguments_var() != NULL) { | 2196 if (instr->arguments_var() != NULL) { |
2196 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject()); | 2197 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject()); |
2197 } | 2198 } |
| 2199 inner->set_entry(instr); |
2198 current_block_->UpdateEnvironment(inner); | 2200 current_block_->UpdateEnvironment(inner); |
2199 chunk_->AddInlinedClosure(instr->closure()); | 2201 chunk_->AddInlinedClosure(instr->closure()); |
2200 return NULL; | 2202 return NULL; |
2201 } | 2203 } |
2202 | 2204 |
2203 | 2205 |
2204 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2206 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2205 LInstruction* pop = NULL; | 2207 LInstruction* pop = NULL; |
2206 | 2208 |
2207 HEnvironment* env = current_block_->last_environment(); | 2209 HEnvironment* env = current_block_->last_environment(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2251 | 2253 |
2252 | 2254 |
2253 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2255 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2254 LOperand* object = UseRegister(instr->object()); | 2256 LOperand* object = UseRegister(instr->object()); |
2255 LOperand* index = UseRegister(instr->index()); | 2257 LOperand* index = UseRegister(instr->index()); |
2256 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2258 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2257 } | 2259 } |
2258 | 2260 |
2259 | 2261 |
2260 } } // namespace v8::internal | 2262 } } // namespace v8::internal |
OLD | NEW |