| OLD | NEW |
| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 V(String, String) \ | 99 V(String, String) \ |
| 100 V(Symbol, Symbol) \ | 100 V(Symbol, Symbol) \ |
| 101 V(Script, JSFunction) \ | 101 V(Script, JSFunction) \ |
| 102 V(UnboundScript, SharedFunctionInfo) \ | 102 V(UnboundScript, SharedFunctionInfo) \ |
| 103 V(Module, Module) \ | 103 V(Module, Module) \ |
| 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, JSObject) \ | 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 | 115 |
| 116 class Utils { | 116 class Utils { |
| 117 public: | 117 public: |
| 118 static inline bool ApiCheck(bool condition, | 118 static inline bool ApiCheck(bool condition, |
| 119 const char* location, | 119 const char* location, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 static inline Local<SharedArrayBuffer> ToLocalShared( | 181 static inline Local<SharedArrayBuffer> ToLocalShared( |
| 182 v8::internal::Handle<v8::internal::JSArrayBuffer> obj); | 182 v8::internal::Handle<v8::internal::JSArrayBuffer> obj); |
| 183 | 183 |
| 184 static inline Local<Message> MessageToLocal( | 184 static inline Local<Message> MessageToLocal( |
| 185 v8::internal::Handle<v8::internal::Object> obj); | 185 v8::internal::Handle<v8::internal::Object> obj); |
| 186 static inline Local<Promise> PromiseToLocal( | 186 static inline Local<Promise> PromiseToLocal( |
| 187 v8::internal::Handle<v8::internal::JSObject> obj); | 187 v8::internal::Handle<v8::internal::JSObject> obj); |
| 188 static inline Local<StackTrace> StackTraceToLocal( | 188 static inline Local<StackTrace> StackTraceToLocal( |
| 189 v8::internal::Handle<v8::internal::JSArray> obj); | 189 v8::internal::Handle<v8::internal::JSArray> obj); |
| 190 static inline Local<StackFrame> StackFrameToLocal( | 190 static inline Local<StackFrame> StackFrameToLocal( |
| 191 v8::internal::Handle<v8::internal::JSObject> obj); | 191 v8::internal::Handle<v8::internal::StackFrameInfo> obj); |
| 192 static inline Local<Number> NumberToLocal( | 192 static inline Local<Number> NumberToLocal( |
| 193 v8::internal::Handle<v8::internal::Object> obj); | 193 v8::internal::Handle<v8::internal::Object> obj); |
| 194 static inline Local<Integer> IntegerToLocal( | 194 static inline Local<Integer> IntegerToLocal( |
| 195 v8::internal::Handle<v8::internal::Object> obj); | 195 v8::internal::Handle<v8::internal::Object> obj); |
| 196 static inline Local<Uint32> Uint32ToLocal( | 196 static inline Local<Uint32> Uint32ToLocal( |
| 197 v8::internal::Handle<v8::internal::Object> obj); | 197 v8::internal::Handle<v8::internal::Object> obj); |
| 198 static inline Local<FunctionTemplate> ToLocal( | 198 static inline Local<FunctionTemplate> ToLocal( |
| 199 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj); | 199 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj); |
| 200 static inline Local<ObjectTemplate> ToLocal( | 200 static inline Local<ObjectTemplate> ToLocal( |
| 201 v8::internal::Handle<v8::internal::ObjectTemplateInfo> obj); | 201 v8::internal::Handle<v8::internal::ObjectTemplateInfo> obj); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 311 |
| 312 TYPED_ARRAYS(MAKE_TO_LOCAL_TYPED_ARRAY) | 312 TYPED_ARRAYS(MAKE_TO_LOCAL_TYPED_ARRAY) |
| 313 | 313 |
| 314 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate) | 314 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate) |
| 315 MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate) | 315 MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate) |
| 316 MAKE_TO_LOCAL(SignatureToLocal, FunctionTemplateInfo, Signature) | 316 MAKE_TO_LOCAL(SignatureToLocal, FunctionTemplateInfo, Signature) |
| 317 MAKE_TO_LOCAL(AccessorSignatureToLocal, FunctionTemplateInfo, AccessorSignature) | 317 MAKE_TO_LOCAL(AccessorSignatureToLocal, FunctionTemplateInfo, AccessorSignature) |
| 318 MAKE_TO_LOCAL(MessageToLocal, Object, Message) | 318 MAKE_TO_LOCAL(MessageToLocal, Object, Message) |
| 319 MAKE_TO_LOCAL(PromiseToLocal, JSObject, Promise) | 319 MAKE_TO_LOCAL(PromiseToLocal, JSObject, Promise) |
| 320 MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace) | 320 MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace) |
| 321 MAKE_TO_LOCAL(StackFrameToLocal, JSObject, StackFrame) | 321 MAKE_TO_LOCAL(StackFrameToLocal, StackFrameInfo, StackFrame) |
| 322 MAKE_TO_LOCAL(NumberToLocal, Object, Number) | 322 MAKE_TO_LOCAL(NumberToLocal, Object, Number) |
| 323 MAKE_TO_LOCAL(IntegerToLocal, Object, Integer) | 323 MAKE_TO_LOCAL(IntegerToLocal, Object, Integer) |
| 324 MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32) | 324 MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32) |
| 325 MAKE_TO_LOCAL(ExternalToLocal, JSObject, External) | 325 MAKE_TO_LOCAL(ExternalToLocal, JSObject, External) |
| 326 MAKE_TO_LOCAL(NativeWeakMapToLocal, JSWeakMap, NativeWeakMap) | 326 MAKE_TO_LOCAL(NativeWeakMapToLocal, JSWeakMap, NativeWeakMap) |
| 327 MAKE_TO_LOCAL(CallableToLocal, JSReceiver, Function) | 327 MAKE_TO_LOCAL(CallableToLocal, JSReceiver, Function) |
| 328 | 328 |
| 329 #undef MAKE_TO_LOCAL_TYPED_ARRAY | 329 #undef MAKE_TO_LOCAL_TYPED_ARRAY |
| 330 #undef MAKE_TO_LOCAL | 330 #undef MAKE_TO_LOCAL |
| 331 | 331 |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 } | 664 } |
| 665 | 665 |
| 666 private: | 666 private: |
| 667 static v8::Testing::StressType stress_type_; | 667 static v8::Testing::StressType stress_type_; |
| 668 }; | 668 }; |
| 669 | 669 |
| 670 } // namespace internal | 670 } // namespace internal |
| 671 } // namespace v8 | 671 } // namespace v8 |
| 672 | 672 |
| 673 #endif // V8_API_H_ | 673 #endif // V8_API_H_ |
| OLD | NEW |