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 "isolate.h" | 8 #include "isolate.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 // object that has been freshly allocated using the constructor. | 446 // object that has been freshly allocated using the constructor. |
447 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global, | 447 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global, |
448 Handle<JSFunction> constructor); | 448 Handle<JSFunction> constructor); |
449 | 449 |
450 // Change the type of the argument into a JS object/function and reinitialize. | 450 // Change the type of the argument into a JS object/function and reinitialize. |
451 void BecomeJSObject(Handle<JSReceiver> object); | 451 void BecomeJSObject(Handle<JSReceiver> object); |
452 void BecomeJSFunction(Handle<JSReceiver> object); | 452 void BecomeJSFunction(Handle<JSReceiver> object); |
453 | 453 |
454 Handle<JSFunction> NewFunction(Handle<String> name, | 454 Handle<JSFunction> NewFunction(Handle<String> name, |
455 Handle<Code> code, | 455 Handle<Code> code, |
456 Handle<Object> prototype); | 456 Handle<Object> prototype, |
| 457 bool read_only_prototype = false); |
457 Handle<JSFunction> NewFunction(Handle<String> name); | 458 Handle<JSFunction> NewFunction(Handle<String> name); |
458 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name, | 459 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name, |
459 Handle<Code> code); | 460 Handle<Code> code); |
460 | 461 |
461 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( | 462 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( |
462 Handle<SharedFunctionInfo> function_info, | 463 Handle<SharedFunctionInfo> function_info, |
463 Handle<Context> context, | 464 Handle<Context> context, |
464 PretenureFlag pretenure = TENURED); | 465 PretenureFlag pretenure = TENURED); |
465 | 466 |
466 Handle<JSFunction> NewFunction(Handle<String> name, | 467 Handle<JSFunction> NewFunction(Handle<String> name, |
467 Handle<Code> code, | 468 Handle<Code> code, |
468 Handle<Object> prototype, | 469 Handle<Object> prototype, |
469 InstanceType type, | 470 InstanceType type, |
470 int instance_size); | 471 int instance_size, |
| 472 bool read_only_prototype = false); |
471 Handle<JSFunction> NewFunction(Handle<String> name, | 473 Handle<JSFunction> NewFunction(Handle<String> name, |
472 Handle<Code> code, | 474 Handle<Code> code, |
473 InstanceType type, | 475 InstanceType type, |
474 int instance_size); | 476 int instance_size); |
475 | 477 |
476 // Create a serialized scope info. | 478 // Create a serialized scope info. |
477 Handle<ScopeInfo> NewScopeInfo(int length); | 479 Handle<ScopeInfo> NewScopeInfo(int length); |
478 | 480 |
479 // Create an External object for V8's external API. | 481 // Create an External object for V8's external API. |
480 Handle<JSObject> NewExternal(void* value); | 482 Handle<JSObject> NewExternal(void* value); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 PretenureFlag pretenure = TENURED); | 693 PretenureFlag pretenure = TENURED); |
692 | 694 |
693 Handle<JSFunction> NewFunction(Handle<Map> map, | 695 Handle<JSFunction> NewFunction(Handle<Map> map, |
694 Handle<String> name, | 696 Handle<String> name, |
695 MaybeHandle<Code> maybe_code); | 697 MaybeHandle<Code> maybe_code); |
696 }; | 698 }; |
697 | 699 |
698 } } // namespace v8::internal | 700 } } // namespace v8::internal |
699 | 701 |
700 #endif // V8_FACTORY_H_ | 702 #endif // V8_FACTORY_H_ |
OLD | NEW |