Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: src/factory.h

Issue 253603003: Pass in the prototype to CreateApiFunction rather than setting it on the result. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 MaybeHandle<Object>()); 445 MaybeHandle<Object>());
446 446
447 Handle<JSFunction> NewFunctionWithPrototype(Handle<String> name, 447 Handle<JSFunction> NewFunctionWithPrototype(Handle<String> name,
448 Handle<Object> prototype); 448 Handle<Object> prototype);
449 449
450 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( 450 Handle<JSFunction> NewFunctionFromSharedFunctionInfo(
451 Handle<SharedFunctionInfo> function_info, 451 Handle<SharedFunctionInfo> function_info,
452 Handle<Context> context, 452 Handle<Context> context,
453 PretenureFlag pretenure = TENURED); 453 PretenureFlag pretenure = TENURED);
454 454
455 Handle<JSFunction> NewFunction(MaybeHandle<Object> maybe_prototype,
456 Handle<String> name,
457 InstanceType type,
458 int instance_size,
459 Handle<Code> code,
460 bool force_initial_map);
455 Handle<JSFunction> NewFunction(Handle<String> name, 461 Handle<JSFunction> NewFunction(Handle<String> name,
456 InstanceType type, 462 InstanceType type,
457 int instance_size, 463 int instance_size,
458 Handle<Code> code, 464 Handle<Code> code,
459 bool force_initial_map); 465 bool force_initial_map);
460 466
461 Handle<JSFunction> NewFunctionWithPrototype(Handle<String> name, 467 Handle<JSFunction> NewFunctionWithPrototype(Handle<String> name,
462 InstanceType type, 468 InstanceType type,
463 int instance_size, 469 int instance_size,
464 Handle<JSObject> prototype, 470 Handle<JSObject> prototype,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 538 }
533 539
534 enum ApiInstanceType { 540 enum ApiInstanceType {
535 JavaScriptObject, 541 JavaScriptObject,
536 InnerGlobalObject, 542 InnerGlobalObject,
537 OuterGlobalObject 543 OuterGlobalObject
538 }; 544 };
539 545
540 Handle<JSFunction> CreateApiFunction( 546 Handle<JSFunction> CreateApiFunction(
541 Handle<FunctionTemplateInfo> data, 547 Handle<FunctionTemplateInfo> data,
548 Handle<Object> prototype,
542 ApiInstanceType type = JavaScriptObject); 549 ApiInstanceType type = JavaScriptObject);
543 550
544 Handle<JSFunction> InstallMembers(Handle<JSFunction> function); 551 Handle<JSFunction> InstallMembers(Handle<JSFunction> function);
545 552
546 // Installs interceptors on the instance. 'desc' is a function template, 553 // Installs interceptors on the instance. 'desc' is a function template,
547 // and instance is an object instance created by the function of this 554 // and instance is an object instance created by the function of this
548 // function template. 555 // function template.
549 MUST_USE_RESULT MaybeHandle<FunctionTemplateInfo> ConfigureInstance( 556 MUST_USE_RESULT MaybeHandle<FunctionTemplateInfo> ConfigureInstance(
550 Handle<FunctionTemplateInfo> desc, Handle<JSObject> instance); 557 Handle<FunctionTemplateInfo> desc, Handle<JSObject> instance);
551 558
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 // the string representation of the number. Otherwise return undefined. 678 // the string representation of the number. Otherwise return undefined.
672 Handle<Object> GetNumberStringCache(Handle<Object> number); 679 Handle<Object> GetNumberStringCache(Handle<Object> number);
673 680
674 // Update the cache with a new number-string pair. 681 // Update the cache with a new number-string pair.
675 void SetNumberStringCache(Handle<Object> number, Handle<String> string); 682 void SetNumberStringCache(Handle<Object> number, Handle<String> string);
676 }; 683 };
677 684
678 } } // namespace v8::internal 685 } } // namespace v8::internal
679 686
680 #endif // V8_FACTORY_H_ 687 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/factory.cc » ('j') | src/factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698