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 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 5277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5288 } | 5288 } |
5289 } | 5289 } |
5290 | 5290 |
5291 | 5291 |
5292 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5292 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
5293 DCHECK(ToRegister(instr->context()).is(esi)); | 5293 DCHECK(ToRegister(instr->context()).is(esi)); |
5294 // Use the fast case closure allocation code that allocates in new | 5294 // Use the fast case closure allocation code that allocates in new |
5295 // space for nested functions that don't need literals cloning. | 5295 // space for nested functions that don't need literals cloning. |
5296 bool pretenure = instr->hydrogen()->pretenure(); | 5296 bool pretenure = instr->hydrogen()->pretenure(); |
5297 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5297 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
5298 FastNewClosureStub stub(isolate(), | 5298 FastNewClosureStub stub(isolate(), instr->hydrogen()->strict_mode(), |
5299 instr->hydrogen()->strict_mode(), | 5299 instr->hydrogen()->kind()); |
5300 instr->hydrogen()->is_generator()); | |
5301 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); | 5300 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); |
5302 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5301 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
5303 } else { | 5302 } else { |
5304 __ push(esi); | 5303 __ push(esi); |
5305 __ push(Immediate(instr->hydrogen()->shared_info())); | 5304 __ push(Immediate(instr->hydrogen()->shared_info())); |
5306 __ push(Immediate(pretenure ? factory()->true_value() | 5305 __ push(Immediate(pretenure ? factory()->true_value() |
5307 : factory()->false_value())); | 5306 : factory()->false_value())); |
5308 CallRuntime(Runtime::kNewClosure, 3, instr); | 5307 CallRuntime(Runtime::kNewClosure, 3, instr); |
5309 } | 5308 } |
5310 } | 5309 } |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5703 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5702 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5704 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5703 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5705 } | 5704 } |
5706 | 5705 |
5707 | 5706 |
5708 #undef __ | 5707 #undef __ |
5709 | 5708 |
5710 } } // namespace v8::internal | 5709 } } // namespace v8::internal |
5711 | 5710 |
5712 #endif // V8_TARGET_ARCH_X87 | 5711 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |