@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.
- package/button/index.android.d.ts +13 -0
- package/button/index.android.js +56 -0
- package/button/index.android.js.map +1 -0
- package/button/index.ios.d.ts +21 -0
- package/button/index.ios.js +216 -0
- package/button/index.ios.js.map +1 -0
- package/common.d.ts +78 -33
- package/common.js +1121 -251
- package/common.js.map +1 -1
- package/img/index.android.d.ts +10 -0
- package/img/index.android.js +40 -0
- package/img/index.android.js.map +1 -0
- package/img/index.ios.d.ts +13 -0
- package/img/index.ios.js +102 -0
- package/img/index.ios.js.map +1 -0
- package/index.android.d.ts +6 -34
- package/index.android.js +6 -139
- package/index.android.js.map +1 -1
- package/index.d.ts +88 -60
- package/index.ios.d.ts +6 -48
- package/index.ios.js +6 -355
- package/index.ios.js.map +1 -1
- package/package.json +5 -2
- package/platforms/android/include.gradle +5 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +794 -284
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason.h +0 -5
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/NSObject+MasonElement_Defaults.h +100 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +118 -93
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +58079 -23135
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +1234 -255
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +1234 -255
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4252 -1932
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +1588 -568
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason.h +0 -5
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/NSObject+MasonElement_Defaults.h +100 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +118 -93
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +58076 -23132
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1211 -232
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1211 -232
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +58076 -23132
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1211 -232
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1211 -232
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +31 -31
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4246 -1932
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +4124 -1883
- package/scroll/index.android.d.ts +12 -0
- package/scroll/index.android.js +50 -0
- package/scroll/index.android.js.map +1 -0
- package/scroll/index.ios.d.ts +14 -0
- package/scroll/index.ios.js +120 -0
- package/scroll/index.ios.js.map +1 -0
- package/style.d.ts +110 -53
- package/style.js +1176 -110
- package/style.js.map +1 -1
- package/text/index.android.d.ts +30 -0
- package/text/index.android.js +124 -0
- package/text/index.android.js.map +1 -0
- package/text/index.ios.d.ts +38 -0
- package/text/index.ios.js +251 -0
- package/text/index.ios.js.map +1 -0
- package/tree/index.android.d.ts +28 -0
- package/tree/index.android.js +77 -0
- package/tree/index.android.js.map +1 -0
- package/tree/index.ios.d.ts +29 -0
- package/tree/index.ios.js +76 -0
- package/tree/index.ios.js.map +1 -0
- package/utils/index.android.d.ts +187 -0
- package/utils/index.android.js +514 -0
- package/utils/index.android.js.map +1 -0
- package/utils/index.ios.d.ts +198 -0
- package/utils/index.ios.js +710 -0
- package/utils/index.ios.js.map +1 -0
- package/view/index.android.d.ts +12 -0
- package/view/index.android.js +50 -0
- package/view/index.android.js.map +1 -0
- package/view/index.ios.d.ts +16 -0
- package/view/index.ios.js +124 -0
- package/view/index.ios.js.map +1 -0
- package/web.d.ts +55 -0
- package/web.js +189 -0
- package/web.js.map +1 -0
- package/helpers.d.ts +0 -255
- package/helpers.js +0 -1318
- package/helpers.js.map +0 -1
- package/node.d.ts +0 -2
- package/node.js +0 -3
- package/node.js.map +0 -1
- package/platforms/ios/Podfile +0 -1
- package/platforms/ios/build.xcconfig +0 -5
- package/platforms/ios/prebuild.sh +0 -101
- package/platforms/new_native_src/cpp/Caches.cpp +0 -36
- package/platforms/new_native_src/cpp/Caches.h +0 -42
- package/platforms/new_native_src/cpp/Common.h +0 -34
- package/platforms/new_native_src/cpp/ConcurrentMap.h +0 -57
- package/platforms/new_native_src/cpp/Helpers.cpp +0 -101
- package/platforms/new_native_src/cpp/Helpers.h +0 -364
- package/platforms/new_native_src/cpp/MasonImpl.cpp +0 -68
- package/platforms/new_native_src/cpp/MasonImpl.h +0 -40
- package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +0 -89
- package/platforms/new_native_src/cpp/MasonNodeImpl.h +0 -47
- package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +0 -2181
- package/platforms/new_native_src/cpp/MasonStyleImpl.h +0 -420
- package/platforms/new_native_src/cpp/include/mason_native.h +0 -972
- package/platforms/new_native_src/cpp/include/robin_hood.h +0 -2544
- package/src-native/pods/Headers/include/APIDesign.md +0 -72
- package/src-native/pods/Headers/include/DEPS +0 -10
- package/src-native/pods/Headers/include/DIR_METADATA +0 -11
- package/src-native/pods/Headers/include/OWNERS +0 -23
- package/src-native/pods/Headers/include/cppgc/DEPS +0 -8
- package/src-native/pods/Headers/include/cppgc/OWNERS +0 -2
- package/src-native/pods/Headers/include/cppgc/README.md +0 -133
- package/src-native/pods/Headers/include/cppgc/allocation.h +0 -310
- package/src-native/pods/Headers/include/cppgc/common.h +0 -29
- package/src-native/pods/Headers/include/cppgc/cross-thread-persistent.h +0 -465
- package/src-native/pods/Headers/include/cppgc/custom-space.h +0 -97
- package/src-native/pods/Headers/include/cppgc/default-platform.h +0 -67
- package/src-native/pods/Headers/include/cppgc/ephemeron-pair.h +0 -30
- package/src-native/pods/Headers/include/cppgc/explicit-management.h +0 -100
- package/src-native/pods/Headers/include/cppgc/garbage-collected.h +0 -106
- package/src-native/pods/Headers/include/cppgc/heap-consistency.h +0 -266
- package/src-native/pods/Headers/include/cppgc/heap-state.h +0 -82
- package/src-native/pods/Headers/include/cppgc/heap-statistics.h +0 -120
- package/src-native/pods/Headers/include/cppgc/heap.h +0 -206
- package/src-native/pods/Headers/include/cppgc/internal/api-constants.h +0 -55
- package/src-native/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -48
- package/src-native/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -79
- package/src-native/pods/Headers/include/cppgc/internal/compiler-specific.h +0 -38
- package/src-native/pods/Headers/include/cppgc/internal/finalizer-trait.h +0 -93
- package/src-native/pods/Headers/include/cppgc/internal/gc-info.h +0 -156
- package/src-native/pods/Headers/include/cppgc/internal/logging.h +0 -50
- package/src-native/pods/Headers/include/cppgc/internal/name-trait.h +0 -122
- package/src-native/pods/Headers/include/cppgc/internal/persistent-node.h +0 -216
- package/src-native/pods/Headers/include/cppgc/internal/pointer-policies.h +0 -186
- package/src-native/pods/Headers/include/cppgc/internal/write-barrier.h +0 -435
- package/src-native/pods/Headers/include/cppgc/liveness-broker.h +0 -77
- package/src-native/pods/Headers/include/cppgc/macros.h +0 -26
- package/src-native/pods/Headers/include/cppgc/member.h +0 -291
- package/src-native/pods/Headers/include/cppgc/name-provider.h +0 -65
- package/src-native/pods/Headers/include/cppgc/object-size-trait.h +0 -58
- package/src-native/pods/Headers/include/cppgc/persistent.h +0 -370
- package/src-native/pods/Headers/include/cppgc/platform.h +0 -156
- package/src-native/pods/Headers/include/cppgc/prefinalizer.h +0 -75
- package/src-native/pods/Headers/include/cppgc/process-heap-statistics.h +0 -36
- package/src-native/pods/Headers/include/cppgc/sentinel-pointer.h +0 -32
- package/src-native/pods/Headers/include/cppgc/source-location.h +0 -92
- package/src-native/pods/Headers/include/cppgc/testing.h +0 -106
- package/src-native/pods/Headers/include/cppgc/trace-trait.h +0 -116
- package/src-native/pods/Headers/include/cppgc/type-traits.h +0 -240
- package/src-native/pods/Headers/include/cppgc/visitor.h +0 -379
- package/src-native/pods/Headers/include/js_protocol-1.2.json +0 -936
- package/src-native/pods/Headers/include/js_protocol-1.3.json +0 -1112
- package/src-native/pods/Headers/include/js_protocol.pdl +0 -1709
- package/src-native/pods/Headers/include/libffi/arm64/ffi.h +0 -524
- package/src-native/pods/Headers/include/libffi/arm64/ffitarget.h +0 -92
- package/src-native/pods/Headers/include/libffi/x86_64/ffi.h +0 -524
- package/src-native/pods/Headers/include/libffi/x86_64/ffitarget.h +0 -147
- package/src-native/pods/Headers/include/libffi.h +0 -12
- package/src-native/pods/Headers/include/libplatform/DEPS +0 -9
- package/src-native/pods/Headers/include/libplatform/libplatform-export.h +0 -29
- package/src-native/pods/Headers/include/libplatform/libplatform.h +0 -106
- package/src-native/pods/Headers/include/libplatform/v8-tracing.h +0 -333
- package/src-native/pods/Headers/include/v8-array-buffer.h +0 -433
- package/src-native/pods/Headers/include/v8-callbacks.h +0 -397
- package/src-native/pods/Headers/include/v8-container.h +0 -129
- package/src-native/pods/Headers/include/v8-context.h +0 -407
- package/src-native/pods/Headers/include/v8-cppgc.h +0 -215
- package/src-native/pods/Headers/include/v8-data.h +0 -80
- package/src-native/pods/Headers/include/v8-date.h +0 -43
- package/src-native/pods/Headers/include/v8-debug.h +0 -168
- package/src-native/pods/Headers/include/v8-embedder-heap.h +0 -218
- package/src-native/pods/Headers/include/v8-embedder-state-scope.h +0 -51
- package/src-native/pods/Headers/include/v8-exception.h +0 -217
- package/src-native/pods/Headers/include/v8-extension.h +0 -62
- package/src-native/pods/Headers/include/v8-external.h +0 -37
- package/src-native/pods/Headers/include/v8-fast-api-calls.h +0 -939
- package/src-native/pods/Headers/include/v8-forward.h +0 -81
- package/src-native/pods/Headers/include/v8-function-callback.h +0 -475
- package/src-native/pods/Headers/include/v8-function.h +0 -125
- package/src-native/pods/Headers/include/v8-initialization.h +0 -315
- package/src-native/pods/Headers/include/v8-inspector-protocol.h +0 -13
- package/src-native/pods/Headers/include/v8-inspector.h +0 -376
- package/src-native/pods/Headers/include/v8-internal.h +0 -661
- package/src-native/pods/Headers/include/v8-isolate.h +0 -1709
- package/src-native/pods/Headers/include/v8-json.h +0 -47
- package/src-native/pods/Headers/include/v8-local-handle.h +0 -455
- package/src-native/pods/Headers/include/v8-locker.h +0 -149
- package/src-native/pods/Headers/include/v8-maybe.h +0 -137
- package/src-native/pods/Headers/include/v8-memory-span.h +0 -43
- package/src-native/pods/Headers/include/v8-message.h +0 -216
- package/src-native/pods/Headers/include/v8-metrics.h +0 -255
- package/src-native/pods/Headers/include/v8-microtask-queue.h +0 -152
- package/src-native/pods/Headers/include/v8-microtask.h +0 -28
- package/src-native/pods/Headers/include/v8-object.h +0 -775
- package/src-native/pods/Headers/include/v8-persistent-handle.h +0 -590
- package/src-native/pods/Headers/include/v8-platform.h +0 -1092
- package/src-native/pods/Headers/include/v8-primitive-object.h +0 -118
- package/src-native/pods/Headers/include/v8-primitive.h +0 -866
- package/src-native/pods/Headers/include/v8-profiler.h +0 -1198
- package/src-native/pods/Headers/include/v8-promise.h +0 -174
- package/src-native/pods/Headers/include/v8-proxy.h +0 -50
- package/src-native/pods/Headers/include/v8-regexp.h +0 -105
- package/src-native/pods/Headers/include/v8-script.h +0 -748
- package/src-native/pods/Headers/include/v8-snapshot.h +0 -196
- package/src-native/pods/Headers/include/v8-statistics.h +0 -217
- package/src-native/pods/Headers/include/v8-template.h +0 -1079
- package/src-native/pods/Headers/include/v8-traced-handle.h +0 -420
- package/src-native/pods/Headers/include/v8-typed-array.h +0 -282
- package/src-native/pods/Headers/include/v8-unwinder-state.h +0 -31
- package/src-native/pods/Headers/include/v8-unwinder.h +0 -132
- package/src-native/pods/Headers/include/v8-util.h +0 -658
- package/src-native/pods/Headers/include/v8-value-serializer-version.h +0 -24
- package/src-native/pods/Headers/include/v8-value-serializer.h +0 -279
- package/src-native/pods/Headers/include/v8-value.h +0 -526
- package/src-native/pods/Headers/include/v8-version-string.h +0 -38
- package/src-native/pods/Headers/include/v8-version.h +0 -20
- package/src-native/pods/Headers/include/v8-wasm-trap-handler-posix.h +0 -31
- package/src-native/pods/Headers/include/v8-wasm-trap-handler-win.h +0 -28
- package/src-native/pods/Headers/include/v8-wasm.h +0 -257
- package/src-native/pods/Headers/include/v8-weak-callback-info.h +0 -86
- package/src-native/pods/Headers/include/v8.h +0 -88
- package/src-native/pods/Headers/include/v8config.h +0 -605
- package/src-native/pods/Headers/inspector/InspectorServer.h +0 -20
- package/src-native/pods/Headers/inspector/JsV8InspectorClient.h +0 -66
- package/src-native/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -1123
- package/src-native/pods/Headers/inspector/base64.h +0 -9
- package/src-native/pods/Headers/inspector/src/base/address-region.h +0 -95
- package/src-native/pods/Headers/inspector/src/base/atomic-utils.h +0 -219
- package/src-native/pods/Headers/inspector/src/base/atomicops.h +0 -332
- package/src-native/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -89
- package/src-native/pods/Headers/inspector/src/base/base-export.h +0 -31
- package/src-native/pods/Headers/inspector/src/base/bits.h +0 -343
- package/src-native/pods/Headers/inspector/src/base/build_config.h +0 -234
- package/src-native/pods/Headers/inspector/src/base/compiler-specific.h +0 -136
- package/src-native/pods/Headers/inspector/src/base/export-template.h +0 -163
- package/src-native/pods/Headers/inspector/src/base/flags.h +0 -130
- package/src-native/pods/Headers/inspector/src/base/immediate-crash.h +0 -162
- package/src-native/pods/Headers/inspector/src/base/lazy-instance.h +0 -258
- package/src-native/pods/Headers/inspector/src/base/logging.h +0 -417
- package/src-native/pods/Headers/inspector/src/base/macros.h +0 -423
- package/src-native/pods/Headers/inspector/src/base/memory.h +0 -89
- package/src-native/pods/Headers/inspector/src/base/once.h +0 -108
- package/src-native/pods/Headers/inspector/src/base/optional.h +0 -882
- package/src-native/pods/Headers/inspector/src/base/platform/mutex.h +0 -370
- package/src-native/pods/Headers/inspector/src/base/platform/platform.h +0 -476
- package/src-native/pods/Headers/inspector/src/base/platform/semaphore.h +0 -108
- package/src-native/pods/Headers/inspector/src/base/platform/v8-time.h +0 -513
- package/src-native/pods/Headers/inspector/src/base/platform/wrappers.h +0 -73
- package/src-native/pods/Headers/inspector/src/base/safe_conversions.h +0 -389
- package/src-native/pods/Headers/inspector/src/base/safe_conversions_impl.h +0 -822
- package/src-native/pods/Headers/inspector/src/base/template-utils.h +0 -113
- package/src-native/pods/Headers/inspector/src/base/v8-fallthrough.h +0 -21
- package/src-native/pods/Headers/inspector/src/common/checks.h +0 -38
- package/src-native/pods/Headers/inspector/src/common/globals.h +0 -1842
- package/src-native/pods/Headers/inspector/src/debug/debug-interface.h +0 -667
- package/src-native/pods/Headers/inspector/src/debug/interface-types.h +0 -175
- package/src-native/pods/Headers/inspector/src/init/v8.h +0 -52
- package/src-native/pods/Headers/inspector/src/inspector/custom-preview.h +0 -24
- package/src-native/pods/Headers/inspector/src/inspector/injected-script.h +0 -251
- package/src-native/pods/Headers/inspector/src/inspector/inspected-context.h +0 -79
- package/src-native/pods/Headers/inspector/src/inspector/protocol/CSS.h +0 -2148
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Console.h +0 -211
- package/src-native/pods/Headers/inspector/src/inspector/protocol/DOM.h +0 -1008
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Debugger.h +0 -892
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Forward.h +0 -75
- package/src-native/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -346
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Log.h +0 -342
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Network.h +0 -2528
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Overlay.h +0 -281
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Page.h +0 -1189
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Profiler.h +0 -1001
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Protocol.h +0 -617
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Runtime.h +0 -1696
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Schema.h +0 -146
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Security.h +0 -793
- package/src-native/pods/Headers/inspector/src/inspector/remote-object-id.h +0 -54
- package/src-native/pods/Headers/inspector/src/inspector/search-util.h +0 -26
- package/src-native/pods/Headers/inspector/src/inspector/string-16.h +0 -180
- package/src-native/pods/Headers/inspector/src/inspector/string-util.h +0 -128
- package/src-native/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -48
- package/src-native/pods/Headers/inspector/src/inspector/v8-console-message.h +0 -147
- package/src-native/pods/Headers/inspector/src/inspector/v8-console.h +0 -173
- package/src-native/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -62
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -248
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-id.h +0 -44
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-script.h +0 -123
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger.h +0 -257
- package/src-native/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -91
- package/src-native/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -80
- package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -191
- package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -156
- package/src-native/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -34
- package/src-native/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -71
- package/src-native/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -24
- package/src-native/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -70
- package/src-native/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -88
- package/src-native/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -104
- package/src-native/pods/Headers/inspector/src/inspector/v8-regex.h +0 -38
- package/src-native/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -157
- package/src-native/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -38
- package/src-native/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -164
- package/src-native/pods/Headers/inspector/src/inspector/v8-string-conversions.h +0 -17
- package/src-native/pods/Headers/inspector/src/inspector/v8-value-utils.h +0 -23
- package/src-native/pods/Headers/inspector/src/inspector/value-mirror.h +0 -87
- package/src-native/pods/Headers/inspector/src/libplatform/default-platform.h +0 -92
- package/src-native/pods/Headers/inspector/src/logging/tracing-flags.h +0 -50
- package/src-native/pods/Headers/inspector/src/numbers/conversions.h +0 -183
- package/src-native/pods/Headers/inspector/src/tracing/trace-event.h +0 -664
- package/src-native/pods/Headers/inspector/src/utils/allocation.h +0 -367
- package/src-native/pods/Headers/inspector/src/utils/vector.h +0 -324
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -305
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -314
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -62
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -6
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -58
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -47
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -80
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -52
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -26
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -104
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -39
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -406
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -32
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -158
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -99
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -139
- package/src-native/pods/Headers/inspector/utils.h +0 -32
- package/src-native/pods/Headers/inspector/v8-inspector-platform.h +0 -44
- package/src-native/pods/Headers/jsi/decorator.h +0 -762
- package/src-native/pods/Headers/jsi/instrumentation.h +0 -117
- package/src-native/pods/Headers/jsi/jsi-inl.h +0 -322
- package/src-native/pods/Headers/jsi/jsi.h +0 -1387
- package/src-native/pods/Headers/jsi/jsilib.h +0 -59
- package/src-native/pods/Headers/jsi/threadsafe.h +0 -79
- package/src-native/pods/Headers/runtime/ArgConverter.h +0 -61
- package/src-native/pods/Headers/runtime/ArrayAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/Caches.h +0 -98
- package/src-native/pods/Headers/runtime/ClassBuilder.h +0 -61
- package/src-native/pods/Headers/runtime/Common.h +0 -9
- package/src-native/pods/Headers/runtime/ConcurrentMap.h +0 -55
- package/src-native/pods/Headers/runtime/ConcurrentQueue.h +0 -28
- package/src-native/pods/Headers/runtime/Console.h +0 -27
- package/src-native/pods/Headers/runtime/Constants.h +0 -15
- package/src-native/pods/Headers/runtime/DataWrapper.h +0 -671
- package/src-native/pods/Headers/runtime/DictionaryAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/ExtVector.h +0 -21
- package/src-native/pods/Headers/runtime/FFICall.h +0 -105
- package/src-native/pods/Headers/runtime/FastEnumerationAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/FunctionReference.h +0 -18
- package/src-native/pods/Headers/runtime/Helpers.h +0 -84
- package/src-native/pods/Headers/runtime/InlineFunctions.h +0 -16
- package/src-native/pods/Headers/runtime/Interop.h +0 -202
- package/src-native/pods/Headers/runtime/KnownUnknownClassPair.h +0 -35
- package/src-native/pods/Headers/runtime/Metadata.h +0 -981
- package/src-native/pods/Headers/runtime/MetadataBuilder.h +0 -72
- package/src-native/pods/Headers/runtime/MetadataInlines.h +0 -157
- package/src-native/pods/Headers/runtime/ModuleInternal.h +0 -59
- package/src-native/pods/Headers/runtime/NSDataAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/NativeScriptException.h +0 -27
- package/src-native/pods/Headers/runtime/ObjectManager.h +0 -31
- package/src-native/pods/Headers/runtime/OneByteStringResource.h +0 -21
- package/src-native/pods/Headers/runtime/Pointer.h +0 -26
- package/src-native/pods/Headers/runtime/PromiseProxy.h +0 -15
- package/src-native/pods/Headers/runtime/Reference.h +0 -38
- package/src-native/pods/Headers/runtime/Runtime.h +0 -67
- package/src-native/pods/Headers/runtime/RuntimeConfig.h +0 -17
- package/src-native/pods/Headers/runtime/SetTimeout.h +0 -34
- package/src-native/pods/Headers/runtime/SimpleAllocator.h +0 -23
- package/src-native/pods/Headers/runtime/StringHasher.h +0 -315
- package/src-native/pods/Headers/runtime/SymbolIterator.h +0 -18
- package/src-native/pods/Headers/runtime/SymbolLoader.h +0 -27
- package/src-native/pods/Headers/runtime/TNSDerivedClass.h +0 -8
- package/src-native/pods/Headers/runtime/TSHelpers.h +0 -15
- package/src-native/pods/Headers/runtime/Tasks.h +0 -19
- package/src-native/pods/Headers/runtime/UnmanagedType.h +0 -21
- package/src-native/pods/Headers/runtime/WeakRef.h +0 -15
- package/src-native/pods/Headers/runtime/Worker.h +0 -26
- package/src-native/pods/Headers/runtime/robin_hood.h +0 -2184
- package/src-native/pods/Headers/v8runtime/HostProxy.h +0 -71
- package/src-native/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -70
- package/src-native/pods/Headers/v8runtime/V8PointerValue.h +0 -44
- package/src-native/pods/Headers/v8runtime/V8Runtime.h +0 -215
- package/src-native/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
- package/src-native/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
- package/src-native/pods/NativeScript.podspec +0 -68
|
@@ -1,476 +0,0 @@
|
|
|
1
|
-
// Copyright 2012 the V8 project authors. All rights reserved.
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
// This module contains the platform-specific code. This make the rest of the
|
|
6
|
-
// code less dependent on operating system, compilers and runtime libraries.
|
|
7
|
-
// This module does specifically not deal with differences between different
|
|
8
|
-
// processor architecture.
|
|
9
|
-
// The platform classes have the same definition for all platforms. The
|
|
10
|
-
// implementation for a particular platform is put in platform_<os>.cc.
|
|
11
|
-
// The build system then uses the implementation for the target platform.
|
|
12
|
-
//
|
|
13
|
-
// This design has been chosen because it is simple and fast. Alternatively,
|
|
14
|
-
// the platform dependent classes could have been implemented using abstract
|
|
15
|
-
// superclasses with virtual methods and having specializations for each
|
|
16
|
-
// platform. This design was rejected because it was more complicated and
|
|
17
|
-
// slower. It would require factory methods for selecting the right
|
|
18
|
-
// implementation and the overhead of virtual methods for performance
|
|
19
|
-
// sensitive like mutex locking/unlocking.
|
|
20
|
-
|
|
21
|
-
#ifndef V8_BASE_PLATFORM_PLATFORM_H_
|
|
22
|
-
#define V8_BASE_PLATFORM_PLATFORM_H_
|
|
23
|
-
|
|
24
|
-
#include <cstdarg>
|
|
25
|
-
#include <cstdint>
|
|
26
|
-
#include <string>
|
|
27
|
-
#include <vector>
|
|
28
|
-
|
|
29
|
-
#include "src/base/base-export.h"
|
|
30
|
-
#include "src/base/build_config.h"
|
|
31
|
-
#include "src/base/compiler-specific.h"
|
|
32
|
-
#include "src/base/platform/mutex.h"
|
|
33
|
-
#include "src/base/platform/semaphore.h"
|
|
34
|
-
|
|
35
|
-
#if V8_OS_QNX
|
|
36
|
-
#include "src/base/qnx-math.h"
|
|
37
|
-
#endif
|
|
38
|
-
|
|
39
|
-
#ifdef V8_USE_ADDRESS_SANITIZER
|
|
40
|
-
#include <sanitizer/asan_interface.h>
|
|
41
|
-
#endif // V8_USE_ADDRESS_SANITIZER
|
|
42
|
-
|
|
43
|
-
namespace v8 {
|
|
44
|
-
|
|
45
|
-
namespace base {
|
|
46
|
-
|
|
47
|
-
// ----------------------------------------------------------------------------
|
|
48
|
-
// Fast TLS support
|
|
49
|
-
|
|
50
|
-
#ifndef V8_NO_FAST_TLS
|
|
51
|
-
|
|
52
|
-
#if V8_CC_MSVC && V8_HOST_ARCH_IA32
|
|
53
|
-
|
|
54
|
-
#define V8_FAST_TLS_SUPPORTED 1
|
|
55
|
-
|
|
56
|
-
V8_INLINE intptr_t InternalGetExistingThreadLocal(intptr_t index);
|
|
57
|
-
|
|
58
|
-
inline intptr_t InternalGetExistingThreadLocal(intptr_t index) {
|
|
59
|
-
const intptr_t kTibInlineTlsOffset = 0xE10;
|
|
60
|
-
const intptr_t kTibExtraTlsOffset = 0xF94;
|
|
61
|
-
const intptr_t kMaxInlineSlots = 64;
|
|
62
|
-
const intptr_t kMaxSlots = kMaxInlineSlots + 1024;
|
|
63
|
-
const intptr_t kSystemPointerSize = sizeof(void*);
|
|
64
|
-
DCHECK(0 <= index && index < kMaxSlots);
|
|
65
|
-
USE(kMaxSlots);
|
|
66
|
-
if (index < kMaxInlineSlots) {
|
|
67
|
-
return static_cast<intptr_t>(
|
|
68
|
-
__readfsdword(kTibInlineTlsOffset + kSystemPointerSize * index));
|
|
69
|
-
}
|
|
70
|
-
intptr_t extra = static_cast<intptr_t>(__readfsdword(kTibExtraTlsOffset));
|
|
71
|
-
DCHECK_NE(extra, 0);
|
|
72
|
-
return *reinterpret_cast<intptr_t*>(extra + kSystemPointerSize *
|
|
73
|
-
(index - kMaxInlineSlots));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
#elif defined(__APPLE__) && (V8_HOST_ARCH_IA32 || V8_HOST_ARCH_X64)
|
|
77
|
-
|
|
78
|
-
// tvOS simulator does not use intptr_t as TLS key.
|
|
79
|
-
#if !defined(V8_OS_STARBOARD) || !defined(TARGET_OS_SIMULATOR)
|
|
80
|
-
|
|
81
|
-
#define V8_FAST_TLS_SUPPORTED 1
|
|
82
|
-
|
|
83
|
-
extern V8_BASE_EXPORT intptr_t kMacTlsBaseOffset;
|
|
84
|
-
|
|
85
|
-
V8_INLINE intptr_t InternalGetExistingThreadLocal(intptr_t index);
|
|
86
|
-
|
|
87
|
-
inline intptr_t InternalGetExistingThreadLocal(intptr_t index) {
|
|
88
|
-
intptr_t result;
|
|
89
|
-
#if V8_HOST_ARCH_IA32
|
|
90
|
-
asm("movl %%gs:(%1,%2,4), %0;"
|
|
91
|
-
:"=r"(result) // Output must be a writable register.
|
|
92
|
-
:"r"(kMacTlsBaseOffset), "r"(index));
|
|
93
|
-
#else
|
|
94
|
-
asm("movq %%gs:(%1,%2,8), %0;"
|
|
95
|
-
:"=r"(result)
|
|
96
|
-
:"r"(kMacTlsBaseOffset), "r"(index));
|
|
97
|
-
#endif
|
|
98
|
-
return result;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
#endif // !defined(V8_OS_STARBOARD) || !defined(TARGET_OS_SIMULATOR)
|
|
102
|
-
|
|
103
|
-
#endif
|
|
104
|
-
|
|
105
|
-
#endif // V8_NO_FAST_TLS
|
|
106
|
-
|
|
107
|
-
class PageAllocator;
|
|
108
|
-
class TimezoneCache;
|
|
109
|
-
|
|
110
|
-
// ----------------------------------------------------------------------------
|
|
111
|
-
// OS
|
|
112
|
-
//
|
|
113
|
-
// This class has static methods for the different platform specific
|
|
114
|
-
// functions. Add methods here to cope with differences between the
|
|
115
|
-
// supported platforms.
|
|
116
|
-
|
|
117
|
-
class V8_BASE_EXPORT OS {
|
|
118
|
-
public:
|
|
119
|
-
// Initialize the OS class.
|
|
120
|
-
// - hard_abort: If true, OS::Abort() will crash instead of aborting.
|
|
121
|
-
// - gc_fake_mmap: Name of the file for fake gc mmap used in ll_prof.
|
|
122
|
-
static void Initialize(bool hard_abort, const char* const gc_fake_mmap);
|
|
123
|
-
|
|
124
|
-
// Returns the accumulated user time for thread. This routine
|
|
125
|
-
// can be used for profiling. The implementation should
|
|
126
|
-
// strive for high-precision timer resolution, preferable
|
|
127
|
-
// micro-second resolution.
|
|
128
|
-
static int GetUserTime(uint32_t* secs, uint32_t* usecs);
|
|
129
|
-
|
|
130
|
-
// Returns current time as the number of milliseconds since
|
|
131
|
-
// 00:00:00 UTC, January 1, 1970.
|
|
132
|
-
static double TimeCurrentMillis();
|
|
133
|
-
|
|
134
|
-
static TimezoneCache* CreateTimezoneCache();
|
|
135
|
-
|
|
136
|
-
// Returns last OS error.
|
|
137
|
-
static int GetLastError();
|
|
138
|
-
|
|
139
|
-
static FILE* FOpen(const char* path, const char* mode);
|
|
140
|
-
static bool Remove(const char* path);
|
|
141
|
-
|
|
142
|
-
static char DirectorySeparator();
|
|
143
|
-
static bool isDirectorySeparator(const char ch);
|
|
144
|
-
|
|
145
|
-
// Opens a temporary file, the file is auto removed on close.
|
|
146
|
-
static FILE* OpenTemporaryFile();
|
|
147
|
-
|
|
148
|
-
// Log file open mode is platform-dependent due to line ends issues.
|
|
149
|
-
static const char* const LogFileOpenMode;
|
|
150
|
-
|
|
151
|
-
// Print output to console. This is mostly used for debugging output.
|
|
152
|
-
// On platforms that has standard terminal output, the output
|
|
153
|
-
// should go to stdout.
|
|
154
|
-
static PRINTF_FORMAT(1, 2) void Print(const char* format, ...);
|
|
155
|
-
static PRINTF_FORMAT(1, 0) void VPrint(const char* format, va_list args);
|
|
156
|
-
|
|
157
|
-
// Print output to a file. This is mostly used for debugging output.
|
|
158
|
-
static PRINTF_FORMAT(2, 3) void FPrint(FILE* out, const char* format, ...);
|
|
159
|
-
static PRINTF_FORMAT(2, 0) void VFPrint(FILE* out, const char* format,
|
|
160
|
-
va_list args);
|
|
161
|
-
|
|
162
|
-
// Print error output to console. This is mostly used for error message
|
|
163
|
-
// output. On platforms that has standard terminal output, the output
|
|
164
|
-
// should go to stderr.
|
|
165
|
-
static PRINTF_FORMAT(1, 2) void PrintError(const char* format, ...);
|
|
166
|
-
static PRINTF_FORMAT(1, 0) void VPrintError(const char* format, va_list args);
|
|
167
|
-
|
|
168
|
-
// Memory permissions. These should be kept in sync with the ones in
|
|
169
|
-
// v8::PageAllocator.
|
|
170
|
-
enum class MemoryPermission {
|
|
171
|
-
kNoAccess,
|
|
172
|
-
kRead,
|
|
173
|
-
kReadWrite,
|
|
174
|
-
// TODO(hpayer): Remove this flag. Memory should never be rwx.
|
|
175
|
-
kReadWriteExecute,
|
|
176
|
-
kReadExecute,
|
|
177
|
-
// TODO(jkummerow): Remove this when Wasm has a platform-independent
|
|
178
|
-
// w^x implementation.
|
|
179
|
-
kNoAccessWillJitLater
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
static bool HasLazyCommits();
|
|
183
|
-
|
|
184
|
-
// Sleep for a specified time interval.
|
|
185
|
-
static void Sleep(TimeDelta interval);
|
|
186
|
-
|
|
187
|
-
// Abort the current process.
|
|
188
|
-
[[noreturn]] static void Abort();
|
|
189
|
-
|
|
190
|
-
// Debug break.
|
|
191
|
-
static void DebugBreak();
|
|
192
|
-
|
|
193
|
-
// Walk the stack.
|
|
194
|
-
static const int kStackWalkError = -1;
|
|
195
|
-
static const int kStackWalkMaxNameLen = 256;
|
|
196
|
-
static const int kStackWalkMaxTextLen = 256;
|
|
197
|
-
struct StackFrame {
|
|
198
|
-
void* address;
|
|
199
|
-
char text[kStackWalkMaxTextLen];
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
class V8_BASE_EXPORT MemoryMappedFile {
|
|
203
|
-
public:
|
|
204
|
-
enum class FileMode { kReadOnly, kReadWrite };
|
|
205
|
-
|
|
206
|
-
virtual ~MemoryMappedFile() = default;
|
|
207
|
-
virtual void* memory() const = 0;
|
|
208
|
-
virtual size_t size() const = 0;
|
|
209
|
-
|
|
210
|
-
static MemoryMappedFile* open(const char* name,
|
|
211
|
-
FileMode mode = FileMode::kReadWrite);
|
|
212
|
-
static MemoryMappedFile* create(const char* name, size_t size,
|
|
213
|
-
void* initial);
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
// Safe formatting print. Ensures that str is always null-terminated.
|
|
217
|
-
// Returns the number of chars written, or -1 if output was truncated.
|
|
218
|
-
static PRINTF_FORMAT(3, 4) int SNPrintF(char* str, int length,
|
|
219
|
-
const char* format, ...);
|
|
220
|
-
static PRINTF_FORMAT(3, 0) int VSNPrintF(char* str, int length,
|
|
221
|
-
const char* format, va_list args);
|
|
222
|
-
|
|
223
|
-
static void StrNCpy(char* dest, int length, const char* src, size_t n);
|
|
224
|
-
|
|
225
|
-
// Support for the profiler. Can do nothing, in which case ticks
|
|
226
|
-
// occurring in shared libraries will not be properly accounted for.
|
|
227
|
-
struct SharedLibraryAddress {
|
|
228
|
-
SharedLibraryAddress(const std::string& library_path, uintptr_t start,
|
|
229
|
-
uintptr_t end)
|
|
230
|
-
: library_path(library_path), start(start), end(end), aslr_slide(0) {}
|
|
231
|
-
SharedLibraryAddress(const std::string& library_path, uintptr_t start,
|
|
232
|
-
uintptr_t end, intptr_t aslr_slide)
|
|
233
|
-
: library_path(library_path),
|
|
234
|
-
start(start),
|
|
235
|
-
end(end),
|
|
236
|
-
aslr_slide(aslr_slide) {}
|
|
237
|
-
|
|
238
|
-
std::string library_path;
|
|
239
|
-
uintptr_t start;
|
|
240
|
-
uintptr_t end;
|
|
241
|
-
intptr_t aslr_slide;
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
static std::vector<SharedLibraryAddress> GetSharedLibraryAddresses();
|
|
245
|
-
|
|
246
|
-
// Support for the profiler. Notifies the external profiling
|
|
247
|
-
// process that a code moving garbage collection starts. Can do
|
|
248
|
-
// nothing, in which case the code objects must not move (e.g., by
|
|
249
|
-
// using --never-compact) if accurate profiling is desired.
|
|
250
|
-
static void SignalCodeMovingGC();
|
|
251
|
-
|
|
252
|
-
// Support runtime detection of whether the hard float option of the
|
|
253
|
-
// EABI is used.
|
|
254
|
-
static bool ArmUsingHardFloat();
|
|
255
|
-
|
|
256
|
-
// Returns the activation frame alignment constraint or zero if
|
|
257
|
-
// the platform doesn't care. Guaranteed to be a power of two.
|
|
258
|
-
static int ActivationFrameAlignment();
|
|
259
|
-
|
|
260
|
-
static int GetCurrentProcessId();
|
|
261
|
-
|
|
262
|
-
static int GetCurrentThreadId();
|
|
263
|
-
|
|
264
|
-
static void AdjustSchedulingParams();
|
|
265
|
-
|
|
266
|
-
[[noreturn]] static void ExitProcess(int exit_code);
|
|
267
|
-
|
|
268
|
-
private:
|
|
269
|
-
// These classes use the private memory management API below.
|
|
270
|
-
friend class MemoryMappedFile;
|
|
271
|
-
friend class PosixMemoryMappedFile;
|
|
272
|
-
friend class v8::base::PageAllocator;
|
|
273
|
-
|
|
274
|
-
static size_t AllocatePageSize();
|
|
275
|
-
|
|
276
|
-
static size_t CommitPageSize();
|
|
277
|
-
|
|
278
|
-
static void SetRandomMmapSeed(int64_t seed);
|
|
279
|
-
|
|
280
|
-
static void* GetRandomMmapAddr();
|
|
281
|
-
|
|
282
|
-
V8_WARN_UNUSED_RESULT static void* Allocate(void* address, size_t size,
|
|
283
|
-
size_t alignment,
|
|
284
|
-
MemoryPermission access);
|
|
285
|
-
|
|
286
|
-
V8_WARN_UNUSED_RESULT static void* AllocateShared(size_t size,
|
|
287
|
-
MemoryPermission access);
|
|
288
|
-
|
|
289
|
-
V8_WARN_UNUSED_RESULT static void* RemapShared(void* old_address,
|
|
290
|
-
void* new_address,
|
|
291
|
-
size_t size);
|
|
292
|
-
|
|
293
|
-
V8_WARN_UNUSED_RESULT static bool Free(void* address, const size_t size);
|
|
294
|
-
|
|
295
|
-
V8_WARN_UNUSED_RESULT static bool Release(void* address, size_t size);
|
|
296
|
-
|
|
297
|
-
V8_WARN_UNUSED_RESULT static bool SetPermissions(void* address, size_t size,
|
|
298
|
-
MemoryPermission access);
|
|
299
|
-
|
|
300
|
-
V8_WARN_UNUSED_RESULT static bool DiscardSystemPages(void* address,
|
|
301
|
-
size_t size);
|
|
302
|
-
|
|
303
|
-
static const int msPerSecond = 1000;
|
|
304
|
-
|
|
305
|
-
#if V8_OS_POSIX
|
|
306
|
-
static const char* GetGCFakeMMapFile();
|
|
307
|
-
#endif
|
|
308
|
-
|
|
309
|
-
DISALLOW_IMPLICIT_CONSTRUCTORS(OS);
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
#if (defined(_WIN32) || defined(_WIN64))
|
|
313
|
-
V8_BASE_EXPORT void EnsureConsoleOutputWin32();
|
|
314
|
-
#endif // (defined(_WIN32) || defined(_WIN64))
|
|
315
|
-
|
|
316
|
-
inline void EnsureConsoleOutput() {
|
|
317
|
-
#if (defined(_WIN32) || defined(_WIN64))
|
|
318
|
-
// Windows requires extra calls to send assert output to the console
|
|
319
|
-
// rather than a dialog box.
|
|
320
|
-
EnsureConsoleOutputWin32();
|
|
321
|
-
#endif // (defined(_WIN32) || defined(_WIN64))
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
// ----------------------------------------------------------------------------
|
|
325
|
-
// Thread
|
|
326
|
-
//
|
|
327
|
-
// Thread objects are used for creating and running threads. When the start()
|
|
328
|
-
// method is called the new thread starts running the run() method in the new
|
|
329
|
-
// thread. The Thread object should not be deallocated before the thread has
|
|
330
|
-
// terminated.
|
|
331
|
-
|
|
332
|
-
class V8_BASE_EXPORT Thread {
|
|
333
|
-
public:
|
|
334
|
-
// Opaque data type for thread-local storage keys.
|
|
335
|
-
#if V8_OS_STARBOARD
|
|
336
|
-
using LocalStorageKey = SbThreadLocalKey;
|
|
337
|
-
#else
|
|
338
|
-
using LocalStorageKey = int32_t;
|
|
339
|
-
#endif
|
|
340
|
-
|
|
341
|
-
class Options {
|
|
342
|
-
public:
|
|
343
|
-
Options() : name_("v8:<unknown>"), stack_size_(0) {}
|
|
344
|
-
explicit Options(const char* name, int stack_size = 0)
|
|
345
|
-
: name_(name), stack_size_(stack_size) {}
|
|
346
|
-
|
|
347
|
-
const char* name() const { return name_; }
|
|
348
|
-
int stack_size() const { return stack_size_; }
|
|
349
|
-
|
|
350
|
-
private:
|
|
351
|
-
const char* name_;
|
|
352
|
-
int stack_size_;
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
// Create new thread.
|
|
356
|
-
explicit Thread(const Options& options);
|
|
357
|
-
Thread(const Thread&) = delete;
|
|
358
|
-
Thread& operator=(const Thread&) = delete;
|
|
359
|
-
virtual ~Thread();
|
|
360
|
-
|
|
361
|
-
// Start new thread by calling the Run() method on the new thread.
|
|
362
|
-
V8_WARN_UNUSED_RESULT bool Start();
|
|
363
|
-
|
|
364
|
-
// Start new thread and wait until Run() method is called on the new thread.
|
|
365
|
-
bool StartSynchronously() {
|
|
366
|
-
start_semaphore_ = new Semaphore(0);
|
|
367
|
-
if (!Start()) return false;
|
|
368
|
-
start_semaphore_->Wait();
|
|
369
|
-
delete start_semaphore_;
|
|
370
|
-
start_semaphore_ = nullptr;
|
|
371
|
-
return true;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// Wait until thread terminates.
|
|
375
|
-
void Join();
|
|
376
|
-
|
|
377
|
-
inline const char* name() const {
|
|
378
|
-
return name_;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// Abstract method for run handler.
|
|
382
|
-
virtual void Run() = 0;
|
|
383
|
-
|
|
384
|
-
// Thread-local storage.
|
|
385
|
-
static LocalStorageKey CreateThreadLocalKey();
|
|
386
|
-
static void DeleteThreadLocalKey(LocalStorageKey key);
|
|
387
|
-
static void* GetThreadLocal(LocalStorageKey key);
|
|
388
|
-
static void SetThreadLocal(LocalStorageKey key, void* value);
|
|
389
|
-
static bool HasThreadLocal(LocalStorageKey key) {
|
|
390
|
-
return GetThreadLocal(key) != nullptr;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
#ifdef V8_FAST_TLS_SUPPORTED
|
|
394
|
-
static inline void* GetExistingThreadLocal(LocalStorageKey key) {
|
|
395
|
-
void* result = reinterpret_cast<void*>(
|
|
396
|
-
InternalGetExistingThreadLocal(static_cast<intptr_t>(key)));
|
|
397
|
-
DCHECK(result == GetThreadLocal(key));
|
|
398
|
-
return result;
|
|
399
|
-
}
|
|
400
|
-
#else
|
|
401
|
-
static inline void* GetExistingThreadLocal(LocalStorageKey key) {
|
|
402
|
-
return GetThreadLocal(key);
|
|
403
|
-
}
|
|
404
|
-
#endif
|
|
405
|
-
|
|
406
|
-
// The thread name length is limited to 16 based on Linux's implementation of
|
|
407
|
-
// prctl().
|
|
408
|
-
static const int kMaxThreadNameLength = 16;
|
|
409
|
-
|
|
410
|
-
class PlatformData;
|
|
411
|
-
PlatformData* data() { return data_; }
|
|
412
|
-
|
|
413
|
-
void NotifyStartedAndRun() {
|
|
414
|
-
if (start_semaphore_) start_semaphore_->Signal();
|
|
415
|
-
Run();
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
private:
|
|
419
|
-
void set_name(const char* name);
|
|
420
|
-
|
|
421
|
-
PlatformData* data_;
|
|
422
|
-
|
|
423
|
-
char name_[kMaxThreadNameLength];
|
|
424
|
-
int stack_size_;
|
|
425
|
-
Semaphore* start_semaphore_;
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
// TODO(v8:10354): Make use of the stack utilities here in V8.
|
|
429
|
-
class V8_BASE_EXPORT Stack {
|
|
430
|
-
public:
|
|
431
|
-
// Convenience wrapper to use stack slots as unsigned values or void*
|
|
432
|
-
// pointers.
|
|
433
|
-
struct StackSlot {
|
|
434
|
-
// NOLINTNEXTLINE
|
|
435
|
-
StackSlot(void* value) : value(reinterpret_cast<uintptr_t>(value)) {}
|
|
436
|
-
StackSlot(uintptr_t value) : value(value) {} // NOLINT
|
|
437
|
-
|
|
438
|
-
// NOLINTNEXTLINE
|
|
439
|
-
operator void*() const { return reinterpret_cast<void*>(value); }
|
|
440
|
-
operator uintptr_t() const { return value; } // NOLINT
|
|
441
|
-
|
|
442
|
-
uintptr_t value;
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
// Gets the start of the stack of the current thread.
|
|
446
|
-
static StackSlot GetStackStart();
|
|
447
|
-
|
|
448
|
-
// Returns the current stack top. Works correctly with ASAN and SafeStack.
|
|
449
|
-
// GetCurrentStackPosition() should not be inlined, because it works on stack
|
|
450
|
-
// frames if it were inlined into a function with a huge stack frame it would
|
|
451
|
-
// return an address significantly above the actual current stack position.
|
|
452
|
-
static V8_NOINLINE StackSlot GetCurrentStackPosition();
|
|
453
|
-
|
|
454
|
-
// Returns the real stack frame if slot is part of a fake frame, and slot
|
|
455
|
-
// otherwise.
|
|
456
|
-
static StackSlot GetRealStackAddressForSlot(StackSlot slot) {
|
|
457
|
-
#ifdef V8_USE_ADDRESS_SANITIZER
|
|
458
|
-
// ASAN fetches the real stack deeper in the __asan_addr_is_in_fake_stack()
|
|
459
|
-
// call (precisely, deeper in __asan_stack_malloc_()), which results in a
|
|
460
|
-
// real frame that could be outside of stack bounds. Adjust for this
|
|
461
|
-
// impreciseness here.
|
|
462
|
-
constexpr size_t kAsanRealFrameOffsetBytes = 32;
|
|
463
|
-
void* real_frame = __asan_addr_is_in_fake_stack(
|
|
464
|
-
__asan_get_current_fake_stack(), slot, nullptr, nullptr);
|
|
465
|
-
return real_frame
|
|
466
|
-
? (static_cast<char*>(real_frame) + kAsanRealFrameOffsetBytes)
|
|
467
|
-
: slot;
|
|
468
|
-
#endif // V8_USE_ADDRESS_SANITIZER
|
|
469
|
-
return slot;
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
|
|
473
|
-
} // namespace base
|
|
474
|
-
} // namespace v8
|
|
475
|
-
|
|
476
|
-
#endif // V8_BASE_PLATFORM_PLATFORM_H_
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
// Copyright 2013 the V8 project authors. All rights reserved.
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
#ifndef V8_BASE_PLATFORM_SEMAPHORE_H_
|
|
6
|
-
#define V8_BASE_PLATFORM_SEMAPHORE_H_
|
|
7
|
-
|
|
8
|
-
#include "src/base/base-export.h"
|
|
9
|
-
#include "src/base/lazy-instance.h"
|
|
10
|
-
#if V8_OS_WIN
|
|
11
|
-
#include "src/base/win32-headers.h"
|
|
12
|
-
#endif
|
|
13
|
-
|
|
14
|
-
#if V8_OS_MACOSX
|
|
15
|
-
#include <dispatch/dispatch.h>
|
|
16
|
-
#elif V8_OS_POSIX
|
|
17
|
-
#include <semaphore.h>
|
|
18
|
-
#endif
|
|
19
|
-
|
|
20
|
-
#if V8_OS_STARBOARD
|
|
21
|
-
#include "starboard/common/semaphore.h"
|
|
22
|
-
#endif
|
|
23
|
-
|
|
24
|
-
namespace v8 {
|
|
25
|
-
namespace base {
|
|
26
|
-
|
|
27
|
-
// Forward declarations.
|
|
28
|
-
class TimeDelta;
|
|
29
|
-
|
|
30
|
-
// ----------------------------------------------------------------------------
|
|
31
|
-
// Semaphore
|
|
32
|
-
//
|
|
33
|
-
// A semaphore object is a synchronization object that maintains a count. The
|
|
34
|
-
// count is decremented each time a thread completes a wait for the semaphore
|
|
35
|
-
// object and incremented each time a thread signals the semaphore. When the
|
|
36
|
-
// count reaches zero, threads waiting for the semaphore blocks until the
|
|
37
|
-
// count becomes non-zero.
|
|
38
|
-
|
|
39
|
-
class V8_BASE_EXPORT Semaphore final {
|
|
40
|
-
public:
|
|
41
|
-
explicit Semaphore(int count);
|
|
42
|
-
Semaphore(const Semaphore&) = delete;
|
|
43
|
-
Semaphore& operator=(const Semaphore&) = delete;
|
|
44
|
-
~Semaphore();
|
|
45
|
-
|
|
46
|
-
// Increments the semaphore counter.
|
|
47
|
-
void Signal();
|
|
48
|
-
|
|
49
|
-
// Decrements the semaphore counter if it is positive, or blocks until it
|
|
50
|
-
// becomes positive and then decrements the counter.
|
|
51
|
-
void Wait();
|
|
52
|
-
|
|
53
|
-
// Like Wait() but returns after rel_time time has passed. If the timeout
|
|
54
|
-
// happens the return value is false and the counter is unchanged. Otherwise
|
|
55
|
-
// the semaphore counter is decremented and true is returned.
|
|
56
|
-
bool WaitFor(const TimeDelta& rel_time) V8_WARN_UNUSED_RESULT;
|
|
57
|
-
|
|
58
|
-
#if V8_OS_MACOSX
|
|
59
|
-
using NativeHandle = dispatch_semaphore_t;
|
|
60
|
-
#elif V8_OS_POSIX
|
|
61
|
-
using NativeHandle = sem_t;
|
|
62
|
-
#elif V8_OS_WIN
|
|
63
|
-
using NativeHandle = HANDLE;
|
|
64
|
-
#elif V8_OS_STARBOARD
|
|
65
|
-
using NativeHandle = starboard::Semaphore;
|
|
66
|
-
#endif
|
|
67
|
-
|
|
68
|
-
NativeHandle& native_handle() {
|
|
69
|
-
return native_handle_;
|
|
70
|
-
}
|
|
71
|
-
const NativeHandle& native_handle() const {
|
|
72
|
-
return native_handle_;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
private:
|
|
76
|
-
NativeHandle native_handle_;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
// POD Semaphore initialized lazily (i.e. the first time Pointer() is called).
|
|
81
|
-
// Usage:
|
|
82
|
-
// // The following semaphore starts at 0.
|
|
83
|
-
// static LazySemaphore<0>::type my_semaphore = LAZY_SEMAPHORE_INITIALIZER;
|
|
84
|
-
//
|
|
85
|
-
// void my_function() {
|
|
86
|
-
// // Do something with my_semaphore.Pointer().
|
|
87
|
-
// }
|
|
88
|
-
//
|
|
89
|
-
|
|
90
|
-
template <int N>
|
|
91
|
-
struct CreateSemaphoreTrait {
|
|
92
|
-
static Semaphore* Create() {
|
|
93
|
-
return new Semaphore(N);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
template <int N>
|
|
98
|
-
struct LazySemaphore {
|
|
99
|
-
using typename LazyDynamicInstance<Semaphore, CreateSemaphoreTrait<N>,
|
|
100
|
-
ThreadSafeInitOnceTrait>::type;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
#define LAZY_SEMAPHORE_INITIALIZER LAZY_DYNAMIC_INSTANCE_INITIALIZER
|
|
104
|
-
|
|
105
|
-
} // namespace base
|
|
106
|
-
} // namespace v8
|
|
107
|
-
|
|
108
|
-
#endif // V8_BASE_PLATFORM_SEMAPHORE_H_
|