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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 Label number, non_number, non_string, boolean, probe, miss; | 487 Label number, non_number, non_string, boolean, probe, miss; |
488 | 488 |
489 // Probe the stub cache. | 489 // Probe the stub cache. |
490 Code::Flags flags = Code::ComputeFlags(kind, | 490 Code::Flags flags = Code::ComputeFlags(kind, |
491 NOT_IN_LOOP, | 491 NOT_IN_LOOP, |
492 MONOMORPHIC, | 492 MONOMORPHIC, |
493 extra_ic_state, | 493 extra_ic_state, |
494 NORMAL, | 494 NORMAL, |
495 argc); | 495 argc); |
496 Isolate::Current()->stub_cache()->GenerateProbe( | 496 Isolate::Current()->stub_cache()->GenerateProbe( |
497 masm, flags, r1, r2, r3, r4, r5); | 497 masm, flags, r1, r2, r3, r4, r5, r6); |
498 | 498 |
499 // If the stub cache probing failed, the receiver might be a value. | 499 // If the stub cache probing failed, the receiver might be a value. |
500 // For value objects, we use the map of the prototype objects for | 500 // For value objects, we use the map of the prototype objects for |
501 // the corresponding JSValue for the cache and that is what we need | 501 // the corresponding JSValue for the cache and that is what we need |
502 // to probe. | 502 // to probe. |
503 // | 503 // |
504 // Check for number. | 504 // Check for number. |
505 __ JumpIfSmi(r1, &number); | 505 __ JumpIfSmi(r1, &number); |
506 __ CompareObjectType(r1, r3, r3, HEAP_NUMBER_TYPE); | 506 __ CompareObjectType(r1, r3, r3, HEAP_NUMBER_TYPE); |
507 __ b(ne, &non_number); | 507 __ b(ne, &non_number); |
(...skipping 18 matching lines...) Expand all Loading... |
526 __ LoadRoot(ip, Heap::kFalseValueRootIndex); | 526 __ LoadRoot(ip, Heap::kFalseValueRootIndex); |
527 __ cmp(r1, ip); | 527 __ cmp(r1, ip); |
528 __ b(ne, &miss); | 528 __ b(ne, &miss); |
529 __ bind(&boolean); | 529 __ bind(&boolean); |
530 StubCompiler::GenerateLoadGlobalFunctionPrototype( | 530 StubCompiler::GenerateLoadGlobalFunctionPrototype( |
531 masm, Context::BOOLEAN_FUNCTION_INDEX, r1); | 531 masm, Context::BOOLEAN_FUNCTION_INDEX, r1); |
532 | 532 |
533 // Probe the stub cache for the value object. | 533 // Probe the stub cache for the value object. |
534 __ bind(&probe); | 534 __ bind(&probe); |
535 Isolate::Current()->stub_cache()->GenerateProbe( | 535 Isolate::Current()->stub_cache()->GenerateProbe( |
536 masm, flags, r1, r2, r3, r4, r5); | 536 masm, flags, r1, r2, r3, r4, r5, r6); |
537 | 537 |
538 __ bind(&miss); | 538 __ bind(&miss); |
539 } | 539 } |
540 | 540 |
541 | 541 |
542 static void GenerateFunctionTailCall(MacroAssembler* masm, | 542 static void GenerateFunctionTailCall(MacroAssembler* masm, |
543 int argc, | 543 int argc, |
544 Label* miss, | 544 Label* miss, |
545 Register scratch) { | 545 Register scratch) { |
546 // r1: function | 546 // r1: function |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 // -- lr : return address | 826 // -- lr : return address |
827 // -- r0 : receiver | 827 // -- r0 : receiver |
828 // -- sp[0] : receiver | 828 // -- sp[0] : receiver |
829 // ----------------------------------- | 829 // ----------------------------------- |
830 | 830 |
831 // Probe the stub cache. | 831 // Probe the stub cache. |
832 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, | 832 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, |
833 NOT_IN_LOOP, | 833 NOT_IN_LOOP, |
834 MONOMORPHIC); | 834 MONOMORPHIC); |
835 Isolate::Current()->stub_cache()->GenerateProbe( | 835 Isolate::Current()->stub_cache()->GenerateProbe( |
836 masm, flags, r0, r2, r3, r4, r5); | 836 masm, flags, r0, r2, r3, r4, r5, r6); |
837 | 837 |
838 // Cache miss: Jump to runtime. | 838 // Cache miss: Jump to runtime. |
839 GenerateMiss(masm); | 839 GenerateMiss(masm); |
840 } | 840 } |
841 | 841 |
842 | 842 |
843 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 843 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
844 // ----------- S t a t e ------------- | 844 // ----------- S t a t e ------------- |
845 // -- r2 : name | 845 // -- r2 : name |
846 // -- lr : return address | 846 // -- lr : return address |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 // -- lr : return address | 1474 // -- lr : return address |
1475 // ----------------------------------- | 1475 // ----------------------------------- |
1476 | 1476 |
1477 // Get the receiver from the stack and probe the stub cache. | 1477 // Get the receiver from the stack and probe the stub cache. |
1478 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, | 1478 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, |
1479 NOT_IN_LOOP, | 1479 NOT_IN_LOOP, |
1480 MONOMORPHIC, | 1480 MONOMORPHIC, |
1481 strict_mode); | 1481 strict_mode); |
1482 | 1482 |
1483 Isolate::Current()->stub_cache()->GenerateProbe( | 1483 Isolate::Current()->stub_cache()->GenerateProbe( |
1484 masm, flags, r1, r2, r3, r4, r5); | 1484 masm, flags, r1, r2, r3, r4, r5, r6); |
1485 | 1485 |
1486 // Cache miss: Jump to runtime. | 1486 // Cache miss: Jump to runtime. |
1487 GenerateMiss(masm); | 1487 GenerateMiss(masm); |
1488 } | 1488 } |
1489 | 1489 |
1490 | 1490 |
1491 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1491 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
1492 // ----------- S t a t e ------------- | 1492 // ----------- S t a t e ------------- |
1493 // -- r0 : value | 1493 // -- r0 : value |
1494 // -- r1 : receiver | 1494 // -- r1 : receiver |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 Register reg = Assembler::GetRn(instr_at_patch); | 1716 Register reg = Assembler::GetRn(instr_at_patch); |
1717 patcher.masm()->tst(reg, Operand(kSmiTagMask)); | 1717 patcher.masm()->tst(reg, Operand(kSmiTagMask)); |
1718 patcher.EmitCondition(eq); | 1718 patcher.EmitCondition(eq); |
1719 } | 1719 } |
1720 } | 1720 } |
1721 | 1721 |
1722 | 1722 |
1723 } } // namespace v8::internal | 1723 } } // namespace v8::internal |
1724 | 1724 |
1725 #endif // V8_TARGET_ARCH_ARM | 1725 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |