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 // 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2368 int argc = state_.arg_count(); | 2368 int argc = state_.arg_count(); |
| 2369 ParameterCount actual(argc); | 2369 ParameterCount actual(argc); |
| 2370 | 2370 |
| 2371 EmitLoadTypeFeedbackVector(masm, ebx); | 2371 EmitLoadTypeFeedbackVector(masm, ebx); |
| 2372 | 2372 |
| 2373 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); | 2373 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); |
| 2374 __ cmp(edi, ecx); | 2374 __ cmp(edi, ecx); |
| 2375 __ j(not_equal, &miss); | 2375 __ j(not_equal, &miss); |
| 2376 | 2376 |
| 2377 __ mov(eax, arg_count()); | 2377 __ mov(eax, arg_count()); |
| 2378 __ mov(ebx, FieldOperand(ebx, edx, times_half_pointer_size, | 2378 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, |
| 2379 FixedArray::kHeaderSize)); | 2379 FixedArray::kHeaderSize)); |
| 2380 | |
| 2380 // Verify that ecx contains an AllocationSite | 2381 // Verify that ecx contains an AllocationSite |
| 2381 __ AssertUndefinedOrAllocationSite(ebx); | 2382 Factory* factory = masm->isolate()->factory(); |
| 2383 __ cmp(FieldOperand(ecx, 0), factory->allocation_site_map()); | |
|
Toon Verwaest
2014/07/28 14:11:38
HeapObject::kMapoffset?
| |
| 2384 __ j(not_equal, &miss); | |
| 2385 | |
| 2386 __ mov(ebx, ecx); | |
| 2382 ArrayConstructorStub stub(masm->isolate(), arg_count()); | 2387 ArrayConstructorStub stub(masm->isolate(), arg_count()); |
| 2383 __ TailCallStub(&stub); | 2388 __ TailCallStub(&stub); |
| 2384 | 2389 |
| 2385 __ bind(&miss); | 2390 __ bind(&miss); |
| 2386 GenerateMiss(masm, IC::kCallIC_Customization_Miss); | 2391 GenerateMiss(masm, IC::kCallIC_Customization_Miss); |
| 2387 | 2392 |
| 2388 // The slow case, we need this no matter what to complete a call after a miss. | 2393 // The slow case, we need this no matter what to complete a call after a miss. |
| 2389 CallFunctionNoFeedback(masm, | 2394 CallFunctionNoFeedback(masm, |
| 2390 arg_count(), | 2395 arg_count(), |
| 2391 true, | 2396 true, |
| (...skipping 2584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4976 Operand(ebp, 7 * kPointerSize), | 4981 Operand(ebp, 7 * kPointerSize), |
| 4977 NULL); | 4982 NULL); |
| 4978 } | 4983 } |
| 4979 | 4984 |
| 4980 | 4985 |
| 4981 #undef __ | 4986 #undef __ |
| 4982 | 4987 |
| 4983 } } // namespace v8::internal | 4988 } } // namespace v8::internal |
| 4984 | 4989 |
| 4985 #endif // V8_TARGET_ARCH_IA32 | 4990 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |