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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 149798: Added inline caching for calls to a field to X64. Changed a use of Array::kH... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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/ia32/stub-cache-ia32.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 Register dst, Register src, 157 Register dst, Register src,
158 JSObject* holder, int index) { 158 JSObject* holder, int index) {
159 // Adjust for the number of properties stored in the holder. 159 // Adjust for the number of properties stored in the holder.
160 index -= holder->map()->inobject_properties(); 160 index -= holder->map()->inobject_properties();
161 if (index < 0) { 161 if (index < 0) {
162 // Get the property straight out of the holder. 162 // Get the property straight out of the holder.
163 int offset = holder->map()->instance_size() + (index * kPointerSize); 163 int offset = holder->map()->instance_size() + (index * kPointerSize);
164 __ ldr(dst, FieldMemOperand(src, offset)); 164 __ ldr(dst, FieldMemOperand(src, offset));
165 } else { 165 } else {
166 // Calculate the offset into the properties array. 166 // Calculate the offset into the properties array.
167 int offset = index * kPointerSize + Array::kHeaderSize; 167 int offset = index * kPointerSize + FixedArray::kHeaderSize;
168 __ ldr(dst, FieldMemOperand(src, JSObject::kPropertiesOffset)); 168 __ ldr(dst, FieldMemOperand(src, JSObject::kPropertiesOffset));
169 __ ldr(dst, FieldMemOperand(dst, offset)); 169 __ ldr(dst, FieldMemOperand(dst, offset));
170 } 170 }
171 } 171 }
172 172
173 173
174 void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm, 174 void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm,
175 Register receiver, 175 Register receiver,
176 Register scratch, 176 Register scratch,
177 Label* miss_label) { 177 Label* miss_label) {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // Skip updating write barrier if storing a smi. 323 // Skip updating write barrier if storing a smi.
324 __ tst(r0, Operand(kSmiTagMask)); 324 __ tst(r0, Operand(kSmiTagMask));
325 __ b(eq, &exit); 325 __ b(eq, &exit);
326 326
327 // Update the write barrier for the array address. 327 // Update the write barrier for the array address.
328 // Pass the value being stored in the now unused name_reg. 328 // Pass the value being stored in the now unused name_reg.
329 __ mov(name_reg, Operand(offset)); 329 __ mov(name_reg, Operand(offset));
330 __ RecordWrite(receiver_reg, name_reg, scratch); 330 __ RecordWrite(receiver_reg, name_reg, scratch);
331 } else { 331 } else {
332 // Write to the properties array. 332 // Write to the properties array.
333 int offset = index * kPointerSize + Array::kHeaderSize; 333 int offset = index * kPointerSize + FixedArray::kHeaderSize;
334 // Get the properties array 334 // Get the properties array
335 __ ldr(scratch, FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset)); 335 __ ldr(scratch, FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset));
336 __ str(r0, FieldMemOperand(scratch, offset)); 336 __ str(r0, FieldMemOperand(scratch, offset));
337 337
338 // Skip updating write barrier if storing a smi. 338 // Skip updating write barrier if storing a smi.
339 __ tst(r0, Operand(kSmiTagMask)); 339 __ tst(r0, Operand(kSmiTagMask));
340 __ b(eq, &exit); 340 __ b(eq, &exit);
341 341
342 // Update the write barrier for the array address. 342 // Update the write barrier for the array address.
343 // Ok to clobber receiver_reg and name_reg, since we return. 343 // Ok to clobber receiver_reg and name_reg, since we return.
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 __ Jump(ic, RelocInfo::CODE_TARGET); 1328 __ Jump(ic, RelocInfo::CODE_TARGET);
1329 1329
1330 // Return the generated code. 1330 // Return the generated code.
1331 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name); 1331 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name);
1332 } 1332 }
1333 1333
1334 1334
1335 #undef __ 1335 #undef __
1336 1336
1337 } } // namespace v8::internal 1337 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698