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