Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: src/x87/code-stubs-x87.cc

Issue 443903002: Version 3.27.34.12 (merged r22693) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.27
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/mjsunit/regress/regress-392114.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 int argc = state_.arg_count(); 2159 int argc = state_.arg_count();
2160 ParameterCount actual(argc); 2160 ParameterCount actual(argc);
2161 2161
2162 EmitLoadTypeFeedbackVector(masm, ebx); 2162 EmitLoadTypeFeedbackVector(masm, ebx);
2163 2163
2164 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); 2164 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx);
2165 __ cmp(edi, ecx); 2165 __ cmp(edi, ecx);
2166 __ j(not_equal, &miss); 2166 __ j(not_equal, &miss);
2167 2167
2168 __ mov(eax, arg_count()); 2168 __ mov(eax, arg_count());
2169 __ mov(ebx, FieldOperand(ebx, edx, times_half_pointer_size, 2169 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size,
2170 FixedArray::kHeaderSize)); 2170 FixedArray::kHeaderSize));
2171
2171 // Verify that ecx contains an AllocationSite 2172 // Verify that ecx contains an AllocationSite
2172 __ AssertUndefinedOrAllocationSite(ebx); 2173 Factory* factory = masm->isolate()->factory();
2174 __ cmp(FieldOperand(ecx, HeapObject::kMapOffset),
2175 factory->allocation_site_map());
2176 __ j(not_equal, &miss);
2177
2178 __ mov(ebx, ecx);
2173 ArrayConstructorStub stub(masm->isolate(), arg_count()); 2179 ArrayConstructorStub stub(masm->isolate(), arg_count());
2174 __ TailCallStub(&stub); 2180 __ TailCallStub(&stub);
2175 2181
2176 __ bind(&miss); 2182 __ bind(&miss);
2177 GenerateMiss(masm, IC::kCallIC_Customization_Miss); 2183 GenerateMiss(masm, IC::kCallIC_Customization_Miss);
2178 2184
2179 // The slow case, we need this no matter what to complete a call after a miss. 2185 // The slow case, we need this no matter what to complete a call after a miss.
2180 CallFunctionNoFeedback(masm, 2186 CallFunctionNoFeedback(masm,
2181 arg_count(), 2187 arg_count(),
2182 true, 2188 true,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 Label miss; 2239 Label miss;
2234 2240
2235 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, 2241 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size,
2236 FixedArray::kHeaderSize)); 2242 FixedArray::kHeaderSize));
2237 __ cmp(ecx, Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate))); 2243 __ cmp(ecx, Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate)));
2238 __ j(equal, &slow_start); 2244 __ j(equal, &slow_start);
2239 __ cmp(ecx, Immediate(TypeFeedbackInfo::UninitializedSentinel(isolate))); 2245 __ cmp(ecx, Immediate(TypeFeedbackInfo::UninitializedSentinel(isolate)));
2240 __ j(equal, &miss); 2246 __ j(equal, &miss);
2241 2247
2242 if (!FLAG_trace_ic) { 2248 if (!FLAG_trace_ic) {
2243 // We are going megamorphic, and we don't want to visit the runtime. 2249 // We are going megamorphic. If the feedback is a JSFunction, it is fine
2250 // to handle it here. More complex cases are dealt with in the runtime.
2251 __ AssertNotSmi(ecx);
2252 __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx);
2253 __ j(not_equal, &miss);
2244 __ mov(FieldOperand(ebx, edx, times_half_pointer_size, 2254 __ mov(FieldOperand(ebx, edx, times_half_pointer_size,
2245 FixedArray::kHeaderSize), 2255 FixedArray::kHeaderSize),
2246 Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate))); 2256 Immediate(TypeFeedbackInfo::MegamorphicSentinel(isolate)));
2247 __ jmp(&slow_start); 2257 __ jmp(&slow_start);
2248 } 2258 }
2249 2259
2250 // We are here because tracing is on or we are going monomorphic. 2260 // We are here because tracing is on or we are going monomorphic.
2251 __ bind(&miss); 2261 __ bind(&miss);
2252 GenerateMiss(masm, IC::kCallIC_Miss); 2262 GenerateMiss(masm, IC::kCallIC_Miss);
2253 2263
(...skipping 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after
4725 Operand(ebp, 7 * kPointerSize), 4735 Operand(ebp, 7 * kPointerSize),
4726 NULL); 4736 NULL);
4727 } 4737 }
4728 4738
4729 4739
4730 #undef __ 4740 #undef __
4731 4741
4732 } } // namespace v8::internal 4742 } } // namespace v8::internal
4733 4743
4734 #endif // V8_TARGET_ARCH_X87 4744 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/mjsunit/regress/regress-392114.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698