| 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 7280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7291 | 7291 |
| 7292 inline BindingsArray* function_bindings(); | 7292 inline BindingsArray* function_bindings(); |
| 7293 inline void set_function_bindings(BindingsArray* bindings); | 7293 inline void set_function_bindings(BindingsArray* bindings); |
| 7294 | 7294 |
| 7295 // The initial map for an object created by this constructor. | 7295 // The initial map for an object created by this constructor. |
| 7296 inline Map* initial_map(); | 7296 inline Map* initial_map(); |
| 7297 static void SetInitialMap(Handle<JSFunction> function, Handle<Map> map, | 7297 static void SetInitialMap(Handle<JSFunction> function, Handle<Map> map, |
| 7298 Handle<Object> prototype); | 7298 Handle<Object> prototype); |
| 7299 inline bool has_initial_map(); | 7299 inline bool has_initial_map(); |
| 7300 static void EnsureHasInitialMap(Handle<JSFunction> function); | 7300 static void EnsureHasInitialMap(Handle<JSFunction> function); |
| 7301 // Ensures that the |new_target| has correct initial map and | 7301 |
| 7302 // returns it. If the |new_target| is not a subclass constructor | 7302 // Creates a map that matches the constructor's initial map, but with |
| 7303 // its initial map is left unmodified. | 7303 // [[prototype]] being new.target.prototype. Because new.target can be a |
| 7304 static Handle<Map> EnsureDerivedHasInitialMap(Handle<JSFunction> new_target, | 7304 // JSProxy, this can call back into JavaScript. |
| 7305 Handle<JSFunction> constructor); | 7305 static MUST_USE_RESULT MaybeHandle<Map> GetDerivedMap( |
| 7306 Isolate* isolate, Handle<JSFunction> constructor, |
| 7307 Handle<JSReceiver> new_target); |
| 7306 | 7308 |
| 7307 // Get and set the prototype property on a JSFunction. If the | 7309 // Get and set the prototype property on a JSFunction. If the |
| 7308 // function has an initial map the prototype is set on the initial | 7310 // function has an initial map the prototype is set on the initial |
| 7309 // map. Otherwise, the prototype is put in the initial map field | 7311 // map. Otherwise, the prototype is put in the initial map field |
| 7310 // until an initial map is needed. | 7312 // until an initial map is needed. |
| 7311 inline bool has_prototype(); | 7313 inline bool has_prototype(); |
| 7312 inline bool has_instance_prototype(); | 7314 inline bool has_instance_prototype(); |
| 7313 inline Object* prototype(); | 7315 inline Object* prototype(); |
| 7314 inline Object* instance_prototype(); | 7316 inline Object* instance_prototype(); |
| 7315 static void SetPrototype(Handle<JSFunction> function, | 7317 static void SetPrototype(Handle<JSFunction> function, |
| (...skipping 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10721 } | 10723 } |
| 10722 return value; | 10724 return value; |
| 10723 } | 10725 } |
| 10724 }; | 10726 }; |
| 10725 | 10727 |
| 10726 | 10728 |
| 10727 } // NOLINT, false-positive due to second-order macros. | 10729 } // NOLINT, false-positive due to second-order macros. |
| 10728 } // NOLINT, false-positive due to second-order macros. | 10730 } // NOLINT, false-positive due to second-order macros. |
| 10729 | 10731 |
| 10730 #endif // V8_OBJECTS_H_ | 10732 #endif // V8_OBJECTS_H_ |
| OLD | NEW |