@triniwiz/nativescript-masonkit 1.0.0-alpha.9 → 1.0.0-beta.0

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 (397) hide show
  1. package/button/index.android.d.ts +13 -0
  2. package/button/index.android.js +56 -0
  3. package/button/index.android.js.map +1 -0
  4. package/button/index.ios.d.ts +21 -0
  5. package/button/index.ios.js +216 -0
  6. package/button/index.ios.js.map +1 -0
  7. package/common.d.ts +78 -33
  8. package/common.js +1121 -251
  9. package/common.js.map +1 -1
  10. package/img/index.android.d.ts +10 -0
  11. package/img/index.android.js +40 -0
  12. package/img/index.android.js.map +1 -0
  13. package/img/index.ios.d.ts +13 -0
  14. package/img/index.ios.js +102 -0
  15. package/img/index.ios.js.map +1 -0
  16. package/index.android.d.ts +6 -34
  17. package/index.android.js +6 -139
  18. package/index.android.js.map +1 -1
  19. package/index.d.ts +88 -60
  20. package/index.ios.d.ts +6 -48
  21. package/index.ios.js +6 -355
  22. package/index.ios.js.map +1 -1
  23. package/package.json +5 -2
  24. package/platforms/android/include.gradle +5 -1
  25. package/platforms/android/masonkit-release.aar +0 -0
  26. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +794 -284
  27. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason.h +0 -5
  28. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/NSObject+MasonElement_Defaults.h +100 -0
  29. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +118 -93
  30. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
  31. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  32. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  33. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +58079 -23135
  34. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +1234 -255
  35. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  36. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +1234 -255
  37. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  38. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4252 -1932
  39. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +1588 -568
  40. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason.h +0 -5
  41. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/NSObject+MasonElement_Defaults.h +100 -0
  42. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +118 -93
  43. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
  44. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  45. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  46. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  47. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +58076 -23132
  48. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1211 -232
  49. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  50. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1211 -232
  51. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +58076 -23132
  52. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1211 -232
  53. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  54. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1211 -232
  55. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +31 -31
  56. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  57. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4246 -1932
  58. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +4124 -1883
  59. package/scroll/index.android.d.ts +12 -0
  60. package/scroll/index.android.js +50 -0
  61. package/scroll/index.android.js.map +1 -0
  62. package/scroll/index.ios.d.ts +14 -0
  63. package/scroll/index.ios.js +120 -0
  64. package/scroll/index.ios.js.map +1 -0
  65. package/style.d.ts +110 -53
  66. package/style.js +1176 -110
  67. package/style.js.map +1 -1
  68. package/text/index.android.d.ts +30 -0
  69. package/text/index.android.js +124 -0
  70. package/text/index.android.js.map +1 -0
  71. package/text/index.ios.d.ts +38 -0
  72. package/text/index.ios.js +251 -0
  73. package/text/index.ios.js.map +1 -0
  74. package/tree/index.android.d.ts +28 -0
  75. package/tree/index.android.js +77 -0
  76. package/tree/index.android.js.map +1 -0
  77. package/tree/index.ios.d.ts +29 -0
  78. package/tree/index.ios.js +76 -0
  79. package/tree/index.ios.js.map +1 -0
  80. package/utils/index.android.d.ts +187 -0
  81. package/utils/index.android.js +514 -0
  82. package/utils/index.android.js.map +1 -0
  83. package/utils/index.ios.d.ts +198 -0
  84. package/utils/index.ios.js +710 -0
  85. package/utils/index.ios.js.map +1 -0
  86. package/view/index.android.d.ts +12 -0
  87. package/view/index.android.js +50 -0
  88. package/view/index.android.js.map +1 -0
  89. package/view/index.ios.d.ts +16 -0
  90. package/view/index.ios.js +124 -0
  91. package/view/index.ios.js.map +1 -0
  92. package/web.d.ts +55 -0
  93. package/web.js +189 -0
  94. package/web.js.map +1 -0
  95. package/helpers.d.ts +0 -255
  96. package/helpers.js +0 -1318
  97. package/helpers.js.map +0 -1
  98. package/node.d.ts +0 -2
  99. package/node.js +0 -3
  100. package/node.js.map +0 -1
  101. package/platforms/ios/Podfile +0 -1
  102. package/platforms/ios/build.xcconfig +0 -5
  103. package/platforms/ios/prebuild.sh +0 -101
  104. package/platforms/new_native_src/cpp/Caches.cpp +0 -36
  105. package/platforms/new_native_src/cpp/Caches.h +0 -42
  106. package/platforms/new_native_src/cpp/Common.h +0 -34
  107. package/platforms/new_native_src/cpp/ConcurrentMap.h +0 -57
  108. package/platforms/new_native_src/cpp/Helpers.cpp +0 -101
  109. package/platforms/new_native_src/cpp/Helpers.h +0 -364
  110. package/platforms/new_native_src/cpp/MasonImpl.cpp +0 -68
  111. package/platforms/new_native_src/cpp/MasonImpl.h +0 -40
  112. package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +0 -89
  113. package/platforms/new_native_src/cpp/MasonNodeImpl.h +0 -47
  114. package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +0 -2181
  115. package/platforms/new_native_src/cpp/MasonStyleImpl.h +0 -420
  116. package/platforms/new_native_src/cpp/include/mason_native.h +0 -972
  117. package/platforms/new_native_src/cpp/include/robin_hood.h +0 -2544
  118. package/src-native/pods/Headers/include/APIDesign.md +0 -72
  119. package/src-native/pods/Headers/include/DEPS +0 -10
  120. package/src-native/pods/Headers/include/DIR_METADATA +0 -11
  121. package/src-native/pods/Headers/include/OWNERS +0 -23
  122. package/src-native/pods/Headers/include/cppgc/DEPS +0 -8
  123. package/src-native/pods/Headers/include/cppgc/OWNERS +0 -2
  124. package/src-native/pods/Headers/include/cppgc/README.md +0 -133
  125. package/src-native/pods/Headers/include/cppgc/allocation.h +0 -310
  126. package/src-native/pods/Headers/include/cppgc/common.h +0 -29
  127. package/src-native/pods/Headers/include/cppgc/cross-thread-persistent.h +0 -465
  128. package/src-native/pods/Headers/include/cppgc/custom-space.h +0 -97
  129. package/src-native/pods/Headers/include/cppgc/default-platform.h +0 -67
  130. package/src-native/pods/Headers/include/cppgc/ephemeron-pair.h +0 -30
  131. package/src-native/pods/Headers/include/cppgc/explicit-management.h +0 -100
  132. package/src-native/pods/Headers/include/cppgc/garbage-collected.h +0 -106
  133. package/src-native/pods/Headers/include/cppgc/heap-consistency.h +0 -266
  134. package/src-native/pods/Headers/include/cppgc/heap-state.h +0 -82
  135. package/src-native/pods/Headers/include/cppgc/heap-statistics.h +0 -120
  136. package/src-native/pods/Headers/include/cppgc/heap.h +0 -206
  137. package/src-native/pods/Headers/include/cppgc/internal/api-constants.h +0 -55
  138. package/src-native/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -48
  139. package/src-native/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -79
  140. package/src-native/pods/Headers/include/cppgc/internal/compiler-specific.h +0 -38
  141. package/src-native/pods/Headers/include/cppgc/internal/finalizer-trait.h +0 -93
  142. package/src-native/pods/Headers/include/cppgc/internal/gc-info.h +0 -156
  143. package/src-native/pods/Headers/include/cppgc/internal/logging.h +0 -50
  144. package/src-native/pods/Headers/include/cppgc/internal/name-trait.h +0 -122
  145. package/src-native/pods/Headers/include/cppgc/internal/persistent-node.h +0 -216
  146. package/src-native/pods/Headers/include/cppgc/internal/pointer-policies.h +0 -186
  147. package/src-native/pods/Headers/include/cppgc/internal/write-barrier.h +0 -435
  148. package/src-native/pods/Headers/include/cppgc/liveness-broker.h +0 -77
  149. package/src-native/pods/Headers/include/cppgc/macros.h +0 -26
  150. package/src-native/pods/Headers/include/cppgc/member.h +0 -291
  151. package/src-native/pods/Headers/include/cppgc/name-provider.h +0 -65
  152. package/src-native/pods/Headers/include/cppgc/object-size-trait.h +0 -58
  153. package/src-native/pods/Headers/include/cppgc/persistent.h +0 -370
  154. package/src-native/pods/Headers/include/cppgc/platform.h +0 -156
  155. package/src-native/pods/Headers/include/cppgc/prefinalizer.h +0 -75
  156. package/src-native/pods/Headers/include/cppgc/process-heap-statistics.h +0 -36
  157. package/src-native/pods/Headers/include/cppgc/sentinel-pointer.h +0 -32
  158. package/src-native/pods/Headers/include/cppgc/source-location.h +0 -92
  159. package/src-native/pods/Headers/include/cppgc/testing.h +0 -106
  160. package/src-native/pods/Headers/include/cppgc/trace-trait.h +0 -116
  161. package/src-native/pods/Headers/include/cppgc/type-traits.h +0 -240
  162. package/src-native/pods/Headers/include/cppgc/visitor.h +0 -379
  163. package/src-native/pods/Headers/include/js_protocol-1.2.json +0 -936
  164. package/src-native/pods/Headers/include/js_protocol-1.3.json +0 -1112
  165. package/src-native/pods/Headers/include/js_protocol.pdl +0 -1709
  166. package/src-native/pods/Headers/include/libffi/arm64/ffi.h +0 -524
  167. package/src-native/pods/Headers/include/libffi/arm64/ffitarget.h +0 -92
  168. package/src-native/pods/Headers/include/libffi/x86_64/ffi.h +0 -524
  169. package/src-native/pods/Headers/include/libffi/x86_64/ffitarget.h +0 -147
  170. package/src-native/pods/Headers/include/libffi.h +0 -12
  171. package/src-native/pods/Headers/include/libplatform/DEPS +0 -9
  172. package/src-native/pods/Headers/include/libplatform/libplatform-export.h +0 -29
  173. package/src-native/pods/Headers/include/libplatform/libplatform.h +0 -106
  174. package/src-native/pods/Headers/include/libplatform/v8-tracing.h +0 -333
  175. package/src-native/pods/Headers/include/v8-array-buffer.h +0 -433
  176. package/src-native/pods/Headers/include/v8-callbacks.h +0 -397
  177. package/src-native/pods/Headers/include/v8-container.h +0 -129
  178. package/src-native/pods/Headers/include/v8-context.h +0 -407
  179. package/src-native/pods/Headers/include/v8-cppgc.h +0 -215
  180. package/src-native/pods/Headers/include/v8-data.h +0 -80
  181. package/src-native/pods/Headers/include/v8-date.h +0 -43
  182. package/src-native/pods/Headers/include/v8-debug.h +0 -168
  183. package/src-native/pods/Headers/include/v8-embedder-heap.h +0 -218
  184. package/src-native/pods/Headers/include/v8-embedder-state-scope.h +0 -51
  185. package/src-native/pods/Headers/include/v8-exception.h +0 -217
  186. package/src-native/pods/Headers/include/v8-extension.h +0 -62
  187. package/src-native/pods/Headers/include/v8-external.h +0 -37
  188. package/src-native/pods/Headers/include/v8-fast-api-calls.h +0 -939
  189. package/src-native/pods/Headers/include/v8-forward.h +0 -81
  190. package/src-native/pods/Headers/include/v8-function-callback.h +0 -475
  191. package/src-native/pods/Headers/include/v8-function.h +0 -125
  192. package/src-native/pods/Headers/include/v8-initialization.h +0 -315
  193. package/src-native/pods/Headers/include/v8-inspector-protocol.h +0 -13
  194. package/src-native/pods/Headers/include/v8-inspector.h +0 -376
  195. package/src-native/pods/Headers/include/v8-internal.h +0 -661
  196. package/src-native/pods/Headers/include/v8-isolate.h +0 -1709
  197. package/src-native/pods/Headers/include/v8-json.h +0 -47
  198. package/src-native/pods/Headers/include/v8-local-handle.h +0 -455
  199. package/src-native/pods/Headers/include/v8-locker.h +0 -149
  200. package/src-native/pods/Headers/include/v8-maybe.h +0 -137
  201. package/src-native/pods/Headers/include/v8-memory-span.h +0 -43
  202. package/src-native/pods/Headers/include/v8-message.h +0 -216
  203. package/src-native/pods/Headers/include/v8-metrics.h +0 -255
  204. package/src-native/pods/Headers/include/v8-microtask-queue.h +0 -152
  205. package/src-native/pods/Headers/include/v8-microtask.h +0 -28
  206. package/src-native/pods/Headers/include/v8-object.h +0 -775
  207. package/src-native/pods/Headers/include/v8-persistent-handle.h +0 -590
  208. package/src-native/pods/Headers/include/v8-platform.h +0 -1092
  209. package/src-native/pods/Headers/include/v8-primitive-object.h +0 -118
  210. package/src-native/pods/Headers/include/v8-primitive.h +0 -866
  211. package/src-native/pods/Headers/include/v8-profiler.h +0 -1198
  212. package/src-native/pods/Headers/include/v8-promise.h +0 -174
  213. package/src-native/pods/Headers/include/v8-proxy.h +0 -50
  214. package/src-native/pods/Headers/include/v8-regexp.h +0 -105
  215. package/src-native/pods/Headers/include/v8-script.h +0 -748
  216. package/src-native/pods/Headers/include/v8-snapshot.h +0 -196
  217. package/src-native/pods/Headers/include/v8-statistics.h +0 -217
  218. package/src-native/pods/Headers/include/v8-template.h +0 -1079
  219. package/src-native/pods/Headers/include/v8-traced-handle.h +0 -420
  220. package/src-native/pods/Headers/include/v8-typed-array.h +0 -282
  221. package/src-native/pods/Headers/include/v8-unwinder-state.h +0 -31
  222. package/src-native/pods/Headers/include/v8-unwinder.h +0 -132
  223. package/src-native/pods/Headers/include/v8-util.h +0 -658
  224. package/src-native/pods/Headers/include/v8-value-serializer-version.h +0 -24
  225. package/src-native/pods/Headers/include/v8-value-serializer.h +0 -279
  226. package/src-native/pods/Headers/include/v8-value.h +0 -526
  227. package/src-native/pods/Headers/include/v8-version-string.h +0 -38
  228. package/src-native/pods/Headers/include/v8-version.h +0 -20
  229. package/src-native/pods/Headers/include/v8-wasm-trap-handler-posix.h +0 -31
  230. package/src-native/pods/Headers/include/v8-wasm-trap-handler-win.h +0 -28
  231. package/src-native/pods/Headers/include/v8-wasm.h +0 -257
  232. package/src-native/pods/Headers/include/v8-weak-callback-info.h +0 -86
  233. package/src-native/pods/Headers/include/v8.h +0 -88
  234. package/src-native/pods/Headers/include/v8config.h +0 -605
  235. package/src-native/pods/Headers/inspector/InspectorServer.h +0 -20
  236. package/src-native/pods/Headers/inspector/JsV8InspectorClient.h +0 -66
  237. package/src-native/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -1123
  238. package/src-native/pods/Headers/inspector/base64.h +0 -9
  239. package/src-native/pods/Headers/inspector/src/base/address-region.h +0 -95
  240. package/src-native/pods/Headers/inspector/src/base/atomic-utils.h +0 -219
  241. package/src-native/pods/Headers/inspector/src/base/atomicops.h +0 -332
  242. package/src-native/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -89
  243. package/src-native/pods/Headers/inspector/src/base/base-export.h +0 -31
  244. package/src-native/pods/Headers/inspector/src/base/bits.h +0 -343
  245. package/src-native/pods/Headers/inspector/src/base/build_config.h +0 -234
  246. package/src-native/pods/Headers/inspector/src/base/compiler-specific.h +0 -136
  247. package/src-native/pods/Headers/inspector/src/base/export-template.h +0 -163
  248. package/src-native/pods/Headers/inspector/src/base/flags.h +0 -130
  249. package/src-native/pods/Headers/inspector/src/base/immediate-crash.h +0 -162
  250. package/src-native/pods/Headers/inspector/src/base/lazy-instance.h +0 -258
  251. package/src-native/pods/Headers/inspector/src/base/logging.h +0 -417
  252. package/src-native/pods/Headers/inspector/src/base/macros.h +0 -423
  253. package/src-native/pods/Headers/inspector/src/base/memory.h +0 -89
  254. package/src-native/pods/Headers/inspector/src/base/once.h +0 -108
  255. package/src-native/pods/Headers/inspector/src/base/optional.h +0 -882
  256. package/src-native/pods/Headers/inspector/src/base/platform/mutex.h +0 -370
  257. package/src-native/pods/Headers/inspector/src/base/platform/platform.h +0 -476
  258. package/src-native/pods/Headers/inspector/src/base/platform/semaphore.h +0 -108
  259. package/src-native/pods/Headers/inspector/src/base/platform/v8-time.h +0 -513
  260. package/src-native/pods/Headers/inspector/src/base/platform/wrappers.h +0 -73
  261. package/src-native/pods/Headers/inspector/src/base/safe_conversions.h +0 -389
  262. package/src-native/pods/Headers/inspector/src/base/safe_conversions_impl.h +0 -822
  263. package/src-native/pods/Headers/inspector/src/base/template-utils.h +0 -113
  264. package/src-native/pods/Headers/inspector/src/base/v8-fallthrough.h +0 -21
  265. package/src-native/pods/Headers/inspector/src/common/checks.h +0 -38
  266. package/src-native/pods/Headers/inspector/src/common/globals.h +0 -1842
  267. package/src-native/pods/Headers/inspector/src/debug/debug-interface.h +0 -667
  268. package/src-native/pods/Headers/inspector/src/debug/interface-types.h +0 -175
  269. package/src-native/pods/Headers/inspector/src/init/v8.h +0 -52
  270. package/src-native/pods/Headers/inspector/src/inspector/custom-preview.h +0 -24
  271. package/src-native/pods/Headers/inspector/src/inspector/injected-script.h +0 -251
  272. package/src-native/pods/Headers/inspector/src/inspector/inspected-context.h +0 -79
  273. package/src-native/pods/Headers/inspector/src/inspector/protocol/CSS.h +0 -2148
  274. package/src-native/pods/Headers/inspector/src/inspector/protocol/Console.h +0 -211
  275. package/src-native/pods/Headers/inspector/src/inspector/protocol/DOM.h +0 -1008
  276. package/src-native/pods/Headers/inspector/src/inspector/protocol/Debugger.h +0 -892
  277. package/src-native/pods/Headers/inspector/src/inspector/protocol/Forward.h +0 -75
  278. package/src-native/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -346
  279. package/src-native/pods/Headers/inspector/src/inspector/protocol/Log.h +0 -342
  280. package/src-native/pods/Headers/inspector/src/inspector/protocol/Network.h +0 -2528
  281. package/src-native/pods/Headers/inspector/src/inspector/protocol/Overlay.h +0 -281
  282. package/src-native/pods/Headers/inspector/src/inspector/protocol/Page.h +0 -1189
  283. package/src-native/pods/Headers/inspector/src/inspector/protocol/Profiler.h +0 -1001
  284. package/src-native/pods/Headers/inspector/src/inspector/protocol/Protocol.h +0 -617
  285. package/src-native/pods/Headers/inspector/src/inspector/protocol/Runtime.h +0 -1696
  286. package/src-native/pods/Headers/inspector/src/inspector/protocol/Schema.h +0 -146
  287. package/src-native/pods/Headers/inspector/src/inspector/protocol/Security.h +0 -793
  288. package/src-native/pods/Headers/inspector/src/inspector/remote-object-id.h +0 -54
  289. package/src-native/pods/Headers/inspector/src/inspector/search-util.h +0 -26
  290. package/src-native/pods/Headers/inspector/src/inspector/string-16.h +0 -180
  291. package/src-native/pods/Headers/inspector/src/inspector/string-util.h +0 -128
  292. package/src-native/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -48
  293. package/src-native/pods/Headers/inspector/src/inspector/v8-console-message.h +0 -147
  294. package/src-native/pods/Headers/inspector/src/inspector/v8-console.h +0 -173
  295. package/src-native/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -62
  296. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -248
  297. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-id.h +0 -44
  298. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-script.h +0 -123
  299. package/src-native/pods/Headers/inspector/src/inspector/v8-debugger.h +0 -257
  300. package/src-native/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -91
  301. package/src-native/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -80
  302. package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -191
  303. package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -156
  304. package/src-native/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -34
  305. package/src-native/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -71
  306. package/src-native/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -24
  307. package/src-native/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -70
  308. package/src-native/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -88
  309. package/src-native/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -104
  310. package/src-native/pods/Headers/inspector/src/inspector/v8-regex.h +0 -38
  311. package/src-native/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -157
  312. package/src-native/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -38
  313. package/src-native/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -164
  314. package/src-native/pods/Headers/inspector/src/inspector/v8-string-conversions.h +0 -17
  315. package/src-native/pods/Headers/inspector/src/inspector/v8-value-utils.h +0 -23
  316. package/src-native/pods/Headers/inspector/src/inspector/value-mirror.h +0 -87
  317. package/src-native/pods/Headers/inspector/src/libplatform/default-platform.h +0 -92
  318. package/src-native/pods/Headers/inspector/src/logging/tracing-flags.h +0 -50
  319. package/src-native/pods/Headers/inspector/src/numbers/conversions.h +0 -183
  320. package/src-native/pods/Headers/inspector/src/tracing/trace-event.h +0 -664
  321. package/src-native/pods/Headers/inspector/src/utils/allocation.h +0 -367
  322. package/src-native/pods/Headers/inspector/src/utils/vector.h +0 -324
  323. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -305
  324. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -314
  325. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -62
  326. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -6
  327. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -58
  328. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -47
  329. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -80
  330. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -52
  331. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -26
  332. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -104
  333. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -39
  334. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -406
  335. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -32
  336. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -158
  337. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -99
  338. package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -139
  339. package/src-native/pods/Headers/inspector/utils.h +0 -32
  340. package/src-native/pods/Headers/inspector/v8-inspector-platform.h +0 -44
  341. package/src-native/pods/Headers/jsi/decorator.h +0 -762
  342. package/src-native/pods/Headers/jsi/instrumentation.h +0 -117
  343. package/src-native/pods/Headers/jsi/jsi-inl.h +0 -322
  344. package/src-native/pods/Headers/jsi/jsi.h +0 -1387
  345. package/src-native/pods/Headers/jsi/jsilib.h +0 -59
  346. package/src-native/pods/Headers/jsi/threadsafe.h +0 -79
  347. package/src-native/pods/Headers/runtime/ArgConverter.h +0 -61
  348. package/src-native/pods/Headers/runtime/ArrayAdapter.h +0 -13
  349. package/src-native/pods/Headers/runtime/Caches.h +0 -98
  350. package/src-native/pods/Headers/runtime/ClassBuilder.h +0 -61
  351. package/src-native/pods/Headers/runtime/Common.h +0 -9
  352. package/src-native/pods/Headers/runtime/ConcurrentMap.h +0 -55
  353. package/src-native/pods/Headers/runtime/ConcurrentQueue.h +0 -28
  354. package/src-native/pods/Headers/runtime/Console.h +0 -27
  355. package/src-native/pods/Headers/runtime/Constants.h +0 -15
  356. package/src-native/pods/Headers/runtime/DataWrapper.h +0 -671
  357. package/src-native/pods/Headers/runtime/DictionaryAdapter.h +0 -13
  358. package/src-native/pods/Headers/runtime/ExtVector.h +0 -21
  359. package/src-native/pods/Headers/runtime/FFICall.h +0 -105
  360. package/src-native/pods/Headers/runtime/FastEnumerationAdapter.h +0 -13
  361. package/src-native/pods/Headers/runtime/FunctionReference.h +0 -18
  362. package/src-native/pods/Headers/runtime/Helpers.h +0 -84
  363. package/src-native/pods/Headers/runtime/InlineFunctions.h +0 -16
  364. package/src-native/pods/Headers/runtime/Interop.h +0 -202
  365. package/src-native/pods/Headers/runtime/KnownUnknownClassPair.h +0 -35
  366. package/src-native/pods/Headers/runtime/Metadata.h +0 -981
  367. package/src-native/pods/Headers/runtime/MetadataBuilder.h +0 -72
  368. package/src-native/pods/Headers/runtime/MetadataInlines.h +0 -157
  369. package/src-native/pods/Headers/runtime/ModuleInternal.h +0 -59
  370. package/src-native/pods/Headers/runtime/NSDataAdapter.h +0 -13
  371. package/src-native/pods/Headers/runtime/NativeScriptException.h +0 -27
  372. package/src-native/pods/Headers/runtime/ObjectManager.h +0 -31
  373. package/src-native/pods/Headers/runtime/OneByteStringResource.h +0 -21
  374. package/src-native/pods/Headers/runtime/Pointer.h +0 -26
  375. package/src-native/pods/Headers/runtime/PromiseProxy.h +0 -15
  376. package/src-native/pods/Headers/runtime/Reference.h +0 -38
  377. package/src-native/pods/Headers/runtime/Runtime.h +0 -67
  378. package/src-native/pods/Headers/runtime/RuntimeConfig.h +0 -17
  379. package/src-native/pods/Headers/runtime/SetTimeout.h +0 -34
  380. package/src-native/pods/Headers/runtime/SimpleAllocator.h +0 -23
  381. package/src-native/pods/Headers/runtime/StringHasher.h +0 -315
  382. package/src-native/pods/Headers/runtime/SymbolIterator.h +0 -18
  383. package/src-native/pods/Headers/runtime/SymbolLoader.h +0 -27
  384. package/src-native/pods/Headers/runtime/TNSDerivedClass.h +0 -8
  385. package/src-native/pods/Headers/runtime/TSHelpers.h +0 -15
  386. package/src-native/pods/Headers/runtime/Tasks.h +0 -19
  387. package/src-native/pods/Headers/runtime/UnmanagedType.h +0 -21
  388. package/src-native/pods/Headers/runtime/WeakRef.h +0 -15
  389. package/src-native/pods/Headers/runtime/Worker.h +0 -26
  390. package/src-native/pods/Headers/runtime/robin_hood.h +0 -2184
  391. package/src-native/pods/Headers/v8runtime/HostProxy.h +0 -71
  392. package/src-native/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -70
  393. package/src-native/pods/Headers/v8runtime/V8PointerValue.h +0 -44
  394. package/src-native/pods/Headers/v8runtime/V8Runtime.h +0 -215
  395. package/src-native/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
  396. package/src-native/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
  397. package/src-native/pods/NativeScript.podspec +0 -68
@@ -1,661 +0,0 @@
1
- // Copyright 2018 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 INCLUDE_V8_INTERNAL_H_
6
- #define INCLUDE_V8_INTERNAL_H_
7
-
8
- #include <stddef.h>
9
- #include <stdint.h>
10
- #include <string.h>
11
- #include <type_traits>
12
-
13
- #include "v8-version.h" // NOLINT(build/include_directory)
14
- #include "v8config.h" // NOLINT(build/include_directory)
15
-
16
- namespace v8 {
17
-
18
- class Array;
19
- class Context;
20
- class Data;
21
- class Isolate;
22
- template <typename T>
23
- class Local;
24
-
25
- namespace internal {
26
-
27
- class Isolate;
28
-
29
- typedef uintptr_t Address;
30
- static const Address kNullAddress = 0;
31
-
32
- constexpr int KB = 1024;
33
- constexpr int MB = KB * 1024;
34
- constexpr int GB = MB * 1024;
35
- #ifdef V8_TARGET_ARCH_X64
36
- constexpr size_t TB = size_t{GB} * 1024;
37
- #endif
38
-
39
- /**
40
- * Configuration of tagging scheme.
41
- */
42
- const int kApiSystemPointerSize = sizeof(void*);
43
- const int kApiDoubleSize = sizeof(double);
44
- const int kApiInt32Size = sizeof(int32_t);
45
- const int kApiInt64Size = sizeof(int64_t);
46
- const int kApiSizetSize = sizeof(size_t);
47
-
48
- // Tag information for HeapObject.
49
- const int kHeapObjectTag = 1;
50
- const int kWeakHeapObjectTag = 3;
51
- const int kHeapObjectTagSize = 2;
52
- const intptr_t kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1;
53
-
54
- // Tag information for fowarding pointers stored in object headers.
55
- // 0b00 at the lowest 2 bits in the header indicates that the map word is a
56
- // forwarding pointer.
57
- const int kForwardingTag = 0;
58
- const int kForwardingTagSize = 2;
59
- const intptr_t kForwardingTagMask = (1 << kForwardingTagSize) - 1;
60
-
61
- // Tag information for Smi.
62
- const int kSmiTag = 0;
63
- const int kSmiTagSize = 1;
64
- const intptr_t kSmiTagMask = (1 << kSmiTagSize) - 1;
65
-
66
- template <size_t tagged_ptr_size>
67
- struct SmiTagging;
68
-
69
- constexpr intptr_t kIntptrAllBitsSet = intptr_t{-1};
70
- constexpr uintptr_t kUintptrAllBitsSet =
71
- static_cast<uintptr_t>(kIntptrAllBitsSet);
72
-
73
- // Smi constants for systems where tagged pointer is a 32-bit value.
74
- template <>
75
- struct SmiTagging<4> {
76
- enum { kSmiShiftSize = 0, kSmiValueSize = 31 };
77
-
78
- static constexpr intptr_t kSmiMinValue =
79
- static_cast<intptr_t>(kUintptrAllBitsSet << (kSmiValueSize - 1));
80
- static constexpr intptr_t kSmiMaxValue = -(kSmiMinValue + 1);
81
-
82
- V8_INLINE static int SmiToInt(const internal::Address value) {
83
- int shift_bits = kSmiTagSize + kSmiShiftSize;
84
- // Truncate and shift down (requires >> to be sign extending).
85
- return static_cast<int32_t>(static_cast<uint32_t>(value)) >> shift_bits;
86
- }
87
- V8_INLINE static constexpr bool IsValidSmi(intptr_t value) {
88
- // Is value in range [kSmiMinValue, kSmiMaxValue].
89
- // Use unsigned operations in order to avoid undefined behaviour in case of
90
- // signed integer overflow.
91
- return (static_cast<uintptr_t>(value) -
92
- static_cast<uintptr_t>(kSmiMinValue)) <=
93
- (static_cast<uintptr_t>(kSmiMaxValue) -
94
- static_cast<uintptr_t>(kSmiMinValue));
95
- }
96
- };
97
-
98
- // Smi constants for systems where tagged pointer is a 64-bit value.
99
- template <>
100
- struct SmiTagging<8> {
101
- enum { kSmiShiftSize = 31, kSmiValueSize = 32 };
102
-
103
- static constexpr intptr_t kSmiMinValue =
104
- static_cast<intptr_t>(kUintptrAllBitsSet << (kSmiValueSize - 1));
105
- static constexpr intptr_t kSmiMaxValue = -(kSmiMinValue + 1);
106
-
107
- V8_INLINE static int SmiToInt(const internal::Address value) {
108
- int shift_bits = kSmiTagSize + kSmiShiftSize;
109
- // Shift down and throw away top 32 bits.
110
- return static_cast<int>(static_cast<intptr_t>(value) >> shift_bits);
111
- }
112
- V8_INLINE static constexpr bool IsValidSmi(intptr_t value) {
113
- // To be representable as a long smi, the value must be a 32-bit integer.
114
- return (value == static_cast<int32_t>(value));
115
- }
116
- };
117
-
118
- #ifdef V8_COMPRESS_POINTERS
119
- // See v8:7703 or src/common/ptr-compr-inl.h for details about pointer
120
- // compression.
121
- constexpr size_t kPtrComprCageReservationSize = size_t{1} << 32;
122
- constexpr size_t kPtrComprCageBaseAlignment = size_t{1} << 32;
123
-
124
- static_assert(
125
- kApiSystemPointerSize == kApiInt64Size,
126
- "Pointer compression can be enabled only for 64-bit architectures");
127
- const int kApiTaggedSize = kApiInt32Size;
128
- #else
129
- const int kApiTaggedSize = kApiSystemPointerSize;
130
- #endif
131
-
132
- constexpr bool PointerCompressionIsEnabled() {
133
- return kApiTaggedSize != kApiSystemPointerSize;
134
- }
135
-
136
- #ifdef V8_31BIT_SMIS_ON_64BIT_ARCH
137
- using PlatformSmiTagging = SmiTagging<kApiInt32Size>;
138
- #else
139
- using PlatformSmiTagging = SmiTagging<kApiTaggedSize>;
140
- #endif
141
-
142
- // TODO(ishell): Consinder adding kSmiShiftBits = kSmiShiftSize + kSmiTagSize
143
- // since it's used much more often than the inividual constants.
144
- const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize;
145
- const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize;
146
- const int kSmiMinValue = static_cast<int>(PlatformSmiTagging::kSmiMinValue);
147
- const int kSmiMaxValue = static_cast<int>(PlatformSmiTagging::kSmiMaxValue);
148
- constexpr bool SmiValuesAre31Bits() { return kSmiValueSize == 31; }
149
- constexpr bool SmiValuesAre32Bits() { return kSmiValueSize == 32; }
150
-
151
- V8_INLINE static constexpr internal::Address IntToSmi(int value) {
152
- return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) |
153
- kSmiTag;
154
- }
155
-
156
- /*
157
- * Sandbox related types, constants, and functions.
158
- */
159
- constexpr bool SandboxIsEnabled() {
160
- #ifdef V8_SANDBOX
161
- return true;
162
- #else
163
- return false;
164
- #endif
165
- }
166
-
167
- constexpr bool SandboxedExternalPointersAreEnabled() {
168
- #ifdef V8_SANDBOXED_EXTERNAL_POINTERS
169
- return true;
170
- #else
171
- return false;
172
- #endif
173
- }
174
-
175
- // SandboxedPointers are guaranteed to point into the sandbox. This is achieved
176
- // for example by storing them as offset rather than as raw pointers.
177
- using SandboxedPointer_t = Address;
178
-
179
- // ExternalPointers point to objects located outside the sandbox. When sandboxed
180
- // external pointers are enabled, these are stored in an external pointer table
181
- // and referenced from HeapObjects through indices.
182
- #ifdef V8_SANDBOXED_EXTERNAL_POINTERS
183
- using ExternalPointer_t = uint32_t;
184
- #else
185
- using ExternalPointer_t = Address;
186
- #endif
187
-
188
- #ifdef V8_SANDBOX_IS_AVAILABLE
189
-
190
- // Size of the sandbox, excluding the guard regions surrounding it.
191
- constexpr size_t kSandboxSizeLog2 = 40; // 1 TB
192
- constexpr size_t kSandboxSize = 1ULL << kSandboxSizeLog2;
193
-
194
- // Required alignment of the sandbox. For simplicity, we require the
195
- // size of the guard regions to be a multiple of this, so that this specifies
196
- // the alignment of the sandbox including and excluding surrounding guard
197
- // regions. The alignment requirement is due to the pointer compression cage
198
- // being located at the start of the sandbox.
199
- constexpr size_t kSandboxAlignment = kPtrComprCageBaseAlignment;
200
-
201
- // Sandboxed pointers are stored inside the heap as offset from the sandbox
202
- // base shifted to the left. This way, it is guaranteed that the offset is
203
- // smaller than the sandbox size after shifting it to the right again. This
204
- // constant specifies the shift amount.
205
- constexpr uint64_t kSandboxedPointerShift = 64 - kSandboxSizeLog2;
206
-
207
- // Size of the guard regions surrounding the sandbox. This assumes a worst-case
208
- // scenario of a 32-bit unsigned index used to access an array of 64-bit
209
- // values.
210
- constexpr size_t kSandboxGuardRegionSize = 32ULL * GB;
211
-
212
- static_assert((kSandboxGuardRegionSize % kSandboxAlignment) == 0,
213
- "The size of the guard regions around the sandbox must be a "
214
- "multiple of its required alignment.");
215
-
216
- // Minimum size of the sandbox, excluding the guard regions surrounding it. If
217
- // the virtual memory reservation for the sandbox fails, its size is currently
218
- // halved until either the reservation succeeds or the minimum size is reached.
219
- // A minimum of 32GB allows the 4GB pointer compression region as well as the
220
- // ArrayBuffer partition and two 10GB Wasm memory cages to fit into the
221
- // sandbox. 32GB should also be the minimum possible size of the userspace
222
- // address space as there are some machine configurations with only 36 virtual
223
- // address bits.
224
- constexpr size_t kSandboxMinimumSize = 32ULL * GB;
225
-
226
- static_assert(kSandboxMinimumSize <= kSandboxSize,
227
- "The minimal size of the sandbox must be smaller or equal to the "
228
- "regular size.");
229
-
230
- // On OSes where reserving virtual memory is too expensive to reserve the
231
- // entire address space backing the sandbox, notably Windows pre 8.1, we create
232
- // a partially reserved sandbox that doesn't actually reserve most of the
233
- // memory, and so doesn't have the desired security properties as unrelated
234
- // memory allocations could end up inside of it, but which still ensures that
235
- // objects that should be located inside the sandbox are allocated within
236
- // kSandboxSize bytes from the start of the sandbox. The minimum size of the
237
- // region that is actually reserved for such a sandbox is specified by this
238
- // constant and should be big enough to contain the pointer compression cage as
239
- // well as the ArrayBuffer partition.
240
- constexpr size_t kSandboxMinimumReservationSize = 8ULL * GB;
241
-
242
- static_assert(kSandboxMinimumSize > kPtrComprCageReservationSize,
243
- "The sandbox must be larger than the pointer compression cage "
244
- "contained within it.");
245
- static_assert(kSandboxMinimumReservationSize > kPtrComprCageReservationSize,
246
- "The minimum reservation size for a sandbox must be larger than "
247
- "the pointer compression cage contained within it.");
248
-
249
- // For now, even if the sandbox is enabled, we still allow backing stores to be
250
- // allocated outside of it as fallback. This will simplify the initial rollout.
251
- // However, if sandboxed pointers are also enabled, we must always place
252
- // backing stores inside the sandbox as they will be referenced though them.
253
- #ifdef V8_SANDBOXED_POINTERS
254
- constexpr bool kAllowBackingStoresOutsideSandbox = false;
255
- #else
256
- constexpr bool kAllowBackingStoresOutsideSandbox = true;
257
- #endif // V8_SANDBOXED_POINTERS
258
-
259
- // The size of the virtual memory reservation for an external pointer table.
260
- // This determines the maximum number of entries in a table. Using a maximum
261
- // size allows omitting bounds checks on table accesses if the indices are
262
- // guaranteed (e.g. through shifting) to be below the maximum index. This
263
- // value must be a power of two.
264
- static const size_t kExternalPointerTableReservationSize = 128 * MB;
265
-
266
- // The maximum number of entries in an external pointer table.
267
- static const size_t kMaxSandboxedExternalPointers =
268
- kExternalPointerTableReservationSize / kApiSystemPointerSize;
269
-
270
- // The external pointer table indices stored in HeapObjects as external
271
- // pointers are shifted to the left by this amount to guarantee that they are
272
- // smaller than the maximum table size.
273
- static const uint32_t kExternalPointerIndexShift = 8;
274
- static_assert((1 << (32 - kExternalPointerIndexShift)) ==
275
- kMaxSandboxedExternalPointers,
276
- "kExternalPointerTableReservationSize and "
277
- "kExternalPointerIndexShift don't match");
278
-
279
- #endif // V8_SANDBOX_IS_AVAILABLE
280
-
281
- // If sandboxed external pointers are enabled, these tag values will be ORed
282
- // with the external pointers in the external pointer table to prevent use of
283
- // pointers of the wrong type. When a pointer is loaded, it is ANDed with the
284
- // inverse of the expected type's tag. The tags are constructed in a way that
285
- // guarantees that a failed type check will result in one or more of the top
286
- // bits of the pointer to be set, rendering the pointer inacessible. Besides
287
- // the type tag bits (48 through 62), the tags also have the GC mark bit (63)
288
- // set, so that the mark bit is automatically set when a pointer is written
289
- // into the external pointer table (in which case it is clearly alive) and is
290
- // cleared when the pointer is loaded. The exception to this is the free entry
291
- // tag, which doesn't have the mark bit set, as the entry is not alive. This
292
- // construction allows performing the type check and removing GC marking bits
293
- // (the MSB) from the pointer at the same time.
294
- // Note: this scheme assumes a 48-bit address space and will likely break if
295
- // more virtual address bits are used.
296
- constexpr uint64_t kExternalPointerTagMask = 0xffff000000000000;
297
- constexpr uint64_t kExternalPointerTagShift = 48;
298
- #define MAKE_TAG(v) (static_cast<uint64_t>(v) << kExternalPointerTagShift)
299
- // clang-format off
300
- enum ExternalPointerTag : uint64_t {
301
- kExternalPointerNullTag = MAKE_TAG(0b0000000000000000),
302
- kExternalPointerFreeEntryTag = MAKE_TAG(0b0111111110000000),
303
- kExternalStringResourceTag = MAKE_TAG(0b1000000011111111),
304
- kExternalStringResourceDataTag = MAKE_TAG(0b1000000101111111),
305
- kForeignForeignAddressTag = MAKE_TAG(0b1000000110111111),
306
- kNativeContextMicrotaskQueueTag = MAKE_TAG(0b1000000111011111),
307
- kEmbedderDataSlotPayloadTag = MAKE_TAG(0b1000000111101111),
308
- kCodeEntryPointTag = MAKE_TAG(0b1000000111110111),
309
- kExternalObjectValueTag = MAKE_TAG(0b1000000111111011),
310
- };
311
- // clang-format on
312
- #undef MAKE_TAG
313
-
314
- // Converts encoded external pointer to address.
315
- V8_EXPORT Address DecodeExternalPointerImpl(const Isolate* isolate,
316
- ExternalPointer_t pointer,
317
- ExternalPointerTag tag);
318
-
319
- // {obj} must be the raw tagged pointer representation of a HeapObject
320
- // that's guaranteed to never be in ReadOnlySpace.
321
- V8_EXPORT internal::Isolate* IsolateFromNeverReadOnlySpaceObject(Address obj);
322
-
323
- // Returns if we need to throw when an error occurs. This infers the language
324
- // mode based on the current context and the closure. This returns true if the
325
- // language mode is strict.
326
- V8_EXPORT bool ShouldThrowOnError(v8::internal::Isolate* isolate);
327
-
328
- V8_EXPORT bool CanHaveInternalField(int instance_type);
329
-
330
- /**
331
- * This class exports constants and functionality from within v8 that
332
- * is necessary to implement inline functions in the v8 api. Don't
333
- * depend on functions and constants defined here.
334
- */
335
- class Internals {
336
- #ifdef V8_MAP_PACKING
337
- V8_INLINE static constexpr internal::Address UnpackMapWord(
338
- internal::Address mapword) {
339
- // TODO(wenyuzhao): Clear header metadata.
340
- return mapword ^ kMapWordXorMask;
341
- }
342
- #endif
343
-
344
- public:
345
- // These values match non-compiler-dependent values defined within
346
- // the implementation of v8.
347
- static const int kHeapObjectMapOffset = 0;
348
- static const int kMapInstanceTypeOffset = 1 * kApiTaggedSize + kApiInt32Size;
349
- static const int kStringResourceOffset =
350
- 1 * kApiTaggedSize + 2 * kApiInt32Size;
351
-
352
- static const int kOddballKindOffset = 4 * kApiTaggedSize + kApiDoubleSize;
353
- static const int kJSObjectHeaderSize = 3 * kApiTaggedSize;
354
- static const int kFixedArrayHeaderSize = 2 * kApiTaggedSize;
355
- static const int kEmbedderDataArrayHeaderSize = 2 * kApiTaggedSize;
356
- static const int kEmbedderDataSlotSize = kApiSystemPointerSize;
357
- #ifdef V8_SANDBOXED_EXTERNAL_POINTERS
358
- static const int kEmbedderDataSlotRawPayloadOffset = kApiTaggedSize;
359
- #endif
360
- static const int kNativeContextEmbedderDataOffset = 6 * kApiTaggedSize;
361
- static const int kStringRepresentationAndEncodingMask = 0x0f;
362
- static const int kStringEncodingMask = 0x8;
363
- static const int kExternalTwoByteRepresentationTag = 0x02;
364
- static const int kExternalOneByteRepresentationTag = 0x0a;
365
-
366
- static const uint32_t kNumIsolateDataSlots = 4;
367
- static const int kStackGuardSize = 7 * kApiSystemPointerSize;
368
- static const int kBuiltinTier0EntryTableSize = 9 * kApiSystemPointerSize;
369
- static const int kBuiltinTier0TableSize = 9 * kApiSystemPointerSize;
370
-
371
- // IsolateData layout guarantees.
372
- static const int kIsolateCageBaseOffset = 0;
373
- static const int kIsolateStackGuardOffset =
374
- kIsolateCageBaseOffset + kApiSystemPointerSize;
375
- static const int kBuiltinTier0EntryTableOffset =
376
- kIsolateStackGuardOffset + kStackGuardSize;
377
- static const int kBuiltinTier0TableOffset =
378
- kBuiltinTier0EntryTableOffset + kBuiltinTier0EntryTableSize;
379
- static const int kIsolateEmbedderDataOffset =
380
- kBuiltinTier0TableOffset + kBuiltinTier0TableSize;
381
- static const int kIsolateFastCCallCallerFpOffset =
382
- kIsolateEmbedderDataOffset + kNumIsolateDataSlots * kApiSystemPointerSize;
383
- static const int kIsolateFastCCallCallerPcOffset =
384
- kIsolateFastCCallCallerFpOffset + kApiSystemPointerSize;
385
- static const int kIsolateFastApiCallTargetOffset =
386
- kIsolateFastCCallCallerPcOffset + kApiSystemPointerSize;
387
- static const int kIsolateLongTaskStatsCounterOffset =
388
- kIsolateFastApiCallTargetOffset + kApiSystemPointerSize;
389
- static const int kIsolateRootsOffset =
390
- kIsolateLongTaskStatsCounterOffset + kApiSizetSize;
391
-
392
- static const int kExternalPointerTableBufferOffset = 0;
393
- static const int kExternalPointerTableCapacityOffset =
394
- kExternalPointerTableBufferOffset + kApiSystemPointerSize;
395
- static const int kExternalPointerTableFreelistHeadOffset =
396
- kExternalPointerTableCapacityOffset + kApiInt32Size;
397
-
398
- static const int kUndefinedValueRootIndex = 4;
399
- static const int kTheHoleValueRootIndex = 5;
400
- static const int kNullValueRootIndex = 6;
401
- static const int kTrueValueRootIndex = 7;
402
- static const int kFalseValueRootIndex = 8;
403
- static const int kEmptyStringRootIndex = 9;
404
-
405
- static const int kNodeClassIdOffset = 1 * kApiSystemPointerSize;
406
- static const int kNodeFlagsOffset = 1 * kApiSystemPointerSize + 3;
407
- static const int kNodeStateMask = 0x7;
408
- static const int kNodeStateIsWeakValue = 2;
409
- static const int kNodeStateIsPendingValue = 3;
410
-
411
- static const int kFirstNonstringType = 0x80;
412
- static const int kOddballType = 0x83;
413
- static const int kForeignType = 0xcc;
414
- static const int kJSSpecialApiObjectType = 0x410;
415
- static const int kJSObjectType = 0x421;
416
- static const int kFirstJSApiObjectType = 0x422;
417
- static const int kLastJSApiObjectType = 0x80A;
418
-
419
- static const int kUndefinedOddballKind = 5;
420
- static const int kNullOddballKind = 3;
421
-
422
- // Constants used by PropertyCallbackInfo to check if we should throw when an
423
- // error occurs.
424
- static const int kThrowOnError = 0;
425
- static const int kDontThrow = 1;
426
- static const int kInferShouldThrowMode = 2;
427
-
428
- // Soft limit for AdjustAmountofExternalAllocatedMemory. Trigger an
429
- // incremental GC once the external memory reaches this limit.
430
- static constexpr int kExternalAllocationSoftLimit = 64 * 1024 * 1024;
431
-
432
- #ifdef V8_MAP_PACKING
433
- static const uintptr_t kMapWordMetadataMask = 0xffffULL << 48;
434
- // The lowest two bits of mapwords are always `0b10`
435
- static const uintptr_t kMapWordSignature = 0b10;
436
- // XORing a (non-compressed) map with this mask ensures that the two
437
- // low-order bits are 0b10. The 0 at the end makes this look like a Smi,
438
- // although real Smis have all lower 32 bits unset. We only rely on these
439
- // values passing as Smis in very few places.
440
- static const int kMapWordXorMask = 0b11;
441
- #endif
442
-
443
- V8_EXPORT static void CheckInitializedImpl(v8::Isolate* isolate);
444
- V8_INLINE static void CheckInitialized(v8::Isolate* isolate) {
445
- #ifdef V8_ENABLE_CHECKS
446
- CheckInitializedImpl(isolate);
447
- #endif
448
- }
449
-
450
- V8_INLINE static bool HasHeapObjectTag(const internal::Address value) {
451
- return (value & kHeapObjectTagMask) == static_cast<Address>(kHeapObjectTag);
452
- }
453
-
454
- V8_INLINE static int SmiValue(const internal::Address value) {
455
- return PlatformSmiTagging::SmiToInt(value);
456
- }
457
-
458
- V8_INLINE static constexpr internal::Address IntToSmi(int value) {
459
- return internal::IntToSmi(value);
460
- }
461
-
462
- V8_INLINE static constexpr bool IsValidSmi(intptr_t value) {
463
- return PlatformSmiTagging::IsValidSmi(value);
464
- }
465
-
466
- V8_INLINE static int GetInstanceType(const internal::Address obj) {
467
- typedef internal::Address A;
468
- A map = ReadTaggedPointerField(obj, kHeapObjectMapOffset);
469
- #ifdef V8_MAP_PACKING
470
- map = UnpackMapWord(map);
471
- #endif
472
- return ReadRawField<uint16_t>(map, kMapInstanceTypeOffset);
473
- }
474
-
475
- V8_INLINE static int GetOddballKind(const internal::Address obj) {
476
- return SmiValue(ReadTaggedSignedField(obj, kOddballKindOffset));
477
- }
478
-
479
- V8_INLINE static bool IsExternalTwoByteString(int instance_type) {
480
- int representation = (instance_type & kStringRepresentationAndEncodingMask);
481
- return representation == kExternalTwoByteRepresentationTag;
482
- }
483
-
484
- V8_INLINE static uint8_t GetNodeFlag(internal::Address* obj, int shift) {
485
- uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset;
486
- return *addr & static_cast<uint8_t>(1U << shift);
487
- }
488
-
489
- V8_INLINE static void UpdateNodeFlag(internal::Address* obj, bool value,
490
- int shift) {
491
- uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset;
492
- uint8_t mask = static_cast<uint8_t>(1U << shift);
493
- *addr = static_cast<uint8_t>((*addr & ~mask) | (value << shift));
494
- }
495
-
496
- V8_INLINE static uint8_t GetNodeState(internal::Address* obj) {
497
- uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset;
498
- return *addr & kNodeStateMask;
499
- }
500
-
501
- V8_INLINE static void UpdateNodeState(internal::Address* obj, uint8_t value) {
502
- uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset;
503
- *addr = static_cast<uint8_t>((*addr & ~kNodeStateMask) | value);
504
- }
505
-
506
- V8_INLINE static void SetEmbedderData(v8::Isolate* isolate, uint32_t slot,
507
- void* data) {
508
- internal::Address addr = reinterpret_cast<internal::Address>(isolate) +
509
- kIsolateEmbedderDataOffset +
510
- slot * kApiSystemPointerSize;
511
- *reinterpret_cast<void**>(addr) = data;
512
- }
513
-
514
- V8_INLINE static void* GetEmbedderData(const v8::Isolate* isolate,
515
- uint32_t slot) {
516
- internal::Address addr = reinterpret_cast<internal::Address>(isolate) +
517
- kIsolateEmbedderDataOffset +
518
- slot * kApiSystemPointerSize;
519
- return *reinterpret_cast<void* const*>(addr);
520
- }
521
-
522
- V8_INLINE static void IncrementLongTasksStatsCounter(v8::Isolate* isolate) {
523
- internal::Address addr = reinterpret_cast<internal::Address>(isolate) +
524
- kIsolateLongTaskStatsCounterOffset;
525
- ++(*reinterpret_cast<size_t*>(addr));
526
- }
527
-
528
- V8_INLINE static internal::Address* GetRoot(v8::Isolate* isolate, int index) {
529
- internal::Address addr = reinterpret_cast<internal::Address>(isolate) +
530
- kIsolateRootsOffset +
531
- index * kApiSystemPointerSize;
532
- return reinterpret_cast<internal::Address*>(addr);
533
- }
534
-
535
- template <typename T>
536
- V8_INLINE static T ReadRawField(internal::Address heap_object_ptr,
537
- int offset) {
538
- internal::Address addr = heap_object_ptr + offset - kHeapObjectTag;
539
- #ifdef V8_COMPRESS_POINTERS
540
- if (sizeof(T) > kApiTaggedSize) {
541
- // TODO(ishell, v8:8875): When pointer compression is enabled 8-byte size
542
- // fields (external pointers, doubles and BigInt data) are only
543
- // kTaggedSize aligned so we have to use unaligned pointer friendly way of
544
- // accessing them in order to avoid undefined behavior in C++ code.
545
- T r;
546
- memcpy(&r, reinterpret_cast<void*>(addr), sizeof(T));
547
- return r;
548
- }
549
- #endif
550
- return *reinterpret_cast<const T*>(addr);
551
- }
552
-
553
- V8_INLINE static internal::Address ReadTaggedPointerField(
554
- internal::Address heap_object_ptr, int offset) {
555
- #ifdef V8_COMPRESS_POINTERS
556
- uint32_t value = ReadRawField<uint32_t>(heap_object_ptr, offset);
557
- internal::Address base =
558
- GetPtrComprCageBaseFromOnHeapAddress(heap_object_ptr);
559
- return base + static_cast<internal::Address>(static_cast<uintptr_t>(value));
560
- #else
561
- return ReadRawField<internal::Address>(heap_object_ptr, offset);
562
- #endif
563
- }
564
-
565
- V8_INLINE static internal::Address ReadTaggedSignedField(
566
- internal::Address heap_object_ptr, int offset) {
567
- #ifdef V8_COMPRESS_POINTERS
568
- uint32_t value = ReadRawField<uint32_t>(heap_object_ptr, offset);
569
- return static_cast<internal::Address>(static_cast<uintptr_t>(value));
570
- #else
571
- return ReadRawField<internal::Address>(heap_object_ptr, offset);
572
- #endif
573
- }
574
-
575
- V8_INLINE static internal::Isolate* GetIsolateForSandbox(
576
- internal::Address obj) {
577
- #ifdef V8_SANDBOXED_EXTERNAL_POINTERS
578
- return internal::IsolateFromNeverReadOnlySpaceObject(obj);
579
- #else
580
- // Not used in non-sandbox mode.
581
- return nullptr;
582
- #endif
583
- }
584
-
585
- V8_INLINE static Address DecodeExternalPointer(
586
- const Isolate* isolate, ExternalPointer_t encoded_pointer,
587
- ExternalPointerTag tag) {
588
- #ifdef V8_SANDBOXED_EXTERNAL_POINTERS
589
- return internal::DecodeExternalPointerImpl(isolate, encoded_pointer, tag);
590
- #else
591
- return encoded_pointer;
592
- #endif
593
- }
594
-
595
- V8_INLINE static internal::Address ReadExternalPointerField(
596
- internal::Isolate* isolate, internal::Address heap_object_ptr, int offset,
597
- ExternalPointerTag tag) {
598
- #ifdef V8_SANDBOXED_EXTERNAL_POINTERS
599
- internal::ExternalPointer_t encoded_value =
600
- ReadRawField<uint32_t>(heap_object_ptr, offset);
601
- // We currently have to treat zero as nullptr in embedder slots.
602
- return encoded_value ? DecodeExternalPointer(isolate, encoded_value, tag)
603
- : 0;
604
- #else
605
- return ReadRawField<Address>(heap_object_ptr, offset);
606
- #endif
607
- }
608
-
609
- #ifdef V8_COMPRESS_POINTERS
610
- V8_INLINE static internal::Address GetPtrComprCageBaseFromOnHeapAddress(
611
- internal::Address addr) {
612
- return addr & -static_cast<intptr_t>(kPtrComprCageBaseAlignment);
613
- }
614
-
615
- V8_INLINE static internal::Address DecompressTaggedAnyField(
616
- internal::Address heap_object_ptr, uint32_t value) {
617
- internal::Address base =
618
- GetPtrComprCageBaseFromOnHeapAddress(heap_object_ptr);
619
- return base + static_cast<internal::Address>(static_cast<uintptr_t>(value));
620
- }
621
-
622
- #endif // V8_COMPRESS_POINTERS
623
- };
624
-
625
- // Only perform cast check for types derived from v8::Data since
626
- // other types do not implement the Cast method.
627
- template <bool PerformCheck>
628
- struct CastCheck {
629
- template <class T>
630
- static void Perform(T* data);
631
- };
632
-
633
- template <>
634
- template <class T>
635
- void CastCheck<true>::Perform(T* data) {
636
- T::Cast(data);
637
- }
638
-
639
- template <>
640
- template <class T>
641
- void CastCheck<false>::Perform(T* data) {}
642
-
643
- template <class T>
644
- V8_INLINE void PerformCastCheck(T* data) {
645
- CastCheck<std::is_base_of<Data, T>::value &&
646
- !std::is_same<Data, std::remove_cv<T>>::value>::Perform(data);
647
- }
648
-
649
- // A base class for backing stores, which is needed due to vagaries of
650
- // how static casts work with std::shared_ptr.
651
- class BackingStoreBase {};
652
-
653
- // The maximum value in enum GarbageCollectionReason, defined in heap.h.
654
- // This is needed for histograms sampling garbage collection reasons.
655
- constexpr int kGarbageCollectionReasonMaxValue = 25;
656
-
657
- } // namespace internal
658
-
659
- } // namespace v8
660
-
661
- #endif // INCLUDE_V8_INTERNAL_H_