| 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 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2832 SetSourcePosition(expr->position()); | 2832 SetSourcePosition(expr->position()); |
| 2833 | 2833 |
| 2834 // Load function and argument count into edi and eax. | 2834 // Load function and argument count into edi and eax. |
| 2835 __ Set(eax, Immediate(arg_count)); | 2835 __ Set(eax, Immediate(arg_count)); |
| 2836 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 2836 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
| 2837 | 2837 |
| 2838 // Record call targets in unoptimized code. | 2838 // Record call targets in unoptimized code. |
| 2839 Handle<Object> uninitialized = | 2839 Handle<Object> uninitialized = |
| 2840 TypeFeedbackInfo::UninitializedSentinel(isolate()); | 2840 TypeFeedbackInfo::UninitializedSentinel(isolate()); |
| 2841 StoreFeedbackVectorSlot(expr->CallNewFeedbackSlot(), uninitialized); | 2841 StoreFeedbackVectorSlot(expr->CallNewFeedbackSlot(), uninitialized); |
| 2842 if (FLAG_pretenuring_call_new) { |
| 2843 StoreFeedbackVectorSlot(expr->AllocationSiteFeedbackSlot(), |
| 2844 isolate()->factory()->NewAllocationSite()); |
| 2845 ASSERT(expr->AllocationSiteFeedbackSlot() == |
| 2846 expr->CallNewFeedbackSlot() + 1); |
| 2847 } |
| 2848 |
| 2842 __ LoadHeapObject(ebx, FeedbackVector()); | 2849 __ LoadHeapObject(ebx, FeedbackVector()); |
| 2843 __ mov(edx, Immediate(Smi::FromInt(expr->CallNewFeedbackSlot()))); | 2850 __ mov(edx, Immediate(Smi::FromInt(expr->CallNewFeedbackSlot()))); |
| 2844 | 2851 |
| 2845 CallConstructStub stub(RECORD_CALL_TARGET); | 2852 CallConstructStub stub(RECORD_CALL_TARGET); |
| 2846 __ call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL); | 2853 __ call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL); |
| 2847 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 2854 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 2848 context()->Plug(eax); | 2855 context()->Plug(eax); |
| 2849 } | 2856 } |
| 2850 | 2857 |
| 2851 | 2858 |
| (...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4896 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4903 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4897 Assembler::target_address_at(call_target_address, | 4904 Assembler::target_address_at(call_target_address, |
| 4898 unoptimized_code)); | 4905 unoptimized_code)); |
| 4899 return OSR_AFTER_STACK_CHECK; | 4906 return OSR_AFTER_STACK_CHECK; |
| 4900 } | 4907 } |
| 4901 | 4908 |
| 4902 | 4909 |
| 4903 } } // namespace v8::internal | 4910 } } // namespace v8::internal |
| 4904 | 4911 |
| 4905 #endif // V8_TARGET_ARCH_IA32 | 4912 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |