| 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 4128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4139 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4139 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4140 } | 4140 } |
| 4141 } | 4141 } |
| 4142 | 4142 |
| 4143 | 4143 |
| 4144 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { | 4144 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { |
| 4145 CallRuntime(instr->function(), instr->arity(), instr); | 4145 CallRuntime(instr->function(), instr->arity(), instr); |
| 4146 } | 4146 } |
| 4147 | 4147 |
| 4148 | 4148 |
| 4149 void LCodeGen::DoStoreCodeEntry(LStoreCodeEntry* instr) { |
| 4150 Register function = ToRegister(instr->function()); |
| 4151 Register code_object = ToRegister(instr->code_object()); |
| 4152 __ add(code_object, code_object, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 4153 __ str(code_object, |
| 4154 FieldMemOperand(function, JSFunction::kCodeEntryOffset)); |
| 4155 } |
| 4156 |
| 4157 |
| 4149 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { | 4158 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { |
| 4150 Register result = ToRegister(instr->result()); | 4159 Register result = ToRegister(instr->result()); |
| 4151 Register base = ToRegister(instr->base_object()); | 4160 Register base = ToRegister(instr->base_object()); |
| 4152 __ add(result, base, Operand(instr->offset())); | 4161 __ add(result, base, Operand(instr->offset())); |
| 4153 } | 4162 } |
| 4154 | 4163 |
| 4155 | 4164 |
| 4156 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { | 4165 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
| 4157 Representation representation = instr->representation(); | 4166 Representation representation = instr->representation(); |
| 4158 | 4167 |
| (...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5410 } | 5419 } |
| 5411 | 5420 |
| 5412 | 5421 |
| 5413 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5422 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
| 5414 // Use the fast case closure allocation code that allocates in new | 5423 // Use the fast case closure allocation code that allocates in new |
| 5415 // space for nested functions that don't need literals cloning. | 5424 // space for nested functions that don't need literals cloning. |
| 5416 bool pretenure = instr->hydrogen()->pretenure(); | 5425 bool pretenure = instr->hydrogen()->pretenure(); |
| 5417 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5426 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
| 5418 FastNewClosureStub stub(instr->hydrogen()->language_mode(), | 5427 FastNewClosureStub stub(instr->hydrogen()->language_mode(), |
| 5419 instr->hydrogen()->is_generator()); | 5428 instr->hydrogen()->is_generator()); |
| 5420 __ mov(r1, Operand(instr->hydrogen()->shared_info())); | 5429 __ mov(r2, Operand(instr->hydrogen()->shared_info())); |
| 5421 __ push(r1); | |
| 5422 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 5430 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 5423 } else { | 5431 } else { |
| 5424 __ mov(r2, Operand(instr->hydrogen()->shared_info())); | 5432 __ mov(r2, Operand(instr->hydrogen()->shared_info())); |
| 5425 __ mov(r1, Operand(pretenure ? factory()->true_value() | 5433 __ mov(r1, Operand(pretenure ? factory()->true_value() |
| 5426 : factory()->false_value())); | 5434 : factory()->false_value())); |
| 5427 __ Push(cp, r2, r1); | 5435 __ Push(cp, r2, r1); |
| 5428 CallRuntime(Runtime::kNewClosure, 3, instr); | 5436 CallRuntime(Runtime::kNewClosure, 3, instr); |
| 5429 } | 5437 } |
| 5430 } | 5438 } |
| 5431 | 5439 |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5773 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5781 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5774 __ ldr(result, FieldMemOperand(scratch, | 5782 __ ldr(result, FieldMemOperand(scratch, |
| 5775 FixedArray::kHeaderSize - kPointerSize)); | 5783 FixedArray::kHeaderSize - kPointerSize)); |
| 5776 __ bind(&done); | 5784 __ bind(&done); |
| 5777 } | 5785 } |
| 5778 | 5786 |
| 5779 | 5787 |
| 5780 #undef __ | 5788 #undef __ |
| 5781 | 5789 |
| 5782 } } // namespace v8::internal | 5790 } } // namespace v8::internal |
| OLD | NEW |