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

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

Issue 2840493002: [snapshot] full setup delegate should also be able to deserialize. (Closed)
Patch Set: fix comment Created 3 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
« no previous file with comments | « no previous file | src/setup-isolate.h » ('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/builtins/builtins-definitions.h" 9 #include "src/builtins/builtins-definitions.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Returns the C++ entry point for builtins implemented in C++, and the null 83 // Returns the C++ entry point for builtins implemented in C++, and the null
84 // Address otherwise. 84 // Address otherwise.
85 static Address CppEntryOf(int index); 85 static Address CppEntryOf(int index);
86 86
87 static bool IsCpp(int index); 87 static bool IsCpp(int index);
88 static bool IsApi(int index); 88 static bool IsApi(int index);
89 static bool HasCppImplementation(int index); 89 static bool HasCppImplementation(int index);
90 90
91 bool is_initialized() const { return initialized_; } 91 bool is_initialized() const { return initialized_; }
92 92
93 // Used by SetupIsolateDelegate and Deserializer.
94 void MarkInitialized() {
95 DCHECK(!initialized_);
96 initialized_ = true;
97 }
98
93 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction( 99 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction(
94 Isolate* isolate, bool is_construct, Handle<HeapObject> function, 100 Isolate* isolate, bool is_construct, Handle<HeapObject> function,
95 Handle<Object> receiver, int argc, Handle<Object> args[], 101 Handle<Object> receiver, int argc, Handle<Object> args[],
96 Handle<HeapObject> new_target); 102 Handle<HeapObject> new_target);
97 103
98 enum ExitFrameType { EXIT, BUILTIN_EXIT }; 104 enum ExitFrameType { EXIT, BUILTIN_EXIT };
99 105
100 static void Generate_Adaptor(MacroAssembler* masm, Address builtin_address, 106 static void Generate_Adaptor(MacroAssembler* masm, Address builtin_address,
101 ExitFrameType exit_frame_type); 107 ExitFrameType exit_frame_type);
102 108
103 static bool AllowDynamicFunction(Isolate* isolate, Handle<JSFunction> target, 109 static bool AllowDynamicFunction(Isolate* isolate, Handle<JSFunction> target,
104 Handle<JSObject> target_global_proxy); 110 Handle<JSObject> target_global_proxy);
105 111
106 private: 112 private:
107 Builtins(); 113 Builtins();
108 // Used by SetupIsolateDelegate.
109 void MarkInitialized() {
110 DCHECK(!initialized_);
111 initialized_ = true;
112 }
113 114
114 static void Generate_CallFunction(MacroAssembler* masm, 115 static void Generate_CallFunction(MacroAssembler* masm,
115 ConvertReceiverMode mode, 116 ConvertReceiverMode mode,
116 TailCallMode tail_call_mode); 117 TailCallMode tail_call_mode);
117 118
118 static void Generate_CallBoundFunctionImpl(MacroAssembler* masm, 119 static void Generate_CallBoundFunctionImpl(MacroAssembler* masm,
119 TailCallMode tail_call_mode); 120 TailCallMode tail_call_mode);
120 121
121 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, 122 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode,
122 TailCallMode tail_call_mode); 123 TailCallMode tail_call_mode);
(...skipping 27 matching lines...) Expand all
150 friend class Isolate; 151 friend class Isolate;
151 friend class SetupIsolateDelegate; 152 friend class SetupIsolateDelegate;
152 153
153 DISALLOW_COPY_AND_ASSIGN(Builtins); 154 DISALLOW_COPY_AND_ASSIGN(Builtins);
154 }; 155 };
155 156
156 } // namespace internal 157 } // namespace internal
157 } // namespace v8 158 } // namespace v8
158 159
159 #endif // V8_BUILTINS_BUILTINS_H_ 160 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW
« no previous file with comments | « no previous file | src/setup-isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698