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

Side by Side Diff: src/objects.h

Issue 13741010: Eagerly parse expected transitions in JSON. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Only commit after transitioning 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 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 PropertyAttributes attributes, 1761 PropertyAttributes attributes,
1762 StrictModeFlag strict_mode, 1762 StrictModeFlag strict_mode,
1763 ExtensibilityCheck extensibility_check); 1763 ExtensibilityCheck extensibility_check);
1764 1764
1765 static Handle<Object> SetLocalPropertyIgnoreAttributes( 1765 static Handle<Object> SetLocalPropertyIgnoreAttributes(
1766 Handle<JSObject> object, 1766 Handle<JSObject> object,
1767 Handle<Name> key, 1767 Handle<Name> key,
1768 Handle<Object> value, 1768 Handle<Object> value,
1769 PropertyAttributes attributes); 1769 PropertyAttributes attributes);
1770 1770
1771 static inline Handle<String> ExpectedTransitionKey(Handle<Map> map);
1772 static inline Handle<Map> ExpectedTransitionTarget(Handle<Map> map);
1773
1771 // Try to follow an existing transition to a field with attributes NONE. The 1774 // Try to follow an existing transition to a field with attributes NONE. The
1772 // return value indicates whether the transition was successful. 1775 // return value indicates whether the transition was successful.
1773 static inline bool TryTransitionToField(Handle<JSObject> object, 1776 static inline Handle<Map> FindTransitionToField(Handle<Map> map,
1774 Handle<Name> key); 1777 Handle<Name> key);
1775 1778
1776 inline int LastAddedFieldIndex(); 1779 inline int LastAddedFieldIndex();
1777 1780
1778 // Extend the receiver with a single fast property appeared first in the 1781 // Extend the receiver with a single fast property appeared first in the
1779 // passed map. This also extends the property backing store if necessary. 1782 // passed map. This also extends the property backing store if necessary.
1780 static void AddFastPropertyUsingMap(Handle<JSObject> object, Handle<Map> map); 1783 static void AddFastPropertyUsingMap(Handle<JSObject> object, Handle<Map> map);
1781 inline MUST_USE_RESULT MaybeObject* AddFastPropertyUsingMap(Map* map); 1784 inline MUST_USE_RESULT MaybeObject* AddFastPropertyUsingMap(Map* map);
1785 static void TransitionToMap(Handle<JSObject> object, Handle<Map> map);
1786 inline MUST_USE_RESULT MaybeObject* TransitionToMap(Map* map);
1782 1787
1783 // Can cause GC. 1788 // Can cause GC.
1784 MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributes( 1789 MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributes(
1785 Name* key, 1790 Name* key,
1786 Object* value, 1791 Object* value,
1787 PropertyAttributes attributes); 1792 PropertyAttributes attributes);
1788 1793
1789 // Retrieve a value in a normalized object given a lookup result. 1794 // Retrieve a value in a normalized object given a lookup result.
1790 // Handles the special representation of JS global objects. 1795 // Handles the special representation of JS global objects.
1791 Object* GetNormalizedProperty(LookupResult* result); 1796 Object* GetNormalizedProperty(LookupResult* result);
(...skipping 3443 matching lines...) Expand 10 before | Expand all | Expand 10 after
5235 Descriptor* descriptor); 5240 Descriptor* descriptor);
5236 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor, 5241 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor,
5237 TransitionFlag flag); 5242 TransitionFlag flag);
5238 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor, 5243 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor,
5239 TransitionFlag flag); 5244 TransitionFlag flag);
5240 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptor( 5245 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptor(
5241 DescriptorArray* descriptors, 5246 DescriptorArray* descriptors,
5242 Descriptor* descriptor, 5247 Descriptor* descriptor,
5243 int index, 5248 int index,
5244 TransitionFlag flag); 5249 TransitionFlag flag);
5250 MUST_USE_RESULT MaybeObject* AsElementsKind(ElementsKind kind);
5245 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind, 5251 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind,
5246 TransitionFlag flag); 5252 TransitionFlag flag);
5247 5253
5248 MUST_USE_RESULT MaybeObject* CopyNormalized(PropertyNormalizationMode mode, 5254 MUST_USE_RESULT MaybeObject* CopyNormalized(PropertyNormalizationMode mode,
5249 NormalizedMapSharingMode sharing); 5255 NormalizedMapSharingMode sharing);
5250 5256
5251 inline void AppendDescriptor(Descriptor* desc, 5257 inline void AppendDescriptor(Descriptor* desc,
5252 const DescriptorArray::WhitenessWitness&); 5258 const DescriptorArray::WhitenessWitness&);
5253 5259
5254 // Returns a copy of the map, with all transitions dropped from the 5260 // Returns a copy of the map, with all transitions dropped from the
(...skipping 4059 matching lines...) Expand 10 before | Expand all | Expand 10 after
9314 } else { 9320 } else {
9315 value &= ~(1 << bit_position); 9321 value &= ~(1 << bit_position);
9316 } 9322 }
9317 return value; 9323 return value;
9318 } 9324 }
9319 }; 9325 };
9320 9326
9321 } } // namespace v8::internal 9327 } } // namespace v8::internal
9322 9328
9323 #endif // V8_OBJECTS_H_ 9329 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698