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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 Vector< Handle<Object> > args); | 552 Vector< Handle<Object> > args); |
553 | 553 |
554 Handle<String> NumberToString(Handle<Object> number, | 554 Handle<String> NumberToString(Handle<Object> number, |
555 bool check_number_string_cache = true); | 555 bool check_number_string_cache = true); |
556 | 556 |
557 Handle<String> Uint32ToString(uint32_t value) { | 557 Handle<String> Uint32ToString(uint32_t value) { |
558 return NumberToString(NewNumberFromUint(value)); | 558 return NumberToString(NewNumberFromUint(value)); |
559 } | 559 } |
560 | 560 |
561 enum ApiInstanceType { | 561 enum ApiInstanceType { |
562 JavaScriptObject, | 562 JavaScriptObjectType, |
563 InnerGlobalObject, | 563 GlobalObjectType, |
564 OuterGlobalObject | 564 GlobalProxyType |
565 }; | 565 }; |
566 | 566 |
567 Handle<JSFunction> CreateApiFunction( | 567 Handle<JSFunction> CreateApiFunction( |
568 Handle<FunctionTemplateInfo> data, | 568 Handle<FunctionTemplateInfo> data, |
569 Handle<Object> prototype, | 569 Handle<Object> prototype, |
570 ApiInstanceType type = JavaScriptObject); | 570 ApiInstanceType type = JavaScriptObjectType); |
571 | 571 |
572 Handle<JSFunction> InstallMembers(Handle<JSFunction> function); | 572 Handle<JSFunction> InstallMembers(Handle<JSFunction> function); |
573 | 573 |
574 // Installs interceptors on the instance. 'desc' is a function template, | 574 // Installs interceptors on the instance. 'desc' is a function template, |
575 // and instance is an object instance created by the function of this | 575 // and instance is an object instance created by the function of this |
576 // function template. | 576 // function template. |
577 MUST_USE_RESULT MaybeHandle<FunctionTemplateInfo> ConfigureInstance( | 577 MUST_USE_RESULT MaybeHandle<FunctionTemplateInfo> ConfigureInstance( |
578 Handle<FunctionTemplateInfo> desc, Handle<JSObject> instance); | 578 Handle<FunctionTemplateInfo> desc, Handle<JSObject> instance); |
579 | 579 |
580 #define ROOT_ACCESSOR(type, name, camel_name) \ | 580 #define ROOT_ACCESSOR(type, name, camel_name) \ |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 PretenureFlag pretenure = TENURED); | 710 PretenureFlag pretenure = TENURED); |
711 | 711 |
712 Handle<JSFunction> NewFunction(Handle<Map> map, | 712 Handle<JSFunction> NewFunction(Handle<Map> map, |
713 Handle<String> name, | 713 Handle<String> name, |
714 MaybeHandle<Code> maybe_code); | 714 MaybeHandle<Code> maybe_code); |
715 }; | 715 }; |
716 | 716 |
717 } } // namespace v8::internal | 717 } } // namespace v8::internal |
718 | 718 |
719 #endif // V8_FACTORY_H_ | 719 #endif // V8_FACTORY_H_ |
OLD | NEW |