OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
(...skipping 7714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7725 // until an initial map is needed. | 7725 // until an initial map is needed. |
7726 inline bool has_prototype(); | 7726 inline bool has_prototype(); |
7727 inline bool has_instance_prototype(); | 7727 inline bool has_instance_prototype(); |
7728 inline Object* prototype(); | 7728 inline Object* prototype(); |
7729 inline Object* instance_prototype(); | 7729 inline Object* instance_prototype(); |
7730 static void SetPrototype(Handle<JSFunction> function, | 7730 static void SetPrototype(Handle<JSFunction> function, |
7731 Handle<Object> value); | 7731 Handle<Object> value); |
7732 static void SetInstancePrototype(Handle<JSFunction> function, | 7732 static void SetInstancePrototype(Handle<JSFunction> function, |
7733 Handle<Object> value); | 7733 Handle<Object> value); |
7734 | 7734 |
| 7735 static Handle<JSFunction> Copy(Handle<JSFunction> function); |
| 7736 |
7735 // After prototype is removed, it will not be created when accessed, and | 7737 // After prototype is removed, it will not be created when accessed, and |
7736 // [[Construct]] from this function will not be allowed. | 7738 // [[Construct]] from this function will not be allowed. |
7737 bool RemovePrototype(); | 7739 bool RemovePrototype(); |
7738 inline bool should_have_prototype(); | 7740 inline bool should_have_prototype(); |
7739 | 7741 |
7740 // Accessor for this function's initial map's [[class]] | 7742 // Accessor for this function's initial map's [[class]] |
7741 // property. This is primarily used by ECMA native functions. This | 7743 // property. This is primarily used by ECMA native functions. This |
7742 // method sets the class_name field of this function's initial map | 7744 // method sets the class_name field of this function's initial map |
7743 // to a given value. It creates an initial map if this function does | 7745 // to a given value. It creates an initial map if this function does |
7744 // not have one. Note that this method does not copy the initial map | 7746 // not have one. Note that this method does not copy the initial map |
(...skipping 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11214 } else { | 11216 } else { |
11215 value &= ~(1 << bit_position); | 11217 value &= ~(1 << bit_position); |
11216 } | 11218 } |
11217 return value; | 11219 return value; |
11218 } | 11220 } |
11219 }; | 11221 }; |
11220 | 11222 |
11221 } } // namespace v8::internal | 11223 } } // namespace v8::internal |
11222 | 11224 |
11223 #endif // V8_OBJECTS_H_ | 11225 #endif // V8_OBJECTS_H_ |
OLD | NEW |