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

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

Issue 16409: Inline array loads in loops directly in the code instead of always... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 __ TryGetFunctionPrototype(receiver, scratch1, scratch2, miss_label); 220 __ TryGetFunctionPrototype(receiver, scratch1, scratch2, miss_label);
221 __ mov(eax, Operand(scratch1)); 221 __ mov(eax, Operand(scratch1));
222 __ ret(0); 222 __ ret(0);
223 } 223 }
224 224
225 225
226 // Load a fast property out of a holder object (src). In-object properties 226 // Load a fast property out of a holder object (src). In-object properties
227 // are loaded directly otherwise the property is loaded from the properties 227 // are loaded directly otherwise the property is loaded from the properties
228 // fixed array. 228 // fixed array.
229 void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm, 229 void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm,
230 Register dst, Register src, 230 Register dst, Register src,
231 JSObject* holder, int index) { 231 JSObject* holder, int index) {
232 // Adjust for the number of properties stored in the holder. 232 // Adjust for the number of properties stored in the holder.
233 index -= holder->map()->inobject_properties(); 233 index -= holder->map()->inobject_properties();
234 if (index < 0) { 234 if (index < 0) {
235 // Get the property straight out of the holder. 235 // Get the property straight out of the holder.
236 int offset = holder->map()->instance_size() + (index * kPointerSize); 236 int offset = holder->map()->instance_size() + (index * kPointerSize);
237 __ mov(dst, FieldOperand(src, offset)); 237 __ mov(dst, FieldOperand(src, offset));
238 } else { 238 } else {
239 // Calculate the offset into the properties array. 239 // Calculate the offset into the properties array.
240 int offset = index * kPointerSize + Array::kHeaderSize; 240 int offset = index * kPointerSize + Array::kHeaderSize;
241 __ mov(dst, FieldOperand(src, JSObject::kPropertiesOffset)); 241 __ mov(dst, FieldOperand(src, JSObject::kPropertiesOffset));
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 1199 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1200 1200
1201 // Return the generated code. 1201 // Return the generated code.
1202 return GetCode(CALLBACKS); 1202 return GetCode(CALLBACKS);
1203 } 1203 }
1204 1204
1205 1205
1206 #undef __ 1206 #undef __
1207 1207
1208 } } // namespace v8::internal 1208 } } // namespace v8::internal
OLDNEW
« src/d8.cc ('K') | « src/ic-ia32.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698