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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 5272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5283 } | 5283 } |
5284 } | 5284 } |
5285 | 5285 |
5286 | 5286 |
5287 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5287 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
5288 DCHECK(ToRegister(instr->context()).is(esi)); | 5288 DCHECK(ToRegister(instr->context()).is(esi)); |
5289 // Use the fast case closure allocation code that allocates in new | 5289 // Use the fast case closure allocation code that allocates in new |
5290 // space for nested functions that don't need literals cloning. | 5290 // space for nested functions that don't need literals cloning. |
5291 bool pretenure = instr->hydrogen()->pretenure(); | 5291 bool pretenure = instr->hydrogen()->pretenure(); |
5292 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5292 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
5293 FastNewClosureStub stub(isolate(), | 5293 FastNewClosureStub stub(isolate(), instr->hydrogen()->strict_mode(), |
5294 instr->hydrogen()->strict_mode(), | 5294 instr->hydrogen()->kind()); |
5295 instr->hydrogen()->is_generator()); | |
5296 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); | 5295 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); |
5297 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5296 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
5298 } else { | 5297 } else { |
5299 __ push(esi); | 5298 __ push(esi); |
5300 __ push(Immediate(instr->hydrogen()->shared_info())); | 5299 __ push(Immediate(instr->hydrogen()->shared_info())); |
5301 __ push(Immediate(pretenure ? factory()->true_value() | 5300 __ push(Immediate(pretenure ? factory()->true_value() |
5302 : factory()->false_value())); | 5301 : factory()->false_value())); |
5303 CallRuntime(Runtime::kNewClosure, 3, instr); | 5302 CallRuntime(Runtime::kNewClosure, 3, instr); |
5304 } | 5303 } |
5305 } | 5304 } |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5695 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5694 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5696 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5695 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5697 } | 5696 } |
5698 | 5697 |
5699 | 5698 |
5700 #undef __ | 5699 #undef __ |
5701 | 5700 |
5702 } } // namespace v8::internal | 5701 } } // namespace v8::internal |
5703 | 5702 |
5704 #endif // V8_TARGET_ARCH_IA32 | 5703 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |