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

Side by Side Diff: src/builtins/builtins.h

Issue 2203353002: [api] Stay in C++ when constructing an API-function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: set the receiver to the_hole for construct calls Created 4 years, 4 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
« no previous file with comments | « no previous file | src/builtins/builtins-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_BUILTINS_BUILTINS_H_ 5 #ifndef V8_BUILTINS_BUILTINS_H_
6 #define V8_BUILTINS_BUILTINS_H_ 6 #define V8_BUILTINS_BUILTINS_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 10
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 589
590 Address builtin_address(Name name) { 590 Address builtin_address(Name name) {
591 return reinterpret_cast<Address>(&builtins_[name]); 591 return reinterpret_cast<Address>(&builtins_[name]);
592 } 592 }
593 593
594 const char* name(int index); 594 const char* name(int index);
595 595
596 bool is_initialized() const { return initialized_; } 596 bool is_initialized() const { return initialized_; }
597 597
598 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction( 598 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction(
599 Isolate* isolate, Handle<HeapObject> function, Handle<Object> receiver, 599 Isolate* isolate, bool is_construct, Handle<HeapObject> function,
600 int argc, Handle<Object> args[]); 600 Handle<Object> receiver, int argc, Handle<Object> args[],
601 Handle<HeapObject> new_target);
601 602
602 enum ExitFrameType { EXIT, BUILTIN_EXIT }; 603 enum ExitFrameType { EXIT, BUILTIN_EXIT };
603 604
604 static void Generate_Adaptor(MacroAssembler* masm, Address builtin_address, 605 static void Generate_Adaptor(MacroAssembler* masm, Address builtin_address,
605 ExitFrameType exit_frame_type); 606 ExitFrameType exit_frame_type);
606 607
607 static bool AllowDynamicFunction(Isolate* isolate, Handle<JSFunction> target, 608 static bool AllowDynamicFunction(Isolate* isolate, Handle<JSFunction> target,
608 Handle<JSObject> target_global_proxy); 609 Handle<JSObject> target_global_proxy);
609 610
610 private: 611 private:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 650
650 friend class Isolate; 651 friend class Isolate;
651 652
652 DISALLOW_COPY_AND_ASSIGN(Builtins); 653 DISALLOW_COPY_AND_ASSIGN(Builtins);
653 }; 654 };
654 655
655 } // namespace internal 656 } // namespace internal
656 } // namespace v8 657 } // namespace v8
657 658
658 #endif // V8_BUILTINS_BUILTINS_H_ 659 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698