| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 5486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5497 } | 5497 } |
| 5498 | 5498 |
| 5499 | 5499 |
| 5500 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5500 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
| 5501 // Use the fast case closure allocation code that allocates in new | 5501 // Use the fast case closure allocation code that allocates in new |
| 5502 // space for nested functions that don't need literals cloning. | 5502 // space for nested functions that don't need literals cloning. |
| 5503 bool pretenure = instr->hydrogen()->pretenure(); | 5503 bool pretenure = instr->hydrogen()->pretenure(); |
| 5504 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5504 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
| 5505 FastNewClosureStub stub(instr->hydrogen()->language_mode(), | 5505 FastNewClosureStub stub(instr->hydrogen()->language_mode(), |
| 5506 instr->hydrogen()->is_generator()); | 5506 instr->hydrogen()->is_generator()); |
| 5507 __ mov(r1, Operand(instr->hydrogen()->shared_info())); | 5507 __ mov(r2, Operand(instr->hydrogen()->shared_info())); |
| 5508 __ push(r1); | |
| 5509 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 5508 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 5510 } else { | 5509 } else { |
| 5511 __ mov(r2, Operand(instr->hydrogen()->shared_info())); | 5510 __ mov(r2, Operand(instr->hydrogen()->shared_info())); |
| 5512 __ mov(r1, Operand(pretenure ? factory()->true_value() | 5511 __ mov(r1, Operand(pretenure ? factory()->true_value() |
| 5513 : factory()->false_value())); | 5512 : factory()->false_value())); |
| 5514 __ Push(cp, r2, r1); | 5513 __ Push(cp, r2, r1); |
| 5515 CallRuntime(Runtime::kNewClosure, 3, instr); | 5514 CallRuntime(Runtime::kNewClosure, 3, instr); |
| 5516 } | 5515 } |
| 5517 } | 5516 } |
| 5518 | 5517 |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5856 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5855 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5857 __ ldr(result, FieldMemOperand(scratch, | 5856 __ ldr(result, FieldMemOperand(scratch, |
| 5858 FixedArray::kHeaderSize - kPointerSize)); | 5857 FixedArray::kHeaderSize - kPointerSize)); |
| 5859 __ bind(&done); | 5858 __ bind(&done); |
| 5860 } | 5859 } |
| 5861 | 5860 |
| 5862 | 5861 |
| 5863 #undef __ | 5862 #undef __ |
| 5864 | 5863 |
| 5865 } } // namespace v8::internal | 5864 } } // namespace v8::internal |
| OLD | NEW |