| 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 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
| 8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
| (...skipping 5448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5459 __ CopyFields(r0, r1, double_scratch0(), size / kPointerSize); | 5459 __ CopyFields(r0, r1, double_scratch0(), size / kPointerSize); |
| 5460 } | 5460 } |
| 5461 | 5461 |
| 5462 | 5462 |
| 5463 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5463 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
| 5464 DCHECK(ToRegister(instr->context()).is(cp)); | 5464 DCHECK(ToRegister(instr->context()).is(cp)); |
| 5465 // Use the fast case closure allocation code that allocates in new | 5465 // Use the fast case closure allocation code that allocates in new |
| 5466 // space for nested functions that don't need literals cloning. | 5466 // space for nested functions that don't need literals cloning. |
| 5467 bool pretenure = instr->hydrogen()->pretenure(); | 5467 bool pretenure = instr->hydrogen()->pretenure(); |
| 5468 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5468 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
| 5469 FastNewClosureStub stub(isolate(), | 5469 FastNewClosureStub stub(isolate(), instr->hydrogen()->strict_mode(), |
| 5470 instr->hydrogen()->strict_mode(), | 5470 instr->hydrogen()->kind()); |
| 5471 instr->hydrogen()->is_generator()); | |
| 5472 __ mov(r2, Operand(instr->hydrogen()->shared_info())); | 5471 __ mov(r2, Operand(instr->hydrogen()->shared_info())); |
| 5473 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5472 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 5474 } else { | 5473 } else { |
| 5475 __ mov(r2, Operand(instr->hydrogen()->shared_info())); | 5474 __ mov(r2, Operand(instr->hydrogen()->shared_info())); |
| 5476 __ mov(r1, Operand(pretenure ? factory()->true_value() | 5475 __ mov(r1, Operand(pretenure ? factory()->true_value() |
| 5477 : factory()->false_value())); | 5476 : factory()->false_value())); |
| 5478 __ Push(cp, r2, r1); | 5477 __ Push(cp, r2, r1); |
| 5479 CallRuntime(Runtime::kNewClosure, 3, instr); | 5478 CallRuntime(Runtime::kNewClosure, 3, instr); |
| 5480 } | 5479 } |
| 5481 } | 5480 } |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5883 __ Push(scope_info); | 5882 __ Push(scope_info); |
| 5884 __ push(ToRegister(instr->function())); | 5883 __ push(ToRegister(instr->function())); |
| 5885 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5884 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5886 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5885 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5887 } | 5886 } |
| 5888 | 5887 |
| 5889 | 5888 |
| 5890 #undef __ | 5889 #undef __ |
| 5891 | 5890 |
| 5892 } } // namespace v8::internal | 5891 } } // namespace v8::internal |
| OLD | NEW |