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

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: 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
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 6183 matching lines...) Expand 10 before | Expand all | Expand 10 after
6463 #undef WRITE_UINT32_FIELD 6466 #undef WRITE_UINT32_FIELD
6464 #undef READ_SHORT_FIELD 6467 #undef READ_SHORT_FIELD
6465 #undef WRITE_SHORT_FIELD 6468 #undef WRITE_SHORT_FIELD
6466 #undef READ_BYTE_FIELD 6469 #undef READ_BYTE_FIELD
6467 #undef WRITE_BYTE_FIELD 6470 #undef WRITE_BYTE_FIELD
6468 6471
6469 6472
6470 } } // namespace v8::internal 6473 } } // namespace v8::internal
6471 6474
6472 #endif // V8_OBJECTS_INL_H_ 6475 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698