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 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2102 // This is the inlined call site instanceof cache. The two occurences of the | 2102 // This is the inlined call site instanceof cache. The two occurences of the |
2103 // hole value will be patched to the last map/result pair generated by the | 2103 // hole value will be patched to the last map/result pair generated by the |
2104 // instanceof stub. | 2104 // instanceof stub. |
2105 Label cache_miss; | 2105 Label cache_miss; |
2106 Register map = temp; | 2106 Register map = temp; |
2107 __ ldr(map, FieldMemOperand(object, HeapObject::kMapOffset)); | 2107 __ ldr(map, FieldMemOperand(object, HeapObject::kMapOffset)); |
2108 __ bind(deferred->map_check()); // Label for calculating code patching. | 2108 __ bind(deferred->map_check()); // Label for calculating code patching. |
2109 // We use Factory::the_hole_value() on purpose instead of loading from the | 2109 // We use Factory::the_hole_value() on purpose instead of loading from the |
2110 // root array to force relocation to be able to later patch with | 2110 // root array to force relocation to be able to later patch with |
2111 // the cached map. | 2111 // the cached map. |
2112 __ mov(ip, Operand(factory()->the_hole_value())); | 2112 Handle<JSGlobalPropertyCell> cell = |
| 2113 factory()->NewJSGlobalPropertyCell(factory()->the_hole_value()); |
| 2114 __ mov(ip, Operand(Handle<Object>(cell))); |
| 2115 __ ldr(ip, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); |
2113 __ cmp(map, Operand(ip)); | 2116 __ cmp(map, Operand(ip)); |
2114 __ b(ne, &cache_miss); | 2117 __ b(ne, &cache_miss); |
2115 // We use Factory::the_hole_value() on purpose instead of loading from the | 2118 // We use Factory::the_hole_value() on purpose instead of loading from the |
2116 // root array to force relocation to be able to later patch | 2119 // root array to force relocation to be able to later patch |
2117 // with true or false. | 2120 // with true or false. |
2118 __ mov(result, Operand(factory()->the_hole_value())); | 2121 __ mov(result, Operand(factory()->the_hole_value())); |
2119 __ b(&done); | 2122 __ b(&done); |
2120 | 2123 |
2121 // The inlined call site cache did not match. Check null and string before | 2124 // The inlined call site cache did not match. Check null and string before |
2122 // calling the deferred code. | 2125 // calling the deferred code. |
(...skipping 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4699 ASSERT(osr_pc_offset_ == -1); | 4702 ASSERT(osr_pc_offset_ == -1); |
4700 osr_pc_offset_ = masm()->pc_offset(); | 4703 osr_pc_offset_ = masm()->pc_offset(); |
4701 } | 4704 } |
4702 | 4705 |
4703 | 4706 |
4704 | 4707 |
4705 | 4708 |
4706 #undef __ | 4709 #undef __ |
4707 | 4710 |
4708 } } // namespace v8::internal | 4711 } } // namespace v8::internal |
OLD | NEW |