| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 static void UnregisterAll(); | 62 static void UnregisterAll(); |
| 63 Extension* extension() { return extension_; } | 63 Extension* extension() { return extension_; } |
| 64 RegisteredExtension* next() { return next_; } | 64 RegisteredExtension* next() { return next_; } |
| 65 static RegisteredExtension* first_extension() { return first_extension_; } | 65 static RegisteredExtension* first_extension() { return first_extension_; } |
| 66 private: | 66 private: |
| 67 Extension* extension_; | 67 Extension* extension_; |
| 68 RegisteredExtension* next_; | 68 RegisteredExtension* next_; |
| 69 static RegisteredExtension* first_extension_; | 69 static RegisteredExtension* first_extension_; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 #define OPEN_HANDLE_LIST(V) \ | 72 #define OPEN_HANDLE_LIST(V) \ |
| 73 V(Template, TemplateInfo) \ | 73 V(Template, TemplateInfo) \ |
| 74 V(FunctionTemplate, FunctionTemplateInfo) \ | 74 V(FunctionTemplate, FunctionTemplateInfo) \ |
| 75 V(ObjectTemplate, ObjectTemplateInfo) \ | 75 V(ObjectTemplate, ObjectTemplateInfo) \ |
| 76 V(Signature, FunctionTemplateInfo) \ | 76 V(Signature, FunctionTemplateInfo) \ |
| 77 V(AccessorSignature, FunctionTemplateInfo) \ | 77 V(AccessorSignature, FunctionTemplateInfo) \ |
| 78 V(Data, Object) \ | 78 V(Data, Object) \ |
| 79 V(RegExp, JSRegExp) \ | 79 V(RegExp, JSRegExp) \ |
| 80 V(Object, JSReceiver) \ | 80 V(Object, JSReceiver) \ |
| 81 V(Array, JSArray) \ | 81 V(Array, JSArray) \ |
| 82 V(Map, JSMap) \ | 82 V(Map, JSMap) \ |
| 83 V(Set, JSSet) \ | 83 V(Set, JSSet) \ |
| 84 V(ArrayBuffer, JSArrayBuffer) \ | 84 V(ArrayBuffer, JSArrayBuffer) \ |
| 85 V(ArrayBufferView, JSArrayBufferView) \ | 85 V(ArrayBufferView, JSArrayBufferView) \ |
| 86 V(TypedArray, JSTypedArray) \ | 86 V(TypedArray, JSTypedArray) \ |
| 87 V(Uint8Array, JSTypedArray) \ | 87 V(Uint8Array, JSTypedArray) \ |
| 88 V(Uint8ClampedArray, JSTypedArray) \ | 88 V(Uint8ClampedArray, JSTypedArray) \ |
| 89 V(Int8Array, JSTypedArray) \ | 89 V(Int8Array, JSTypedArray) \ |
| 90 V(Uint16Array, JSTypedArray) \ | 90 V(Uint16Array, JSTypedArray) \ |
| 91 V(Int16Array, JSTypedArray) \ | 91 V(Int16Array, JSTypedArray) \ |
| 92 V(Uint32Array, JSTypedArray) \ | 92 V(Uint32Array, JSTypedArray) \ |
| 93 V(Int32Array, JSTypedArray) \ | 93 V(Int32Array, JSTypedArray) \ |
| 94 V(Float32Array, JSTypedArray) \ | 94 V(Float32Array, JSTypedArray) \ |
| 95 V(Float64Array, JSTypedArray) \ | 95 V(Float64Array, JSTypedArray) \ |
| 96 V(DataView, JSDataView) \ | 96 V(DataView, JSDataView) \ |
| 97 V(SharedArrayBuffer, JSArrayBuffer) \ | 97 V(SharedArrayBuffer, JSArrayBuffer) \ |
| 98 V(Name, Name) \ | 98 V(Name, Name) \ |
| 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, JSObject) \ |
| 110 V(Proxy, JSProxy) \ | 110 V(Proxy, JSProxy) \ |
| 111 V(NativeWeakMap, JSWeakMap) \ | 111 V(NativeWeakMap, JSWeakMap) \ |
| 112 V(debug::GeneratorObject, JSGeneratorObject) \ |
| 112 V(debug::Script, Script) | 113 V(debug::Script, Script) |
| 113 | 114 |
| 114 class Utils { | 115 class Utils { |
| 115 public: | 116 public: |
| 116 static inline bool ApiCheck(bool condition, | 117 static inline bool ApiCheck(bool condition, |
| 117 const char* location, | 118 const char* location, |
| 118 const char* message) { | 119 const char* message) { |
| 119 if (!condition) Utils::ReportApiFailure(location, message); | 120 if (!condition) Utils::ReportApiFailure(location, message); |
| 120 return condition; | 121 return condition; |
| 121 } | 122 } |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 } | 664 } |
| 664 | 665 |
| 665 private: | 666 private: |
| 666 static v8::Testing::StressType stress_type_; | 667 static v8::Testing::StressType stress_type_; |
| 667 }; | 668 }; |
| 668 | 669 |
| 669 } // namespace internal | 670 } // namespace internal |
| 670 } // namespace v8 | 671 } // namespace v8 |
| 671 | 672 |
| 672 #endif // V8_API_H_ | 673 #endif // V8_API_H_ |
| OLD | NEW |