| 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 4180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4191 | 4191 |
| 4192 | 4192 |
| 4193 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4193 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
| 4194 ASSERT(ToRegister(instr->context()).is(esi)); | 4194 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4195 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4195 ASSERT(ToRegister(instr->constructor()).is(edi)); |
| 4196 ASSERT(ToRegister(instr->result()).is(eax)); | 4196 ASSERT(ToRegister(instr->result()).is(eax)); |
| 4197 ASSERT(FLAG_optimize_constructed_arrays); | 4197 ASSERT(FLAG_optimize_constructed_arrays); |
| 4198 | 4198 |
| 4199 __ Set(eax, Immediate(instr->arity())); | 4199 __ Set(eax, Immediate(instr->arity())); |
| 4200 __ mov(ebx, instr->hydrogen()->property_cell()); | 4200 __ mov(ebx, instr->hydrogen()->property_cell()); |
| 4201 Object* cell_value = instr->hydrogen()->property_cell()->value(); | 4201 ElementsKind kind = instr->hydrogen()->elements_kind(); |
| 4202 ElementsKind kind = static_cast<ElementsKind>(Smi::cast(cell_value)->value()); | |
| 4203 if (instr->arity() == 0) { | 4202 if (instr->arity() == 0) { |
| 4204 ArrayNoArgumentConstructorStub stub(kind); | 4203 ArrayNoArgumentConstructorStub stub(kind); |
| 4205 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4204 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4206 } else if (instr->arity() == 1) { | 4205 } else if (instr->arity() == 1) { |
| 4207 ArraySingleArgumentConstructorStub stub(kind); | 4206 ArraySingleArgumentConstructorStub stub(kind); |
| 4208 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4207 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4209 } else { | 4208 } else { |
| 4210 ArrayNArgumentsConstructorStub stub(kind); | 4209 ArrayNArgumentsConstructorStub stub(kind); |
| 4211 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4210 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4212 } | 4211 } |
| (...skipping 2394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6607 FixedArray::kHeaderSize - kPointerSize)); | 6606 FixedArray::kHeaderSize - kPointerSize)); |
| 6608 __ bind(&done); | 6607 __ bind(&done); |
| 6609 } | 6608 } |
| 6610 | 6609 |
| 6611 | 6610 |
| 6612 #undef __ | 6611 #undef __ |
| 6613 | 6612 |
| 6614 } } // namespace v8::internal | 6613 } } // namespace v8::internal |
| 6615 | 6614 |
| 6616 #endif // V8_TARGET_ARCH_IA32 | 6615 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |