OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 Label number, non_number, non_string, boolean, probe, miss; | 392 Label number, non_number, non_string, boolean, probe, miss; |
393 | 393 |
394 // Probe the stub cache. | 394 // Probe the stub cache. |
395 Code::Flags flags = Code::ComputeFlags(kind, | 395 Code::Flags flags = Code::ComputeFlags(kind, |
396 NOT_IN_LOOP, | 396 NOT_IN_LOOP, |
397 MONOMORPHIC, | 397 MONOMORPHIC, |
398 extra_ic_state, | 398 extra_ic_state, |
399 NORMAL, | 399 NORMAL, |
400 argc); | 400 argc); |
401 Isolate::Current()->stub_cache()->GenerateProbe( | 401 Isolate::Current()->stub_cache()->GenerateProbe( |
402 masm, flags, r1, r2, r3, r4, r5); | 402 masm, flags, r1, r2, r3, r4, r5, r6); |
403 | 403 |
404 // If the stub cache probing failed, the receiver might be a value. | 404 // If the stub cache probing failed, the receiver might be a value. |
405 // For value objects, we use the map of the prototype objects for | 405 // For value objects, we use the map of the prototype objects for |
406 // the corresponding JSValue for the cache and that is what we need | 406 // the corresponding JSValue for the cache and that is what we need |
407 // to probe. | 407 // to probe. |
408 // | 408 // |
409 // Check for number. | 409 // Check for number. |
410 __ JumpIfSmi(r1, &number); | 410 __ JumpIfSmi(r1, &number); |
411 __ CompareObjectType(r1, r3, r3, HEAP_NUMBER_TYPE); | 411 __ CompareObjectType(r1, r3, r3, HEAP_NUMBER_TYPE); |
412 __ b(ne, &non_number); | 412 __ b(ne, &non_number); |
(...skipping 18 matching lines...) Expand all Loading... |
431 __ LoadRoot(ip, Heap::kFalseValueRootIndex); | 431 __ LoadRoot(ip, Heap::kFalseValueRootIndex); |
432 __ cmp(r1, ip); | 432 __ cmp(r1, ip); |
433 __ b(ne, &miss); | 433 __ b(ne, &miss); |
434 __ bind(&boolean); | 434 __ bind(&boolean); |
435 StubCompiler::GenerateLoadGlobalFunctionPrototype( | 435 StubCompiler::GenerateLoadGlobalFunctionPrototype( |
436 masm, Context::BOOLEAN_FUNCTION_INDEX, r1); | 436 masm, Context::BOOLEAN_FUNCTION_INDEX, r1); |
437 | 437 |
438 // Probe the stub cache for the value object. | 438 // Probe the stub cache for the value object. |
439 __ bind(&probe); | 439 __ bind(&probe); |
440 Isolate::Current()->stub_cache()->GenerateProbe( | 440 Isolate::Current()->stub_cache()->GenerateProbe( |
441 masm, flags, r1, r2, r3, r4, r5); | 441 masm, flags, r1, r2, r3, r4, r5, r6); |
442 | 442 |
443 __ bind(&miss); | 443 __ bind(&miss); |
444 } | 444 } |
445 | 445 |
446 | 446 |
447 static void GenerateFunctionTailCall(MacroAssembler* masm, | 447 static void GenerateFunctionTailCall(MacroAssembler* masm, |
448 int argc, | 448 int argc, |
449 Label* miss, | 449 Label* miss, |
450 Register scratch) { | 450 Register scratch) { |
451 // r1: function | 451 // r1: function |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 // -- lr : return address | 731 // -- lr : return address |
732 // -- r0 : receiver | 732 // -- r0 : receiver |
733 // -- sp[0] : receiver | 733 // -- sp[0] : receiver |
734 // ----------------------------------- | 734 // ----------------------------------- |
735 | 735 |
736 // Probe the stub cache. | 736 // Probe the stub cache. |
737 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, | 737 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, |
738 NOT_IN_LOOP, | 738 NOT_IN_LOOP, |
739 MONOMORPHIC); | 739 MONOMORPHIC); |
740 Isolate::Current()->stub_cache()->GenerateProbe( | 740 Isolate::Current()->stub_cache()->GenerateProbe( |
741 masm, flags, r0, r2, r3, r4, r5); | 741 masm, flags, r0, r2, r3, r4, r5, r6); |
742 | 742 |
743 // Cache miss: Jump to runtime. | 743 // Cache miss: Jump to runtime. |
744 GenerateMiss(masm); | 744 GenerateMiss(masm); |
745 } | 745 } |
746 | 746 |
747 | 747 |
748 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 748 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
749 // ----------- S t a t e ------------- | 749 // ----------- S t a t e ------------- |
750 // -- r2 : name | 750 // -- r2 : name |
751 // -- lr : return address | 751 // -- lr : return address |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 // -- lr : return address | 1379 // -- lr : return address |
1380 // ----------------------------------- | 1380 // ----------------------------------- |
1381 | 1381 |
1382 // Get the receiver from the stack and probe the stub cache. | 1382 // Get the receiver from the stack and probe the stub cache. |
1383 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, | 1383 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, |
1384 NOT_IN_LOOP, | 1384 NOT_IN_LOOP, |
1385 MONOMORPHIC, | 1385 MONOMORPHIC, |
1386 strict_mode); | 1386 strict_mode); |
1387 | 1387 |
1388 Isolate::Current()->stub_cache()->GenerateProbe( | 1388 Isolate::Current()->stub_cache()->GenerateProbe( |
1389 masm, flags, r1, r2, r3, r4, r5); | 1389 masm, flags, r1, r2, r3, r4, r5, r6); |
1390 | 1390 |
1391 // Cache miss: Jump to runtime. | 1391 // Cache miss: Jump to runtime. |
1392 GenerateMiss(masm); | 1392 GenerateMiss(masm); |
1393 } | 1393 } |
1394 | 1394 |
1395 | 1395 |
1396 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1396 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
1397 // ----------- S t a t e ------------- | 1397 // ----------- S t a t e ------------- |
1398 // -- r0 : value | 1398 // -- r0 : value |
1399 // -- r1 : receiver | 1399 // -- r1 : receiver |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1621 Register reg = Assembler::GetRn(instr_at_patch); | 1621 Register reg = Assembler::GetRn(instr_at_patch); |
1622 patcher.masm()->tst(reg, Operand(kSmiTagMask)); | 1622 patcher.masm()->tst(reg, Operand(kSmiTagMask)); |
1623 patcher.EmitCondition(eq); | 1623 patcher.EmitCondition(eq); |
1624 } | 1624 } |
1625 } | 1625 } |
1626 | 1626 |
1627 | 1627 |
1628 } } // namespace v8::internal | 1628 } } // namespace v8::internal |
1629 | 1629 |
1630 #endif // V8_TARGET_ARCH_ARM | 1630 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |