| 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-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 5403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5414 __ mov(edx, FieldOperand(ebx, size - kPointerSize)); | 5414 __ mov(edx, FieldOperand(ebx, size - kPointerSize)); |
| 5415 __ mov(FieldOperand(eax, size - kPointerSize), edx); | 5415 __ mov(FieldOperand(eax, size - kPointerSize), edx); |
| 5416 } | 5416 } |
| 5417 } | 5417 } |
| 5418 | 5418 |
| 5419 | 5419 |
| 5420 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5420 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
| 5421 DCHECK(ToRegister(instr->context()).is(esi)); | 5421 DCHECK(ToRegister(instr->context()).is(esi)); |
| 5422 // Use the fast case closure allocation code that allocates in new | 5422 // Use the fast case closure allocation code that allocates in new |
| 5423 // space for nested functions that don't need literals cloning. | 5423 // space for nested functions that don't need literals cloning. |
| 5424 AllowDeferredHandleDereference copy_handles; |
| 5424 bool pretenure = instr->hydrogen()->pretenure(); | 5425 bool pretenure = instr->hydrogen()->pretenure(); |
| 5425 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5426 if (!pretenure && instr->hydrogen()->has_no_literals() && |
| 5427 !instr->hydrogen()->shared_info().is_null() && |
| 5428 !) { |
| 5426 FastNewClosureStub stub(isolate(), instr->hydrogen()->language_mode(), | 5429 FastNewClosureStub stub(isolate(), instr->hydrogen()->language_mode(), |
| 5427 instr->hydrogen()->kind()); | 5430 instr->hydrogen()->kind()); |
| 5428 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); | 5431 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); |
| 5429 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5432 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 5430 } else { | 5433 } else { |
| 5431 __ push(esi); | 5434 __ push(esi); |
| 5432 __ push(Immediate(instr->hydrogen()->shared_info())); | 5435 __ push(Immediate(instr->hydrogen()->shared_info())); |
| 5433 __ push(Immediate(pretenure ? factory()->true_value() | 5436 __ push(Immediate(pretenure ? factory()->true_value() |
| 5434 : factory()->false_value())); | 5437 : factory()->false_value())); |
| 5435 CallRuntime(Runtime::kNewClosure, 3, instr); | 5438 CallRuntime(Runtime::kNewClosure, 3, instr); |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5828 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5831 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5829 } | 5832 } |
| 5830 | 5833 |
| 5831 | 5834 |
| 5832 #undef __ | 5835 #undef __ |
| 5833 | 5836 |
| 5834 } // namespace internal | 5837 } // namespace internal |
| 5835 } // namespace v8 | 5838 } // namespace v8 |
| 5836 | 5839 |
| 5837 #endif // V8_TARGET_ARCH_IA32 | 5840 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |