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/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 5252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5263 } | 5263 } |
5264 } | 5264 } |
5265 | 5265 |
5266 | 5266 |
5267 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5267 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
5268 DCHECK(ToRegister(instr->context()).is(esi)); | 5268 DCHECK(ToRegister(instr->context()).is(esi)); |
5269 // Use the fast case closure allocation code that allocates in new | 5269 // Use the fast case closure allocation code that allocates in new |
5270 // space for nested functions that don't need literals cloning. | 5270 // space for nested functions that don't need literals cloning. |
5271 bool pretenure = instr->hydrogen()->pretenure(); | 5271 bool pretenure = instr->hydrogen()->pretenure(); |
5272 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5272 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
5273 FastNewClosureStub stub(isolate(), | 5273 FastNewClosureStub stub(isolate(), instr->hydrogen()->strict_mode(), |
5274 instr->hydrogen()->strict_mode(), | 5274 instr->hydrogen()->is_generator(), |
5275 instr->hydrogen()->is_generator()); | 5275 instr->hydrogen()->is_concise_method()); |
5276 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); | 5276 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); |
5277 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5277 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
5278 } else { | 5278 } else { |
5279 __ push(esi); | 5279 __ push(esi); |
5280 __ push(Immediate(instr->hydrogen()->shared_info())); | 5280 __ push(Immediate(instr->hydrogen()->shared_info())); |
5281 __ push(Immediate(pretenure ? factory()->true_value() | 5281 __ push(Immediate(pretenure ? factory()->true_value() |
5282 : factory()->false_value())); | 5282 : factory()->false_value())); |
5283 CallRuntime(Runtime::kNewClosure, 3, instr); | 5283 CallRuntime(Runtime::kNewClosure, 3, instr); |
5284 } | 5284 } |
5285 } | 5285 } |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5675 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5675 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5676 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5676 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5677 } | 5677 } |
5678 | 5678 |
5679 | 5679 |
5680 #undef __ | 5680 #undef __ |
5681 | 5681 |
5682 } } // namespace v8::internal | 5682 } } // namespace v8::internal |
5683 | 5683 |
5684 #endif // V8_TARGET_ARCH_IA32 | 5684 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |