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 4272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4283 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4283 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
4284 } | 4284 } |
4285 | 4285 |
4286 | 4286 |
4287 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4287 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
4288 ASSERT(ToRegister(instr->context()).is(esi)); | 4288 ASSERT(ToRegister(instr->context()).is(esi)); |
4289 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4289 ASSERT(ToRegister(instr->constructor()).is(edi)); |
4290 ASSERT(ToRegister(instr->result()).is(eax)); | 4290 ASSERT(ToRegister(instr->result()).is(eax)); |
4291 | 4291 |
4292 __ Set(eax, Immediate(instr->arity())); | 4292 __ Set(eax, Immediate(instr->arity())); |
4293 __ mov(ebx, instr->hydrogen()->property_cell()); | 4293 __ mov(ebx, factory()->undefined_value()); |
4294 ElementsKind kind = instr->hydrogen()->elements_kind(); | 4294 ElementsKind kind = instr->hydrogen()->elements_kind(); |
4295 AllocationSiteOverrideMode override_mode = | 4295 AllocationSiteOverrideMode override_mode = |
4296 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) | 4296 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) |
4297 ? DISABLE_ALLOCATION_SITES | 4297 ? DISABLE_ALLOCATION_SITES |
4298 : DONT_OVERRIDE; | 4298 : DONT_OVERRIDE; |
4299 | 4299 |
4300 if (instr->arity() == 0) { | 4300 if (instr->arity() == 0) { |
4301 ArrayNoArgumentConstructorStub stub(kind, override_mode); | 4301 ArrayNoArgumentConstructorStub stub(kind, override_mode); |
4302 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4302 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
4303 } else if (instr->arity() == 1) { | 4303 } else if (instr->arity() == 1) { |
(...skipping 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6362 FixedArray::kHeaderSize - kPointerSize)); | 6362 FixedArray::kHeaderSize - kPointerSize)); |
6363 __ bind(&done); | 6363 __ bind(&done); |
6364 } | 6364 } |
6365 | 6365 |
6366 | 6366 |
6367 #undef __ | 6367 #undef __ |
6368 | 6368 |
6369 } } // namespace v8::internal | 6369 } } // namespace v8::internal |
6370 | 6370 |
6371 #endif // V8_TARGET_ARCH_IA32 | 6371 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |