OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 Handle<String> name, | 1314 Handle<String> name, |
1315 Label* miss) { | 1315 Label* miss) { |
1316 ASSERT(holder->IsGlobalObject()); | 1316 ASSERT(holder->IsGlobalObject()); |
1317 | 1317 |
1318 // Get the number of arguments. | 1318 // Get the number of arguments. |
1319 const int argc = arguments().immediate(); | 1319 const int argc = arguments().immediate(); |
1320 | 1320 |
1321 // Get the receiver from the stack. | 1321 // Get the receiver from the stack. |
1322 __ ldr(r0, MemOperand(sp, argc * kPointerSize)); | 1322 __ ldr(r0, MemOperand(sp, argc * kPointerSize)); |
1323 | 1323 |
1324 // If the object is the holder then we know that it's a global | |
1325 // object which can only happen for contextual calls. In this case, | |
1326 // the receiver cannot be a smi. | |
1327 if (!object.is_identical_to(holder)) { | |
1328 __ JumpIfSmi(r0, miss); | |
1329 } | |
1330 | |
1331 // Check that the maps haven't changed. | 1324 // Check that the maps haven't changed. |
| 1325 __ JumpIfSmi(r0, miss); |
1332 CheckPrototypes(object, r0, holder, r3, r1, r4, name, miss); | 1326 CheckPrototypes(object, r0, holder, r3, r1, r4, name, miss); |
1333 } | 1327 } |
1334 | 1328 |
1335 | 1329 |
1336 void CallStubCompiler::GenerateLoadFunctionFromCell( | 1330 void CallStubCompiler::GenerateLoadFunctionFromCell( |
1337 Handle<JSGlobalPropertyCell> cell, | 1331 Handle<JSGlobalPropertyCell> cell, |
1338 Handle<JSFunction> function, | 1332 Handle<JSFunction> function, |
1339 Label* miss) { | 1333 Label* miss) { |
1340 // Get the value from the cell. | 1334 // Get the value from the cell. |
1341 __ mov(r3, Operand(cell)); | 1335 __ mov(r3, Operand(cell)); |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2718 Handle<JSGlobalPropertyCell> cell, | 2712 Handle<JSGlobalPropertyCell> cell, |
2719 Handle<String> name, | 2713 Handle<String> name, |
2720 bool is_dont_delete) { | 2714 bool is_dont_delete) { |
2721 // ----------- S t a t e ------------- | 2715 // ----------- S t a t e ------------- |
2722 // -- r0 : receiver | 2716 // -- r0 : receiver |
2723 // -- r2 : name | 2717 // -- r2 : name |
2724 // -- lr : return address | 2718 // -- lr : return address |
2725 // ----------------------------------- | 2719 // ----------------------------------- |
2726 Label miss; | 2720 Label miss; |
2727 | 2721 |
2728 // If the object is the holder then we know that it's a global | |
2729 // object which can only happen for contextual calls. In this case, | |
2730 // the receiver cannot be a smi. | |
2731 if (!object.is_identical_to(holder)) { | |
2732 __ JumpIfSmi(r0, &miss); | |
2733 } | |
2734 | |
2735 // Check that the map of the global has not changed. | 2722 // Check that the map of the global has not changed. |
| 2723 __ JumpIfSmi(r0, &miss); |
2736 CheckPrototypes(object, r0, holder, r3, r4, r1, name, &miss); | 2724 CheckPrototypes(object, r0, holder, r3, r4, r1, name, &miss); |
2737 | 2725 |
2738 // Get the value from the cell. | 2726 // Get the value from the cell. |
2739 __ mov(r3, Operand(cell)); | 2727 __ mov(r3, Operand(cell)); |
2740 __ ldr(r4, FieldMemOperand(r3, JSGlobalPropertyCell::kValueOffset)); | 2728 __ ldr(r4, FieldMemOperand(r3, JSGlobalPropertyCell::kValueOffset)); |
2741 | 2729 |
2742 // Check for deleted property if property can actually be deleted. | 2730 // Check for deleted property if property can actually be deleted. |
2743 if (!is_dont_delete) { | 2731 if (!is_dont_delete) { |
2744 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 2732 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
2745 __ cmp(r4, ip); | 2733 __ cmp(r4, ip); |
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4216 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); | 4204 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); |
4217 __ Jump(ic_miss, RelocInfo::CODE_TARGET); | 4205 __ Jump(ic_miss, RelocInfo::CODE_TARGET); |
4218 } | 4206 } |
4219 | 4207 |
4220 | 4208 |
4221 #undef __ | 4209 #undef __ |
4222 | 4210 |
4223 } } // namespace v8::internal | 4211 } } // namespace v8::internal |
4224 | 4212 |
4225 #endif // V8_TARGET_ARCH_ARM | 4213 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |