Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 9158015: Change inlined cache of intanceof stub to use indirection through cell. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | test/cctest/test-heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698