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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 hydrogen_env->frame_type() != JS_FUNCTION); | 879 hydrogen_env->frame_type() != JS_FUNCTION); |
880 int value_count = hydrogen_env->length(); | 880 int value_count = hydrogen_env->length(); |
881 LEnvironment* result = | 881 LEnvironment* result = |
882 new(zone()) LEnvironment(hydrogen_env->closure(), | 882 new(zone()) LEnvironment(hydrogen_env->closure(), |
883 hydrogen_env->frame_type(), | 883 hydrogen_env->frame_type(), |
884 ast_id, | 884 ast_id, |
885 hydrogen_env->parameter_count(), | 885 hydrogen_env->parameter_count(), |
886 argument_count_, | 886 argument_count_, |
887 value_count, | 887 value_count, |
888 outer, | 888 outer, |
| 889 hydrogen_env->entry(), |
889 zone()); | 890 zone()); |
890 int argument_index = *argument_index_accumulator; | 891 int argument_index = *argument_index_accumulator; |
891 for (int i = 0; i < value_count; ++i) { | 892 for (int i = 0; i < value_count; ++i) { |
892 if (hydrogen_env->is_special_index(i)) continue; | 893 if (hydrogen_env->is_special_index(i)) continue; |
893 | 894 |
894 HValue* value = hydrogen_env->values()->at(i); | 895 HValue* value = hydrogen_env->values()->at(i); |
895 LOperand* op = NULL; | 896 LOperand* op = NULL; |
896 if (value->IsArgumentsObject()) { | 897 if (value->IsArgumentsObject()) { |
897 op = NULL; | 898 op = NULL; |
898 } else if (value->IsPushArgument()) { | 899 } else if (value->IsPushArgument()) { |
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2363 HConstant* undefined = graph()->GetConstantUndefined(); | 2364 HConstant* undefined = graph()->GetConstantUndefined(); |
2364 HEnvironment* inner = outer->CopyForInlining(instr->closure(), | 2365 HEnvironment* inner = outer->CopyForInlining(instr->closure(), |
2365 instr->arguments_count(), | 2366 instr->arguments_count(), |
2366 instr->function(), | 2367 instr->function(), |
2367 undefined, | 2368 undefined, |
2368 instr->call_kind(), | 2369 instr->call_kind(), |
2369 instr->inlining_kind()); | 2370 instr->inlining_kind()); |
2370 if (instr->arguments_var() != NULL) { | 2371 if (instr->arguments_var() != NULL) { |
2371 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject()); | 2372 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject()); |
2372 } | 2373 } |
| 2374 inner->set_entry(instr); |
2373 current_block_->UpdateEnvironment(inner); | 2375 current_block_->UpdateEnvironment(inner); |
2374 chunk_->AddInlinedClosure(instr->closure()); | 2376 chunk_->AddInlinedClosure(instr->closure()); |
2375 return NULL; | 2377 return NULL; |
2376 } | 2378 } |
2377 | 2379 |
2378 | 2380 |
2379 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2381 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2380 LInstruction* pop = NULL; | 2382 LInstruction* pop = NULL; |
2381 | 2383 |
2382 HEnvironment* env = current_block_->last_environment(); | 2384 HEnvironment* env = current_block_->last_environment(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2428 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2430 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2429 LOperand* object = UseRegister(instr->object()); | 2431 LOperand* object = UseRegister(instr->object()); |
2430 LOperand* index = UseTempRegister(instr->index()); | 2432 LOperand* index = UseTempRegister(instr->index()); |
2431 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2433 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2432 } | 2434 } |
2433 | 2435 |
2434 | 2436 |
2435 } } // namespace v8::internal | 2437 } } // namespace v8::internal |
2436 | 2438 |
2437 #endif // V8_TARGET_ARCH_IA32 | 2439 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |