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

Side by Side Diff: src/arm/ic-arm.cc

Issue 400523007: Cache IC handlers on the prototype's map if possible (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 6 years, 5 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
« no previous file with comments | « no previous file | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/arm/assembler-arm.h" 9 #include "src/arm/assembler-arm.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 270
271 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 271 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
272 // The return address is in lr. 272 // The return address is in lr.
273 Register receiver = ReceiverRegister(); 273 Register receiver = ReceiverRegister();
274 Register name = NameRegister(); 274 Register name = NameRegister();
275 ASSERT(receiver.is(r1)); 275 ASSERT(receiver.is(r1));
276 ASSERT(name.is(r2)); 276 ASSERT(name.is(r2));
277 277
278 // Probe the stub cache. 278 // Probe the stub cache.
279 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); 279 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
280 Code::ComputeHandlerFlags(Code::LOAD_IC));
280 masm->isolate()->stub_cache()->GenerateProbe( 281 masm->isolate()->stub_cache()->GenerateProbe(
281 masm, flags, receiver, name, r3, r4, r5, r6); 282 masm, flags, receiver, name, r3, r4, r5, r6);
282 283
283 // Cache miss: Jump to runtime. 284 // Cache miss: Jump to runtime.
284 GenerateMiss(masm); 285 GenerateMiss(masm);
285 } 286 }
286 287
287 288
288 void LoadIC::GenerateNormal(MacroAssembler* masm) { 289 void LoadIC::GenerateNormal(MacroAssembler* masm) {
289 Register dictionary = r0; 290 Register dictionary = r0;
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 1080
1080 1081
1081 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 1082 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
1082 Register receiver = ReceiverRegister(); 1083 Register receiver = ReceiverRegister();
1083 Register name = NameRegister(); 1084 Register name = NameRegister();
1084 ASSERT(receiver.is(r1)); 1085 ASSERT(receiver.is(r1));
1085 ASSERT(name.is(r2)); 1086 ASSERT(name.is(r2));
1086 ASSERT(ValueRegister().is(r0)); 1087 ASSERT(ValueRegister().is(r0));
1087 1088
1088 // Get the receiver from the stack and probe the stub cache. 1089 // Get the receiver from the stack and probe the stub cache.
1089 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); 1090 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
1091 Code::ComputeHandlerFlags(Code::STORE_IC));
1090 1092
1091 masm->isolate()->stub_cache()->GenerateProbe( 1093 masm->isolate()->stub_cache()->GenerateProbe(
1092 masm, flags, receiver, name, r3, r4, r5, r6); 1094 masm, flags, receiver, name, r3, r4, r5, r6);
1093 1095
1094 // Cache miss: Jump to runtime. 1096 // Cache miss: Jump to runtime.
1095 GenerateMiss(masm); 1097 GenerateMiss(masm);
1096 } 1098 }
1097 1099
1098 1100
1099 void StoreIC::GenerateMiss(MacroAssembler* masm) { 1101 void StoreIC::GenerateMiss(MacroAssembler* masm) {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 } else { 1237 } else {
1236 ASSERT(Assembler::GetCondition(branch_instr) == ne); 1238 ASSERT(Assembler::GetCondition(branch_instr) == ne);
1237 patcher.EmitCondition(eq); 1239 patcher.EmitCondition(eq);
1238 } 1240 }
1239 } 1241 }
1240 1242
1241 1243
1242 } } // namespace v8::internal 1244 } } // namespace v8::internal
1243 1245
1244 #endif // V8_TARGET_ARCH_ARM 1246 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698