Chromium Code Reviews| 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 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2134 // This is the inlined call site instanceof cache. The two occurences of the | 2134 // This is the inlined call site instanceof cache. The two occurences of the |
| 2135 // hole value will be patched to the last map/result pair generated by the | 2135 // hole value will be patched to the last map/result pair generated by the |
| 2136 // instanceof stub. | 2136 // instanceof stub. |
| 2137 Label cache_miss; | 2137 Label cache_miss; |
| 2138 Register map = temp; | 2138 Register map = temp; |
| 2139 __ ldr(map, FieldMemOperand(object, HeapObject::kMapOffset)); | 2139 __ ldr(map, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 2140 __ bind(deferred->map_check()); // Label for calculating code patching. | 2140 __ bind(deferred->map_check()); // Label for calculating code patching. |
| 2141 // We use Factory::the_hole_value() on purpose instead of loading from the | 2141 // We use Factory::the_hole_value() on purpose instead of loading from the |
| 2142 // root array to force relocation to be able to later patch with | 2142 // root array to force relocation to be able to later patch with |
| 2143 // the cached map. | 2143 // the cached map. |
| 2144 __ mov(ip, Operand(factory()->the_hole_value())); | 2144 Handle<JSGlobalPropertyCell> cell = |
| 2145 isolate()->factory()->NewJSGlobalPropertyCell( | |
|
Michael Starzinger
2012/01/11 09:35:09
Can we use factory() instead of isolate()->factory
| |
| 2146 factory()->the_hole_value()); | |
| 2147 __ mov(ip, Operand(Handle<Object>(cell))); | |
| 2148 __ ldr(ip, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); | |
| 2145 __ cmp(map, Operand(ip)); | 2149 __ cmp(map, Operand(ip)); |
| 2146 __ b(ne, &cache_miss); | 2150 __ b(ne, &cache_miss); |
| 2147 // We use Factory::the_hole_value() on purpose instead of loading from the | 2151 // We use Factory::the_hole_value() on purpose instead of loading from the |
| 2148 // root array to force relocation to be able to later patch | 2152 // root array to force relocation to be able to later patch |
| 2149 // with true or false. | 2153 // with true or false. |
| 2150 __ mov(result, Operand(factory()->the_hole_value())); | 2154 __ mov(result, Operand(factory()->the_hole_value())); |
| 2151 __ b(&done); | 2155 __ b(&done); |
| 2152 | 2156 |
| 2153 // The inlined call site cache did not match. Check null and string before | 2157 // The inlined call site cache did not match. Check null and string before |
| 2154 // calling the deferred code. | 2158 // calling the deferred code. |
| (...skipping 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4732 ASSERT(osr_pc_offset_ == -1); | 4736 ASSERT(osr_pc_offset_ == -1); |
| 4733 osr_pc_offset_ = masm()->pc_offset(); | 4737 osr_pc_offset_ = masm()->pc_offset(); |
| 4734 } | 4738 } |
| 4735 | 4739 |
| 4736 | 4740 |
| 4737 | 4741 |
| 4738 | 4742 |
| 4739 #undef __ | 4743 #undef __ |
| 4740 | 4744 |
| 4741 } } // namespace v8::internal | 4745 } } // namespace v8::internal |
| OLD | NEW |