OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 2816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2827 | 2827 |
2828 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 2828 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
2829 DCHECK(ToRegister(instr->context()).is(cp)); | 2829 DCHECK(ToRegister(instr->context()).is(cp)); |
2830 // FunctionLiteral instruction is marked as call, we can trash any register. | 2830 // FunctionLiteral instruction is marked as call, we can trash any register. |
2831 DCHECK(instr->IsMarkedAsCall()); | 2831 DCHECK(instr->IsMarkedAsCall()); |
2832 | 2832 |
2833 // Use the fast case closure allocation code that allocates in new | 2833 // Use the fast case closure allocation code that allocates in new |
2834 // space for nested functions that don't need literals cloning. | 2834 // space for nested functions that don't need literals cloning. |
2835 bool pretenure = instr->hydrogen()->pretenure(); | 2835 bool pretenure = instr->hydrogen()->pretenure(); |
2836 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 2836 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
2837 FastNewClosureStub stub(isolate(), | 2837 FastNewClosureStub stub(isolate(), instr->hydrogen()->strict_mode(), |
2838 instr->hydrogen()->strict_mode(), | 2838 instr->hydrogen()->kind()); |
2839 instr->hydrogen()->is_generator()); | |
2840 __ Mov(x2, Operand(instr->hydrogen()->shared_info())); | 2839 __ Mov(x2, Operand(instr->hydrogen()->shared_info())); |
2841 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 2840 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
2842 } else { | 2841 } else { |
2843 __ Mov(x2, Operand(instr->hydrogen()->shared_info())); | 2842 __ Mov(x2, Operand(instr->hydrogen()->shared_info())); |
2844 __ Mov(x1, Operand(pretenure ? factory()->true_value() | 2843 __ Mov(x1, Operand(pretenure ? factory()->true_value() |
2845 : factory()->false_value())); | 2844 : factory()->false_value())); |
2846 __ Push(cp, x2, x1); | 2845 __ Push(cp, x2, x1); |
2847 CallRuntime(Runtime::kNewClosure, 3, instr); | 2846 CallRuntime(Runtime::kNewClosure, 3, instr); |
2848 } | 2847 } |
2849 } | 2848 } |
(...skipping 3175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6025 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6024 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6026 __ Push(scope_info); | 6025 __ Push(scope_info); |
6027 __ Push(ToRegister(instr->function())); | 6026 __ Push(ToRegister(instr->function())); |
6028 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6027 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6029 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6028 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6030 } | 6029 } |
6031 | 6030 |
6032 | 6031 |
6033 | 6032 |
6034 } } // namespace v8::internal | 6033 } } // namespace v8::internal |
OLD | NEW |