OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 2631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2642 // -- r2 : name | 2642 // -- r2 : name |
2643 // -- lr : return address | 2643 // -- lr : return address |
2644 // ----------------------------------- | 2644 // ----------------------------------- |
2645 Label miss; | 2645 Label miss; |
2646 | 2646 |
2647 // Check that the map of the global has not changed. | 2647 // Check that the map of the global has not changed. |
2648 __ ldr(r3, FieldMemOperand(r1, HeapObject::kMapOffset)); | 2648 __ ldr(r3, FieldMemOperand(r1, HeapObject::kMapOffset)); |
2649 __ cmp(r3, Operand(Handle<Map>(object->map()))); | 2649 __ cmp(r3, Operand(Handle<Map>(object->map()))); |
2650 __ b(ne, &miss); | 2650 __ b(ne, &miss); |
2651 | 2651 |
| 2652 // Check that the value in the cell is not the hole. If it is, this |
| 2653 // cell could have been deleted and reintroducing the global needs |
| 2654 // to update the property details in the property dictionary of the |
| 2655 // global object. We bail out to the runtime system to do that. |
| 2656 __ mov(r4, Operand(Handle<JSGlobalPropertyCell>(cell))); |
| 2657 __ LoadRoot(r5, Heap::kTheHoleValueRootIndex); |
| 2658 __ ldr(r6, FieldMemOperand(r4, JSGlobalPropertyCell::kValueOffset)); |
| 2659 __ cmp(r5, r6); |
| 2660 __ b(eq, &miss); |
| 2661 |
2652 // Store the value in the cell. | 2662 // Store the value in the cell. |
2653 __ mov(r2, Operand(Handle<JSGlobalPropertyCell>(cell))); | 2663 __ str(r0, FieldMemOperand(r4, JSGlobalPropertyCell::kValueOffset)); |
2654 __ str(r0, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset)); | |
2655 | 2664 |
2656 __ IncrementCounter(&Counters::named_store_global_inline, 1, r4, r3); | 2665 __ IncrementCounter(&Counters::named_store_global_inline, 1, r4, r3); |
2657 __ Ret(); | 2666 __ Ret(); |
2658 | 2667 |
2659 // Handle store cache miss. | 2668 // Handle store cache miss. |
2660 __ bind(&miss); | 2669 __ bind(&miss); |
2661 __ IncrementCounter(&Counters::named_store_global_inline_miss, 1, r4, r3); | 2670 __ IncrementCounter(&Counters::named_store_global_inline_miss, 1, r4, r3); |
2662 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); | 2671 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
2663 __ Jump(ic, RelocInfo::CODE_TARGET); | 2672 __ Jump(ic, RelocInfo::CODE_TARGET); |
2664 | 2673 |
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3925 | 3934 |
3926 return GetCode(flags); | 3935 return GetCode(flags); |
3927 } | 3936 } |
3928 | 3937 |
3929 | 3938 |
3930 #undef __ | 3939 #undef __ |
3931 | 3940 |
3932 } } // namespace v8::internal | 3941 } } // namespace v8::internal |
3933 | 3942 |
3934 #endif // V8_TARGET_ARCH_ARM | 3943 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |