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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1305 __ j(not_equal, miss); | 1305 __ j(not_equal, miss); |
1306 | 1306 |
1307 __ mov(eax, arg_count()); | 1307 __ mov(eax, arg_count()); |
1308 // Reload ecx. | 1308 // Reload ecx. |
1309 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, | 1309 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, |
1310 FixedArray::kHeaderSize)); | 1310 FixedArray::kHeaderSize)); |
1311 | 1311 |
1312 // Increment the call count for monomorphic function calls. | 1312 // Increment the call count for monomorphic function calls. |
1313 __ add(FieldOperand(ebx, edx, times_half_pointer_size, | 1313 __ add(FieldOperand(ebx, edx, times_half_pointer_size, |
1314 FixedArray::kHeaderSize + kPointerSize), | 1314 FixedArray::kHeaderSize + kPointerSize), |
1315 Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement))); | 1315 Immediate(Smi::FromInt(1))); |
1316 | 1316 |
1317 __ mov(ebx, ecx); | 1317 __ mov(ebx, ecx); |
1318 __ mov(edx, edi); | 1318 __ mov(edx, edi); |
1319 ArrayConstructorStub stub(masm->isolate(), arg_count()); | 1319 ArrayConstructorStub stub(masm->isolate(), arg_count()); |
1320 __ TailCallStub(&stub); | 1320 __ TailCallStub(&stub); |
1321 | 1321 |
1322 // Unreachable. | 1322 // Unreachable. |
1323 } | 1323 } |
1324 | 1324 |
1325 | 1325 |
(...skipping 27 matching lines...) Expand all Loading... |
1353 __ cmp(edi, FieldOperand(ecx, WeakCell::kValueOffset)); | 1353 __ cmp(edi, FieldOperand(ecx, WeakCell::kValueOffset)); |
1354 __ j(not_equal, &extra_checks_or_miss); | 1354 __ j(not_equal, &extra_checks_or_miss); |
1355 | 1355 |
1356 // The compare above could have been a SMI/SMI comparison. Guard against this | 1356 // The compare above could have been a SMI/SMI comparison. Guard against this |
1357 // convincing us that we have a monomorphic JSFunction. | 1357 // convincing us that we have a monomorphic JSFunction. |
1358 __ JumpIfSmi(edi, &extra_checks_or_miss); | 1358 __ JumpIfSmi(edi, &extra_checks_or_miss); |
1359 | 1359 |
1360 // Increment the call count for monomorphic function calls. | 1360 // Increment the call count for monomorphic function calls. |
1361 __ add(FieldOperand(ebx, edx, times_half_pointer_size, | 1361 __ add(FieldOperand(ebx, edx, times_half_pointer_size, |
1362 FixedArray::kHeaderSize + kPointerSize), | 1362 FixedArray::kHeaderSize + kPointerSize), |
1363 Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement))); | 1363 Immediate(Smi::FromInt(1))); |
1364 | 1364 |
1365 __ bind(&call_function); | 1365 __ bind(&call_function); |
1366 __ Set(eax, argc); | 1366 __ Set(eax, argc); |
1367 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(), | 1367 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(), |
1368 tail_call_mode()), | 1368 tail_call_mode()), |
1369 RelocInfo::CODE_TARGET); | 1369 RelocInfo::CODE_TARGET); |
1370 | 1370 |
1371 __ bind(&extra_checks_or_miss); | 1371 __ bind(&extra_checks_or_miss); |
1372 Label uninitialized, miss, not_allocation_site; | 1372 Label uninitialized, miss, not_allocation_site; |
1373 | 1373 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 | 1424 |
1425 // Make sure the function belongs to the same native context. | 1425 // Make sure the function belongs to the same native context. |
1426 __ mov(ecx, FieldOperand(edi, JSFunction::kContextOffset)); | 1426 __ mov(ecx, FieldOperand(edi, JSFunction::kContextOffset)); |
1427 __ mov(ecx, ContextOperand(ecx, Context::NATIVE_CONTEXT_INDEX)); | 1427 __ mov(ecx, ContextOperand(ecx, Context::NATIVE_CONTEXT_INDEX)); |
1428 __ cmp(ecx, NativeContextOperand()); | 1428 __ cmp(ecx, NativeContextOperand()); |
1429 __ j(not_equal, &miss); | 1429 __ j(not_equal, &miss); |
1430 | 1430 |
1431 // Initialize the call counter. | 1431 // Initialize the call counter. |
1432 __ mov(FieldOperand(ebx, edx, times_half_pointer_size, | 1432 __ mov(FieldOperand(ebx, edx, times_half_pointer_size, |
1433 FixedArray::kHeaderSize + kPointerSize), | 1433 FixedArray::kHeaderSize + kPointerSize), |
1434 Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement))); | 1434 Immediate(Smi::FromInt(1))); |
1435 | 1435 |
1436 // Store the function. Use a stub since we need a frame for allocation. | 1436 // Store the function. Use a stub since we need a frame for allocation. |
1437 // ebx - vector | 1437 // ebx - vector |
1438 // edx - slot | 1438 // edx - slot |
1439 // edi - function | 1439 // edi - function |
1440 { | 1440 { |
1441 FrameScope scope(masm, StackFrame::INTERNAL); | 1441 FrameScope scope(masm, StackFrame::INTERNAL); |
1442 CreateWeakCellStub create_stub(isolate); | 1442 CreateWeakCellStub create_stub(isolate); |
1443 __ push(edi); | 1443 __ push(edi); |
1444 __ CallStub(&create_stub); | 1444 __ CallStub(&create_stub); |
(...skipping 3940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5385 kStackUnwindSpace, nullptr, return_value_operand, | 5385 kStackUnwindSpace, nullptr, return_value_operand, |
5386 NULL); | 5386 NULL); |
5387 } | 5387 } |
5388 | 5388 |
5389 #undef __ | 5389 #undef __ |
5390 | 5390 |
5391 } // namespace internal | 5391 } // namespace internal |
5392 } // namespace v8 | 5392 } // namespace v8 |
5393 | 5393 |
5394 #endif // V8_TARGET_ARCH_X87 | 5394 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |