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 6668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6679 inline bool has_initial_map(); | 6679 inline bool has_initial_map(); |
6680 | 6680 |
6681 // Get and set the prototype property on a JSFunction. If the | 6681 // Get and set the prototype property on a JSFunction. If the |
6682 // function has an initial map the prototype is set on the initial | 6682 // function has an initial map the prototype is set on the initial |
6683 // map. Otherwise, the prototype is put in the initial map field | 6683 // map. Otherwise, the prototype is put in the initial map field |
6684 // until an initial map is needed. | 6684 // until an initial map is needed. |
6685 inline bool has_prototype(); | 6685 inline bool has_prototype(); |
6686 inline bool has_instance_prototype(); | 6686 inline bool has_instance_prototype(); |
6687 inline Object* prototype(); | 6687 inline Object* prototype(); |
6688 inline Object* instance_prototype(); | 6688 inline Object* instance_prototype(); |
6689 MUST_USE_RESULT MaybeObject* SetInstancePrototype(Object* value); | 6689 static void SetPrototype(Handle<JSFunction> function, |
6690 MUST_USE_RESULT MaybeObject* SetPrototype(Object* value); | 6690 Handle<Object> value); |
| 6691 static void SetInstancePrototype(Handle<JSFunction> function, |
| 6692 Handle<Object> value); |
6691 | 6693 |
6692 // After prototype is removed, it will not be created when accessed, and | 6694 // After prototype is removed, it will not be created when accessed, and |
6693 // [[Construct]] from this function will not be allowed. | 6695 // [[Construct]] from this function will not be allowed. |
6694 void RemovePrototype(); | 6696 void RemovePrototype(); |
6695 inline bool should_have_prototype(); | 6697 inline bool should_have_prototype(); |
6696 | 6698 |
6697 // Accessor for this function's initial map's [[class]] | 6699 // Accessor for this function's initial map's [[class]] |
6698 // property. This is primarily used by ECMA native functions. This | 6700 // property. This is primarily used by ECMA native functions. This |
6699 // method sets the class_name field of this function's initial map | 6701 // method sets the class_name field of this function's initial map |
6700 // to a given value. It creates an initial map if this function does | 6702 // to a given value. It creates an initial map if this function does |
(...skipping 3125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9826 } else { | 9828 } else { |
9827 value &= ~(1 << bit_position); | 9829 value &= ~(1 << bit_position); |
9828 } | 9830 } |
9829 return value; | 9831 return value; |
9830 } | 9832 } |
9831 }; | 9833 }; |
9832 | 9834 |
9833 } } // namespace v8::internal | 9835 } } // namespace v8::internal |
9834 | 9836 |
9835 #endif // V8_OBJECTS_H_ | 9837 #endif // V8_OBJECTS_H_ |
OLD | NEW |