| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 // object that has been freshly allocated using the constructor. | 475 // object that has been freshly allocated using the constructor. |
| 476 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global, | 476 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global, |
| 477 Handle<JSFunction> constructor); | 477 Handle<JSFunction> constructor); |
| 478 | 478 |
| 479 Handle<JSGlobalProxy> NewUninitializedJSGlobalProxy(); | 479 Handle<JSGlobalProxy> NewUninitializedJSGlobalProxy(); |
| 480 | 480 |
| 481 // Change the type of the argument into a JS object/function and reinitialize. | 481 // Change the type of the argument into a JS object/function and reinitialize. |
| 482 void BecomeJSObject(Handle<JSProxy> object); | 482 void BecomeJSObject(Handle<JSProxy> object); |
| 483 void BecomeJSFunction(Handle<JSProxy> object); | 483 void BecomeJSFunction(Handle<JSProxy> object); |
| 484 | 484 |
| 485 Handle<JSFunction> NewFunction(Handle<String> name, | 485 Handle<JSFunction> NewFunction(Handle<String> name, Handle<Code> code, |
| 486 Handle<Code> code, | |
| 487 Handle<Object> prototype, | 486 Handle<Object> prototype, |
| 488 bool read_only_prototype = false); | 487 bool read_only_prototype = false, |
| 488 bool is_strict = false); |
| 489 Handle<JSFunction> NewFunction(Handle<String> name); | 489 Handle<JSFunction> NewFunction(Handle<String> name); |
| 490 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name, | 490 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name, |
| 491 Handle<Code> code); | 491 Handle<Code> code, |
| 492 bool is_strict = false); |
| 492 | 493 |
| 493 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( | 494 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( |
| 494 Handle<SharedFunctionInfo> function_info, | 495 Handle<SharedFunctionInfo> function_info, |
| 495 Handle<Context> context, | 496 Handle<Context> context, |
| 496 PretenureFlag pretenure = TENURED); | 497 PretenureFlag pretenure = TENURED); |
| 497 | 498 |
| 498 Handle<JSFunction> NewFunction(Handle<String> name, Handle<Code> code, | 499 Handle<JSFunction> NewFunction(Handle<String> name, Handle<Code> code, |
| 499 Handle<Object> prototype, InstanceType type, | 500 Handle<Object> prototype, InstanceType type, |
| 500 int instance_size, | 501 int instance_size, |
| 501 bool read_only_prototype = false, | 502 bool read_only_prototype = false, |
| 502 bool install_constructor = false); | 503 bool install_constructor = false, |
| 504 bool is_strict = false); |
| 503 Handle<JSFunction> NewFunction(Handle<String> name, | 505 Handle<JSFunction> NewFunction(Handle<String> name, |
| 504 Handle<Code> code, | 506 Handle<Code> code, |
| 505 InstanceType type, | 507 InstanceType type, |
| 506 int instance_size); | 508 int instance_size); |
| 507 | 509 |
| 508 // Create a serialized scope info. | 510 // Create a serialized scope info. |
| 509 Handle<ScopeInfo> NewScopeInfo(int length); | 511 Handle<ScopeInfo> NewScopeInfo(int length); |
| 510 | 512 |
| 511 // Create an External object for V8's external API. | 513 // Create an External object for V8's external API. |
| 512 Handle<JSObject> NewExternal(void* value); | 514 Handle<JSObject> NewExternal(void* value); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 // Reinitialize a JSProxy into an (empty) JS object of respective type and | 718 // Reinitialize a JSProxy into an (empty) JS object of respective type and |
| 717 // size, but keeping the original prototype. The receiver must have at least | 719 // size, but keeping the original prototype. The receiver must have at least |
| 718 // the size of the new object. The object is reinitialized and behaves as an | 720 // the size of the new object. The object is reinitialized and behaves as an |
| 719 // object that has been freshly allocated. | 721 // object that has been freshly allocated. |
| 720 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); | 722 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size); |
| 721 }; | 723 }; |
| 722 | 724 |
| 723 } } // namespace v8::internal | 725 } } // namespace v8::internal |
| 724 | 726 |
| 725 #endif // V8_FACTORY_H_ | 727 #endif // V8_FACTORY_H_ |
| OLD | NEW |