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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(); | 468 Handle<JSGlobalProxy> NewUninitializedJSGlobalProxy(); |
469 | 469 |
470 // 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. |
471 void BecomeJSObject(Handle<JSProxy> object); | 471 void BecomeJSObject(Handle<JSProxy> object); |
472 void BecomeJSFunction(Handle<JSProxy> object); | 472 void BecomeJSFunction(Handle<JSProxy> object); |
473 | 473 |
474 Handle<JSFunction> NewFunction(Handle<String> name, | 474 Handle<JSFunction> NewFunction(Handle<String> name, Handle<Code> code, |
475 Handle<Code> code, | |
476 Handle<Object> prototype, | 475 Handle<Object> prototype, |
477 bool read_only_prototype = false); | 476 bool read_only_prototype = false, |
| 477 bool use_empty_function_map = false); |
478 Handle<JSFunction> NewFunction(Handle<String> name); | 478 Handle<JSFunction> NewFunction(Handle<String> name); |
479 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name, | 479 Handle<JSFunction> NewFunctionWithoutPrototype( |
480 Handle<Code> code); | 480 Handle<String> name, Handle<Code> code, |
| 481 bool use_empty_function_map = false); |
481 | 482 |
482 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( | 483 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( |
483 Handle<SharedFunctionInfo> function_info, | 484 Handle<SharedFunctionInfo> function_info, |
484 Handle<Context> context, | 485 Handle<Context> context, |
485 PretenureFlag pretenure = TENURED); | 486 PretenureFlag pretenure = TENURED); |
486 | 487 |
487 Handle<JSFunction> NewFunction(Handle<String> name, Handle<Code> code, | 488 Handle<JSFunction> NewFunction(Handle<String> name, Handle<Code> code, |
488 Handle<Object> prototype, InstanceType type, | 489 Handle<Object> prototype, InstanceType type, |
489 int instance_size, | 490 int instance_size, |
490 bool read_only_prototype = false, | 491 bool read_only_prototype = false, |
491 bool install_constructor = false); | 492 bool install_constructor = false, |
| 493 bool use_empty_function_map = false); |
492 Handle<JSFunction> NewFunction(Handle<String> name, | 494 Handle<JSFunction> NewFunction(Handle<String> name, |
493 Handle<Code> code, | 495 Handle<Code> code, |
494 InstanceType type, | 496 InstanceType type, |
495 int instance_size); | 497 int instance_size); |
496 | 498 |
497 // Create a serialized scope info. | 499 // Create a serialized scope info. |
498 Handle<ScopeInfo> NewScopeInfo(int length); | 500 Handle<ScopeInfo> NewScopeInfo(int length); |
499 | 501 |
500 // Create an External object for V8's external API. | 502 // Create an External object for V8's external API. |
501 Handle<JSObject> NewExternal(void* value); | 503 Handle<JSObject> NewExternal(void* value); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 // Reinitialize a JSProxy into an (empty) JS object of respective type and | 707 // Reinitialize a JSProxy into an (empty) JS object of respective type and |
706 // size, but keeping the original prototype. The receiver must have at least | 708 // size, but keeping the original prototype. The receiver must have at least |
707 // the size of the new object. The object is reinitialized and behaves as an | 709 // the size of the new object. The object is reinitialized and behaves as an |
708 // object that has been freshly allocated. | 710 // object that has been freshly allocated. |
709 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 711 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
710 }; | 712 }; |
711 | 713 |
712 } } // namespace v8::internal | 714 } } // namespace v8::internal |
713 | 715 |
714 #endif // V8_FACTORY_H_ | 716 #endif // V8_FACTORY_H_ |
OLD | NEW |