OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/hydrogen-osr.h" | 8 #include "src/hydrogen-osr.h" |
9 #include "src/ic/stub-cache.h" | 9 #include "src/ic/stub-cache.h" |
10 #include "src/mips64/lithium-codegen-mips64.h" | 10 #include "src/mips64/lithium-codegen-mips64.h" |
(...skipping 5501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5512 } | 5512 } |
5513 } | 5513 } |
5514 | 5514 |
5515 | 5515 |
5516 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5516 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
5517 DCHECK(ToRegister(instr->context()).is(cp)); | 5517 DCHECK(ToRegister(instr->context()).is(cp)); |
5518 // Use the fast case closure allocation code that allocates in new | 5518 // Use the fast case closure allocation code that allocates in new |
5519 // space for nested functions that don't need literals cloning. | 5519 // space for nested functions that don't need literals cloning. |
5520 bool pretenure = instr->hydrogen()->pretenure(); | 5520 bool pretenure = instr->hydrogen()->pretenure(); |
5521 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5521 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
5522 FastNewClosureStub stub(isolate(), | 5522 FastNewClosureStub stub(isolate(), instr->hydrogen()->strict_mode(), |
5523 instr->hydrogen()->strict_mode(), | 5523 instr->hydrogen()->kind()); |
5524 instr->hydrogen()->is_generator()); | |
5525 __ li(a2, Operand(instr->hydrogen()->shared_info())); | 5524 __ li(a2, Operand(instr->hydrogen()->shared_info())); |
5526 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5525 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
5527 } else { | 5526 } else { |
5528 __ li(a2, Operand(instr->hydrogen()->shared_info())); | 5527 __ li(a2, Operand(instr->hydrogen()->shared_info())); |
5529 __ li(a1, Operand(pretenure ? factory()->true_value() | 5528 __ li(a1, Operand(pretenure ? factory()->true_value() |
5530 : factory()->false_value())); | 5529 : factory()->false_value())); |
5531 __ Push(cp, a2, a1); | 5530 __ Push(cp, a2, a1); |
5532 CallRuntime(Runtime::kNewClosure, 3, instr); | 5531 CallRuntime(Runtime::kNewClosure, 3, instr); |
5533 } | 5532 } |
5534 } | 5533 } |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5965 __ li(at, scope_info); | 5964 __ li(at, scope_info); |
5966 __ Push(at, ToRegister(instr->function())); | 5965 __ Push(at, ToRegister(instr->function())); |
5967 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5966 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5968 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5967 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5969 } | 5968 } |
5970 | 5969 |
5971 | 5970 |
5972 #undef __ | 5971 #undef __ |
5973 | 5972 |
5974 } } // namespace v8::internal | 5973 } } // namespace v8::internal |
OLD | NEW |