| 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/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 5439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5450 } | 5450 } |
| 5451 } | 5451 } |
| 5452 | 5452 |
| 5453 | 5453 |
| 5454 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5454 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
| 5455 DCHECK(ToRegister(instr->context()).is(rsi)); | 5455 DCHECK(ToRegister(instr->context()).is(rsi)); |
| 5456 // Use the fast case closure allocation code that allocates in new | 5456 // Use the fast case closure allocation code that allocates in new |
| 5457 // space for nested functions that don't need literals cloning. | 5457 // space for nested functions that don't need literals cloning. |
| 5458 bool pretenure = instr->hydrogen()->pretenure(); | 5458 bool pretenure = instr->hydrogen()->pretenure(); |
| 5459 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5459 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
| 5460 FastNewClosureStub stub(isolate(), | 5460 FastNewClosureStub stub(isolate(), instr->hydrogen()->strict_mode(), |
| 5461 instr->hydrogen()->strict_mode(), | 5461 instr->hydrogen()->kind()); |
| 5462 instr->hydrogen()->is_generator()); | |
| 5463 __ Move(rbx, instr->hydrogen()->shared_info()); | 5462 __ Move(rbx, instr->hydrogen()->shared_info()); |
| 5464 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5463 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 5465 } else { | 5464 } else { |
| 5466 __ Push(rsi); | 5465 __ Push(rsi); |
| 5467 __ Push(instr->hydrogen()->shared_info()); | 5466 __ Push(instr->hydrogen()->shared_info()); |
| 5468 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex : | 5467 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex : |
| 5469 Heap::kFalseValueRootIndex); | 5468 Heap::kFalseValueRootIndex); |
| 5470 CallRuntime(Runtime::kNewClosure, 3, instr); | 5469 CallRuntime(Runtime::kNewClosure, 3, instr); |
| 5471 } | 5470 } |
| 5472 } | 5471 } |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5875 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5874 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5876 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5875 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5877 } | 5876 } |
| 5878 | 5877 |
| 5879 | 5878 |
| 5880 #undef __ | 5879 #undef __ |
| 5881 | 5880 |
| 5882 } } // namespace v8::internal | 5881 } } // namespace v8::internal |
| 5883 | 5882 |
| 5884 #endif // V8_TARGET_ARCH_X64 | 5883 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |