Chromium Code Reviews| 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 4151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4162 CALL_AS_FUNCTION, | 4162 CALL_AS_FUNCTION, |
| 4163 EDI_UNINITIALIZED); | 4163 EDI_UNINITIALIZED); |
| 4164 } | 4164 } |
| 4165 | 4165 |
| 4166 | 4166 |
| 4167 void LCodeGen::DoCallNew(LCallNew* instr) { | 4167 void LCodeGen::DoCallNew(LCallNew* instr) { |
| 4168 ASSERT(ToRegister(instr->context()).is(esi)); | 4168 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4169 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4169 ASSERT(ToRegister(instr->constructor()).is(edi)); |
| 4170 ASSERT(ToRegister(instr->result()).is(eax)); | 4170 ASSERT(ToRegister(instr->result()).is(eax)); |
| 4171 | 4171 |
| 4172 if (FLAG_optimize_constructed_arrays) { | 4172 // No cell in ebx for construct type feedback in optimized code |
| 4173 // No cell in ebx for construct type feedback in optimized code | 4173 Handle<Object> undefined_value(isolate()->heap()->undefined_value(), |
|
Michael Starzinger
2013/06/25 16:05:22
nit: Better use isolate()->factory()->undefined_va
mvstanton
2013/06/27 08:51:02
Done.
| |
| 4174 Handle<Object> undefined_value(isolate()->heap()->undefined_value(), | 4174 isolate()); |
| 4175 isolate()); | 4175 __ mov(ebx, Immediate(undefined_value)); |
| 4176 __ mov(ebx, Immediate(undefined_value)); | |
| 4177 } | |
| 4178 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); | 4176 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); |
| 4179 __ Set(eax, Immediate(instr->arity())); | 4177 __ Set(eax, Immediate(instr->arity())); |
| 4180 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4178 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4181 } | 4179 } |
| 4182 | 4180 |
| 4183 | 4181 |
| 4184 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4182 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
| 4185 ASSERT(ToRegister(instr->context()).is(esi)); | 4183 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4186 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4184 ASSERT(ToRegister(instr->constructor()).is(edi)); |
| 4187 ASSERT(ToRegister(instr->result()).is(eax)); | 4185 ASSERT(ToRegister(instr->result()).is(eax)); |
| 4188 ASSERT(FLAG_optimize_constructed_arrays); | |
| 4189 | 4186 |
| 4190 __ Set(eax, Immediate(instr->arity())); | 4187 __ Set(eax, Immediate(instr->arity())); |
| 4191 __ mov(ebx, instr->hydrogen()->property_cell()); | 4188 __ mov(ebx, instr->hydrogen()->property_cell()); |
| 4192 ElementsKind kind = instr->hydrogen()->elements_kind(); | 4189 ElementsKind kind = instr->hydrogen()->elements_kind(); |
| 4193 bool disable_allocation_sites = | 4190 bool disable_allocation_sites = |
| 4194 (AllocationSiteInfo::GetMode(kind) == TRACK_ALLOCATION_SITE); | 4191 (AllocationSiteInfo::GetMode(kind) == TRACK_ALLOCATION_SITE); |
| 4195 | 4192 |
| 4196 if (instr->arity() == 0) { | 4193 if (instr->arity() == 0) { |
| 4197 ArrayNoArgumentConstructorStub stub(kind, disable_allocation_sites); | 4194 ArrayNoArgumentConstructorStub stub(kind, disable_allocation_sites); |
| 4198 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4195 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| (...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6560 FixedArray::kHeaderSize - kPointerSize)); | 6557 FixedArray::kHeaderSize - kPointerSize)); |
| 6561 __ bind(&done); | 6558 __ bind(&done); |
| 6562 } | 6559 } |
| 6563 | 6560 |
| 6564 | 6561 |
| 6565 #undef __ | 6562 #undef __ |
| 6566 | 6563 |
| 6567 } } // namespace v8::internal | 6564 } } // namespace v8::internal |
| 6568 | 6565 |
| 6569 #endif // V8_TARGET_ARCH_IA32 | 6566 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |