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