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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 hydrogen_env->frame_type() != JS_FUNCTION); | 853 hydrogen_env->frame_type() != JS_FUNCTION); |
854 int value_count = hydrogen_env->length(); | 854 int value_count = hydrogen_env->length(); |
855 LEnvironment* result = new(zone()) LEnvironment( | 855 LEnvironment* result = new(zone()) LEnvironment( |
856 hydrogen_env->closure(), | 856 hydrogen_env->closure(), |
857 hydrogen_env->frame_type(), | 857 hydrogen_env->frame_type(), |
858 ast_id, | 858 ast_id, |
859 hydrogen_env->parameter_count(), | 859 hydrogen_env->parameter_count(), |
860 argument_count_, | 860 argument_count_, |
861 value_count, | 861 value_count, |
862 outer, | 862 outer, |
| 863 hydrogen_env->entry(), |
863 zone()); | 864 zone()); |
864 int argument_index = *argument_index_accumulator; | 865 int argument_index = *argument_index_accumulator; |
865 for (int i = 0; i < value_count; ++i) { | 866 for (int i = 0; i < value_count; ++i) { |
866 if (hydrogen_env->is_special_index(i)) continue; | 867 if (hydrogen_env->is_special_index(i)) continue; |
867 | 868 |
868 HValue* value = hydrogen_env->values()->at(i); | 869 HValue* value = hydrogen_env->values()->at(i); |
869 LOperand* op = NULL; | 870 LOperand* op = NULL; |
870 if (value->IsArgumentsObject()) { | 871 if (value->IsArgumentsObject()) { |
871 op = NULL; | 872 op = NULL; |
872 } else if (value->IsPushArgument()) { | 873 } else if (value->IsPushArgument()) { |
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2246 HConstant* undefined = graph()->GetConstantUndefined(); | 2247 HConstant* undefined = graph()->GetConstantUndefined(); |
2247 HEnvironment* inner = outer->CopyForInlining(instr->closure(), | 2248 HEnvironment* inner = outer->CopyForInlining(instr->closure(), |
2248 instr->arguments_count(), | 2249 instr->arguments_count(), |
2249 instr->function(), | 2250 instr->function(), |
2250 undefined, | 2251 undefined, |
2251 instr->call_kind(), | 2252 instr->call_kind(), |
2252 instr->inlining_kind()); | 2253 instr->inlining_kind()); |
2253 if (instr->arguments_var() != NULL) { | 2254 if (instr->arguments_var() != NULL) { |
2254 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject()); | 2255 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject()); |
2255 } | 2256 } |
| 2257 inner->set_entry(instr); |
2256 current_block_->UpdateEnvironment(inner); | 2258 current_block_->UpdateEnvironment(inner); |
2257 chunk_->AddInlinedClosure(instr->closure()); | 2259 chunk_->AddInlinedClosure(instr->closure()); |
2258 return NULL; | 2260 return NULL; |
2259 } | 2261 } |
2260 | 2262 |
2261 | 2263 |
2262 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2264 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2263 LInstruction* pop = NULL; | 2265 LInstruction* pop = NULL; |
2264 | 2266 |
2265 HEnvironment* env = current_block_->last_environment(); | 2267 HEnvironment* env = current_block_->last_environment(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 | 2311 |
2310 | 2312 |
2311 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2313 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2312 LOperand* object = UseRegister(instr->object()); | 2314 LOperand* object = UseRegister(instr->object()); |
2313 LOperand* index = UseRegister(instr->index()); | 2315 LOperand* index = UseRegister(instr->index()); |
2314 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2316 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2315 } | 2317 } |
2316 | 2318 |
2317 | 2319 |
2318 } } // namespace v8::internal | 2320 } } // namespace v8::internal |
OLD | NEW |