| 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 4171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4182 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4182 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4183 } | 4183 } |
| 4184 | 4184 |
| 4185 | 4185 |
| 4186 void LCodeGen::DoCallNew(LCallNew* instr) { | 4186 void LCodeGen::DoCallNew(LCallNew* instr) { |
| 4187 ASSERT(ToRegister(instr->context()).is(esi)); | 4187 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4188 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4188 ASSERT(ToRegister(instr->constructor()).is(edi)); |
| 4189 ASSERT(ToRegister(instr->result()).is(eax)); | 4189 ASSERT(ToRegister(instr->result()).is(eax)); |
| 4190 | 4190 |
| 4191 // No cell in ebx for construct type feedback in optimized code | 4191 // No cell in ebx for construct type feedback in optimized code |
| 4192 Handle<Object> undefined_value(isolate()->factory()->undefined_value()); | 4192 Handle<Object> megamorphic_symbol = |
| 4193 __ mov(ebx, Immediate(undefined_value)); | 4193 TypeFeedbackInfo::MegamorphicSentinel(isolate()); |
| 4194 __ mov(ebx, Immediate(megamorphic_symbol)); |
| 4194 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); | 4195 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); |
| 4195 __ Set(eax, Immediate(instr->arity())); | 4196 __ Set(eax, Immediate(instr->arity())); |
| 4196 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4197 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4197 } | 4198 } |
| 4198 | 4199 |
| 4199 | 4200 |
| 4200 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4201 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
| 4201 ASSERT(ToRegister(instr->context()).is(esi)); | 4202 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4202 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4203 ASSERT(ToRegister(instr->constructor()).is(edi)); |
| 4203 ASSERT(ToRegister(instr->result()).is(eax)); | 4204 ASSERT(ToRegister(instr->result()).is(eax)); |
| 4204 | 4205 |
| 4205 __ Set(eax, Immediate(instr->arity())); | 4206 __ Set(eax, Immediate(instr->arity())); |
| 4206 __ mov(ebx, factory()->undefined_value()); | 4207 __ mov(ebx, TypeFeedbackInfo::MegamorphicSentinel(isolate())); |
| 4207 ElementsKind kind = instr->hydrogen()->elements_kind(); | 4208 ElementsKind kind = instr->hydrogen()->elements_kind(); |
| 4208 AllocationSiteOverrideMode override_mode = | 4209 AllocationSiteOverrideMode override_mode = |
| 4209 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) | 4210 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) |
| 4210 ? DISABLE_ALLOCATION_SITES | 4211 ? DISABLE_ALLOCATION_SITES |
| 4211 : DONT_OVERRIDE; | 4212 : DONT_OVERRIDE; |
| 4212 | 4213 |
| 4213 if (instr->arity() == 0) { | 4214 if (instr->arity() == 0) { |
| 4214 ArrayNoArgumentConstructorStub stub(kind, override_mode); | 4215 ArrayNoArgumentConstructorStub stub(kind, override_mode); |
| 4215 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4216 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4216 } else if (instr->arity() == 1) { | 4217 } else if (instr->arity() == 1) { |
| (...skipping 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6274 FixedArray::kHeaderSize - kPointerSize)); | 6275 FixedArray::kHeaderSize - kPointerSize)); |
| 6275 __ bind(&done); | 6276 __ bind(&done); |
| 6276 } | 6277 } |
| 6277 | 6278 |
| 6278 | 6279 |
| 6279 #undef __ | 6280 #undef __ |
| 6280 | 6281 |
| 6281 } } // namespace v8::internal | 6282 } } // namespace v8::internal |
| 6282 | 6283 |
| 6283 #endif // V8_TARGET_ARCH_IA32 | 6284 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |