@nativescript/canvas 2.0.0-alpha.10 → 2.0.0-alpha.11

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 (366) hide show
  1. package/WebGL/WebGLRenderingContext/index.js +1 -1
  2. package/WebGL/WebGLRenderingContext/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/platforms/android/canvas-release.aar +0 -0
  5. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
  6. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +4 -0
  7. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +46 -0
  8. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  9. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +381 -16
  10. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +3 -0
  11. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +3 -0
  12. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  13. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
  14. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +8 -0
  15. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +46 -0
  16. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  17. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  18. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +381 -16
  19. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +3 -0
  20. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -0
  21. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +381 -16
  22. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +3 -0
  23. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +3 -0
  24. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +24 -24
  25. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  26. package/platforms/ios/Podfile +1 -1
  27. package/platforms/ios/build.xcconfig +1 -1
  28. package/platforms/ios/src/CanvasModule.h +1 -1
  29. package/platforms/ios/src/cpp/CanvasJSIModule.h +1 -1
  30. package/platforms/ios/src/cpp/CanvasJSIModule.mm +17 -17
  31. package/platforms/ios/src/cpp/Helpers.h +1 -1
  32. package/platforms/ios/src/cpp/ImageAssetImpl.h +1 -1
  33. package/platforms/ios/src/cpp/ImageBitmapImpl.h +1 -1
  34. package/platforms/ios/src/cpp/JSICallback.h +1 -1
  35. package/platforms/ios/src/cpp/JSIReadFileCallback.h +1 -1
  36. package/platforms/ios/src/cpp/TextDecoderImpl.h +1 -1
  37. package/platforms/ios/src/cpp/VecMutableBuffer.h +1 -1
  38. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +1 -1
  39. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +1 -1
  40. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +1 -1
  41. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +1 -1
  42. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +1 -1
  43. package/platforms/ios/src/cpp/canvas2d/Path2D.h +1 -1
  44. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +1 -1
  45. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +1 -1
  46. package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +1 -1
  47. package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +1 -1
  48. package/platforms/ios/src/cpp/webgl/WebGLProgram.h +1 -1
  49. package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +1 -1
  50. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +1 -1
  51. package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +1 -1
  52. package/platforms/ios/src/cpp/webgl/WebGLShader.h +1 -1
  53. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +1 -1
  54. package/platforms/ios/src/cpp/webgl/WebGLTexture.h +1 -1
  55. package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +1 -1
  56. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +1 -1
  57. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +1 -1
  58. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +1 -1
  59. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +1 -1
  60. package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +1 -1
  61. package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +1 -1
  62. package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +1 -1
  63. package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +1 -1
  64. package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +1 -1
  65. package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +1 -1
  66. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +1 -1
  67. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +1 -1
  68. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +1 -1
  69. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +1 -1
  70. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +1 -1
  71. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +1 -1
  72. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +1 -1
  73. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +1 -1
  74. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +1 -1
  75. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +1 -1
  76. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +1 -1
  77. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +1 -1
  78. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +1 -1
  79. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +1 -1
  80. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +1 -1
  81. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1 -1
  82. package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +1 -1
  83. package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +1 -1
  84. package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +1 -1
  85. package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +1 -1
  86. package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +1 -1
  87. package/pods/Headers/include/APIDesign.md +0 -72
  88. package/pods/Headers/include/DEPS +0 -10
  89. package/pods/Headers/include/DIR_METADATA +0 -11
  90. package/pods/Headers/include/OWNERS +0 -23
  91. package/pods/Headers/include/cppgc/DEPS +0 -8
  92. package/pods/Headers/include/cppgc/OWNERS +0 -2
  93. package/pods/Headers/include/cppgc/README.md +0 -133
  94. package/pods/Headers/include/cppgc/allocation.h +0 -310
  95. package/pods/Headers/include/cppgc/common.h +0 -29
  96. package/pods/Headers/include/cppgc/cross-thread-persistent.h +0 -465
  97. package/pods/Headers/include/cppgc/custom-space.h +0 -97
  98. package/pods/Headers/include/cppgc/default-platform.h +0 -67
  99. package/pods/Headers/include/cppgc/ephemeron-pair.h +0 -30
  100. package/pods/Headers/include/cppgc/explicit-management.h +0 -100
  101. package/pods/Headers/include/cppgc/garbage-collected.h +0 -106
  102. package/pods/Headers/include/cppgc/heap-consistency.h +0 -266
  103. package/pods/Headers/include/cppgc/heap-state.h +0 -82
  104. package/pods/Headers/include/cppgc/heap-statistics.h +0 -120
  105. package/pods/Headers/include/cppgc/heap.h +0 -206
  106. package/pods/Headers/include/cppgc/internal/api-constants.h +0 -55
  107. package/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -48
  108. package/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -79
  109. package/pods/Headers/include/cppgc/internal/compiler-specific.h +0 -38
  110. package/pods/Headers/include/cppgc/internal/finalizer-trait.h +0 -93
  111. package/pods/Headers/include/cppgc/internal/gc-info.h +0 -156
  112. package/pods/Headers/include/cppgc/internal/logging.h +0 -50
  113. package/pods/Headers/include/cppgc/internal/name-trait.h +0 -122
  114. package/pods/Headers/include/cppgc/internal/persistent-node.h +0 -216
  115. package/pods/Headers/include/cppgc/internal/pointer-policies.h +0 -186
  116. package/pods/Headers/include/cppgc/internal/write-barrier.h +0 -435
  117. package/pods/Headers/include/cppgc/liveness-broker.h +0 -77
  118. package/pods/Headers/include/cppgc/macros.h +0 -26
  119. package/pods/Headers/include/cppgc/member.h +0 -291
  120. package/pods/Headers/include/cppgc/name-provider.h +0 -65
  121. package/pods/Headers/include/cppgc/object-size-trait.h +0 -58
  122. package/pods/Headers/include/cppgc/persistent.h +0 -370
  123. package/pods/Headers/include/cppgc/platform.h +0 -156
  124. package/pods/Headers/include/cppgc/prefinalizer.h +0 -75
  125. package/pods/Headers/include/cppgc/process-heap-statistics.h +0 -36
  126. package/pods/Headers/include/cppgc/sentinel-pointer.h +0 -32
  127. package/pods/Headers/include/cppgc/source-location.h +0 -92
  128. package/pods/Headers/include/cppgc/testing.h +0 -106
  129. package/pods/Headers/include/cppgc/trace-trait.h +0 -116
  130. package/pods/Headers/include/cppgc/type-traits.h +0 -240
  131. package/pods/Headers/include/cppgc/visitor.h +0 -379
  132. package/pods/Headers/include/js_protocol-1.2.json +0 -936
  133. package/pods/Headers/include/js_protocol-1.3.json +0 -1112
  134. package/pods/Headers/include/js_protocol.pdl +0 -1709
  135. package/pods/Headers/include/libffi/arm64/ffi.h +0 -524
  136. package/pods/Headers/include/libffi/arm64/ffitarget.h +0 -92
  137. package/pods/Headers/include/libffi/x86_64/ffi.h +0 -524
  138. package/pods/Headers/include/libffi/x86_64/ffitarget.h +0 -147
  139. package/pods/Headers/include/libffi.h +0 -12
  140. package/pods/Headers/include/libplatform/DEPS +0 -9
  141. package/pods/Headers/include/libplatform/libplatform-export.h +0 -29
  142. package/pods/Headers/include/libplatform/libplatform.h +0 -106
  143. package/pods/Headers/include/libplatform/v8-tracing.h +0 -333
  144. package/pods/Headers/include/v8-array-buffer.h +0 -433
  145. package/pods/Headers/include/v8-callbacks.h +0 -397
  146. package/pods/Headers/include/v8-container.h +0 -129
  147. package/pods/Headers/include/v8-context.h +0 -407
  148. package/pods/Headers/include/v8-cppgc.h +0 -215
  149. package/pods/Headers/include/v8-data.h +0 -80
  150. package/pods/Headers/include/v8-date.h +0 -43
  151. package/pods/Headers/include/v8-debug.h +0 -168
  152. package/pods/Headers/include/v8-embedder-heap.h +0 -218
  153. package/pods/Headers/include/v8-embedder-state-scope.h +0 -51
  154. package/pods/Headers/include/v8-exception.h +0 -217
  155. package/pods/Headers/include/v8-extension.h +0 -62
  156. package/pods/Headers/include/v8-external.h +0 -37
  157. package/pods/Headers/include/v8-fast-api-calls.h +0 -939
  158. package/pods/Headers/include/v8-forward.h +0 -81
  159. package/pods/Headers/include/v8-function-callback.h +0 -475
  160. package/pods/Headers/include/v8-function.h +0 -125
  161. package/pods/Headers/include/v8-initialization.h +0 -315
  162. package/pods/Headers/include/v8-inspector-protocol.h +0 -13
  163. package/pods/Headers/include/v8-inspector.h +0 -376
  164. package/pods/Headers/include/v8-internal.h +0 -661
  165. package/pods/Headers/include/v8-isolate.h +0 -1709
  166. package/pods/Headers/include/v8-json.h +0 -47
  167. package/pods/Headers/include/v8-local-handle.h +0 -455
  168. package/pods/Headers/include/v8-locker.h +0 -149
  169. package/pods/Headers/include/v8-maybe.h +0 -137
  170. package/pods/Headers/include/v8-memory-span.h +0 -43
  171. package/pods/Headers/include/v8-message.h +0 -216
  172. package/pods/Headers/include/v8-metrics.h +0 -255
  173. package/pods/Headers/include/v8-microtask-queue.h +0 -152
  174. package/pods/Headers/include/v8-microtask.h +0 -28
  175. package/pods/Headers/include/v8-object.h +0 -775
  176. package/pods/Headers/include/v8-persistent-handle.h +0 -590
  177. package/pods/Headers/include/v8-platform.h +0 -1092
  178. package/pods/Headers/include/v8-primitive-object.h +0 -118
  179. package/pods/Headers/include/v8-primitive.h +0 -866
  180. package/pods/Headers/include/v8-profiler.h +0 -1198
  181. package/pods/Headers/include/v8-promise.h +0 -174
  182. package/pods/Headers/include/v8-proxy.h +0 -50
  183. package/pods/Headers/include/v8-regexp.h +0 -105
  184. package/pods/Headers/include/v8-script.h +0 -748
  185. package/pods/Headers/include/v8-snapshot.h +0 -196
  186. package/pods/Headers/include/v8-statistics.h +0 -217
  187. package/pods/Headers/include/v8-template.h +0 -1079
  188. package/pods/Headers/include/v8-traced-handle.h +0 -420
  189. package/pods/Headers/include/v8-typed-array.h +0 -282
  190. package/pods/Headers/include/v8-unwinder-state.h +0 -31
  191. package/pods/Headers/include/v8-unwinder.h +0 -132
  192. package/pods/Headers/include/v8-util.h +0 -658
  193. package/pods/Headers/include/v8-value-serializer-version.h +0 -24
  194. package/pods/Headers/include/v8-value-serializer.h +0 -279
  195. package/pods/Headers/include/v8-value.h +0 -526
  196. package/pods/Headers/include/v8-version-string.h +0 -38
  197. package/pods/Headers/include/v8-version.h +0 -20
  198. package/pods/Headers/include/v8-wasm-trap-handler-posix.h +0 -31
  199. package/pods/Headers/include/v8-wasm-trap-handler-win.h +0 -28
  200. package/pods/Headers/include/v8-wasm.h +0 -257
  201. package/pods/Headers/include/v8-weak-callback-info.h +0 -86
  202. package/pods/Headers/include/v8.h +0 -88
  203. package/pods/Headers/include/v8config.h +0 -605
  204. package/pods/Headers/inspector/InspectorServer.h +0 -20
  205. package/pods/Headers/inspector/JsV8InspectorClient.h +0 -66
  206. package/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -1123
  207. package/pods/Headers/inspector/base64.h +0 -9
  208. package/pods/Headers/inspector/src/base/address-region.h +0 -95
  209. package/pods/Headers/inspector/src/base/atomic-utils.h +0 -219
  210. package/pods/Headers/inspector/src/base/atomicops.h +0 -332
  211. package/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -89
  212. package/pods/Headers/inspector/src/base/base-export.h +0 -31
  213. package/pods/Headers/inspector/src/base/bits.h +0 -343
  214. package/pods/Headers/inspector/src/base/build_config.h +0 -234
  215. package/pods/Headers/inspector/src/base/compiler-specific.h +0 -136
  216. package/pods/Headers/inspector/src/base/export-template.h +0 -163
  217. package/pods/Headers/inspector/src/base/flags.h +0 -130
  218. package/pods/Headers/inspector/src/base/immediate-crash.h +0 -162
  219. package/pods/Headers/inspector/src/base/lazy-instance.h +0 -258
  220. package/pods/Headers/inspector/src/base/logging.h +0 -417
  221. package/pods/Headers/inspector/src/base/macros.h +0 -423
  222. package/pods/Headers/inspector/src/base/memory.h +0 -89
  223. package/pods/Headers/inspector/src/base/once.h +0 -108
  224. package/pods/Headers/inspector/src/base/optional.h +0 -882
  225. package/pods/Headers/inspector/src/base/platform/mutex.h +0 -370
  226. package/pods/Headers/inspector/src/base/platform/platform.h +0 -476
  227. package/pods/Headers/inspector/src/base/platform/semaphore.h +0 -108
  228. package/pods/Headers/inspector/src/base/platform/v8-time.h +0 -513
  229. package/pods/Headers/inspector/src/base/platform/wrappers.h +0 -73
  230. package/pods/Headers/inspector/src/base/safe_conversions.h +0 -389
  231. package/pods/Headers/inspector/src/base/safe_conversions_impl.h +0 -822
  232. package/pods/Headers/inspector/src/base/template-utils.h +0 -113
  233. package/pods/Headers/inspector/src/base/v8-fallthrough.h +0 -21
  234. package/pods/Headers/inspector/src/common/checks.h +0 -38
  235. package/pods/Headers/inspector/src/common/globals.h +0 -1842
  236. package/pods/Headers/inspector/src/debug/debug-interface.h +0 -667
  237. package/pods/Headers/inspector/src/debug/interface-types.h +0 -175
  238. package/pods/Headers/inspector/src/init/v8.h +0 -52
  239. package/pods/Headers/inspector/src/inspector/custom-preview.h +0 -24
  240. package/pods/Headers/inspector/src/inspector/injected-script.h +0 -251
  241. package/pods/Headers/inspector/src/inspector/inspected-context.h +0 -79
  242. package/pods/Headers/inspector/src/inspector/protocol/CSS.h +0 -2148
  243. package/pods/Headers/inspector/src/inspector/protocol/Console.h +0 -211
  244. package/pods/Headers/inspector/src/inspector/protocol/DOM.h +0 -1008
  245. package/pods/Headers/inspector/src/inspector/protocol/Debugger.h +0 -892
  246. package/pods/Headers/inspector/src/inspector/protocol/Forward.h +0 -75
  247. package/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -346
  248. package/pods/Headers/inspector/src/inspector/protocol/Log.h +0 -342
  249. package/pods/Headers/inspector/src/inspector/protocol/Network.h +0 -2528
  250. package/pods/Headers/inspector/src/inspector/protocol/Overlay.h +0 -281
  251. package/pods/Headers/inspector/src/inspector/protocol/Page.h +0 -1189
  252. package/pods/Headers/inspector/src/inspector/protocol/Profiler.h +0 -1001
  253. package/pods/Headers/inspector/src/inspector/protocol/Protocol.h +0 -617
  254. package/pods/Headers/inspector/src/inspector/protocol/Runtime.h +0 -1696
  255. package/pods/Headers/inspector/src/inspector/protocol/Schema.h +0 -146
  256. package/pods/Headers/inspector/src/inspector/protocol/Security.h +0 -793
  257. package/pods/Headers/inspector/src/inspector/remote-object-id.h +0 -54
  258. package/pods/Headers/inspector/src/inspector/search-util.h +0 -26
  259. package/pods/Headers/inspector/src/inspector/string-16.h +0 -180
  260. package/pods/Headers/inspector/src/inspector/string-util.h +0 -128
  261. package/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -48
  262. package/pods/Headers/inspector/src/inspector/v8-console-message.h +0 -147
  263. package/pods/Headers/inspector/src/inspector/v8-console.h +0 -173
  264. package/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -62
  265. package/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -248
  266. package/pods/Headers/inspector/src/inspector/v8-debugger-id.h +0 -44
  267. package/pods/Headers/inspector/src/inspector/v8-debugger-script.h +0 -123
  268. package/pods/Headers/inspector/src/inspector/v8-debugger.h +0 -257
  269. package/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -91
  270. package/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -80
  271. package/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -191
  272. package/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -156
  273. package/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -34
  274. package/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -71
  275. package/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -24
  276. package/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -70
  277. package/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -88
  278. package/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -104
  279. package/pods/Headers/inspector/src/inspector/v8-regex.h +0 -38
  280. package/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -157
  281. package/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -38
  282. package/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -164
  283. package/pods/Headers/inspector/src/inspector/v8-string-conversions.h +0 -17
  284. package/pods/Headers/inspector/src/inspector/v8-value-utils.h +0 -23
  285. package/pods/Headers/inspector/src/inspector/value-mirror.h +0 -87
  286. package/pods/Headers/inspector/src/libplatform/default-platform.h +0 -92
  287. package/pods/Headers/inspector/src/logging/tracing-flags.h +0 -50
  288. package/pods/Headers/inspector/src/numbers/conversions.h +0 -183
  289. package/pods/Headers/inspector/src/tracing/trace-event.h +0 -664
  290. package/pods/Headers/inspector/src/utils/allocation.h +0 -367
  291. package/pods/Headers/inspector/src/utils/vector.h +0 -324
  292. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -305
  293. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -314
  294. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -62
  295. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -6
  296. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -58
  297. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -47
  298. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -80
  299. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -52
  300. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -26
  301. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -104
  302. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -39
  303. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -406
  304. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -32
  305. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -158
  306. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -99
  307. package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -139
  308. package/pods/Headers/inspector/utils.h +0 -32
  309. package/pods/Headers/inspector/v8-inspector-platform.h +0 -44
  310. package/pods/Headers/jsi/decorator.h +0 -770
  311. package/pods/Headers/jsi/instrumentation.h +0 -117
  312. package/pods/Headers/jsi/jsi-inl.h +0 -338
  313. package/pods/Headers/jsi/jsi.h +0 -1571
  314. package/pods/Headers/jsi/jsilib.h +0 -59
  315. package/pods/Headers/jsi/threadsafe.h +0 -79
  316. package/pods/Headers/runtime/ArgConverter.h +0 -61
  317. package/pods/Headers/runtime/ArrayAdapter.h +0 -13
  318. package/pods/Headers/runtime/Caches.h +0 -98
  319. package/pods/Headers/runtime/ClassBuilder.h +0 -61
  320. package/pods/Headers/runtime/Common.h +0 -9
  321. package/pods/Headers/runtime/ConcurrentMap.h +0 -55
  322. package/pods/Headers/runtime/ConcurrentQueue.h +0 -28
  323. package/pods/Headers/runtime/Console.h +0 -27
  324. package/pods/Headers/runtime/Constants.h +0 -15
  325. package/pods/Headers/runtime/DataWrapper.h +0 -671
  326. package/pods/Headers/runtime/DictionaryAdapter.h +0 -13
  327. package/pods/Headers/runtime/ExtVector.h +0 -21
  328. package/pods/Headers/runtime/FFICall.h +0 -105
  329. package/pods/Headers/runtime/FastEnumerationAdapter.h +0 -13
  330. package/pods/Headers/runtime/FunctionReference.h +0 -18
  331. package/pods/Headers/runtime/Helpers.h +0 -84
  332. package/pods/Headers/runtime/InlineFunctions.h +0 -16
  333. package/pods/Headers/runtime/Interop.h +0 -202
  334. package/pods/Headers/runtime/KnownUnknownClassPair.h +0 -35
  335. package/pods/Headers/runtime/Metadata.h +0 -981
  336. package/pods/Headers/runtime/MetadataBuilder.h +0 -72
  337. package/pods/Headers/runtime/MetadataInlines.h +0 -157
  338. package/pods/Headers/runtime/ModuleInternal.h +0 -59
  339. package/pods/Headers/runtime/NSDataAdapter.h +0 -13
  340. package/pods/Headers/runtime/NativeScriptException.h +0 -27
  341. package/pods/Headers/runtime/ObjectManager.h +0 -31
  342. package/pods/Headers/runtime/OneByteStringResource.h +0 -21
  343. package/pods/Headers/runtime/Pointer.h +0 -26
  344. package/pods/Headers/runtime/PromiseProxy.h +0 -15
  345. package/pods/Headers/runtime/Reference.h +0 -38
  346. package/pods/Headers/runtime/Runtime.h +0 -67
  347. package/pods/Headers/runtime/RuntimeConfig.h +0 -17
  348. package/pods/Headers/runtime/SetTimeout.h +0 -34
  349. package/pods/Headers/runtime/SimpleAllocator.h +0 -23
  350. package/pods/Headers/runtime/StringHasher.h +0 -315
  351. package/pods/Headers/runtime/SymbolIterator.h +0 -18
  352. package/pods/Headers/runtime/SymbolLoader.h +0 -27
  353. package/pods/Headers/runtime/TNSDerivedClass.h +0 -8
  354. package/pods/Headers/runtime/TSHelpers.h +0 -15
  355. package/pods/Headers/runtime/Tasks.h +0 -19
  356. package/pods/Headers/runtime/UnmanagedType.h +0 -21
  357. package/pods/Headers/runtime/WeakRef.h +0 -15
  358. package/pods/Headers/runtime/Worker.h +0 -26
  359. package/pods/Headers/runtime/robin_hood.h +0 -2184
  360. package/pods/Headers/v8runtime/HostProxy.h +0 -71
  361. package/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -74
  362. package/pods/Headers/v8runtime/V8PointerValue.h +0 -44
  363. package/pods/Headers/v8runtime/V8Runtime.h +0 -240
  364. package/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
  365. package/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
  366. package/pods/NativeScript.podspec +0 -68
@@ -1,866 +0,0 @@
1
- // Copyright 2021 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_PRIMITIVE_H_
6
- #define INCLUDE_V8_PRIMITIVE_H_
7
-
8
- #include "v8-data.h" // NOLINT(build/include_directory)
9
- #include "v8-internal.h" // NOLINT(build/include_directory)
10
- #include "v8-local-handle.h" // NOLINT(build/include_directory)
11
- #include "v8-value.h" // NOLINT(build/include_directory)
12
- #include "v8config.h" // NOLINT(build/include_directory)
13
-
14
- namespace v8 {
15
-
16
- class Context;
17
- class Isolate;
18
- class String;
19
-
20
- namespace internal {
21
- class ExternalString;
22
- class ScopedExternalStringLock;
23
- } // namespace internal
24
-
25
- /**
26
- * The superclass of primitive values. See ECMA-262 4.3.2.
27
- */
28
- class V8_EXPORT Primitive : public Value {};
29
-
30
- /**
31
- * A primitive boolean value (ECMA-262, 4.3.14). Either the true
32
- * or false value.
33
- */
34
- class V8_EXPORT Boolean : public Primitive {
35
- public:
36
- bool Value() const;
37
- V8_INLINE static Boolean* Cast(v8::Data* data) {
38
- #ifdef V8_ENABLE_CHECKS
39
- CheckCast(data);
40
- #endif
41
- return static_cast<Boolean*>(data);
42
- }
43
-
44
- V8_INLINE static Local<Boolean> New(Isolate* isolate, bool value);
45
-
46
- private:
47
- static void CheckCast(v8::Data* that);
48
- };
49
-
50
- /**
51
- * An array to hold Primitive values. This is used by the embedder to
52
- * pass host defined options to the ScriptOptions during compilation.
53
- *
54
- * This is passed back to the embedder as part of
55
- * HostImportModuleDynamicallyCallback for module loading.
56
- */
57
- class V8_EXPORT PrimitiveArray : public Data {
58
- public:
59
- static Local<PrimitiveArray> New(Isolate* isolate, int length);
60
- int Length() const;
61
- void Set(Isolate* isolate, int index, Local<Primitive> item);
62
- Local<Primitive> Get(Isolate* isolate, int index);
63
-
64
- V8_INLINE static PrimitiveArray* Cast(Data* data) {
65
- #ifdef V8_ENABLE_CHECKS
66
- CheckCast(data);
67
- #endif
68
- return reinterpret_cast<PrimitiveArray*>(data);
69
- }
70
-
71
- private:
72
- static void CheckCast(Data* obj);
73
- };
74
-
75
- /**
76
- * A superclass for symbols and strings.
77
- */
78
- class V8_EXPORT Name : public Primitive {
79
- public:
80
- /**
81
- * Returns the identity hash for this object. The current implementation
82
- * uses an inline property on the object to store the identity hash.
83
- *
84
- * The return value will never be 0. Also, it is not guaranteed to be
85
- * unique.
86
- */
87
- int GetIdentityHash();
88
-
89
- V8_INLINE static Name* Cast(Data* data) {
90
- #ifdef V8_ENABLE_CHECKS
91
- CheckCast(data);
92
- #endif
93
- return static_cast<Name*>(data);
94
- }
95
-
96
- private:
97
- static void CheckCast(Data* that);
98
- };
99
-
100
- /**
101
- * A flag describing different modes of string creation.
102
- *
103
- * Aside from performance implications there are no differences between the two
104
- * creation modes.
105
- */
106
- enum class NewStringType {
107
- /**
108
- * Create a new string, always allocating new storage memory.
109
- */
110
- kNormal,
111
-
112
- /**
113
- * Acts as a hint that the string should be created in the
114
- * old generation heap space and be deduplicated if an identical string
115
- * already exists.
116
- */
117
- kInternalized
118
- };
119
-
120
- /**
121
- * A JavaScript string value (ECMA-262, 4.3.17).
122
- */
123
- class V8_EXPORT String : public Name {
124
- public:
125
- static constexpr int kMaxLength =
126
- internal::kApiSystemPointerSize == 4 ? (1 << 28) - 16 : (1 << 29) - 24;
127
-
128
- enum Encoding {
129
- UNKNOWN_ENCODING = 0x1,
130
- TWO_BYTE_ENCODING = 0x0,
131
- ONE_BYTE_ENCODING = 0x8
132
- };
133
- /**
134
- * Returns the number of characters (UTF-16 code units) in this string.
135
- */
136
- int Length() const;
137
-
138
- /**
139
- * Returns the number of bytes in the UTF-8 encoded
140
- * representation of this string.
141
- */
142
- int Utf8Length(Isolate* isolate) const;
143
-
144
- /**
145
- * Returns whether this string is known to contain only one byte data,
146
- * i.e. ISO-8859-1 code points.
147
- * Does not read the string.
148
- * False negatives are possible.
149
- */
150
- bool IsOneByte() const;
151
-
152
- /**
153
- * Returns whether this string contain only one byte data,
154
- * i.e. ISO-8859-1 code points.
155
- * Will read the entire string in some cases.
156
- */
157
- bool ContainsOnlyOneByte() const;
158
-
159
- /**
160
- * Write the contents of the string to an external buffer.
161
- * If no arguments are given, expects the buffer to be large
162
- * enough to hold the entire string and NULL terminator. Copies
163
- * the contents of the string and the NULL terminator into the
164
- * buffer.
165
- *
166
- * WriteUtf8 will not write partial UTF-8 sequences, preferring to stop
167
- * before the end of the buffer.
168
- *
169
- * Copies up to length characters into the output buffer.
170
- * Only null-terminates if there is enough space in the buffer.
171
- *
172
- * \param buffer The buffer into which the string will be copied.
173
- * \param start The starting position within the string at which
174
- * copying begins.
175
- * \param length The number of characters to copy from the string. For
176
- * WriteUtf8 the number of bytes in the buffer.
177
- * \param nchars_ref The number of characters written, can be NULL.
178
- * \param options Various options that might affect performance of this or
179
- * subsequent operations.
180
- * \return The number of characters copied to the buffer excluding the null
181
- * terminator. For WriteUtf8: The number of bytes copied to the buffer
182
- * including the null terminator (if written).
183
- */
184
- enum WriteOptions {
185
- NO_OPTIONS = 0,
186
- HINT_MANY_WRITES_EXPECTED = 1,
187
- NO_NULL_TERMINATION = 2,
188
- PRESERVE_ONE_BYTE_NULL = 4,
189
- // Used by WriteUtf8 to replace orphan surrogate code units with the
190
- // unicode replacement character. Needs to be set to guarantee valid UTF-8
191
- // output.
192
- REPLACE_INVALID_UTF8 = 8
193
- };
194
-
195
- // 16-bit character codes.
196
- int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1,
197
- int options = NO_OPTIONS) const;
198
- // One byte characters.
199
- int WriteOneByte(Isolate* isolate, uint8_t* buffer, int start = 0,
200
- int length = -1, int options = NO_OPTIONS) const;
201
- // UTF-8 encoded characters.
202
- int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
203
- int* nchars_ref = nullptr, int options = NO_OPTIONS) const;
204
-
205
- /**
206
- * A zero length string.
207
- */
208
- V8_INLINE static Local<String> Empty(Isolate* isolate);
209
-
210
- /**
211
- * Returns true if the string is external.
212
- */
213
- bool IsExternal() const;
214
-
215
- /**
216
- * Returns true if the string is both external and two-byte.
217
- */
218
- bool IsExternalTwoByte() const;
219
-
220
- /**
221
- * Returns true if the string is both external and one-byte.
222
- */
223
- bool IsExternalOneByte() const;
224
-
225
- class V8_EXPORT ExternalStringResourceBase {
226
- public:
227
- virtual ~ExternalStringResourceBase() = default;
228
-
229
- /**
230
- * If a string is cacheable, the value returned by
231
- * ExternalStringResource::data() may be cached, otherwise it is not
232
- * expected to be stable beyond the current top-level task.
233
- */
234
- virtual bool IsCacheable() const { return true; }
235
-
236
- // Disallow copying and assigning.
237
- ExternalStringResourceBase(const ExternalStringResourceBase&) = delete;
238
- void operator=(const ExternalStringResourceBase&) = delete;
239
-
240
- protected:
241
- ExternalStringResourceBase() = default;
242
-
243
- /**
244
- * Internally V8 will call this Dispose method when the external string
245
- * resource is no longer needed. The default implementation will use the
246
- * delete operator. This method can be overridden in subclasses to
247
- * control how allocated external string resources are disposed.
248
- */
249
- virtual void Dispose() { delete this; }
250
-
251
- /**
252
- * For a non-cacheable string, the value returned by
253
- * |ExternalStringResource::data()| has to be stable between |Lock()| and
254
- * |Unlock()|, that is the string must behave as is |IsCacheable()| returned
255
- * true.
256
- *
257
- * These two functions must be thread-safe, and can be called from anywhere.
258
- * They also must handle lock depth, in the sense that each can be called
259
- * several times, from different threads, and unlocking should only happen
260
- * when the balance of Lock() and Unlock() calls is 0.
261
- */
262
- virtual void Lock() const {}
263
-
264
- /**
265
- * Unlocks the string.
266
- */
267
- virtual void Unlock() const {}
268
-
269
- private:
270
- friend class internal::ExternalString;
271
- friend class v8::String;
272
- friend class internal::ScopedExternalStringLock;
273
- };
274
-
275
- /**
276
- * An ExternalStringResource is a wrapper around a two-byte string
277
- * buffer that resides outside V8's heap. Implement an
278
- * ExternalStringResource to manage the life cycle of the underlying
279
- * buffer. Note that the string data must be immutable.
280
- */
281
- class V8_EXPORT ExternalStringResource : public ExternalStringResourceBase {
282
- public:
283
- /**
284
- * Override the destructor to manage the life cycle of the underlying
285
- * buffer.
286
- */
287
- ~ExternalStringResource() override = default;
288
-
289
- /**
290
- * The string data from the underlying buffer. If the resource is cacheable
291
- * then data() must return the same value for all invocations.
292
- */
293
- virtual const uint16_t* data() const = 0;
294
-
295
- /**
296
- * The length of the string. That is, the number of two-byte characters.
297
- */
298
- virtual size_t length() const = 0;
299
-
300
- /**
301
- * Returns the cached data from the underlying buffer. This method can be
302
- * called only for cacheable resources (i.e. IsCacheable() == true) and only
303
- * after UpdateDataCache() was called.
304
- */
305
- const uint16_t* cached_data() const {
306
- CheckCachedDataInvariants();
307
- return cached_data_;
308
- }
309
-
310
- /**
311
- * Update {cached_data_} with the data from the underlying buffer. This can
312
- * be called only for cacheable resources.
313
- */
314
- void UpdateDataCache();
315
-
316
- protected:
317
- ExternalStringResource() = default;
318
-
319
- private:
320
- void CheckCachedDataInvariants() const;
321
-
322
- const uint16_t* cached_data_ = nullptr;
323
- };
324
-
325
- /**
326
- * An ExternalOneByteStringResource is a wrapper around an one-byte
327
- * string buffer that resides outside V8's heap. Implement an
328
- * ExternalOneByteStringResource to manage the life cycle of the
329
- * underlying buffer. Note that the string data must be immutable
330
- * and that the data must be Latin-1 and not UTF-8, which would require
331
- * special treatment internally in the engine and do not allow efficient
332
- * indexing. Use String::New or convert to 16 bit data for non-Latin1.
333
- */
334
-
335
- class V8_EXPORT ExternalOneByteStringResource
336
- : public ExternalStringResourceBase {
337
- public:
338
- /**
339
- * Override the destructor to manage the life cycle of the underlying
340
- * buffer.
341
- */
342
- ~ExternalOneByteStringResource() override = default;
343
-
344
- /**
345
- * The string data from the underlying buffer. If the resource is cacheable
346
- * then data() must return the same value for all invocations.
347
- */
348
- virtual const char* data() const = 0;
349
-
350
- /** The number of Latin-1 characters in the string.*/
351
- virtual size_t length() const = 0;
352
-
353
- /**
354
- * Returns the cached data from the underlying buffer. If the resource is
355
- * uncacheable or if UpdateDataCache() was not called before, it has
356
- * undefined behaviour.
357
- */
358
- const char* cached_data() const {
359
- CheckCachedDataInvariants();
360
- return cached_data_;
361
- }
362
-
363
- /**
364
- * Update {cached_data_} with the data from the underlying buffer. This can
365
- * be called only for cacheable resources.
366
- */
367
- void UpdateDataCache();
368
-
369
- protected:
370
- ExternalOneByteStringResource() = default;
371
-
372
- private:
373
- void CheckCachedDataInvariants() const;
374
-
375
- const char* cached_data_ = nullptr;
376
- };
377
-
378
- /**
379
- * If the string is an external string, return the ExternalStringResourceBase
380
- * regardless of the encoding, otherwise return NULL. The encoding of the
381
- * string is returned in encoding_out.
382
- */
383
- V8_INLINE ExternalStringResourceBase* GetExternalStringResourceBase(
384
- Encoding* encoding_out) const;
385
-
386
- /**
387
- * Get the ExternalStringResource for an external string. Returns
388
- * NULL if IsExternal() doesn't return true.
389
- */
390
- V8_INLINE ExternalStringResource* GetExternalStringResource() const;
391
-
392
- /**
393
- * Get the ExternalOneByteStringResource for an external one-byte string.
394
- * Returns NULL if IsExternalOneByte() doesn't return true.
395
- */
396
- const ExternalOneByteStringResource* GetExternalOneByteStringResource() const;
397
-
398
- V8_INLINE static String* Cast(v8::Data* data) {
399
- #ifdef V8_ENABLE_CHECKS
400
- CheckCast(data);
401
- #endif
402
- return static_cast<String*>(data);
403
- }
404
-
405
- /**
406
- * Allocates a new string from a UTF-8 literal. This is equivalent to calling
407
- * String::NewFromUtf(isolate, "...").ToLocalChecked(), but without the check
408
- * overhead.
409
- *
410
- * When called on a string literal containing '\0', the inferred length is the
411
- * length of the input array minus 1 (for the final '\0') and not the value
412
- * returned by strlen.
413
- **/
414
- template <int N>
415
- static V8_WARN_UNUSED_RESULT Local<String> NewFromUtf8Literal(
416
- Isolate* isolate, const char (&literal)[N],
417
- NewStringType type = NewStringType::kNormal) {
418
- static_assert(N <= kMaxLength, "String is too long");
419
- return NewFromUtf8Literal(isolate, literal, type, N - 1);
420
- }
421
-
422
- /** Allocates a new string from UTF-8 data. Only returns an empty value when
423
- * length > kMaxLength. **/
424
- static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromUtf8(
425
- Isolate* isolate, const char* data,
426
- NewStringType type = NewStringType::kNormal, int length = -1);
427
-
428
- /** Allocates a new string from Latin-1 data. Only returns an empty value
429
- * when length > kMaxLength. **/
430
- static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromOneByte(
431
- Isolate* isolate, const uint8_t* data,
432
- NewStringType type = NewStringType::kNormal, int length = -1);
433
-
434
- /** Allocates a new string from UTF-16 data. Only returns an empty value when
435
- * length > kMaxLength. **/
436
- static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewFromTwoByte(
437
- Isolate* isolate, const uint16_t* data,
438
- NewStringType type = NewStringType::kNormal, int length = -1);
439
-
440
- /**
441
- * Creates a new string by concatenating the left and the right strings
442
- * passed in as parameters.
443
- */
444
- static Local<String> Concat(Isolate* isolate, Local<String> left,
445
- Local<String> right);
446
-
447
- /**
448
- * Creates a new external string using the data defined in the given
449
- * resource. When the external string is no longer live on V8's heap the
450
- * resource will be disposed by calling its Dispose method. The caller of
451
- * this function should not otherwise delete or modify the resource. Neither
452
- * should the underlying buffer be deallocated or modified except through the
453
- * destructor of the external string resource.
454
- */
455
- static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewExternalTwoByte(
456
- Isolate* isolate, ExternalStringResource* resource);
457
-
458
- /**
459
- * Associate an external string resource with this string by transforming it
460
- * in place so that existing references to this string in the JavaScript heap
461
- * will use the external string resource. The external string resource's
462
- * character contents need to be equivalent to this string.
463
- * Returns true if the string has been changed to be an external string.
464
- * The string is not modified if the operation fails. See NewExternal for
465
- * information on the lifetime of the resource.
466
- */
467
- bool MakeExternal(ExternalStringResource* resource);
468
-
469
- /**
470
- * Creates a new external string using the one-byte data defined in the given
471
- * resource. When the external string is no longer live on V8's heap the
472
- * resource will be disposed by calling its Dispose method. The caller of
473
- * this function should not otherwise delete or modify the resource. Neither
474
- * should the underlying buffer be deallocated or modified except through the
475
- * destructor of the external string resource.
476
- */
477
- static V8_WARN_UNUSED_RESULT MaybeLocal<String> NewExternalOneByte(
478
- Isolate* isolate, ExternalOneByteStringResource* resource);
479
-
480
- /**
481
- * Associate an external string resource with this string by transforming it
482
- * in place so that existing references to this string in the JavaScript heap
483
- * will use the external string resource. The external string resource's
484
- * character contents need to be equivalent to this string.
485
- * Returns true if the string has been changed to be an external string.
486
- * The string is not modified if the operation fails. See NewExternal for
487
- * information on the lifetime of the resource.
488
- */
489
- bool MakeExternal(ExternalOneByteStringResource* resource);
490
-
491
- /**
492
- * Returns true if this string can be made external.
493
- */
494
- bool CanMakeExternal() const;
495
-
496
- /**
497
- * Returns true if the strings values are equal. Same as JS ==/===.
498
- */
499
- bool StringEquals(Local<String> str) const;
500
-
501
- /**
502
- * Converts an object to a UTF-8-encoded character array. Useful if
503
- * you want to print the object. If conversion to a string fails
504
- * (e.g. due to an exception in the toString() method of the object)
505
- * then the length() method returns 0 and the * operator returns
506
- * NULL.
507
- */
508
- class V8_EXPORT Utf8Value {
509
- public:
510
- Utf8Value(Isolate* isolate, Local<v8::Value> obj);
511
- ~Utf8Value();
512
- char* operator*() { return str_; }
513
- const char* operator*() const { return str_; }
514
- int length() const { return length_; }
515
-
516
- // Disallow copying and assigning.
517
- Utf8Value(const Utf8Value&) = delete;
518
- void operator=(const Utf8Value&) = delete;
519
-
520
- private:
521
- char* str_;
522
- int length_;
523
- };
524
-
525
- /**
526
- * Converts an object to a two-byte (UTF-16-encoded) string.
527
- * If conversion to a string fails (eg. due to an exception in the toString()
528
- * method of the object) then the length() method returns 0 and the * operator
529
- * returns NULL.
530
- */
531
- class V8_EXPORT Value {
532
- public:
533
- Value(Isolate* isolate, Local<v8::Value> obj);
534
- ~Value();
535
- uint16_t* operator*() { return str_; }
536
- const uint16_t* operator*() const { return str_; }
537
- int length() const { return length_; }
538
-
539
- // Disallow copying and assigning.
540
- Value(const Value&) = delete;
541
- void operator=(const Value&) = delete;
542
-
543
- private:
544
- uint16_t* str_;
545
- int length_;
546
- };
547
-
548
- private:
549
- void VerifyExternalStringResourceBase(ExternalStringResourceBase* v,
550
- Encoding encoding) const;
551
- void VerifyExternalStringResource(ExternalStringResource* val) const;
552
- ExternalStringResource* GetExternalStringResourceSlow() const;
553
- ExternalStringResourceBase* GetExternalStringResourceBaseSlow(
554
- String::Encoding* encoding_out) const;
555
-
556
- static Local<v8::String> NewFromUtf8Literal(Isolate* isolate,
557
- const char* literal,
558
- NewStringType type, int length);
559
-
560
- static void CheckCast(v8::Data* that);
561
- };
562
-
563
- // Zero-length string specialization (templated string size includes
564
- // terminator).
565
- template <>
566
- inline V8_WARN_UNUSED_RESULT Local<String> String::NewFromUtf8Literal(
567
- Isolate* isolate, const char (&literal)[1], NewStringType type) {
568
- return String::Empty(isolate);
569
- }
570
-
571
- /**
572
- * Interface for iterating through all external resources in the heap.
573
- */
574
- class V8_EXPORT ExternalResourceVisitor {
575
- public:
576
- virtual ~ExternalResourceVisitor() = default;
577
- virtual void VisitExternalString(Local<String> string) {}
578
- };
579
-
580
- /**
581
- * A JavaScript symbol (ECMA-262 edition 6)
582
- */
583
- class V8_EXPORT Symbol : public Name {
584
- public:
585
- /**
586
- * Returns the description string of the symbol, or undefined if none.
587
- */
588
- Local<Value> Description(Isolate* isolate) const;
589
-
590
- /**
591
- * Create a symbol. If description is not empty, it will be used as the
592
- * description.
593
- */
594
- static Local<Symbol> New(Isolate* isolate,
595
- Local<String> description = Local<String>());
596
-
597
- /**
598
- * Access global symbol registry.
599
- * Note that symbols created this way are never collected, so
600
- * they should only be used for statically fixed properties.
601
- * Also, there is only one global name space for the descriptions used as
602
- * keys.
603
- * To minimize the potential for clashes, use qualified names as keys.
604
- */
605
- static Local<Symbol> For(Isolate* isolate, Local<String> description);
606
-
607
- /**
608
- * Retrieve a global symbol. Similar to |For|, but using a separate
609
- * registry that is not accessible by (and cannot clash with) JavaScript code.
610
- */
611
- static Local<Symbol> ForApi(Isolate* isolate, Local<String> description);
612
-
613
- // Well-known symbols
614
- static Local<Symbol> GetAsyncIterator(Isolate* isolate);
615
- static Local<Symbol> GetHasInstance(Isolate* isolate);
616
- static Local<Symbol> GetIsConcatSpreadable(Isolate* isolate);
617
- static Local<Symbol> GetIterator(Isolate* isolate);
618
- static Local<Symbol> GetMatch(Isolate* isolate);
619
- static Local<Symbol> GetReplace(Isolate* isolate);
620
- static Local<Symbol> GetSearch(Isolate* isolate);
621
- static Local<Symbol> GetSplit(Isolate* isolate);
622
- static Local<Symbol> GetToPrimitive(Isolate* isolate);
623
- static Local<Symbol> GetToStringTag(Isolate* isolate);
624
- static Local<Symbol> GetUnscopables(Isolate* isolate);
625
-
626
- V8_INLINE static Symbol* Cast(Data* data) {
627
- #ifdef V8_ENABLE_CHECKS
628
- CheckCast(data);
629
- #endif
630
- return static_cast<Symbol*>(data);
631
- }
632
-
633
- private:
634
- Symbol();
635
- static void CheckCast(Data* that);
636
- };
637
-
638
- /**
639
- * A JavaScript number value (ECMA-262, 4.3.20)
640
- */
641
- class V8_EXPORT Number : public Primitive {
642
- public:
643
- double Value() const;
644
- static Local<Number> New(Isolate* isolate, double value);
645
- V8_INLINE static Number* Cast(v8::Data* data) {
646
- #ifdef V8_ENABLE_CHECKS
647
- CheckCast(data);
648
- #endif
649
- return static_cast<Number*>(data);
650
- }
651
-
652
- private:
653
- Number();
654
- static void CheckCast(v8::Data* that);
655
- };
656
-
657
- /**
658
- * A JavaScript value representing a signed integer.
659
- */
660
- class V8_EXPORT Integer : public Number {
661
- public:
662
- static Local<Integer> New(Isolate* isolate, int32_t value);
663
- static Local<Integer> NewFromUnsigned(Isolate* isolate, uint32_t value);
664
- int64_t Value() const;
665
- V8_INLINE static Integer* Cast(v8::Data* data) {
666
- #ifdef V8_ENABLE_CHECKS
667
- CheckCast(data);
668
- #endif
669
- return static_cast<Integer*>(data);
670
- }
671
-
672
- private:
673
- Integer();
674
- static void CheckCast(v8::Data* that);
675
- };
676
-
677
- /**
678
- * A JavaScript value representing a 32-bit signed integer.
679
- */
680
- class V8_EXPORT Int32 : public Integer {
681
- public:
682
- int32_t Value() const;
683
- V8_INLINE static Int32* Cast(v8::Data* data) {
684
- #ifdef V8_ENABLE_CHECKS
685
- CheckCast(data);
686
- #endif
687
- return static_cast<Int32*>(data);
688
- }
689
-
690
- private:
691
- Int32();
692
- static void CheckCast(v8::Data* that);
693
- };
694
-
695
- /**
696
- * A JavaScript value representing a 32-bit unsigned integer.
697
- */
698
- class V8_EXPORT Uint32 : public Integer {
699
- public:
700
- uint32_t Value() const;
701
- V8_INLINE static Uint32* Cast(v8::Data* data) {
702
- #ifdef V8_ENABLE_CHECKS
703
- CheckCast(data);
704
- #endif
705
- return static_cast<Uint32*>(data);
706
- }
707
-
708
- private:
709
- Uint32();
710
- static void CheckCast(v8::Data* that);
711
- };
712
-
713
- /**
714
- * A JavaScript BigInt value (https://tc39.github.io/proposal-bigint)
715
- */
716
- class V8_EXPORT BigInt : public Primitive {
717
- public:
718
- static Local<BigInt> New(Isolate* isolate, int64_t value);
719
- static Local<BigInt> NewFromUnsigned(Isolate* isolate, uint64_t value);
720
- /**
721
- * Creates a new BigInt object using a specified sign bit and a
722
- * specified list of digits/words.
723
- * The resulting number is calculated as:
724
- *
725
- * (-1)^sign_bit * (words[0] * (2^64)^0 + words[1] * (2^64)^1 + ...)
726
- */
727
- static MaybeLocal<BigInt> NewFromWords(Local<Context> context, int sign_bit,
728
- int word_count, const uint64_t* words);
729
-
730
- /**
731
- * Returns the value of this BigInt as an unsigned 64-bit integer.
732
- * If `lossless` is provided, it will reflect whether the return value was
733
- * truncated or wrapped around. In particular, it is set to `false` if this
734
- * BigInt is negative.
735
- */
736
- uint64_t Uint64Value(bool* lossless = nullptr) const;
737
-
738
- /**
739
- * Returns the value of this BigInt as a signed 64-bit integer.
740
- * If `lossless` is provided, it will reflect whether this BigInt was
741
- * truncated or not.
742
- */
743
- int64_t Int64Value(bool* lossless = nullptr) const;
744
-
745
- /**
746
- * Returns the number of 64-bit words needed to store the result of
747
- * ToWordsArray().
748
- */
749
- int WordCount() const;
750
-
751
- /**
752
- * Writes the contents of this BigInt to a specified memory location.
753
- * `sign_bit` must be provided and will be set to 1 if this BigInt is
754
- * negative.
755
- * `*word_count` has to be initialized to the length of the `words` array.
756
- * Upon return, it will be set to the actual number of words that would
757
- * be needed to store this BigInt (i.e. the return value of `WordCount()`).
758
- */
759
- void ToWordsArray(int* sign_bit, int* word_count, uint64_t* words) const;
760
-
761
- V8_INLINE static BigInt* Cast(v8::Data* data) {
762
- #ifdef V8_ENABLE_CHECKS
763
- CheckCast(data);
764
- #endif
765
- return static_cast<BigInt*>(data);
766
- }
767
-
768
- private:
769
- BigInt();
770
- static void CheckCast(v8::Data* that);
771
- };
772
-
773
- Local<String> String::Empty(Isolate* isolate) {
774
- using S = internal::Address;
775
- using I = internal::Internals;
776
- I::CheckInitialized(isolate);
777
- S* slot = I::GetRoot(isolate, I::kEmptyStringRootIndex);
778
- return Local<String>(reinterpret_cast<String*>(slot));
779
- }
780
-
781
- String::ExternalStringResource* String::GetExternalStringResource() const {
782
- using A = internal::Address;
783
- using I = internal::Internals;
784
- A obj = *reinterpret_cast<const A*>(this);
785
-
786
- ExternalStringResource* result;
787
- if (I::IsExternalTwoByteString(I::GetInstanceType(obj))) {
788
- internal::Isolate* isolate = I::GetIsolateForSandbox(obj);
789
- A value =
790
- I::ReadExternalPointerField(isolate, obj, I::kStringResourceOffset,
791
- internal::kExternalStringResourceTag);
792
- result = reinterpret_cast<String::ExternalStringResource*>(value);
793
- } else {
794
- result = GetExternalStringResourceSlow();
795
- }
796
- #ifdef V8_ENABLE_CHECKS
797
- VerifyExternalStringResource(result);
798
- #endif
799
- return result;
800
- }
801
-
802
- String::ExternalStringResourceBase* String::GetExternalStringResourceBase(
803
- String::Encoding* encoding_out) const {
804
- using A = internal::Address;
805
- using I = internal::Internals;
806
- A obj = *reinterpret_cast<const A*>(this);
807
- int type = I::GetInstanceType(obj) & I::kStringRepresentationAndEncodingMask;
808
- *encoding_out = static_cast<Encoding>(type & I::kStringEncodingMask);
809
- ExternalStringResourceBase* resource;
810
- if (type == I::kExternalOneByteRepresentationTag ||
811
- type == I::kExternalTwoByteRepresentationTag) {
812
- internal::Isolate* isolate = I::GetIsolateForSandbox(obj);
813
- A value =
814
- I::ReadExternalPointerField(isolate, obj, I::kStringResourceOffset,
815
- internal::kExternalStringResourceTag);
816
- resource = reinterpret_cast<ExternalStringResourceBase*>(value);
817
- } else {
818
- resource = GetExternalStringResourceBaseSlow(encoding_out);
819
- }
820
- #ifdef V8_ENABLE_CHECKS
821
- VerifyExternalStringResourceBase(resource, *encoding_out);
822
- #endif
823
- return resource;
824
- }
825
-
826
- // --- Statics ---
827
-
828
- V8_INLINE Local<Primitive> Undefined(Isolate* isolate) {
829
- using S = internal::Address;
830
- using I = internal::Internals;
831
- I::CheckInitialized(isolate);
832
- S* slot = I::GetRoot(isolate, I::kUndefinedValueRootIndex);
833
- return Local<Primitive>(reinterpret_cast<Primitive*>(slot));
834
- }
835
-
836
- V8_INLINE Local<Primitive> Null(Isolate* isolate) {
837
- using S = internal::Address;
838
- using I = internal::Internals;
839
- I::CheckInitialized(isolate);
840
- S* slot = I::GetRoot(isolate, I::kNullValueRootIndex);
841
- return Local<Primitive>(reinterpret_cast<Primitive*>(slot));
842
- }
843
-
844
- V8_INLINE Local<Boolean> True(Isolate* isolate) {
845
- using S = internal::Address;
846
- using I = internal::Internals;
847
- I::CheckInitialized(isolate);
848
- S* slot = I::GetRoot(isolate, I::kTrueValueRootIndex);
849
- return Local<Boolean>(reinterpret_cast<Boolean*>(slot));
850
- }
851
-
852
- V8_INLINE Local<Boolean> False(Isolate* isolate) {
853
- using S = internal::Address;
854
- using I = internal::Internals;
855
- I::CheckInitialized(isolate);
856
- S* slot = I::GetRoot(isolate, I::kFalseValueRootIndex);
857
- return Local<Boolean>(reinterpret_cast<Boolean*>(slot));
858
- }
859
-
860
- Local<Boolean> Boolean::New(Isolate* isolate, bool value) {
861
- return value ? True(isolate) : False(isolate);
862
- }
863
-
864
- } // namespace v8
865
-
866
- #endif // INCLUDE_V8_PRIMITIVE_H_