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

Side by Side Diff: src/api.h

Issue 2703563002: [ESNext] Implement DynamicImportCall (Closed)
Patch Set: rebase 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 | « include/v8.h ('k') | src/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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_API_H_ 5 #ifndef V8_API_H_
6 #define V8_API_H_ 6 #define V8_API_H_
7 7
8 #include "include/v8-testing.h" 8 #include "include/v8-testing.h"
9 #include "src/contexts.h" 9 #include "src/contexts.h"
10 #include "src/debug/debug-interface.h" 10 #include "src/debug/debug-interface.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 V(Function, JSReceiver) \ 104 V(Function, JSReceiver) \
105 V(Message, JSMessageObject) \ 105 V(Message, JSMessageObject) \
106 V(Context, Context) \ 106 V(Context, Context) \
107 V(External, Object) \ 107 V(External, Object) \
108 V(StackTrace, JSArray) \ 108 V(StackTrace, JSArray) \
109 V(StackFrame, StackFrameInfo) \ 109 V(StackFrame, StackFrameInfo) \
110 V(Proxy, JSProxy) \ 110 V(Proxy, JSProxy) \
111 V(NativeWeakMap, JSWeakMap) \ 111 V(NativeWeakMap, JSWeakMap) \
112 V(debug::GeneratorObject, JSGeneratorObject) \ 112 V(debug::GeneratorObject, JSGeneratorObject) \
113 V(debug::Script, Script) \ 113 V(debug::Script, Script) \
114 V(Promise, JSPromise) 114 V(Promise, JSPromise) \
115 V(DynamicImportResult, JSPromise)
115 116
116 class Utils { 117 class Utils {
117 public: 118 public:
118 static inline bool ApiCheck(bool condition, 119 static inline bool ApiCheck(bool condition,
119 const char* location, 120 const char* location,
120 const char* message) { 121 const char* message) {
121 if (!condition) Utils::ReportApiFailure(location, message); 122 if (!condition) Utils::ReportApiFailure(location, message);
122 return condition; 123 return condition;
123 } 124 }
124 static void ReportOOMFailure(const char* location, bool is_heap_oom); 125 static void ReportOOMFailure(const char* location, bool is_heap_oom);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 static inline Local<Float64Array> ToLocalFloat64Array( 179 static inline Local<Float64Array> ToLocalFloat64Array(
179 v8::internal::Handle<v8::internal::JSTypedArray> obj); 180 v8::internal::Handle<v8::internal::JSTypedArray> obj);
180 181
181 static inline Local<SharedArrayBuffer> ToLocalShared( 182 static inline Local<SharedArrayBuffer> ToLocalShared(
182 v8::internal::Handle<v8::internal::JSArrayBuffer> obj); 183 v8::internal::Handle<v8::internal::JSArrayBuffer> obj);
183 184
184 static inline Local<Message> MessageToLocal( 185 static inline Local<Message> MessageToLocal(
185 v8::internal::Handle<v8::internal::Object> obj); 186 v8::internal::Handle<v8::internal::Object> obj);
186 static inline Local<Promise> PromiseToLocal( 187 static inline Local<Promise> PromiseToLocal(
187 v8::internal::Handle<v8::internal::JSObject> obj); 188 v8::internal::Handle<v8::internal::JSObject> obj);
189 static inline Local<DynamicImportResult> PromiseToDynamicImportResult(
190 v8::internal::Handle<v8::internal::JSPromise> obj);
188 static inline Local<StackTrace> StackTraceToLocal( 191 static inline Local<StackTrace> StackTraceToLocal(
189 v8::internal::Handle<v8::internal::JSArray> obj); 192 v8::internal::Handle<v8::internal::JSArray> obj);
190 static inline Local<StackFrame> StackFrameToLocal( 193 static inline Local<StackFrame> StackFrameToLocal(
191 v8::internal::Handle<v8::internal::StackFrameInfo> obj); 194 v8::internal::Handle<v8::internal::StackFrameInfo> obj);
192 static inline Local<Number> NumberToLocal( 195 static inline Local<Number> NumberToLocal(
193 v8::internal::Handle<v8::internal::Object> obj); 196 v8::internal::Handle<v8::internal::Object> obj);
194 static inline Local<Integer> IntegerToLocal( 197 static inline Local<Integer> IntegerToLocal(
195 v8::internal::Handle<v8::internal::Object> obj); 198 v8::internal::Handle<v8::internal::Object> obj);
196 static inline Local<Uint32> Uint32ToLocal( 199 static inline Local<Uint32> Uint32ToLocal(
197 v8::internal::Handle<v8::internal::Object> obj); 200 v8::internal::Handle<v8::internal::Object> obj);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 MAKE_TO_LOCAL(ToLocalShared, JSArrayBuffer, SharedArrayBuffer) 313 MAKE_TO_LOCAL(ToLocalShared, JSArrayBuffer, SharedArrayBuffer)
311 314
312 TYPED_ARRAYS(MAKE_TO_LOCAL_TYPED_ARRAY) 315 TYPED_ARRAYS(MAKE_TO_LOCAL_TYPED_ARRAY)
313 316
314 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate) 317 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate)
315 MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate) 318 MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate)
316 MAKE_TO_LOCAL(SignatureToLocal, FunctionTemplateInfo, Signature) 319 MAKE_TO_LOCAL(SignatureToLocal, FunctionTemplateInfo, Signature)
317 MAKE_TO_LOCAL(AccessorSignatureToLocal, FunctionTemplateInfo, AccessorSignature) 320 MAKE_TO_LOCAL(AccessorSignatureToLocal, FunctionTemplateInfo, AccessorSignature)
318 MAKE_TO_LOCAL(MessageToLocal, Object, Message) 321 MAKE_TO_LOCAL(MessageToLocal, Object, Message)
319 MAKE_TO_LOCAL(PromiseToLocal, JSObject, Promise) 322 MAKE_TO_LOCAL(PromiseToLocal, JSObject, Promise)
323 MAKE_TO_LOCAL(PromiseToDynamicImportResult, JSPromise, DynamicImportResult)
320 MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace) 324 MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace)
321 MAKE_TO_LOCAL(StackFrameToLocal, StackFrameInfo, StackFrame) 325 MAKE_TO_LOCAL(StackFrameToLocal, StackFrameInfo, StackFrame)
322 MAKE_TO_LOCAL(NumberToLocal, Object, Number) 326 MAKE_TO_LOCAL(NumberToLocal, Object, Number)
323 MAKE_TO_LOCAL(IntegerToLocal, Object, Integer) 327 MAKE_TO_LOCAL(IntegerToLocal, Object, Integer)
324 MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32) 328 MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32)
325 MAKE_TO_LOCAL(ExternalToLocal, JSObject, External) 329 MAKE_TO_LOCAL(ExternalToLocal, JSObject, External)
326 MAKE_TO_LOCAL(NativeWeakMapToLocal, JSWeakMap, NativeWeakMap) 330 MAKE_TO_LOCAL(NativeWeakMapToLocal, JSWeakMap, NativeWeakMap)
327 MAKE_TO_LOCAL(CallableToLocal, JSReceiver, Function) 331 MAKE_TO_LOCAL(CallableToLocal, JSReceiver, Function)
328 332
329 #undef MAKE_TO_LOCAL_TYPED_ARRAY 333 #undef MAKE_TO_LOCAL_TYPED_ARRAY
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 } 669 }
666 670
667 private: 671 private:
668 static v8::Testing::StressType stress_type_; 672 static v8::Testing::StressType stress_type_;
669 }; 673 };
670 674
671 } // namespace internal 675 } // namespace internal
672 } // namespace v8 676 } // namespace v8
673 677
674 #endif // V8_API_H_ 678 #endif // V8_API_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698