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

Side by Side Diff: src/objects.h

Issue 12385014: Hydrogen stubs for array constructors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years, 8 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
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 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 inline bool HasExternalShortElements(); 1714 inline bool HasExternalShortElements();
1715 inline bool HasExternalUnsignedShortElements(); 1715 inline bool HasExternalUnsignedShortElements();
1716 inline bool HasExternalIntElements(); 1716 inline bool HasExternalIntElements();
1717 inline bool HasExternalUnsignedIntElements(); 1717 inline bool HasExternalUnsignedIntElements();
1718 inline bool HasExternalFloatElements(); 1718 inline bool HasExternalFloatElements();
1719 inline bool HasExternalDoubleElements(); 1719 inline bool HasExternalDoubleElements();
1720 bool HasFastArgumentsElements(); 1720 bool HasFastArgumentsElements();
1721 bool HasDictionaryArgumentsElements(); 1721 bool HasDictionaryArgumentsElements();
1722 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. 1722 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements.
1723 1723
1724 inline bool ShouldTrackAllocationInfo();
1725
1724 inline void set_map_and_elements( 1726 inline void set_map_and_elements(
1725 Map* map, 1727 Map* map,
1726 FixedArrayBase* value, 1728 FixedArrayBase* value,
1727 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 1729 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
1728 1730
1729 // Requires: HasFastElements(). 1731 // Requires: HasFastElements().
1730 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements(); 1732 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements();
1731 1733
1732 // Collects elements starting at index 0. 1734 // Collects elements starting at index 0.
1733 // Undefined values are placed after non-undefined values. 1735 // Undefined values are placed after non-undefined values.
(...skipping 5504 matching lines...) Expand 10 before | Expand all | Expand 10 after
7238 public: 7240 public:
7239 DECL_ACCESSORS(payload, Object) 7241 DECL_ACCESSORS(payload, Object)
7240 7242
7241 static inline AllocationSiteInfo* cast(Object* obj); 7243 static inline AllocationSiteInfo* cast(Object* obj);
7242 7244
7243 DECLARE_PRINTER(AllocationSiteInfo) 7245 DECLARE_PRINTER(AllocationSiteInfo)
7244 DECLARE_VERIFIER(AllocationSiteInfo) 7246 DECLARE_VERIFIER(AllocationSiteInfo)
7245 7247
7246 // Returns NULL if no AllocationSiteInfo is available for object. 7248 // Returns NULL if no AllocationSiteInfo is available for object.
7247 static AllocationSiteInfo* FindForJSObject(JSObject* object); 7249 static AllocationSiteInfo* FindForJSObject(JSObject* object);
7248 7250 static inline AllocationSiteMode GetMode(
7249 static AllocationSiteMode GetMode(ElementsKind boilerplate_elements_kind); 7251 ElementsKind boilerplate_elements_kind);
7250 static AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); 7252 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to);
7251 7253
7252 static const int kPayloadOffset = HeapObject::kHeaderSize; 7254 static const int kPayloadOffset = HeapObject::kHeaderSize;
7253 static const int kSize = kPayloadOffset + kPointerSize; 7255 static const int kSize = kPayloadOffset + kPointerSize;
7254 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; 7256 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024;
7255 7257
7256 bool GetElementsKindPayload(ElementsKind* kind); 7258 bool GetElementsKindPayload(ElementsKind* kind);
7257 private: 7259 private:
7258 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo); 7260 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo);
7259 }; 7261 };
7260 7262
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
8692 8694
8693 private: 8695 private:
8694 // Expand the fixed array backing of a fast-case JSArray to at least 8696 // Expand the fixed array backing of a fast-case JSArray to at least
8695 // the requested size. 8697 // the requested size.
8696 void Expand(int minimum_size_of_backing_fixed_array); 8698 void Expand(int minimum_size_of_backing_fixed_array);
8697 8699
8698 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray); 8700 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray);
8699 }; 8701 };
8700 8702
8701 8703
8704 MUST_USE_RESULT MaybeObject* CacheInitialJSArrayMaps(
8705 Context* native_context, Map* initial_map);
8706
8707
8702 // JSRegExpResult is just a JSArray with a specific initial map. 8708 // JSRegExpResult is just a JSArray with a specific initial map.
8703 // This initial map adds in-object properties for "index" and "input" 8709 // This initial map adds in-object properties for "index" and "input"
8704 // properties, as assigned by RegExp.prototype.exec, which allows 8710 // properties, as assigned by RegExp.prototype.exec, which allows
8705 // faster creation of RegExp exec results. 8711 // faster creation of RegExp exec results.
8706 // This class just holds constants used when creating the result. 8712 // This class just holds constants used when creating the result.
8707 // After creation the result must be treated as a JSArray in all regards. 8713 // After creation the result must be treated as a JSArray in all regards.
8708 class JSRegExpResult: public JSArray { 8714 class JSRegExpResult: public JSArray {
8709 public: 8715 public:
8710 // Offsets of object fields. 8716 // Offsets of object fields.
8711 static const int kIndexOffset = JSArray::kSize; 8717 static const int kIndexOffset = JSArray::kSize;
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
9405 } else { 9411 } else {
9406 value &= ~(1 << bit_position); 9412 value &= ~(1 << bit_position);
9407 } 9413 }
9408 return value; 9414 return value;
9409 } 9415 }
9410 }; 9416 };
9411 9417
9412 } } // namespace v8::internal 9418 } } // namespace v8::internal
9413 9419
9414 #endif // V8_OBJECTS_H_ 9420 #endif // V8_OBJECTS_H_
OLDNEW
« src/flag-definitions.h ('K') | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698