@triniwiz/nativescript-masonkit 1.0.0-alpha.5 → 1.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/common.d.ts +7 -9
  2. package/common.js +277 -552
  3. package/common.js.map +1 -1
  4. package/helpers.d.ts +32 -10
  5. package/helpers.js +772 -286
  6. package/helpers.js.map +1 -1
  7. package/index.android.d.ts +6 -2
  8. package/index.android.js +21 -3
  9. package/index.android.js.map +1 -1
  10. package/index.d.ts +64 -7
  11. package/index.ios.d.ts +9 -6
  12. package/index.ios.js +39 -25
  13. package/index.ios.js.map +1 -1
  14. package/package.json +1 -1
  15. package/platforms/android/include.gradle +18 -1
  16. package/platforms/android/masonkit-release.aar +0 -0
  17. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +108 -64
  18. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +47 -20
  19. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
  20. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  21. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  22. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +7002 -1194
  23. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +58 -21
  24. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  25. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +58 -21
  26. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  27. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +216 -128
  28. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +47 -20
  29. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
  30. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  31. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  32. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  33. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +7002 -1194
  34. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +58 -21
  35. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  36. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +58 -21
  37. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +7002 -1194
  38. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +58 -21
  39. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  40. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +58 -21
  41. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +43 -43
  42. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  43. package/platforms/ios/build.xcconfig +1 -2
  44. package/platforms/ios/src/MasonV8Module.h +583 -0
  45. package/platforms/ios/src/MasonV8Module.mm +1005 -0
  46. package/platforms/ios/src/{include → cpp/include}/mason_native.h +47 -20
  47. package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
  48. package/platforms/ios/src/module.modulemap +2 -2
  49. package/platforms/new_native_src/cpp/Caches.cpp +36 -0
  50. package/platforms/new_native_src/cpp/Caches.h +42 -0
  51. package/platforms/new_native_src/cpp/Common.h +34 -0
  52. package/platforms/new_native_src/cpp/ConcurrentMap.h +57 -0
  53. package/platforms/new_native_src/cpp/Helpers.cpp +101 -0
  54. package/platforms/new_native_src/cpp/Helpers.h +364 -0
  55. package/platforms/new_native_src/cpp/MasonImpl.cpp +68 -0
  56. package/platforms/new_native_src/cpp/MasonImpl.h +40 -0
  57. package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +89 -0
  58. package/platforms/new_native_src/cpp/MasonNodeImpl.h +47 -0
  59. package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +2181 -0
  60. package/platforms/new_native_src/cpp/MasonStyleImpl.h +420 -0
  61. package/platforms/{ios/Mason.xcframework/ios-arm64/Mason.framework/PrivateHeaders → new_native_src/cpp/include}/mason_native.h +464 -168
  62. package/platforms/new_native_src/cpp/include/robin_hood.h +2544 -0
  63. package/pods/Headers/include/APIDesign.md +72 -0
  64. package/pods/Headers/include/DEPS +10 -0
  65. package/pods/Headers/include/DIR_METADATA +11 -0
  66. package/pods/Headers/include/OWNERS +23 -0
  67. package/pods/Headers/include/cppgc/DEPS +8 -0
  68. package/pods/Headers/include/cppgc/OWNERS +2 -0
  69. package/pods/Headers/include/cppgc/README.md +133 -0
  70. package/pods/Headers/include/cppgc/allocation.h +310 -0
  71. package/pods/Headers/include/cppgc/common.h +29 -0
  72. package/pods/Headers/include/cppgc/cross-thread-persistent.h +465 -0
  73. package/pods/Headers/include/cppgc/custom-space.h +97 -0
  74. package/pods/Headers/include/cppgc/default-platform.h +67 -0
  75. package/pods/Headers/include/cppgc/ephemeron-pair.h +30 -0
  76. package/pods/Headers/include/cppgc/explicit-management.h +100 -0
  77. package/pods/Headers/include/cppgc/garbage-collected.h +106 -0
  78. package/pods/Headers/include/cppgc/heap-consistency.h +266 -0
  79. package/pods/Headers/include/cppgc/heap-state.h +82 -0
  80. package/pods/Headers/include/cppgc/heap-statistics.h +120 -0
  81. package/pods/Headers/include/cppgc/heap.h +206 -0
  82. package/pods/Headers/include/cppgc/internal/api-constants.h +55 -0
  83. package/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +48 -0
  84. package/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +79 -0
  85. package/pods/Headers/include/cppgc/internal/compiler-specific.h +38 -0
  86. package/pods/Headers/include/cppgc/internal/finalizer-trait.h +93 -0
  87. package/pods/Headers/include/cppgc/internal/gc-info.h +156 -0
  88. package/pods/Headers/include/cppgc/internal/logging.h +50 -0
  89. package/pods/Headers/include/cppgc/internal/name-trait.h +122 -0
  90. package/pods/Headers/include/cppgc/internal/persistent-node.h +216 -0
  91. package/pods/Headers/include/cppgc/internal/pointer-policies.h +186 -0
  92. package/pods/Headers/include/cppgc/internal/write-barrier.h +435 -0
  93. package/pods/Headers/include/cppgc/liveness-broker.h +77 -0
  94. package/pods/Headers/include/cppgc/macros.h +26 -0
  95. package/pods/Headers/include/cppgc/member.h +291 -0
  96. package/pods/Headers/include/cppgc/name-provider.h +65 -0
  97. package/pods/Headers/include/cppgc/object-size-trait.h +58 -0
  98. package/pods/Headers/include/cppgc/persistent.h +370 -0
  99. package/pods/Headers/include/cppgc/platform.h +156 -0
  100. package/pods/Headers/include/cppgc/prefinalizer.h +75 -0
  101. package/pods/Headers/include/cppgc/process-heap-statistics.h +36 -0
  102. package/pods/Headers/include/cppgc/sentinel-pointer.h +32 -0
  103. package/pods/Headers/include/cppgc/source-location.h +92 -0
  104. package/pods/Headers/include/cppgc/testing.h +106 -0
  105. package/pods/Headers/include/cppgc/trace-trait.h +116 -0
  106. package/pods/Headers/include/cppgc/type-traits.h +240 -0
  107. package/pods/Headers/include/cppgc/visitor.h +379 -0
  108. package/pods/Headers/include/js_protocol-1.2.json +936 -0
  109. package/pods/Headers/include/js_protocol-1.3.json +1112 -0
  110. package/pods/Headers/include/js_protocol.pdl +1709 -0
  111. package/pods/Headers/include/libffi/arm64/ffi.h +524 -0
  112. package/pods/Headers/include/libffi/arm64/ffitarget.h +92 -0
  113. package/pods/Headers/include/libffi/x86_64/ffi.h +524 -0
  114. package/pods/Headers/include/libffi/x86_64/ffitarget.h +147 -0
  115. package/pods/Headers/include/libffi.h +12 -0
  116. package/pods/Headers/include/libplatform/DEPS +9 -0
  117. package/pods/Headers/include/libplatform/libplatform-export.h +29 -0
  118. package/pods/Headers/include/libplatform/libplatform.h +106 -0
  119. package/pods/Headers/include/libplatform/v8-tracing.h +333 -0
  120. package/pods/Headers/include/v8-array-buffer.h +433 -0
  121. package/pods/Headers/include/v8-callbacks.h +397 -0
  122. package/pods/Headers/include/v8-container.h +129 -0
  123. package/pods/Headers/include/v8-context.h +407 -0
  124. package/pods/Headers/include/v8-cppgc.h +215 -0
  125. package/pods/Headers/include/v8-data.h +80 -0
  126. package/pods/Headers/include/v8-date.h +43 -0
  127. package/pods/Headers/include/v8-debug.h +168 -0
  128. package/pods/Headers/include/v8-embedder-heap.h +218 -0
  129. package/pods/Headers/include/v8-embedder-state-scope.h +51 -0
  130. package/pods/Headers/include/v8-exception.h +217 -0
  131. package/pods/Headers/include/v8-extension.h +62 -0
  132. package/pods/Headers/include/v8-external.h +37 -0
  133. package/pods/Headers/include/v8-fast-api-calls.h +939 -0
  134. package/pods/Headers/include/v8-forward.h +81 -0
  135. package/pods/Headers/include/v8-function-callback.h +475 -0
  136. package/pods/Headers/include/v8-function.h +125 -0
  137. package/pods/Headers/include/v8-initialization.h +315 -0
  138. package/pods/Headers/include/v8-inspector-protocol.h +13 -0
  139. package/pods/Headers/include/v8-inspector.h +376 -0
  140. package/pods/Headers/include/v8-internal.h +661 -0
  141. package/pods/Headers/include/v8-isolate.h +1709 -0
  142. package/pods/Headers/include/v8-json.h +47 -0
  143. package/pods/Headers/include/v8-local-handle.h +455 -0
  144. package/pods/Headers/include/v8-locker.h +149 -0
  145. package/pods/Headers/include/v8-maybe.h +137 -0
  146. package/pods/Headers/include/v8-memory-span.h +43 -0
  147. package/pods/Headers/include/v8-message.h +216 -0
  148. package/pods/Headers/include/v8-metrics.h +255 -0
  149. package/pods/Headers/include/v8-microtask-queue.h +152 -0
  150. package/pods/Headers/include/v8-microtask.h +28 -0
  151. package/pods/Headers/include/v8-object.h +775 -0
  152. package/pods/Headers/include/v8-persistent-handle.h +590 -0
  153. package/pods/Headers/include/v8-platform.h +1092 -0
  154. package/pods/Headers/include/v8-primitive-object.h +118 -0
  155. package/pods/Headers/include/v8-primitive.h +866 -0
  156. package/pods/Headers/include/v8-profiler.h +1198 -0
  157. package/pods/Headers/include/v8-promise.h +174 -0
  158. package/pods/Headers/include/v8-proxy.h +50 -0
  159. package/pods/Headers/include/v8-regexp.h +105 -0
  160. package/pods/Headers/include/v8-script.h +748 -0
  161. package/pods/Headers/include/v8-snapshot.h +196 -0
  162. package/pods/Headers/include/v8-statistics.h +217 -0
  163. package/pods/Headers/include/v8-template.h +1079 -0
  164. package/pods/Headers/include/v8-traced-handle.h +420 -0
  165. package/pods/Headers/include/v8-typed-array.h +282 -0
  166. package/pods/Headers/include/v8-unwinder-state.h +31 -0
  167. package/pods/Headers/include/v8-unwinder.h +132 -0
  168. package/pods/Headers/include/v8-util.h +658 -0
  169. package/pods/Headers/include/v8-value-serializer-version.h +24 -0
  170. package/pods/Headers/include/v8-value-serializer.h +279 -0
  171. package/pods/Headers/include/v8-value.h +526 -0
  172. package/pods/Headers/include/v8-version-string.h +38 -0
  173. package/pods/Headers/include/v8-version.h +20 -0
  174. package/pods/Headers/include/v8-wasm-trap-handler-posix.h +31 -0
  175. package/pods/Headers/include/v8-wasm-trap-handler-win.h +28 -0
  176. package/pods/Headers/include/v8-wasm.h +257 -0
  177. package/pods/Headers/include/v8-weak-callback-info.h +86 -0
  178. package/pods/Headers/include/v8.h +88 -0
  179. package/pods/Headers/include/v8config.h +605 -0
  180. package/pods/Headers/inspector/InspectorServer.h +20 -0
  181. package/pods/Headers/inspector/JsV8InspectorClient.h +66 -0
  182. package/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +1123 -0
  183. package/pods/Headers/inspector/base64.h +9 -0
  184. package/pods/Headers/inspector/src/base/address-region.h +95 -0
  185. package/pods/Headers/inspector/src/base/atomic-utils.h +219 -0
  186. package/pods/Headers/inspector/src/base/atomicops.h +332 -0
  187. package/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +89 -0
  188. package/pods/Headers/inspector/src/base/base-export.h +31 -0
  189. package/pods/Headers/inspector/src/base/bits.h +343 -0
  190. package/pods/Headers/inspector/src/base/build_config.h +234 -0
  191. package/pods/Headers/inspector/src/base/compiler-specific.h +136 -0
  192. package/pods/Headers/inspector/src/base/export-template.h +163 -0
  193. package/pods/Headers/inspector/src/base/flags.h +130 -0
  194. package/pods/Headers/inspector/src/base/immediate-crash.h +162 -0
  195. package/pods/Headers/inspector/src/base/lazy-instance.h +258 -0
  196. package/pods/Headers/inspector/src/base/logging.h +417 -0
  197. package/pods/Headers/inspector/src/base/macros.h +423 -0
  198. package/pods/Headers/inspector/src/base/memory.h +89 -0
  199. package/pods/Headers/inspector/src/base/once.h +108 -0
  200. package/pods/Headers/inspector/src/base/optional.h +882 -0
  201. package/pods/Headers/inspector/src/base/platform/mutex.h +370 -0
  202. package/pods/Headers/inspector/src/base/platform/platform.h +476 -0
  203. package/pods/Headers/inspector/src/base/platform/semaphore.h +108 -0
  204. package/pods/Headers/inspector/src/base/platform/v8-time.h +513 -0
  205. package/pods/Headers/inspector/src/base/platform/wrappers.h +73 -0
  206. package/pods/Headers/inspector/src/base/safe_conversions.h +389 -0
  207. package/pods/Headers/inspector/src/base/safe_conversions_impl.h +822 -0
  208. package/pods/Headers/inspector/src/base/template-utils.h +113 -0
  209. package/pods/Headers/inspector/src/base/v8-fallthrough.h +21 -0
  210. package/pods/Headers/inspector/src/common/checks.h +38 -0
  211. package/pods/Headers/inspector/src/common/globals.h +1842 -0
  212. package/pods/Headers/inspector/src/debug/debug-interface.h +667 -0
  213. package/pods/Headers/inspector/src/debug/interface-types.h +175 -0
  214. package/pods/Headers/inspector/src/init/v8.h +52 -0
  215. package/pods/Headers/inspector/src/inspector/custom-preview.h +24 -0
  216. package/pods/Headers/inspector/src/inspector/injected-script.h +251 -0
  217. package/pods/Headers/inspector/src/inspector/inspected-context.h +79 -0
  218. package/pods/Headers/inspector/src/inspector/protocol/CSS.h +2148 -0
  219. package/pods/Headers/inspector/src/inspector/protocol/Console.h +211 -0
  220. package/pods/Headers/inspector/src/inspector/protocol/DOM.h +1008 -0
  221. package/pods/Headers/inspector/src/inspector/protocol/Debugger.h +892 -0
  222. package/pods/Headers/inspector/src/inspector/protocol/Forward.h +75 -0
  223. package/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +346 -0
  224. package/pods/Headers/inspector/src/inspector/protocol/Log.h +342 -0
  225. package/pods/Headers/inspector/src/inspector/protocol/Network.h +2528 -0
  226. package/pods/Headers/inspector/src/inspector/protocol/Overlay.h +281 -0
  227. package/pods/Headers/inspector/src/inspector/protocol/Page.h +1189 -0
  228. package/pods/Headers/inspector/src/inspector/protocol/Profiler.h +1001 -0
  229. package/pods/Headers/inspector/src/inspector/protocol/Protocol.h +617 -0
  230. package/pods/Headers/inspector/src/inspector/protocol/Runtime.h +1696 -0
  231. package/pods/Headers/inspector/src/inspector/protocol/Schema.h +146 -0
  232. package/pods/Headers/inspector/src/inspector/protocol/Security.h +793 -0
  233. package/pods/Headers/inspector/src/inspector/remote-object-id.h +54 -0
  234. package/pods/Headers/inspector/src/inspector/search-util.h +26 -0
  235. package/pods/Headers/inspector/src/inspector/string-16.h +180 -0
  236. package/pods/Headers/inspector/src/inspector/string-util.h +128 -0
  237. package/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +48 -0
  238. package/pods/Headers/inspector/src/inspector/v8-console-message.h +147 -0
  239. package/pods/Headers/inspector/src/inspector/v8-console.h +173 -0
  240. package/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +62 -0
  241. package/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +248 -0
  242. package/pods/Headers/inspector/src/inspector/v8-debugger-id.h +44 -0
  243. package/pods/Headers/inspector/src/inspector/v8-debugger-script.h +123 -0
  244. package/pods/Headers/inspector/src/inspector/v8-debugger.h +257 -0
  245. package/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +91 -0
  246. package/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +80 -0
  247. package/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +191 -0
  248. package/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +156 -0
  249. package/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +34 -0
  250. package/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +71 -0
  251. package/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +24 -0
  252. package/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +70 -0
  253. package/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +88 -0
  254. package/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +104 -0
  255. package/pods/Headers/inspector/src/inspector/v8-regex.h +38 -0
  256. package/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +157 -0
  257. package/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +38 -0
  258. package/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +164 -0
  259. package/pods/Headers/inspector/src/inspector/v8-string-conversions.h +17 -0
  260. package/pods/Headers/inspector/src/inspector/v8-value-utils.h +23 -0
  261. package/pods/Headers/inspector/src/inspector/value-mirror.h +87 -0
  262. package/pods/Headers/inspector/src/libplatform/default-platform.h +92 -0
  263. package/pods/Headers/inspector/src/logging/tracing-flags.h +50 -0
  264. package/pods/Headers/inspector/src/numbers/conversions.h +183 -0
  265. package/pods/Headers/inspector/src/tracing/trace-event.h +664 -0
  266. package/pods/Headers/inspector/src/utils/allocation.h +367 -0
  267. package/pods/Headers/inspector/src/utils/vector.h +324 -0
  268. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +305 -0
  269. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +314 -0
  270. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +62 -0
  271. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +6 -0
  272. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +58 -0
  273. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +47 -0
  274. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +80 -0
  275. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +52 -0
  276. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +26 -0
  277. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +104 -0
  278. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +39 -0
  279. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +406 -0
  280. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +32 -0
  281. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +158 -0
  282. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +99 -0
  283. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +139 -0
  284. package/pods/Headers/inspector/utils.h +32 -0
  285. package/pods/Headers/inspector/v8-inspector-platform.h +44 -0
  286. package/pods/Headers/jsi/decorator.h +762 -0
  287. package/pods/Headers/jsi/instrumentation.h +117 -0
  288. package/pods/Headers/jsi/jsi-inl.h +322 -0
  289. package/pods/Headers/jsi/jsi.h +1387 -0
  290. package/pods/Headers/jsi/jsilib.h +59 -0
  291. package/pods/Headers/jsi/threadsafe.h +79 -0
  292. package/pods/Headers/runtime/ArgConverter.h +61 -0
  293. package/pods/Headers/runtime/ArrayAdapter.h +13 -0
  294. package/pods/Headers/runtime/Caches.h +98 -0
  295. package/pods/Headers/runtime/ClassBuilder.h +61 -0
  296. package/pods/Headers/runtime/Common.h +9 -0
  297. package/pods/Headers/runtime/ConcurrentMap.h +55 -0
  298. package/pods/Headers/runtime/ConcurrentQueue.h +28 -0
  299. package/pods/Headers/runtime/Console.h +27 -0
  300. package/pods/Headers/runtime/Constants.h +15 -0
  301. package/pods/Headers/runtime/DataWrapper.h +671 -0
  302. package/pods/Headers/runtime/DictionaryAdapter.h +13 -0
  303. package/pods/Headers/runtime/ExtVector.h +21 -0
  304. package/pods/Headers/runtime/FFICall.h +105 -0
  305. package/pods/Headers/runtime/FastEnumerationAdapter.h +13 -0
  306. package/pods/Headers/runtime/FunctionReference.h +18 -0
  307. package/pods/Headers/runtime/Helpers.h +84 -0
  308. package/pods/Headers/runtime/InlineFunctions.h +16 -0
  309. package/pods/Headers/runtime/Interop.h +202 -0
  310. package/pods/Headers/runtime/KnownUnknownClassPair.h +35 -0
  311. package/pods/Headers/runtime/Metadata.h +981 -0
  312. package/pods/Headers/runtime/MetadataBuilder.h +72 -0
  313. package/pods/Headers/runtime/MetadataInlines.h +157 -0
  314. package/pods/Headers/runtime/ModuleInternal.h +59 -0
  315. package/pods/Headers/runtime/NSDataAdapter.h +13 -0
  316. package/pods/Headers/runtime/NativeScriptException.h +27 -0
  317. package/pods/Headers/runtime/ObjectManager.h +31 -0
  318. package/pods/Headers/runtime/OneByteStringResource.h +21 -0
  319. package/pods/Headers/runtime/Pointer.h +26 -0
  320. package/pods/Headers/runtime/PromiseProxy.h +15 -0
  321. package/pods/Headers/runtime/Reference.h +38 -0
  322. package/pods/Headers/runtime/Runtime.h +67 -0
  323. package/pods/Headers/runtime/RuntimeConfig.h +17 -0
  324. package/pods/Headers/runtime/SetTimeout.h +34 -0
  325. package/pods/Headers/runtime/SimpleAllocator.h +23 -0
  326. package/pods/Headers/runtime/StringHasher.h +315 -0
  327. package/pods/Headers/runtime/SymbolIterator.h +18 -0
  328. package/pods/Headers/runtime/SymbolLoader.h +27 -0
  329. package/pods/Headers/runtime/TNSDerivedClass.h +8 -0
  330. package/pods/Headers/runtime/TSHelpers.h +15 -0
  331. package/pods/Headers/runtime/Tasks.h +19 -0
  332. package/pods/Headers/runtime/UnmanagedType.h +21 -0
  333. package/pods/Headers/runtime/WeakRef.h +15 -0
  334. package/pods/Headers/runtime/Worker.h +26 -0
  335. package/pods/Headers/runtime/robin_hood.h +2184 -0
  336. package/pods/Headers/v8runtime/HostProxy.h +71 -0
  337. package/pods/Headers/v8runtime/JSIV8ValueConverter.h +70 -0
  338. package/pods/Headers/v8runtime/V8PointerValue.h +44 -0
  339. package/pods/Headers/v8runtime/V8Runtime.h +215 -0
  340. package/pods/Headers/v8runtime/V8RuntimeConfig.h +26 -0
  341. package/pods/Headers/v8runtime/V8RuntimeFactory.h +21 -0
  342. package/pods/NativeScript.podspec +68 -0
  343. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/PrivateHeaders/mason_native.h +0 -676
  344. package/platforms/ios/src/JSIModule.h +0 -217
  345. package/platforms/ios/src/JSIModule.mm +0 -2788
@@ -0,0 +1,605 @@
1
+ // Copyright 2013 the V8 project authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ #ifndef V8CONFIG_H_
6
+ #define V8CONFIG_H_
7
+
8
+ #ifdef V8_GN_HEADER
9
+ #if __cplusplus >= 201703L && !__has_include("v8-gn.h")
10
+ #error Missing v8-gn.h. The configuration for v8 is missing from the include \
11
+ path. Add it with -I<path> to the command line
12
+ #endif
13
+ #include "v8-gn.h" // NOLINT(build/include_directory)
14
+ #endif
15
+
16
+ // clang-format off
17
+
18
+ // Platform headers for feature detection below.
19
+ #if defined(__ANDROID__)
20
+ # include <sys/cdefs.h>
21
+ #elif defined(__APPLE__)
22
+ # include <TargetConditionals.h>
23
+ #elif defined(__linux__)
24
+ # include <features.h>
25
+ #endif
26
+
27
+
28
+ // This macro allows to test for the version of the GNU C library (or
29
+ // a compatible C library that masquerades as glibc). It evaluates to
30
+ // 0 if libc is not GNU libc or compatible.
31
+ // Use like:
32
+ // #if V8_GLIBC_PREREQ(2, 3)
33
+ // ...
34
+ // #endif
35
+ #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
36
+ # define V8_GLIBC_PREREQ(major, minor) \
37
+ ((__GLIBC__ * 100 + __GLIBC_MINOR__) >= ((major) * 100 + (minor)))
38
+ #else
39
+ # define V8_GLIBC_PREREQ(major, minor) 0
40
+ #endif
41
+
42
+
43
+ // This macro allows to test for the version of the GNU C++ compiler.
44
+ // Note that this also applies to compilers that masquerade as GCC,
45
+ // for example clang and the Intel C++ compiler for Linux.
46
+ // Use like:
47
+ // #if V8_GNUC_PREREQ(4, 3, 1)
48
+ // ...
49
+ // #endif
50
+ #if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
51
+ # define V8_GNUC_PREREQ(major, minor, patchlevel) \
52
+ ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= \
53
+ ((major) * 10000 + (minor) * 100 + (patchlevel)))
54
+ #elif defined(__GNUC__) && defined(__GNUC_MINOR__)
55
+ # define V8_GNUC_PREREQ(major, minor, patchlevel) \
56
+ ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= \
57
+ ((major) * 10000 + (minor) * 100 + (patchlevel)))
58
+ #else
59
+ # define V8_GNUC_PREREQ(major, minor, patchlevel) 0
60
+ #endif
61
+
62
+
63
+
64
+ // -----------------------------------------------------------------------------
65
+ // Operating system detection (host)
66
+ //
67
+ // V8_OS_ANDROID - Android
68
+ // V8_OS_BSD - BSDish (macOS, Net/Free/Open/DragonFlyBSD)
69
+ // V8_OS_CYGWIN - Cygwin
70
+ // V8_OS_DRAGONFLYBSD - DragonFlyBSD
71
+ // V8_OS_FREEBSD - FreeBSD
72
+ // V8_OS_FUCHSIA - Fuchsia
73
+ // V8_OS_LINUX - Linux (Android, ChromeOS, Linux, ...)
74
+ // V8_OS_DARWIN - Darwin (macOS, iOS)
75
+ // V8_OS_MACOS - macOS
76
+ // V8_OS_IOS - iOS
77
+ // V8_OS_NETBSD - NetBSD
78
+ // V8_OS_OPENBSD - OpenBSD
79
+ // V8_OS_POSIX - POSIX compatible (mostly everything except Windows)
80
+ // V8_OS_QNX - QNX Neutrino
81
+ // V8_OS_SOLARIS - Sun Solaris and OpenSolaris
82
+ // V8_OS_STARBOARD - Starboard (platform abstraction for Cobalt)
83
+ // V8_OS_AIX - AIX
84
+ // V8_OS_WIN - Microsoft Windows
85
+
86
+ #if defined(__ANDROID__)
87
+ # define V8_OS_ANDROID 1
88
+ # define V8_OS_LINUX 1
89
+ # define V8_OS_POSIX 1
90
+ # define V8_OS_STRING "android"
91
+
92
+ #elif defined(__APPLE__)
93
+ # define V8_OS_POSIX 1
94
+ # define V8_OS_BSD 1
95
+ # define V8_OS_DARWIN 1
96
+ # if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
97
+ # define V8_OS_IOS 1
98
+ # define V8_OS_STRING "ios"
99
+ # else
100
+ # define V8_OS_MACOS 1
101
+ # define V8_OS_STRING "macos"
102
+ # endif // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
103
+
104
+ #elif defined(__CYGWIN__)
105
+ # define V8_OS_CYGWIN 1
106
+ # define V8_OS_POSIX 1
107
+ # define V8_OS_STRING "cygwin"
108
+
109
+ #elif defined(__linux__)
110
+ # define V8_OS_LINUX 1
111
+ # define V8_OS_POSIX 1
112
+ # define V8_OS_STRING "linux"
113
+
114
+ #elif defined(__sun)
115
+ # define V8_OS_POSIX 1
116
+ # define V8_OS_SOLARIS 1
117
+ # define V8_OS_STRING "sun"
118
+
119
+ #elif defined(STARBOARD)
120
+ # define V8_OS_STARBOARD 1
121
+ # define V8_OS_STRING "starboard"
122
+
123
+ #elif defined(_AIX)
124
+ # define V8_OS_POSIX 1
125
+ # define V8_OS_AIX 1
126
+ # define V8_OS_STRING "aix"
127
+
128
+ #elif defined(__FreeBSD__)
129
+ # define V8_OS_BSD 1
130
+ # define V8_OS_FREEBSD 1
131
+ # define V8_OS_POSIX 1
132
+ # define V8_OS_STRING "freebsd"
133
+
134
+ #elif defined(__Fuchsia__)
135
+ # define V8_OS_FUCHSIA 1
136
+ # define V8_OS_POSIX 1
137
+ # define V8_OS_STRING "fuchsia"
138
+
139
+ #elif defined(__DragonFly__)
140
+ # define V8_OS_BSD 1
141
+ # define V8_OS_DRAGONFLYBSD 1
142
+ # define V8_OS_POSIX 1
143
+ # define V8_OS_STRING "dragonflybsd"
144
+
145
+ #elif defined(__NetBSD__)
146
+ # define V8_OS_BSD 1
147
+ # define V8_OS_NETBSD 1
148
+ # define V8_OS_POSIX 1
149
+ # define V8_OS_STRING "netbsd"
150
+
151
+ #elif defined(__OpenBSD__)
152
+ # define V8_OS_BSD 1
153
+ # define V8_OS_OPENBSD 1
154
+ # define V8_OS_POSIX 1
155
+ # define V8_OS_STRING "openbsd"
156
+
157
+ #elif defined(__QNXNTO__)
158
+ # define V8_OS_POSIX 1
159
+ # define V8_OS_QNX 1
160
+ # define V8_OS_STRING "qnx"
161
+
162
+ #elif defined(_WIN32)
163
+ # define V8_OS_WIN 1
164
+ # define V8_OS_STRING "windows"
165
+ #endif
166
+
167
+ // -----------------------------------------------------------------------------
168
+ // Operating system detection (target)
169
+ //
170
+ // V8_TARGET_OS_ANDROID
171
+ // V8_TARGET_OS_FUCHSIA
172
+ // V8_TARGET_OS_IOS
173
+ // V8_TARGET_OS_LINUX
174
+ // V8_TARGET_OS_MACOS
175
+ // V8_TARGET_OS_WIN
176
+ //
177
+ // If not set explicitly, these fall back to corresponding V8_OS_ values.
178
+
179
+ #ifdef V8_HAVE_TARGET_OS
180
+
181
+ // The target OS is provided, just check that at least one known value is set.
182
+ # if !defined(V8_TARGET_OS_ANDROID) \
183
+ && !defined(V8_TARGET_OS_FUCHSIA) \
184
+ && !defined(V8_TARGET_OS_IOS) \
185
+ && !defined(V8_TARGET_OS_LINUX) \
186
+ && !defined(V8_TARGET_OS_MACOS) \
187
+ && !defined(V8_TARGET_OS_WIN)
188
+ # error No known target OS defined.
189
+ # endif
190
+
191
+ #else // V8_HAVE_TARGET_OS
192
+
193
+ # if defined(V8_TARGET_OS_ANDROID) \
194
+ || defined(V8_TARGET_OS_FUCHSIA) \
195
+ || defined(V8_TARGET_OS_IOS) \
196
+ || defined(V8_TARGET_OS_LINUX) \
197
+ || defined(V8_TARGET_OS_MACOS) \
198
+ || defined(V8_TARGET_OS_WIN)
199
+ # error A target OS is defined but V8_HAVE_TARGET_OS is unset.
200
+ # endif
201
+
202
+ // Fall back to the detected host OS.
203
+ #ifdef V8_OS_ANDROID
204
+ # define V8_TARGET_OS_ANDROID
205
+ #endif
206
+
207
+ #ifdef V8_OS_FUCHSIA
208
+ # define V8_TARGET_OS_FUCHSIA
209
+ #endif
210
+
211
+ #ifdef V8_OS_IOS
212
+ # define V8_TARGET_OS_IOS
213
+ #endif
214
+
215
+ #ifdef V8_OS_LINUX
216
+ # define V8_TARGET_OS_LINUX
217
+ #endif
218
+
219
+ #ifdef V8_OS_MACOS
220
+ # define V8_TARGET_OS_MACOS
221
+ #endif
222
+
223
+ #ifdef V8_OS_WIN
224
+ # define V8_TARGET_OS_WIN
225
+ #endif
226
+
227
+ #endif // V8_HAVE_TARGET_OS
228
+
229
+ #if defined(V8_TARGET_OS_ANDROID)
230
+ # define V8_TARGET_OS_STRING "android"
231
+ #elif defined(V8_TARGET_OS_FUCHSIA)
232
+ # define V8_TARGET_OS_STRING "fuchsia"
233
+ #elif defined(V8_TARGET_OS_IOS)
234
+ # define V8_TARGET_OS_STRING "ios"
235
+ #elif defined(V8_TARGET_OS_LINUX)
236
+ # define V8_TARGET_OS_STRING "linux"
237
+ #elif defined(V8_TARGET_OS_MACOS)
238
+ # define V8_TARGET_OS_STRING "macos"
239
+ #elif defined(V8_TARGET_OS_WINDOWS)
240
+ # define V8_TARGET_OS_STRING "windows"
241
+ #else
242
+ # define V8_TARGET_OS_STRING "unknown"
243
+ #endif
244
+
245
+ // -----------------------------------------------------------------------------
246
+ // C library detection
247
+ //
248
+ // V8_LIBC_MSVCRT - MSVC libc
249
+ // V8_LIBC_BIONIC - Bionic libc
250
+ // V8_LIBC_BSD - BSD libc derivate
251
+ // V8_LIBC_GLIBC - GNU C library
252
+ // V8_LIBC_UCLIBC - uClibc
253
+ //
254
+ // Note that testing for libc must be done using #if not #ifdef. For example,
255
+ // to test for the GNU C library, use:
256
+ // #if V8_LIBC_GLIBC
257
+ // ...
258
+ // #endif
259
+
260
+ #if defined (_MSC_VER)
261
+ # define V8_LIBC_MSVCRT 1
262
+ #elif defined(__BIONIC__)
263
+ # define V8_LIBC_BIONIC 1
264
+ # define V8_LIBC_BSD 1
265
+ #elif defined(__UCLIBC__)
266
+ // Must test for UCLIBC before GLIBC, as UCLIBC pretends to be GLIBC.
267
+ # define V8_LIBC_UCLIBC 1
268
+ #elif defined(__GLIBC__) || defined(__GNU_LIBRARY__)
269
+ # define V8_LIBC_GLIBC 1
270
+ #else
271
+ # define V8_LIBC_BSD V8_OS_BSD
272
+ #endif
273
+
274
+
275
+ // -----------------------------------------------------------------------------
276
+ // Compiler detection
277
+ //
278
+ // V8_CC_GNU - GCC, or clang in gcc mode
279
+ // V8_CC_INTEL - Intel C++
280
+ // V8_CC_MINGW - Minimalist GNU for Windows
281
+ // V8_CC_MINGW32 - Minimalist GNU for Windows (mingw32)
282
+ // V8_CC_MINGW64 - Minimalist GNU for Windows (mingw-w64)
283
+ // V8_CC_MSVC - Microsoft Visual C/C++, or clang in cl.exe mode
284
+ //
285
+ // C++11 feature detection
286
+ //
287
+ // Compiler-specific feature detection
288
+ //
289
+ // V8_HAS_ATTRIBUTE_ALWAYS_INLINE - __attribute__((always_inline))
290
+ // supported
291
+ // V8_HAS_ATTRIBUTE_NONNULL - __attribute__((nonnull)) supported
292
+ // V8_HAS_ATTRIBUTE_NOINLINE - __attribute__((noinline)) supported
293
+ // V8_HAS_ATTRIBUTE_UNUSED - __attribute__((unused)) supported
294
+ // V8_HAS_ATTRIBUTE_VISIBILITY - __attribute__((visibility)) supported
295
+ // V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT - __attribute__((warn_unused_result))
296
+ // supported
297
+ // V8_HAS_CPP_ATTRIBUTE_NODISCARD - [[nodiscard]] supported
298
+ // V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS
299
+ // - [[no_unique_address]] supported
300
+ // V8_HAS_BUILTIN_BSWAP16 - __builtin_bswap16() supported
301
+ // V8_HAS_BUILTIN_BSWAP32 - __builtin_bswap32() supported
302
+ // V8_HAS_BUILTIN_BSWAP64 - __builtin_bswap64() supported
303
+ // V8_HAS_BUILTIN_CLZ - __builtin_clz() supported
304
+ // V8_HAS_BUILTIN_CTZ - __builtin_ctz() supported
305
+ // V8_HAS_BUILTIN_EXPECT - __builtin_expect() supported
306
+ // V8_HAS_BUILTIN_FRAME_ADDRESS - __builtin_frame_address() supported
307
+ // V8_HAS_BUILTIN_POPCOUNT - __builtin_popcount() supported
308
+ // V8_HAS_BUILTIN_SADD_OVERFLOW - __builtin_sadd_overflow() supported
309
+ // V8_HAS_BUILTIN_SSUB_OVERFLOW - __builtin_ssub_overflow() supported
310
+ // V8_HAS_BUILTIN_UADD_OVERFLOW - __builtin_uadd_overflow() supported
311
+ // V8_HAS_COMPUTED_GOTO - computed goto/labels as values
312
+ // supported
313
+ // V8_HAS_DECLSPEC_NOINLINE - __declspec(noinline) supported
314
+ // V8_HAS_DECLSPEC_SELECTANY - __declspec(selectany) supported
315
+ // V8_HAS___FORCEINLINE - __forceinline supported
316
+ //
317
+ // Note that testing for compilers and/or features must be done using #if
318
+ // not #ifdef. For example, to test for Intel C++ Compiler, use:
319
+ // #if V8_CC_INTEL
320
+ // ...
321
+ // #endif
322
+
323
+ #if defined(__has_cpp_attribute)
324
+ #define V8_HAS_CPP_ATTRIBUTE(FEATURE) __has_cpp_attribute(FEATURE)
325
+ #else
326
+ #define V8_HAS_CPP_ATTRIBUTE(FEATURE) 0
327
+ #endif
328
+
329
+ #if defined(__clang__)
330
+
331
+ #if defined(__GNUC__) // Clang in gcc mode.
332
+ # define V8_CC_GNU 1
333
+ #endif
334
+
335
+ # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline))
336
+ # define V8_HAS_ATTRIBUTE_NONNULL (__has_attribute(nonnull))
337
+ # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline))
338
+ # define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused))
339
+ # define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility))
340
+ # define V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT \
341
+ (__has_attribute(warn_unused_result))
342
+
343
+ # define V8_HAS_CPP_ATTRIBUTE_NODISCARD (V8_HAS_CPP_ATTRIBUTE(nodiscard))
344
+ # define V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS \
345
+ (V8_HAS_CPP_ATTRIBUTE(no_unique_address))
346
+
347
+ # define V8_HAS_BUILTIN_ASSUME_ALIGNED (__has_builtin(__builtin_assume_aligned))
348
+ # define V8_HAS_BUILTIN_BSWAP16 (__has_builtin(__builtin_bswap16))
349
+ # define V8_HAS_BUILTIN_BSWAP32 (__has_builtin(__builtin_bswap32))
350
+ # define V8_HAS_BUILTIN_BSWAP64 (__has_builtin(__builtin_bswap64))
351
+ # define V8_HAS_BUILTIN_CLZ (__has_builtin(__builtin_clz))
352
+ # define V8_HAS_BUILTIN_CTZ (__has_builtin(__builtin_ctz))
353
+ # define V8_HAS_BUILTIN_EXPECT (__has_builtin(__builtin_expect))
354
+ # define V8_HAS_BUILTIN_FRAME_ADDRESS (__has_builtin(__builtin_frame_address))
355
+ # define V8_HAS_BUILTIN_POPCOUNT (__has_builtin(__builtin_popcount))
356
+ # define V8_HAS_BUILTIN_SADD_OVERFLOW (__has_builtin(__builtin_sadd_overflow))
357
+ # define V8_HAS_BUILTIN_SSUB_OVERFLOW (__has_builtin(__builtin_ssub_overflow))
358
+ # define V8_HAS_BUILTIN_UADD_OVERFLOW (__has_builtin(__builtin_uadd_overflow))
359
+
360
+ // Clang has no __has_feature for computed gotos.
361
+ // GCC doc: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
362
+ # define V8_HAS_COMPUTED_GOTO 1
363
+
364
+ #elif defined(__GNUC__)
365
+
366
+ # define V8_CC_GNU 1
367
+ # if defined(__INTEL_COMPILER) // Intel C++ also masquerades as GCC 3.2.0
368
+ # define V8_CC_INTEL 1
369
+ # endif
370
+ # if defined(__MINGW32__)
371
+ # define V8_CC_MINGW32 1
372
+ # endif
373
+ # if defined(__MINGW64__)
374
+ # define V8_CC_MINGW64 1
375
+ # endif
376
+ # define V8_CC_MINGW (V8_CC_MINGW32 || V8_CC_MINGW64)
377
+
378
+ // always_inline is available in gcc 4.0 but not very reliable until 4.4.
379
+ // Works around "sorry, unimplemented: inlining failed" build errors with
380
+ // older compilers.
381
+ # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE 1
382
+ # define V8_HAS_ATTRIBUTE_NOINLINE 1
383
+ # define V8_HAS_ATTRIBUTE_UNUSED 1
384
+ # define V8_HAS_ATTRIBUTE_VISIBILITY 1
385
+ # define V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT (!V8_CC_INTEL)
386
+
387
+ // [[nodiscard]] does not work together with with
388
+ // __attribute__((visibility(""))) on GCC 7.4 which is why there is no define
389
+ // for V8_HAS_CPP_ATTRIBUTE_NODISCARD. See https://crbug.com/v8/11707.
390
+
391
+ # define V8_HAS_BUILTIN_ASSUME_ALIGNED 1
392
+ # define V8_HAS_BUILTIN_CLZ 1
393
+ # define V8_HAS_BUILTIN_CTZ 1
394
+ # define V8_HAS_BUILTIN_EXPECT 1
395
+ # define V8_HAS_BUILTIN_FRAME_ADDRESS 1
396
+ # define V8_HAS_BUILTIN_POPCOUNT 1
397
+
398
+ // GCC doc: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
399
+ #define V8_HAS_COMPUTED_GOTO 1
400
+
401
+ #endif
402
+
403
+ #if defined(_MSC_VER)
404
+ # define V8_CC_MSVC 1
405
+
406
+ # define V8_HAS_DECLSPEC_NOINLINE 1
407
+ # define V8_HAS_DECLSPEC_SELECTANY 1
408
+
409
+ # define V8_HAS___FORCEINLINE 1
410
+
411
+ #endif
412
+
413
+
414
+ // -----------------------------------------------------------------------------
415
+ // Helper macros
416
+
417
+ // A macro used to make better inlining. Don't bother for debug builds.
418
+ // Use like:
419
+ // V8_INLINE int GetZero() { return 0; }
420
+ #if !defined(DEBUG) && V8_HAS_ATTRIBUTE_ALWAYS_INLINE
421
+ # define V8_INLINE inline __attribute__((always_inline))
422
+ #elif !defined(DEBUG) && V8_HAS___FORCEINLINE
423
+ # define V8_INLINE __forceinline
424
+ #else
425
+ # define V8_INLINE inline
426
+ #endif
427
+
428
+ #if V8_HAS_BUILTIN_ASSUME_ALIGNED
429
+ # define V8_ASSUME_ALIGNED(ptr, alignment) \
430
+ __builtin_assume_aligned((ptr), (alignment))
431
+ #else
432
+ # define V8_ASSUME_ALIGNED(ptr, alignment) (ptr)
433
+ #endif
434
+
435
+
436
+ // A macro to mark specific arguments as non-null.
437
+ // Use like:
438
+ // int add(int* x, int y, int* z) V8_NONNULL(1, 3) { return *x + y + *z; }
439
+ #if V8_HAS_ATTRIBUTE_NONNULL
440
+ # define V8_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
441
+ #else
442
+ # define V8_NONNULL(...) /* NOT SUPPORTED */
443
+ #endif
444
+
445
+
446
+ // A macro used to tell the compiler to never inline a particular function.
447
+ // Use like:
448
+ // V8_NOINLINE int GetMinusOne() { return -1; }
449
+ #if V8_HAS_ATTRIBUTE_NOINLINE
450
+ # define V8_NOINLINE __attribute__((noinline))
451
+ #elif V8_HAS_DECLSPEC_NOINLINE
452
+ # define V8_NOINLINE __declspec(noinline)
453
+ #else
454
+ # define V8_NOINLINE /* NOT SUPPORTED */
455
+ #endif
456
+
457
+
458
+ // A macro (V8_DEPRECATED) to mark classes or functions as deprecated.
459
+ #if defined(V8_DEPRECATION_WARNINGS)
460
+ # define V8_DEPRECATED(message) [[deprecated(message)]]
461
+ #else
462
+ # define V8_DEPRECATED(message)
463
+ #endif
464
+
465
+
466
+ // A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated.
467
+ #if defined(V8_IMMINENT_DEPRECATION_WARNINGS)
468
+ # define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
469
+ #else
470
+ # define V8_DEPRECATE_SOON(message)
471
+ #endif
472
+
473
+
474
+ #if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 6)
475
+ # define V8_ENUM_DEPRECATED(message)
476
+ # define V8_ENUM_DEPRECATE_SOON(message)
477
+ #else
478
+ # define V8_ENUM_DEPRECATED(message) V8_DEPRECATED(message)
479
+ # define V8_ENUM_DEPRECATE_SOON(message) V8_DEPRECATE_SOON(message)
480
+ #endif
481
+
482
+
483
+ // A macro to provide the compiler with branch prediction information.
484
+ #if V8_HAS_BUILTIN_EXPECT
485
+ # define V8_UNLIKELY(condition) (__builtin_expect(!!(condition), 0))
486
+ # define V8_LIKELY(condition) (__builtin_expect(!!(condition), 1))
487
+ #else
488
+ # define V8_UNLIKELY(condition) (condition)
489
+ # define V8_LIKELY(condition) (condition)
490
+ #endif
491
+
492
+
493
+ // Annotate a function indicating the caller must examine the return value.
494
+ // Use like:
495
+ // int foo() V8_WARN_UNUSED_RESULT;
496
+ #if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT
497
+ #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
498
+ #else
499
+ #define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */
500
+ #endif
501
+
502
+
503
+ // Annotate a class or constructor indicating the caller must assign the
504
+ // constructed instances.
505
+ // Apply to the whole class like:
506
+ // class V8_NODISCARD Foo() { ... };
507
+ // or apply to just one constructor like:
508
+ // V8_NODISCARD Foo() { ... };
509
+ // [[nodiscard]] comes in C++17 but supported in clang with -std >= c++11.
510
+ #if V8_HAS_CPP_ATTRIBUTE_NODISCARD
511
+ #define V8_NODISCARD [[nodiscard]]
512
+ #else
513
+ #define V8_NODISCARD /* NOT SUPPORTED */
514
+ #endif
515
+
516
+ // The no_unique_address attribute allows tail padding in a non-static data
517
+ // member to overlap other members of the enclosing class (and in the special
518
+ // case when the type is empty, permits it to fully overlap other members). The
519
+ // field is laid out as if a base class were encountered at the corresponding
520
+ // point within the class (except that it does not share a vptr with the
521
+ // enclosing object).
522
+ //
523
+ // Apply to a data member like:
524
+ //
525
+ // class Foo {
526
+ // V8_NO_UNIQUE_ADDRESS Bar bar_;
527
+ // };
528
+ //
529
+ // [[no_unique_address]] comes in C++20 but supported in clang with
530
+ // -std >= c++11.
531
+ #if V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS
532
+ #define V8_NO_UNIQUE_ADDRESS [[no_unique_address]]
533
+ #else
534
+ #define V8_NO_UNIQUE_ADDRESS /* NOT SUPPORTED */
535
+ #endif
536
+
537
+ // Helper macro to define no_sanitize attributes only with clang.
538
+ #if defined(__clang__) && defined(__has_attribute)
539
+ #if __has_attribute(no_sanitize)
540
+ #define V8_CLANG_NO_SANITIZE(what) __attribute__((no_sanitize(what)))
541
+ #endif
542
+ #endif
543
+ #if !defined(V8_CLANG_NO_SANITIZE)
544
+ #define V8_CLANG_NO_SANITIZE(what)
545
+ #endif
546
+
547
+ #if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
548
+ #error Inconsistent build configuration: To build the V8 shared library \
549
+ set BUILDING_V8_SHARED, to include its headers for linking against the \
550
+ V8 shared library set USING_V8_SHARED.
551
+ #endif
552
+
553
+ #ifdef V8_OS_WIN
554
+
555
+ // Setup for Windows DLL export/import. When building the V8 DLL the
556
+ // BUILDING_V8_SHARED needs to be defined. When building a program which uses
557
+ // the V8 DLL USING_V8_SHARED needs to be defined. When either building the V8
558
+ // static library or building a program which uses the V8 static library neither
559
+ // BUILDING_V8_SHARED nor USING_V8_SHARED should be defined.
560
+ #ifdef BUILDING_V8_SHARED
561
+ # define V8_EXPORT __declspec(dllexport)
562
+ #elif USING_V8_SHARED
563
+ # define V8_EXPORT __declspec(dllimport)
564
+ #else
565
+ # define V8_EXPORT
566
+ #endif // BUILDING_V8_SHARED
567
+
568
+ #else // V8_OS_WIN
569
+
570
+ // Setup for Linux shared library export.
571
+ #if V8_HAS_ATTRIBUTE_VISIBILITY
572
+ # ifdef BUILDING_V8_SHARED
573
+ # define V8_EXPORT __attribute__ ((visibility("default")))
574
+ # else
575
+ # define V8_EXPORT
576
+ # endif
577
+ #else
578
+ # define V8_EXPORT
579
+ #endif
580
+
581
+ #endif // V8_OS_WIN
582
+
583
+ // The sandbox is available (i.e. defined) when pointer compression
584
+ // is enabled, but it is only used when V8_SANDBOX is enabled as
585
+ // well. This allows better test coverage of the sandbox.
586
+ #if defined(V8_COMPRESS_POINTERS)
587
+ #define V8_SANDBOX_IS_AVAILABLE
588
+ #endif
589
+
590
+ #if defined(V8_SANDBOX) && !defined(V8_SANDBOX_IS_AVAILABLE)
591
+ #error Inconsistent configuration: sandbox is enabled but not available
592
+ #endif
593
+
594
+ // From C++17 onwards, static constexpr member variables are defined to be
595
+ // "inline", and adding a separate definition for them can trigger deprecation
596
+ // warnings. For C++14 and below, however, these definitions are required.
597
+ #if __cplusplus < 201703L && (!defined(_MSVC_LANG) || _MSVC_LANG < 201703L)
598
+ #define V8_STATIC_CONSTEXPR_VARIABLES_NEED_DEFINITIONS
599
+ #endif
600
+
601
+ // clang-format on
602
+
603
+ #undef V8_HAS_CPP_ATTRIBUTE
604
+
605
+ #endif // V8CONFIG_H_
@@ -0,0 +1,20 @@
1
+ #ifndef InspectorServer_h
2
+ #define InspectorServer_h
3
+
4
+ #include <functional>
5
+ #include <string>
6
+ #include <sys/types.h>
7
+ #include <dispatch/dispatch.h>
8
+
9
+ namespace v8_inspector {
10
+
11
+ class InspectorServer {
12
+ public:
13
+ static in_port_t Init(std::function<void (std::function<void (std::string)>)> onClientConnected, std::function<void (std::string)> onMessage);
14
+ private:
15
+ static void Send(dispatch_io_t channel, dispatch_queue_t queue, std::string message);
16
+ };
17
+
18
+ }
19
+
20
+ #endif /* InspectorServer_h */
@@ -0,0 +1,66 @@
1
+ #ifndef JsV8InspectorClient_h
2
+ #define JsV8InspectorClient_h
3
+
4
+ #include <functional>
5
+ #include <dispatch/dispatch.h>
6
+ #include <string>
7
+ #include <vector>
8
+ #include <map>
9
+
10
+ #include "include/v8-inspector.h"
11
+ #include "runtime/Runtime.h"
12
+
13
+ namespace v8_inspector {
14
+
15
+ class JsV8InspectorClient : V8InspectorClient, V8Inspector::Channel {
16
+ public:
17
+ JsV8InspectorClient(tns::Runtime* runtime);
18
+ void init();
19
+ void connect(int argc, char** argv);
20
+ void createInspectorSession();
21
+ void disconnect();
22
+ void dispatchMessage(const std::string& message);
23
+
24
+ void sendResponse(int callId, std::unique_ptr<StringBuffer> message) override;
25
+ void sendNotification(std::unique_ptr<StringBuffer> message) override;
26
+ void flushProtocolNotifications() override;
27
+
28
+ void runMessageLoopOnPause(int contextGroupId) override;
29
+ void quitMessageLoopOnPause() override;
30
+ v8::Local<v8::Context> ensureDefaultContextInGroup(int contextGroupId) override;
31
+
32
+ void scheduleBreak();
33
+ void registerModules();
34
+
35
+ static std::map<std::string, v8::Persistent<v8::Object>*> Domains;
36
+ private:
37
+ static int contextGroupId;
38
+ bool isConnected_;
39
+ std::unique_ptr<V8Inspector> inspector_;
40
+ v8::Persistent<v8::Context> context_;
41
+ std::unique_ptr<V8InspectorSession> session_;
42
+ tns::Runtime* runtime_;
43
+ bool terminated_;
44
+ std::vector<std::string> messages_;
45
+ bool runningNestedLoops_;
46
+ dispatch_queue_t messagesQueue_;
47
+ dispatch_queue_t messageLoopQueue_;
48
+ dispatch_semaphore_t messageArrived_;
49
+ std::function<void (std::string)> sender_;
50
+ bool isWaitingForDebugger_;
51
+
52
+ void enableInspector(int argc, char** argv);
53
+ void notify(std::unique_ptr<StringBuffer> message);
54
+ void onFrontendConnected(std::function<void (std::string)> sender);
55
+ void onFrontendMessageReceived(std::string message);
56
+ template <class TypeName>
57
+ static v8::Local<TypeName> PersistentToLocal(v8::Isolate* isolate, const v8::Persistent<TypeName>& persistent);
58
+ std::string PumpMessage();
59
+ static void registerDomainDispatcherCallback(const v8::FunctionCallbackInfo<v8::Value>& args);
60
+ static void inspectorSendEventCallback(const v8::FunctionCallbackInfo<v8::Value>& args);
61
+ static void inspectorTimestampCallback(const v8::FunctionCallbackInfo<v8::Value>& args);
62
+ };
63
+
64
+ }
65
+
66
+ #endif /* JsV8InspectorClient_h */