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 <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 7123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7134 // until an initial map is needed. | 7134 // until an initial map is needed. |
7135 inline bool has_prototype(); | 7135 inline bool has_prototype(); |
7136 inline bool has_instance_prototype(); | 7136 inline bool has_instance_prototype(); |
7137 inline Object* prototype(); | 7137 inline Object* prototype(); |
7138 inline Object* instance_prototype(); | 7138 inline Object* instance_prototype(); |
7139 static void SetPrototype(Handle<JSFunction> function, | 7139 static void SetPrototype(Handle<JSFunction> function, |
7140 Handle<Object> value); | 7140 Handle<Object> value); |
7141 static void SetInstancePrototype(Handle<JSFunction> function, | 7141 static void SetInstancePrototype(Handle<JSFunction> function, |
7142 Handle<Object> value); | 7142 Handle<Object> value); |
7143 | 7143 |
7144 // Creates a new closure for the fucntion with the same bindings, | |
7145 // bound values, and prototype. An equivalent of spec operations | |
7146 // ``CloneMethod`` and ``CloneBoundFunction``. | |
7147 static Handle<JSFunction> CloneClosure(Handle<JSFunction> function); | |
7148 | |
7149 // After prototype is removed, it will not be created when accessed, and | 7144 // After prototype is removed, it will not be created when accessed, and |
7150 // [[Construct]] from this function will not be allowed. | 7145 // [[Construct]] from this function will not be allowed. |
7151 bool RemovePrototype(); | 7146 bool RemovePrototype(); |
7152 | 7147 |
7153 // Accessor for this function's initial map's [[class]] | 7148 // Accessor for this function's initial map's [[class]] |
7154 // property. This is primarily used by ECMA native functions. This | 7149 // property. This is primarily used by ECMA native functions. This |
7155 // method sets the class_name field of this function's initial map | 7150 // method sets the class_name field of this function's initial map |
7156 // to a given value. It creates an initial map if this function does | 7151 // to a given value. It creates an initial map if this function does |
7157 // not have one. Note that this method does not copy the initial map | 7152 // not have one. Note that this method does not copy the initial map |
7158 // if it has one already, but simply replaces it with the new value. | 7153 // if it has one already, but simply replaces it with the new value. |
(...skipping 3418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10577 | 10572 |
10578 Isolate* isolate_; | 10573 Isolate* isolate_; |
10579 Handle<FixedArray> keys_; | 10574 Handle<FixedArray> keys_; |
10580 Handle<OrderedHashSet> set_; | 10575 Handle<OrderedHashSet> set_; |
10581 int length_; | 10576 int length_; |
10582 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); | 10577 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); |
10583 }; | 10578 }; |
10584 } } // namespace v8::internal | 10579 } } // namespace v8::internal |
10585 | 10580 |
10586 #endif // V8_OBJECTS_H_ | 10581 #endif // V8_OBJECTS_H_ |
OLD | NEW |