| 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 4197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4208 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4208 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4209 } | 4209 } |
| 4210 | 4210 |
| 4211 | 4211 |
| 4212 void LCodeGen::DoCallNew(LCallNew* instr) { | 4212 void LCodeGen::DoCallNew(LCallNew* instr) { |
| 4213 ASSERT(ToRegister(instr->context()).is(esi)); | 4213 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4214 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4214 ASSERT(ToRegister(instr->constructor()).is(edi)); |
| 4215 ASSERT(ToRegister(instr->result()).is(eax)); | 4215 ASSERT(ToRegister(instr->result()).is(eax)); |
| 4216 | 4216 |
| 4217 // No cell in ebx for construct type feedback in optimized code | 4217 // No cell in ebx for construct type feedback in optimized code |
| 4218 Handle<Object> megamorphic_symbol = | 4218 __ mov(ebx, isolate()->factory()->undefined_value()); |
| 4219 TypeFeedbackInfo::MegamorphicSentinel(isolate()); | |
| 4220 __ mov(ebx, Immediate(megamorphic_symbol)); | |
| 4221 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); | 4219 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); |
| 4222 __ Set(eax, Immediate(instr->arity())); | 4220 __ Set(eax, Immediate(instr->arity())); |
| 4223 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4221 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4224 } | 4222 } |
| 4225 | 4223 |
| 4226 | 4224 |
| 4227 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4225 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
| 4228 ASSERT(ToRegister(instr->context()).is(esi)); | 4226 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4229 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4227 ASSERT(ToRegister(instr->constructor()).is(edi)); |
| 4230 ASSERT(ToRegister(instr->result()).is(eax)); | 4228 ASSERT(ToRegister(instr->result()).is(eax)); |
| 4231 | 4229 |
| 4232 __ Set(eax, Immediate(instr->arity())); | 4230 __ Set(eax, Immediate(instr->arity())); |
| 4233 __ mov(ebx, TypeFeedbackInfo::MegamorphicSentinel(isolate())); | 4231 __ mov(ebx, isolate()->factory()->undefined_value()); |
| 4234 ElementsKind kind = instr->hydrogen()->elements_kind(); | 4232 ElementsKind kind = instr->hydrogen()->elements_kind(); |
| 4235 AllocationSiteOverrideMode override_mode = | 4233 AllocationSiteOverrideMode override_mode = |
| 4236 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) | 4234 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) |
| 4237 ? DISABLE_ALLOCATION_SITES | 4235 ? DISABLE_ALLOCATION_SITES |
| 4238 : DONT_OVERRIDE; | 4236 : DONT_OVERRIDE; |
| 4239 | 4237 |
| 4240 if (instr->arity() == 0) { | 4238 if (instr->arity() == 0) { |
| 4241 ArrayNoArgumentConstructorStub stub(kind, override_mode); | 4239 ArrayNoArgumentConstructorStub stub(kind, override_mode); |
| 4242 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4240 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4243 } else if (instr->arity() == 1) { | 4241 } else if (instr->arity() == 1) { |
| (...skipping 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6335 FixedArray::kHeaderSize - kPointerSize)); | 6333 FixedArray::kHeaderSize - kPointerSize)); |
| 6336 __ bind(&done); | 6334 __ bind(&done); |
| 6337 } | 6335 } |
| 6338 | 6336 |
| 6339 | 6337 |
| 6340 #undef __ | 6338 #undef __ |
| 6341 | 6339 |
| 6342 } } // namespace v8::internal | 6340 } } // namespace v8::internal |
| 6343 | 6341 |
| 6344 #endif // V8_TARGET_ARCH_IA32 | 6342 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |