| 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/factory.h" | 10 #include "src/factory.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 static RegisteredExtension* first_extension_; | 135 static RegisteredExtension* first_extension_; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 | 138 |
| 139 #define OPEN_HANDLE_LIST(V) \ | 139 #define OPEN_HANDLE_LIST(V) \ |
| 140 V(Template, TemplateInfo) \ | 140 V(Template, TemplateInfo) \ |
| 141 V(FunctionTemplate, FunctionTemplateInfo) \ | 141 V(FunctionTemplate, FunctionTemplateInfo) \ |
| 142 V(ObjectTemplate, ObjectTemplateInfo) \ | 142 V(ObjectTemplate, ObjectTemplateInfo) \ |
| 143 V(Signature, FunctionTemplateInfo) \ | 143 V(Signature, FunctionTemplateInfo) \ |
| 144 V(AccessorSignature, FunctionTemplateInfo) \ | 144 V(AccessorSignature, FunctionTemplateInfo) \ |
| 145 V(TypeSwitch, TypeSwitchInfo) \ | |
| 146 V(Data, Object) \ | 145 V(Data, Object) \ |
| 147 V(RegExp, JSRegExp) \ | 146 V(RegExp, JSRegExp) \ |
| 148 V(Object, JSReceiver) \ | 147 V(Object, JSReceiver) \ |
| 149 V(Array, JSArray) \ | 148 V(Array, JSArray) \ |
| 150 V(Map, JSMap) \ | 149 V(Map, JSMap) \ |
| 151 V(Set, JSSet) \ | 150 V(Set, JSSet) \ |
| 152 V(ArrayBuffer, JSArrayBuffer) \ | 151 V(ArrayBuffer, JSArrayBuffer) \ |
| 153 V(ArrayBufferView, JSArrayBufferView) \ | 152 V(ArrayBufferView, JSArrayBufferView) \ |
| 154 V(TypedArray, JSTypedArray) \ | 153 V(TypedArray, JSTypedArray) \ |
| 155 V(Uint8Array, JSTypedArray) \ | 154 V(Uint8Array, JSTypedArray) \ |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 static inline Local<Uint32> Uint32ToLocal( | 257 static inline Local<Uint32> Uint32ToLocal( |
| 259 v8::internal::Handle<v8::internal::Object> obj); | 258 v8::internal::Handle<v8::internal::Object> obj); |
| 260 static inline Local<FunctionTemplate> ToLocal( | 259 static inline Local<FunctionTemplate> ToLocal( |
| 261 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj); | 260 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj); |
| 262 static inline Local<ObjectTemplate> ToLocal( | 261 static inline Local<ObjectTemplate> ToLocal( |
| 263 v8::internal::Handle<v8::internal::ObjectTemplateInfo> obj); | 262 v8::internal::Handle<v8::internal::ObjectTemplateInfo> obj); |
| 264 static inline Local<Signature> SignatureToLocal( | 263 static inline Local<Signature> SignatureToLocal( |
| 265 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj); | 264 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj); |
| 266 static inline Local<AccessorSignature> AccessorSignatureToLocal( | 265 static inline Local<AccessorSignature> AccessorSignatureToLocal( |
| 267 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj); | 266 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj); |
| 268 static inline Local<TypeSwitch> ToLocal( | |
| 269 v8::internal::Handle<v8::internal::TypeSwitchInfo> obj); | |
| 270 static inline Local<External> ExternalToLocal( | 267 static inline Local<External> ExternalToLocal( |
| 271 v8::internal::Handle<v8::internal::JSObject> obj); | 268 v8::internal::Handle<v8::internal::JSObject> obj); |
| 272 static inline Local<NativeWeakMap> NativeWeakMapToLocal( | 269 static inline Local<NativeWeakMap> NativeWeakMapToLocal( |
| 273 v8::internal::Handle<v8::internal::JSWeakMap> obj); | 270 v8::internal::Handle<v8::internal::JSWeakMap> obj); |
| 274 static inline Local<Function> CallableToLocal( | 271 static inline Local<Function> CallableToLocal( |
| 275 v8::internal::Handle<v8::internal::JSReceiver> obj); | 272 v8::internal::Handle<v8::internal::JSReceiver> obj); |
| 276 | 273 |
| 277 #define DECLARE_OPEN_HANDLE(From, To) \ | 274 #define DECLARE_OPEN_HANDLE(From, To) \ |
| 278 static inline v8::internal::Handle<v8::internal::To> \ | 275 static inline v8::internal::Handle<v8::internal::To> \ |
| 279 OpenHandle(const From* that, bool allow_empty_handle = false); | 276 OpenHandle(const From* that, bool allow_empty_handle = false); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 MAKE_TO_LOCAL(ToLocal, JSDataView, DataView) | 365 MAKE_TO_LOCAL(ToLocal, JSDataView, DataView) |
| 369 MAKE_TO_LOCAL(ToLocal, JSTypedArray, TypedArray) | 366 MAKE_TO_LOCAL(ToLocal, JSTypedArray, TypedArray) |
| 370 MAKE_TO_LOCAL(ToLocalShared, JSArrayBuffer, SharedArrayBuffer) | 367 MAKE_TO_LOCAL(ToLocalShared, JSArrayBuffer, SharedArrayBuffer) |
| 371 | 368 |
| 372 TYPED_ARRAYS(MAKE_TO_LOCAL_TYPED_ARRAY) | 369 TYPED_ARRAYS(MAKE_TO_LOCAL_TYPED_ARRAY) |
| 373 | 370 |
| 374 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate) | 371 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate) |
| 375 MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate) | 372 MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate) |
| 376 MAKE_TO_LOCAL(SignatureToLocal, FunctionTemplateInfo, Signature) | 373 MAKE_TO_LOCAL(SignatureToLocal, FunctionTemplateInfo, Signature) |
| 377 MAKE_TO_LOCAL(AccessorSignatureToLocal, FunctionTemplateInfo, AccessorSignature) | 374 MAKE_TO_LOCAL(AccessorSignatureToLocal, FunctionTemplateInfo, AccessorSignature) |
| 378 MAKE_TO_LOCAL(ToLocal, TypeSwitchInfo, TypeSwitch) | |
| 379 MAKE_TO_LOCAL(MessageToLocal, Object, Message) | 375 MAKE_TO_LOCAL(MessageToLocal, Object, Message) |
| 380 MAKE_TO_LOCAL(PromiseToLocal, JSObject, Promise) | 376 MAKE_TO_LOCAL(PromiseToLocal, JSObject, Promise) |
| 381 MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace) | 377 MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace) |
| 382 MAKE_TO_LOCAL(StackFrameToLocal, JSObject, StackFrame) | 378 MAKE_TO_LOCAL(StackFrameToLocal, JSObject, StackFrame) |
| 383 MAKE_TO_LOCAL(NumberToLocal, Object, Number) | 379 MAKE_TO_LOCAL(NumberToLocal, Object, Number) |
| 384 MAKE_TO_LOCAL(IntegerToLocal, Object, Integer) | 380 MAKE_TO_LOCAL(IntegerToLocal, Object, Integer) |
| 385 MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32) | 381 MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32) |
| 386 MAKE_TO_LOCAL(ExternalToLocal, JSObject, External) | 382 MAKE_TO_LOCAL(ExternalToLocal, JSObject, External) |
| 387 MAKE_TO_LOCAL(NativeWeakMapToLocal, JSWeakMap, NativeWeakMap) | 383 MAKE_TO_LOCAL(NativeWeakMapToLocal, JSWeakMap, NativeWeakMap) |
| 388 MAKE_TO_LOCAL(CallableToLocal, JSReceiver, Function) | 384 MAKE_TO_LOCAL(CallableToLocal, JSReceiver, Function) |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 } | 641 } |
| 646 | 642 |
| 647 private: | 643 private: |
| 648 static v8::Testing::StressType stress_type_; | 644 static v8::Testing::StressType stress_type_; |
| 649 }; | 645 }; |
| 650 | 646 |
| 651 } // namespace internal | 647 } // namespace internal |
| 652 } // namespace v8 | 648 } // namespace v8 |
| 653 | 649 |
| 654 #endif // V8_API_H_ | 650 #endif // V8_API_H_ |
| OLD | NEW |