OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_FACTORY_H_ | 5 #ifndef V8_FACTORY_H_ |
6 #define V8_FACTORY_H_ | 6 #define V8_FACTORY_H_ |
7 | 7 |
8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 Handle<Object> construct_trap, | 458 Handle<Object> construct_trap, |
459 Handle<Object> prototype); | 459 Handle<Object> prototype); |
460 | 460 |
461 // Reinitialize an JSGlobalProxy based on a constructor. The object | 461 // Reinitialize an JSGlobalProxy based on a constructor. The object |
462 // must have the same size as objects allocated using the | 462 // must have the same size as objects allocated using the |
463 // constructor. The object is reinitialized and behaves as an | 463 // constructor. The object is reinitialized and behaves as an |
464 // object that has been freshly allocated using the constructor. | 464 // object that has been freshly allocated using the constructor. |
465 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global, | 465 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global, |
466 Handle<JSFunction> constructor); | 466 Handle<JSFunction> constructor); |
467 | 467 |
| 468 Handle<JSGlobalProxy> NewUninitializedJSGlobalProxy(); |
| 469 |
468 // Change the type of the argument into a JS object/function and reinitialize. | 470 // Change the type of the argument into a JS object/function and reinitialize. |
469 void BecomeJSObject(Handle<JSProxy> object); | 471 void BecomeJSObject(Handle<JSProxy> object); |
470 void BecomeJSFunction(Handle<JSProxy> object); | 472 void BecomeJSFunction(Handle<JSProxy> object); |
471 | 473 |
472 Handle<JSFunction> NewFunction(Handle<String> name, | 474 Handle<JSFunction> NewFunction(Handle<String> name, |
473 Handle<Code> code, | 475 Handle<Code> code, |
474 Handle<Object> prototype, | 476 Handle<Object> prototype, |
475 bool read_only_prototype = false); | 477 bool read_only_prototype = false); |
476 Handle<JSFunction> NewFunction(Handle<String> name); | 478 Handle<JSFunction> NewFunction(Handle<String> name); |
477 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name, | 479 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name, |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 // Reinitialize a JSProxy into an (empty) JS object of respective type and | 724 // Reinitialize a JSProxy into an (empty) JS object of respective type and |
723 // size, but keeping the original prototype. The receiver must have at least | 725 // size, but keeping the original prototype. The receiver must have at least |
724 // the size of the new object. The object is reinitialized and behaves as an | 726 // the size of the new object. The object is reinitialized and behaves as an |
725 // object that has been freshly allocated. | 727 // object that has been freshly allocated. |
726 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 728 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
727 }; | 729 }; |
728 | 730 |
729 } } // namespace v8::internal | 731 } } // namespace v8::internal |
730 | 732 |
731 #endif // V8_FACTORY_H_ | 733 #endif // V8_FACTORY_H_ |
OLD | NEW |