OLD | NEW |
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 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1847 | 1847 |
1848 MUST_USE_RESULT MaybeObject* ReplaceSlowProperty( | 1848 MUST_USE_RESULT MaybeObject* ReplaceSlowProperty( |
1849 String* name, | 1849 String* name, |
1850 Object* value, | 1850 Object* value, |
1851 PropertyAttributes attributes); | 1851 PropertyAttributes attributes); |
1852 | 1852 |
1853 // Returns a new map with all transitions dropped from the object's current | 1853 // Returns a new map with all transitions dropped from the object's current |
1854 // map and the ElementsKind set. | 1854 // map and the ElementsKind set. |
1855 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object, | 1855 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object, |
1856 ElementsKind to_kind); | 1856 ElementsKind to_kind); |
1857 MUST_USE_RESULT MaybeObject* GetElementsTransitionMap( | 1857 inline MUST_USE_RESULT MaybeObject* GetElementsTransitionMap( |
| 1858 Isolate* isolate, |
| 1859 ElementsKind elements_kind); |
| 1860 MUST_USE_RESULT MaybeObject* GetElementsTransitionMapSlow( |
1858 ElementsKind elements_kind); | 1861 ElementsKind elements_kind); |
1859 | 1862 |
1860 static Handle<Object> TransitionElementsKind(Handle<JSObject> object, | 1863 static Handle<Object> TransitionElementsKind(Handle<JSObject> object, |
1861 ElementsKind to_kind); | 1864 ElementsKind to_kind); |
1862 | 1865 |
1863 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind); | 1866 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind); |
1864 | 1867 |
1865 // Converts a descriptor of any other type to a real field, | 1868 // Converts a descriptor of any other type to a real field, |
1866 // backed by the properties array. Descriptors of visible | 1869 // backed by the properties array. Descriptors of visible |
1867 // types, such as CONSTANT_FUNCTION, keep their enumeration order. | 1870 // types, such as CONSTANT_FUNCTION, keep their enumeration order. |
(...skipping 3693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5561 | 5564 |
5562 inline FixedArray* literals(); | 5565 inline FixedArray* literals(); |
5563 inline void set_literals(FixedArray* literals); | 5566 inline void set_literals(FixedArray* literals); |
5564 | 5567 |
5565 inline FixedArray* function_bindings(); | 5568 inline FixedArray* function_bindings(); |
5566 inline void set_function_bindings(FixedArray* bindings); | 5569 inline void set_function_bindings(FixedArray* bindings); |
5567 | 5570 |
5568 // The initial map for an object created by this constructor. | 5571 // The initial map for an object created by this constructor. |
5569 inline Map* initial_map(); | 5572 inline Map* initial_map(); |
5570 inline void set_initial_map(Map* value); | 5573 inline void set_initial_map(Map* value); |
| 5574 inline MaybeObject* set_initial_map_and_cache_transitions(Map* value); |
5571 inline bool has_initial_map(); | 5575 inline bool has_initial_map(); |
5572 | 5576 |
5573 // Get and set the prototype property on a JSFunction. If the | 5577 // Get and set the prototype property on a JSFunction. If the |
5574 // function has an initial map the prototype is set on the initial | 5578 // function has an initial map the prototype is set on the initial |
5575 // map. Otherwise, the prototype is put in the initial map field | 5579 // map. Otherwise, the prototype is put in the initial map field |
5576 // until an initial map is needed. | 5580 // until an initial map is needed. |
5577 inline bool has_prototype(); | 5581 inline bool has_prototype(); |
5578 inline bool has_instance_prototype(); | 5582 inline bool has_instance_prototype(); |
5579 inline Object* prototype(); | 5583 inline Object* prototype(); |
5580 inline Object* instance_prototype(); | 5584 inline Object* instance_prototype(); |
5581 Object* SetInstancePrototype(Object* value); | 5585 MaybeObject* SetInstancePrototype(Object* value); |
5582 MUST_USE_RESULT MaybeObject* SetPrototype(Object* value); | 5586 MUST_USE_RESULT MaybeObject* SetPrototype(Object* value); |
5583 | 5587 |
5584 // After prototype is removed, it will not be created when accessed, and | 5588 // After prototype is removed, it will not be created when accessed, and |
5585 // [[Construct]] from this function will not be allowed. | 5589 // [[Construct]] from this function will not be allowed. |
5586 Object* RemovePrototype(); | 5590 Object* RemovePrototype(); |
5587 inline bool should_have_prototype(); | 5591 inline bool should_have_prototype(); |
5588 | 5592 |
5589 // Accessor for this function's initial map's [[class]] | 5593 // Accessor for this function's initial map's [[class]] |
5590 // property. This is primarily used by ECMA native functions. This | 5594 // property. This is primarily used by ECMA native functions. This |
5591 // method sets the class_name field of this function's initial map | 5595 // method sets the class_name field of this function's initial map |
(...skipping 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8193 } else { | 8197 } else { |
8194 value &= ~(1 << bit_position); | 8198 value &= ~(1 << bit_position); |
8195 } | 8199 } |
8196 return value; | 8200 return value; |
8197 } | 8201 } |
8198 }; | 8202 }; |
8199 | 8203 |
8200 } } // namespace v8::internal | 8204 } } // namespace v8::internal |
8201 | 8205 |
8202 #endif // V8_OBJECTS_H_ | 8206 #endif // V8_OBJECTS_H_ |
OLD | NEW |