| 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 4221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4232 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4232 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
| 4233 ASSERT(ToRegister(instr->context()).is(esi)); | 4233 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4234 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4234 ASSERT(ToRegister(instr->constructor()).is(edi)); |
| 4235 ASSERT(ToRegister(instr->result()).is(eax)); | 4235 ASSERT(ToRegister(instr->result()).is(eax)); |
| 4236 ASSERT(FLAG_optimize_constructed_arrays); | 4236 ASSERT(FLAG_optimize_constructed_arrays); |
| 4237 | 4237 |
| 4238 __ Set(eax, Immediate(instr->arity())); | 4238 __ Set(eax, Immediate(instr->arity())); |
| 4239 __ mov(ebx, instr->hydrogen()->property_cell()); | 4239 __ mov(ebx, instr->hydrogen()->property_cell()); |
| 4240 ElementsKind kind = instr->hydrogen()->elements_kind(); | 4240 ElementsKind kind = instr->hydrogen()->elements_kind(); |
| 4241 bool disable_allocation_sites = | 4241 bool disable_allocation_sites = |
| 4242 (AllocationSiteInfo::GetMode(kind) == TRACK_ALLOCATION_SITE); | 4242 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE); |
| 4243 | 4243 |
| 4244 if (instr->arity() == 0) { | 4244 if (instr->arity() == 0) { |
| 4245 ArrayNoArgumentConstructorStub stub(kind, disable_allocation_sites); | 4245 ArrayNoArgumentConstructorStub stub(kind, disable_allocation_sites); |
| 4246 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4246 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4247 } else if (instr->arity() == 1) { | 4247 } else if (instr->arity() == 1) { |
| 4248 ArraySingleArgumentConstructorStub stub(kind, disable_allocation_sites); | 4248 ArraySingleArgumentConstructorStub stub(kind, disable_allocation_sites); |
| 4249 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4249 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4250 } else { | 4250 } else { |
| 4251 ArrayNArgumentsConstructorStub stub(kind, disable_allocation_sites); | 4251 ArrayNArgumentsConstructorStub stub(kind, disable_allocation_sites); |
| 4252 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4252 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| (...skipping 2261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6514 FixedArray::kHeaderSize - kPointerSize)); | 6514 FixedArray::kHeaderSize - kPointerSize)); |
| 6515 __ bind(&done); | 6515 __ bind(&done); |
| 6516 } | 6516 } |
| 6517 | 6517 |
| 6518 | 6518 |
| 6519 #undef __ | 6519 #undef __ |
| 6520 | 6520 |
| 6521 } } // namespace v8::internal | 6521 } } // namespace v8::internal |
| 6522 | 6522 |
| 6523 #endif // V8_TARGET_ARCH_IA32 | 6523 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |