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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 5474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5485 __ CopyFields(r0, r1, double_scratch0(), size / kPointerSize); | 5485 __ CopyFields(r0, r1, double_scratch0(), size / kPointerSize); |
5486 } | 5486 } |
5487 | 5487 |
5488 | 5488 |
5489 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5489 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
5490 DCHECK(ToRegister(instr->context()).is(cp)); | 5490 DCHECK(ToRegister(instr->context()).is(cp)); |
5491 // Use the fast case closure allocation code that allocates in new | 5491 // Use the fast case closure allocation code that allocates in new |
5492 // space for nested functions that don't need literals cloning. | 5492 // space for nested functions that don't need literals cloning. |
5493 bool pretenure = instr->hydrogen()->pretenure(); | 5493 bool pretenure = instr->hydrogen()->pretenure(); |
5494 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5494 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
5495 FastNewClosureStub stub(isolate(), | 5495 FastNewClosureStub stub(isolate(), instr->hydrogen()->strict_mode(), |
5496 instr->hydrogen()->strict_mode(), | 5496 instr->hydrogen()->kind()); |
5497 instr->hydrogen()->is_generator()); | |
5498 __ mov(r2, Operand(instr->hydrogen()->shared_info())); | 5497 __ mov(r2, Operand(instr->hydrogen()->shared_info())); |
5499 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5498 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
5500 } else { | 5499 } else { |
5501 __ mov(r2, Operand(instr->hydrogen()->shared_info())); | 5500 __ mov(r2, Operand(instr->hydrogen()->shared_info())); |
5502 __ mov(r1, Operand(pretenure ? factory()->true_value() | 5501 __ mov(r1, Operand(pretenure ? factory()->true_value() |
5503 : factory()->false_value())); | 5502 : factory()->false_value())); |
5504 __ Push(cp, r2, r1); | 5503 __ Push(cp, r2, r1); |
5505 CallRuntime(Runtime::kNewClosure, 3, instr); | 5504 CallRuntime(Runtime::kNewClosure, 3, instr); |
5506 } | 5505 } |
5507 } | 5506 } |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5909 __ Push(scope_info); | 5908 __ Push(scope_info); |
5910 __ push(ToRegister(instr->function())); | 5909 __ push(ToRegister(instr->function())); |
5911 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5910 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5912 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5911 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5913 } | 5912 } |
5914 | 5913 |
5915 | 5914 |
5916 #undef __ | 5915 #undef __ |
5917 | 5916 |
5918 } } // namespace v8::internal | 5917 } } // namespace v8::internal |
OLD | NEW |