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

Side by Side Diff: src/objects-inl.h

Issue 108413003: HStoreNamedField for Smis optimized for x64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Even cleaner implementation Created 7 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
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/x64/lithium-codegen-x64.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 // 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 261
262 bool Object::HasValidElements() { 262 bool Object::HasValidElements() {
263 // Dictionary is covered under FixedArray. 263 // Dictionary is covered under FixedArray.
264 return IsFixedArray() || IsFixedDoubleArray() || IsExternalArray(); 264 return IsFixedArray() || IsFixedDoubleArray() || IsExternalArray();
265 } 265 }
266 266
267 267
268 MaybeObject* Object::AllocateNewStorageFor(Heap* heap, 268 MaybeObject* Object::AllocateNewStorageFor(Heap* heap,
269 Representation representation) { 269 Representation representation) {
270 if (FLAG_track_fields && representation.IsSmi() && IsUninitialized()) {
271 return Smi::FromInt(0);
272 }
270 if (!FLAG_track_double_fields) return this; 273 if (!FLAG_track_double_fields) return this;
271 if (!representation.IsDouble()) return this; 274 if (!representation.IsDouble()) return this;
272 if (IsUninitialized()) { 275 if (IsUninitialized()) {
273 return heap->AllocateHeapNumber(0); 276 return heap->AllocateHeapNumber(0);
274 } 277 }
275 return heap->AllocateHeapNumber(Number()); 278 return heap->AllocateHeapNumber(Number());
276 } 279 }
277 280
278 281
279 StringShape::StringShape(String* str) 282 StringShape::StringShape(String* str)
(...skipping 6191 matching lines...) Expand 10 before | Expand all | Expand 10 after
6471 #undef WRITE_UINT32_FIELD 6474 #undef WRITE_UINT32_FIELD
6472 #undef READ_SHORT_FIELD 6475 #undef READ_SHORT_FIELD
6473 #undef WRITE_SHORT_FIELD 6476 #undef WRITE_SHORT_FIELD
6474 #undef READ_BYTE_FIELD 6477 #undef READ_BYTE_FIELD
6475 #undef WRITE_BYTE_FIELD 6478 #undef WRITE_BYTE_FIELD
6476 6479
6477 6480
6478 } } // namespace v8::internal 6481 } } // namespace v8::internal
6479 6482
6480 #endif // V8_OBJECTS_INL_H_ 6483 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698