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

Side by Side Diff: src/property.h

Issue 14850006: Use mutable heapnumbers to store doubles in fields. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ported to ARM and x64 Created 7 years, 7 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 | « src/parser.cc ('k') | src/runtime.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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 return JSProxy::cast(holder_); 261 return JSProxy::cast(holder_);
262 } 262 }
263 263
264 PropertyType type() { 264 PropertyType type() {
265 ASSERT(IsFound()); 265 ASSERT(IsFound());
266 return details_.type(); 266 return details_.type();
267 } 267 }
268 268
269 Representation representation() { 269 Representation representation() {
270 ASSERT(IsFound()); 270 ASSERT(IsFound());
271 ASSERT(!IsTransition());
272 ASSERT(details_.type() != NONEXISTENT);
271 return details_.representation(); 273 return details_.representation();
272 } 274 }
273 275
274 PropertyAttributes GetAttributes() { 276 PropertyAttributes GetAttributes() {
275 ASSERT(!IsTransition()); 277 ASSERT(!IsTransition());
276 ASSERT(IsFound()); 278 ASSERT(IsFound());
277 ASSERT(details_.type() != NONEXISTENT); 279 ASSERT(details_.type() != NONEXISTENT);
278 return details_.attributes(); 280 return details_.attributes();
279 } 281 }
280 282
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 UNREACHABLE(); 350 UNREACHABLE();
349 return false; 351 return false;
350 } 352 }
351 353
352 bool IsCacheable() { return cacheable_; } 354 bool IsCacheable() { return cacheable_; }
353 void DisallowCaching() { cacheable_ = false; } 355 void DisallowCaching() { cacheable_ = false; }
354 356
355 Object* GetLazyValue() { 357 Object* GetLazyValue() {
356 switch (type()) { 358 switch (type()) {
357 case FIELD: 359 case FIELD:
358 return holder()->FastPropertyAt(GetFieldIndex().field_index()); 360 return holder()->RawFastPropertyAt(GetFieldIndex().field_index());
359 case NORMAL: { 361 case NORMAL: {
360 Object* value; 362 Object* value;
361 value = holder()->property_dictionary()->ValueAt(GetDictionaryEntry()); 363 value = holder()->property_dictionary()->ValueAt(GetDictionaryEntry());
362 if (holder()->IsGlobalObject()) { 364 if (holder()->IsGlobalObject()) {
363 value = JSGlobalPropertyCell::cast(value)->value(); 365 value = JSGlobalPropertyCell::cast(value)->value();
364 } 366 }
365 return value; 367 return value;
366 } 368 }
367 case CONSTANT_FUNCTION: 369 case CONSTANT_FUNCTION:
368 return GetConstantFunction(); 370 return GetConstantFunction();
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 JSReceiver* holder_; 494 JSReceiver* holder_;
493 int number_; 495 int number_;
494 bool cacheable_; 496 bool cacheable_;
495 PropertyDetails details_; 497 PropertyDetails details_;
496 }; 498 };
497 499
498 500
499 } } // namespace v8::internal 501 } } // namespace v8::internal
500 502
501 #endif // V8_PROPERTY_H_ 503 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698