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 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
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 5415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5426 } | 5426 } |
5427 } | 5427 } |
5428 | 5428 |
5429 | 5429 |
5430 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5430 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
5431 DCHECK(ToRegister(instr->context()).is(rsi)); | 5431 DCHECK(ToRegister(instr->context()).is(rsi)); |
5432 // Use the fast case closure allocation code that allocates in new | 5432 // Use the fast case closure allocation code that allocates in new |
5433 // space for nested functions that don't need literals cloning. | 5433 // space for nested functions that don't need literals cloning. |
5434 bool pretenure = instr->hydrogen()->pretenure(); | 5434 bool pretenure = instr->hydrogen()->pretenure(); |
5435 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5435 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
5436 FastNewClosureStub stub(isolate(), | 5436 FastNewClosureStub stub(isolate(), instr->hydrogen()->strict_mode(), |
5437 instr->hydrogen()->strict_mode(), | 5437 instr->hydrogen()->kind()); |
5438 instr->hydrogen()->is_generator()); | |
5439 __ Move(rbx, instr->hydrogen()->shared_info()); | 5438 __ Move(rbx, instr->hydrogen()->shared_info()); |
5440 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5439 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
5441 } else { | 5440 } else { |
5442 __ Push(rsi); | 5441 __ Push(rsi); |
5443 __ Push(instr->hydrogen()->shared_info()); | 5442 __ Push(instr->hydrogen()->shared_info()); |
5444 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex : | 5443 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex : |
5445 Heap::kFalseValueRootIndex); | 5444 Heap::kFalseValueRootIndex); |
5446 CallRuntime(Runtime::kNewClosure, 3, instr); | 5445 CallRuntime(Runtime::kNewClosure, 3, instr); |
5447 } | 5446 } |
5448 } | 5447 } |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5851 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5850 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5852 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5851 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5853 } | 5852 } |
5854 | 5853 |
5855 | 5854 |
5856 #undef __ | 5855 #undef __ |
5857 | 5856 |
5858 } } // namespace v8::internal | 5857 } } // namespace v8::internal |
5859 | 5858 |
5860 #endif // V8_TARGET_ARCH_X64 | 5859 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |