@triniwiz/nativescript-masonkit 1.0.0-alpha.11 → 1.0.0-alpha.13
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/helpers.js +0 -3
- package/helpers.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/style.js +0 -1
- package/style.js.map +1 -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,423 +0,0 @@
|
|
|
1
|
-
// Copyright 2014 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_MACROS_H_
|
|
6
|
-
#define V8_BASE_MACROS_H_
|
|
7
|
-
|
|
8
|
-
#include <limits>
|
|
9
|
-
#include <type_traits>
|
|
10
|
-
|
|
11
|
-
#include "src/base/compiler-specific.h"
|
|
12
|
-
#include "src/base/logging.h"
|
|
13
|
-
#include "src/base/platform/wrappers.h"
|
|
14
|
-
|
|
15
|
-
// No-op macro which is used to work around MSVC's funky VA_ARGS support.
|
|
16
|
-
#define EXPAND(x) x
|
|
17
|
-
|
|
18
|
-
// This macro does nothing. That's all.
|
|
19
|
-
#define NOTHING(...)
|
|
20
|
-
|
|
21
|
-
// TODO(all) Replace all uses of this macro with C++'s offsetof. To do that, we
|
|
22
|
-
// have to make sure that only standard-layout types and simple field
|
|
23
|
-
// designators are used.
|
|
24
|
-
#define OFFSET_OF(type, field) \
|
|
25
|
-
(reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(16)->field)) - 16)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// The arraysize(arr) macro returns the # of elements in an array arr.
|
|
29
|
-
// The expression is a compile-time constant, and therefore can be
|
|
30
|
-
// used in defining new arrays, for example. If you use arraysize on
|
|
31
|
-
// a pointer by mistake, you will get a compile-time error.
|
|
32
|
-
#define arraysize(array) (sizeof(ArraySizeHelper(array)))
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// This template function declaration is used in defining arraysize.
|
|
36
|
-
// Note that the function doesn't need an implementation, as we only
|
|
37
|
-
// use its type.
|
|
38
|
-
template <typename T, size_t N>
|
|
39
|
-
char (&ArraySizeHelper(T (&array)[N]))[N];
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
#if !V8_CC_MSVC
|
|
43
|
-
// That gcc wants both of these prototypes seems mysterious. VC, for
|
|
44
|
-
// its part, can't decide which to use (another mystery). Matching of
|
|
45
|
-
// template overloads: the final frontier.
|
|
46
|
-
template <typename T, size_t N>
|
|
47
|
-
char (&ArraySizeHelper(const T (&array)[N]))[N];
|
|
48
|
-
#endif
|
|
49
|
-
|
|
50
|
-
// bit_cast<Dest,Source> is a template function that implements the
|
|
51
|
-
// equivalent of "*reinterpret_cast<Dest*>(&source)". We need this in
|
|
52
|
-
// very low-level functions like the protobuf library and fast math
|
|
53
|
-
// support.
|
|
54
|
-
//
|
|
55
|
-
// float f = 3.14159265358979;
|
|
56
|
-
// int i = bit_cast<int32>(f);
|
|
57
|
-
// // i = 0x40490fdb
|
|
58
|
-
//
|
|
59
|
-
// The classical address-casting method is:
|
|
60
|
-
//
|
|
61
|
-
// // WRONG
|
|
62
|
-
// float f = 3.14159265358979; // WRONG
|
|
63
|
-
// int i = * reinterpret_cast<int*>(&f); // WRONG
|
|
64
|
-
//
|
|
65
|
-
// The address-casting method actually produces undefined behavior
|
|
66
|
-
// according to ISO C++ specification section 3.10 -15 -. Roughly, this
|
|
67
|
-
// section says: if an object in memory has one type, and a program
|
|
68
|
-
// accesses it with a different type, then the result is undefined
|
|
69
|
-
// behavior for most values of "different type".
|
|
70
|
-
//
|
|
71
|
-
// This is true for any cast syntax, either *(int*)&f or
|
|
72
|
-
// *reinterpret_cast<int*>(&f). And it is particularly true for
|
|
73
|
-
// conversions between integral lvalues and floating-point lvalues.
|
|
74
|
-
//
|
|
75
|
-
// The purpose of 3.10 -15- is to allow optimizing compilers to assume
|
|
76
|
-
// that expressions with different types refer to different memory. gcc
|
|
77
|
-
// 4.0.1 has an optimizer that takes advantage of this. So a
|
|
78
|
-
// non-conforming program quietly produces wildly incorrect output.
|
|
79
|
-
//
|
|
80
|
-
// The problem is not the use of reinterpret_cast. The problem is type
|
|
81
|
-
// punning: holding an object in memory of one type and reading its bits
|
|
82
|
-
// back using a different type.
|
|
83
|
-
//
|
|
84
|
-
// The C++ standard is more subtle and complex than this, but that
|
|
85
|
-
// is the basic idea.
|
|
86
|
-
//
|
|
87
|
-
// Anyways ...
|
|
88
|
-
//
|
|
89
|
-
// bit_cast<> calls memcpy() which is blessed by the standard,
|
|
90
|
-
// especially by the example in section 3.9 . Also, of course,
|
|
91
|
-
// bit_cast<> wraps up the nasty logic in one place.
|
|
92
|
-
//
|
|
93
|
-
// Fortunately memcpy() is very fast. In optimized mode, with a
|
|
94
|
-
// constant size, gcc 2.95.3, gcc 4.0.1, and msvc 7.1 produce inline
|
|
95
|
-
// code with the minimal amount of data movement. On a 32-bit system,
|
|
96
|
-
// memcpy(d,s,4) compiles to one load and one store, and memcpy(d,s,8)
|
|
97
|
-
// compiles to two loads and two stores.
|
|
98
|
-
//
|
|
99
|
-
// I tested this code with gcc 2.95.3, gcc 4.0.1, icc 8.1, and msvc 7.1.
|
|
100
|
-
//
|
|
101
|
-
// WARNING: if Dest or Source is a non-POD type, the result of the memcpy
|
|
102
|
-
// is likely to surprise you.
|
|
103
|
-
template <class Dest, class Source>
|
|
104
|
-
V8_INLINE Dest bit_cast(Source const& source) {
|
|
105
|
-
static_assert(sizeof(Dest) == sizeof(Source),
|
|
106
|
-
"source and dest must be same size");
|
|
107
|
-
Dest dest;
|
|
108
|
-
v8::base::Memcpy(&dest, &source, sizeof(dest));
|
|
109
|
-
return dest;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// Explicitly declare the assignment operator as deleted.
|
|
113
|
-
// Note: This macro is deprecated and will be removed soon. Please explicitly
|
|
114
|
-
// delete the assignment operator instead.
|
|
115
|
-
#define DISALLOW_ASSIGN(TypeName) TypeName& operator=(const TypeName&) = delete
|
|
116
|
-
|
|
117
|
-
// Explicitly declare all implicit constructors as deleted, namely the
|
|
118
|
-
// default constructor, copy constructor and operator= functions.
|
|
119
|
-
// This is especially useful for classes containing only static methods.
|
|
120
|
-
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
|
|
121
|
-
TypeName() = delete; \
|
|
122
|
-
TypeName(const TypeName&) = delete; \
|
|
123
|
-
DISALLOW_ASSIGN(TypeName)
|
|
124
|
-
|
|
125
|
-
// Disallow copying a type, but provide default construction, move construction
|
|
126
|
-
// and move assignment. Especially useful for move-only structs.
|
|
127
|
-
#define MOVE_ONLY_WITH_DEFAULT_CONSTRUCTORS(TypeName) \
|
|
128
|
-
TypeName() = default; \
|
|
129
|
-
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(TypeName)
|
|
130
|
-
|
|
131
|
-
// Disallow copying a type, and only provide move construction and move
|
|
132
|
-
// assignment. Especially useful for move-only structs.
|
|
133
|
-
#define MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(TypeName) \
|
|
134
|
-
TypeName(TypeName&&) V8_NOEXCEPT = default; \
|
|
135
|
-
TypeName& operator=(TypeName&&) V8_NOEXCEPT = default; \
|
|
136
|
-
TypeName(const TypeName&) = delete; \
|
|
137
|
-
DISALLOW_ASSIGN(TypeName)
|
|
138
|
-
|
|
139
|
-
// A macro to disallow the dynamic allocation.
|
|
140
|
-
// This should be used in the private: declarations for a class
|
|
141
|
-
// Declaring operator new and delete as deleted is not spec compliant.
|
|
142
|
-
// Extract from 3.2.2 of C++11 spec:
|
|
143
|
-
// [...] A non-placement deallocation function for a class is
|
|
144
|
-
// odr-used by the definition of the destructor of that class, [...]
|
|
145
|
-
#define DISALLOW_NEW_AND_DELETE() \
|
|
146
|
-
void* operator new(size_t) { v8::base::OS::Abort(); } \
|
|
147
|
-
void* operator new[](size_t) { v8::base::OS::Abort(); } \
|
|
148
|
-
void operator delete(void*, size_t) { v8::base::OS::Abort(); } \
|
|
149
|
-
void operator delete[](void*, size_t) { v8::base::OS::Abort(); }
|
|
150
|
-
|
|
151
|
-
// Define V8_USE_ADDRESS_SANITIZER macro.
|
|
152
|
-
#if defined(__has_feature)
|
|
153
|
-
#if __has_feature(address_sanitizer)
|
|
154
|
-
#define V8_USE_ADDRESS_SANITIZER 1
|
|
155
|
-
#endif
|
|
156
|
-
#endif
|
|
157
|
-
|
|
158
|
-
// Define DISABLE_ASAN macro.
|
|
159
|
-
#ifdef V8_USE_ADDRESS_SANITIZER
|
|
160
|
-
#define DISABLE_ASAN __attribute__((no_sanitize_address))
|
|
161
|
-
#else
|
|
162
|
-
#define DISABLE_ASAN
|
|
163
|
-
#endif
|
|
164
|
-
|
|
165
|
-
// Define V8_USE_MEMORY_SANITIZER macro.
|
|
166
|
-
#if defined(__has_feature)
|
|
167
|
-
#if __has_feature(memory_sanitizer)
|
|
168
|
-
#define V8_USE_MEMORY_SANITIZER 1
|
|
169
|
-
#endif
|
|
170
|
-
#endif
|
|
171
|
-
|
|
172
|
-
// DISABLE_CFI_PERF -- Disable Control Flow Integrity checks for Perf reasons.
|
|
173
|
-
#define DISABLE_CFI_PERF V8_CLANG_NO_SANITIZE("cfi")
|
|
174
|
-
|
|
175
|
-
// DISABLE_CFI_ICALL -- Disable Control Flow Integrity indirect call checks,
|
|
176
|
-
// useful because calls into JITed code can not be CFI verified.
|
|
177
|
-
#ifdef V8_OS_WIN
|
|
178
|
-
// On Windows, also needs __declspec(guard(nocf)) for CFG.
|
|
179
|
-
#define DISABLE_CFI_ICALL \
|
|
180
|
-
V8_CLANG_NO_SANITIZE("cfi-icall") \
|
|
181
|
-
__declspec(guard(nocf))
|
|
182
|
-
#else
|
|
183
|
-
#define DISABLE_CFI_ICALL V8_CLANG_NO_SANITIZE("cfi-icall")
|
|
184
|
-
#endif
|
|
185
|
-
|
|
186
|
-
// A convenience wrapper around static_assert without a string message argument.
|
|
187
|
-
// Once C++17 becomes the default, this macro can be removed in favor of the
|
|
188
|
-
// new static_assert(condition) overload.
|
|
189
|
-
#define STATIC_ASSERT(test) static_assert(test, #test)
|
|
190
|
-
|
|
191
|
-
namespace v8 {
|
|
192
|
-
namespace base {
|
|
193
|
-
|
|
194
|
-
// Note that some implementations of std::is_trivially_copyable mandate that at
|
|
195
|
-
// least one of the copy constructor, move constructor, copy assignment or move
|
|
196
|
-
// assignment is non-deleted, while others do not. Be aware that also
|
|
197
|
-
// base::is_trivially_copyable will differ for these cases.
|
|
198
|
-
template <typename T>
|
|
199
|
-
struct is_trivially_copyable {
|
|
200
|
-
#if V8_CC_MSVC
|
|
201
|
-
// Unfortunately, MSVC 2015 is broken in that std::is_trivially_copyable can
|
|
202
|
-
// be false even though it should be true according to the standard.
|
|
203
|
-
// (status at 2018-02-26, observed on the msvc waterfall bot).
|
|
204
|
-
// Interestingly, the lower-level primitives used below are working as
|
|
205
|
-
// intended, so we reimplement this according to the standard.
|
|
206
|
-
// See also https://developercommunity.visualstudio.com/content/problem/
|
|
207
|
-
// 170883/msvc-type-traits-stdis-trivial-is-bugged.html.
|
|
208
|
-
static constexpr bool value =
|
|
209
|
-
// Copy constructor is trivial or deleted.
|
|
210
|
-
(std::is_trivially_copy_constructible<T>::value ||
|
|
211
|
-
!std::is_copy_constructible<T>::value) &&
|
|
212
|
-
// Copy assignment operator is trivial or deleted.
|
|
213
|
-
(std::is_trivially_copy_assignable<T>::value ||
|
|
214
|
-
!std::is_copy_assignable<T>::value) &&
|
|
215
|
-
// Move constructor is trivial or deleted.
|
|
216
|
-
(std::is_trivially_move_constructible<T>::value ||
|
|
217
|
-
!std::is_move_constructible<T>::value) &&
|
|
218
|
-
// Move assignment operator is trivial or deleted.
|
|
219
|
-
(std::is_trivially_move_assignable<T>::value ||
|
|
220
|
-
!std::is_move_assignable<T>::value) &&
|
|
221
|
-
// (Some implementations mandate that one of the above is non-deleted, but
|
|
222
|
-
// the standard does not, so let's skip this check.)
|
|
223
|
-
// Trivial non-deleted destructor.
|
|
224
|
-
std::is_trivially_destructible<T>::value;
|
|
225
|
-
#else
|
|
226
|
-
static constexpr bool value = std::is_trivially_copyable<T>::value;
|
|
227
|
-
#endif
|
|
228
|
-
};
|
|
229
|
-
#define ASSERT_TRIVIALLY_COPYABLE(T) \
|
|
230
|
-
static_assert(::v8::base::is_trivially_copyable<T>::value, \
|
|
231
|
-
#T " should be trivially copyable")
|
|
232
|
-
#define ASSERT_NOT_TRIVIALLY_COPYABLE(T) \
|
|
233
|
-
static_assert(!::v8::base::is_trivially_copyable<T>::value, \
|
|
234
|
-
#T " should not be trivially copyable")
|
|
235
|
-
|
|
236
|
-
// The USE(x, ...) template is used to silence C++ compiler warnings
|
|
237
|
-
// issued for (yet) unused variables (typically parameters).
|
|
238
|
-
// The arguments are guaranteed to be evaluated from left to right.
|
|
239
|
-
struct Use {
|
|
240
|
-
template <typename T>
|
|
241
|
-
Use(T&&) {} // NOLINT(runtime/explicit)
|
|
242
|
-
};
|
|
243
|
-
#define USE(...) \
|
|
244
|
-
do { \
|
|
245
|
-
::v8::base::Use unused_tmp_array_for_use_macro[]{__VA_ARGS__}; \
|
|
246
|
-
(void)unused_tmp_array_for_use_macro; \
|
|
247
|
-
} while (false)
|
|
248
|
-
|
|
249
|
-
// Evaluate the instantiations of an expression with parameter packs.
|
|
250
|
-
// Since USE has left-to-right evaluation order of it's arguments,
|
|
251
|
-
// the parameter pack is iterated from left to right and side effects
|
|
252
|
-
// have defined behavior.
|
|
253
|
-
#define ITERATE_PACK(...) USE(0, ((__VA_ARGS__), 0)...)
|
|
254
|
-
|
|
255
|
-
} // namespace base
|
|
256
|
-
} // namespace v8
|
|
257
|
-
|
|
258
|
-
// implicit_cast<A>(x) triggers an implicit cast from {x} to type {A}. This is
|
|
259
|
-
// useful in situations where static_cast<A>(x) would do too much.
|
|
260
|
-
// Only use this for cheap-to-copy types, or use move semantics explicitly.
|
|
261
|
-
template <class A>
|
|
262
|
-
V8_INLINE A implicit_cast(A x) {
|
|
263
|
-
return x;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
// Define our own macros for writing 64-bit constants. This is less fragile
|
|
267
|
-
// than defining __STDC_CONSTANT_MACROS before including <stdint.h>, and it
|
|
268
|
-
// works on compilers that don't have it (like MSVC).
|
|
269
|
-
#if V8_CC_MSVC
|
|
270
|
-
# if V8_HOST_ARCH_64_BIT
|
|
271
|
-
# define V8_PTR_PREFIX "ll"
|
|
272
|
-
# else
|
|
273
|
-
# define V8_PTR_PREFIX ""
|
|
274
|
-
# endif // V8_HOST_ARCH_64_BIT
|
|
275
|
-
#elif V8_CC_MINGW64
|
|
276
|
-
# define V8_PTR_PREFIX "I64"
|
|
277
|
-
#elif V8_HOST_ARCH_64_BIT
|
|
278
|
-
# define V8_PTR_PREFIX "l"
|
|
279
|
-
#else
|
|
280
|
-
#if V8_OS_AIX
|
|
281
|
-
#define V8_PTR_PREFIX "l"
|
|
282
|
-
#else
|
|
283
|
-
# define V8_PTR_PREFIX ""
|
|
284
|
-
#endif
|
|
285
|
-
#endif
|
|
286
|
-
|
|
287
|
-
#define V8PRIxPTR V8_PTR_PREFIX "x"
|
|
288
|
-
#define V8PRIdPTR V8_PTR_PREFIX "d"
|
|
289
|
-
#define V8PRIuPTR V8_PTR_PREFIX "u"
|
|
290
|
-
|
|
291
|
-
#if V8_TARGET_ARCH_64_BIT
|
|
292
|
-
#define V8_PTR_HEX_DIGITS 12
|
|
293
|
-
#define V8PRIxPTR_FMT "0x%012" V8PRIxPTR
|
|
294
|
-
#else
|
|
295
|
-
#define V8_PTR_HEX_DIGITS 8
|
|
296
|
-
#define V8PRIxPTR_FMT "0x%08" V8PRIxPTR
|
|
297
|
-
#endif
|
|
298
|
-
|
|
299
|
-
// ptrdiff_t is 't' according to the standard, but MSVC uses 'I'.
|
|
300
|
-
#if V8_CC_MSVC
|
|
301
|
-
#define V8PRIxPTRDIFF "Ix"
|
|
302
|
-
#define V8PRIdPTRDIFF "Id"
|
|
303
|
-
#define V8PRIuPTRDIFF "Iu"
|
|
304
|
-
#else
|
|
305
|
-
#define V8PRIxPTRDIFF "tx"
|
|
306
|
-
#define V8PRIdPTRDIFF "td"
|
|
307
|
-
#define V8PRIuPTRDIFF "tu"
|
|
308
|
-
#endif
|
|
309
|
-
|
|
310
|
-
// Fix for Mac OS X defining uintptr_t as "unsigned long":
|
|
311
|
-
#if V8_OS_MACOSX
|
|
312
|
-
#undef V8PRIxPTR
|
|
313
|
-
#define V8PRIxPTR "lx"
|
|
314
|
-
#undef V8PRIdPTR
|
|
315
|
-
#define V8PRIdPTR "ld"
|
|
316
|
-
#undef V8PRIuPTR
|
|
317
|
-
#define V8PRIuPTR "lxu"
|
|
318
|
-
#endif
|
|
319
|
-
|
|
320
|
-
// Make a uint64 from two uint32_t halves.
|
|
321
|
-
inline uint64_t make_uint64(uint32_t high, uint32_t low) {
|
|
322
|
-
return (uint64_t{high} << 32) + low;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// Return the largest multiple of m which is <= x.
|
|
326
|
-
template <typename T>
|
|
327
|
-
inline T RoundDown(T x, intptr_t m) {
|
|
328
|
-
STATIC_ASSERT(std::is_integral<T>::value);
|
|
329
|
-
// m must be a power of two.
|
|
330
|
-
DCHECK(m != 0 && ((m & (m - 1)) == 0));
|
|
331
|
-
return x & static_cast<T>(-m);
|
|
332
|
-
}
|
|
333
|
-
template <intptr_t m, typename T>
|
|
334
|
-
constexpr inline T RoundDown(T x) {
|
|
335
|
-
STATIC_ASSERT(std::is_integral<T>::value);
|
|
336
|
-
// m must be a power of two.
|
|
337
|
-
STATIC_ASSERT(m != 0 && ((m & (m - 1)) == 0));
|
|
338
|
-
return x & static_cast<T>(-m);
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
// Return the smallest multiple of m which is >= x.
|
|
342
|
-
template <typename T>
|
|
343
|
-
inline T RoundUp(T x, intptr_t m) {
|
|
344
|
-
STATIC_ASSERT(std::is_integral<T>::value);
|
|
345
|
-
return RoundDown<T>(static_cast<T>(x + m - 1), m);
|
|
346
|
-
}
|
|
347
|
-
template <intptr_t m, typename T>
|
|
348
|
-
constexpr inline T RoundUp(T x) {
|
|
349
|
-
STATIC_ASSERT(std::is_integral<T>::value);
|
|
350
|
-
return RoundDown<m, T>(static_cast<T>(x + (m - 1)));
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
template <typename T, typename U>
|
|
354
|
-
constexpr inline bool IsAligned(T value, U alignment) {
|
|
355
|
-
return (value & (alignment - 1)) == 0;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
inline void* AlignedAddress(void* address, size_t alignment) {
|
|
359
|
-
// The alignment must be a power of two.
|
|
360
|
-
DCHECK_EQ(alignment & (alignment - 1), 0u);
|
|
361
|
-
return reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(address) &
|
|
362
|
-
~static_cast<uintptr_t>(alignment - 1));
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
// Bounds checks for float to integer conversions, which does truncation. Hence,
|
|
366
|
-
// the range of legal values is (min - 1, max + 1).
|
|
367
|
-
template <typename int_t, typename float_t, typename biggest_int_t = int64_t>
|
|
368
|
-
bool is_inbounds(float_t v) {
|
|
369
|
-
static_assert(sizeof(int_t) < sizeof(biggest_int_t),
|
|
370
|
-
"int_t can't be bounds checked by the compiler");
|
|
371
|
-
constexpr float_t kLowerBound =
|
|
372
|
-
static_cast<float_t>(std::numeric_limits<int_t>::min()) - 1;
|
|
373
|
-
constexpr float_t kUpperBound =
|
|
374
|
-
static_cast<float_t>(std::numeric_limits<int_t>::max()) + 1;
|
|
375
|
-
constexpr bool kLowerBoundIsMin =
|
|
376
|
-
static_cast<biggest_int_t>(kLowerBound) ==
|
|
377
|
-
static_cast<biggest_int_t>(std::numeric_limits<int_t>::min());
|
|
378
|
-
constexpr bool kUpperBoundIsMax =
|
|
379
|
-
static_cast<biggest_int_t>(kUpperBound) ==
|
|
380
|
-
static_cast<biggest_int_t>(std::numeric_limits<int_t>::max());
|
|
381
|
-
// Using USE(var) is only a workaround for a GCC 8.1 bug.
|
|
382
|
-
USE(kLowerBoundIsMin);
|
|
383
|
-
USE(kUpperBoundIsMax);
|
|
384
|
-
return (kLowerBoundIsMin ? (kLowerBound <= v) : (kLowerBound < v)) &&
|
|
385
|
-
(kUpperBoundIsMax ? (v <= kUpperBound) : (v < kUpperBound));
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
#ifdef V8_OS_WIN
|
|
389
|
-
|
|
390
|
-
// Setup for Windows shared library export.
|
|
391
|
-
#ifdef BUILDING_V8_SHARED
|
|
392
|
-
#define V8_EXPORT_PRIVATE __declspec(dllexport)
|
|
393
|
-
#elif USING_V8_SHARED
|
|
394
|
-
#define V8_EXPORT_PRIVATE __declspec(dllimport)
|
|
395
|
-
#else
|
|
396
|
-
#define V8_EXPORT_PRIVATE
|
|
397
|
-
#endif // BUILDING_V8_SHARED
|
|
398
|
-
|
|
399
|
-
#else // V8_OS_WIN
|
|
400
|
-
|
|
401
|
-
// Setup for Linux shared library export.
|
|
402
|
-
#if V8_HAS_ATTRIBUTE_VISIBILITY
|
|
403
|
-
#ifdef BUILDING_V8_SHARED
|
|
404
|
-
#define V8_EXPORT_PRIVATE __attribute__((visibility("default")))
|
|
405
|
-
#else
|
|
406
|
-
#define V8_EXPORT_PRIVATE
|
|
407
|
-
#endif
|
|
408
|
-
#else
|
|
409
|
-
#define V8_EXPORT_PRIVATE
|
|
410
|
-
#endif
|
|
411
|
-
|
|
412
|
-
#endif // V8_OS_WIN
|
|
413
|
-
|
|
414
|
-
// Defines IF_WASM, to be used in macro lists for elements that should only be
|
|
415
|
-
// there if WebAssembly is enabled.
|
|
416
|
-
#if V8_ENABLE_WEBASSEMBLY
|
|
417
|
-
// EXPAND is needed to work around MSVC's broken __VA_ARGS__ expansion.
|
|
418
|
-
#define IF_WASM(V, ...) EXPAND(V(__VA_ARGS__))
|
|
419
|
-
#else
|
|
420
|
-
#define IF_WASM(V, ...)
|
|
421
|
-
#endif // V8_ENABLE_WEBASSEMBLY
|
|
422
|
-
|
|
423
|
-
#endif // V8_BASE_MACROS_H_
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// Copyright 2011 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_MEMORY_H_
|
|
6
|
-
#define V8_BASE_MEMORY_H_
|
|
7
|
-
|
|
8
|
-
#include "src/base/macros.h"
|
|
9
|
-
#include "src/base/platform/wrappers.h"
|
|
10
|
-
|
|
11
|
-
namespace v8 {
|
|
12
|
-
namespace base {
|
|
13
|
-
|
|
14
|
-
using Address = uintptr_t;
|
|
15
|
-
using byte = uint8_t;
|
|
16
|
-
|
|
17
|
-
// Memory provides an interface to 'raw' memory. It encapsulates the casts
|
|
18
|
-
// that typically are needed when incompatible pointer types are used.
|
|
19
|
-
// Note that this class currently relies on undefined behaviour. There is a
|
|
20
|
-
// proposal (http://wg21.link/p0593r2) to make it defined behaviour though.
|
|
21
|
-
template <class T>
|
|
22
|
-
inline T& Memory(Address addr) {
|
|
23
|
-
DCHECK(IsAligned(addr, alignof(T)));
|
|
24
|
-
return *reinterpret_cast<T*>(addr);
|
|
25
|
-
}
|
|
26
|
-
template <class T>
|
|
27
|
-
inline T& Memory(byte* addr) {
|
|
28
|
-
return Memory<T>(reinterpret_cast<Address>(addr));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
template <typename V>
|
|
32
|
-
static inline V ReadUnalignedValue(Address p) {
|
|
33
|
-
ASSERT_TRIVIALLY_COPYABLE(V);
|
|
34
|
-
V r;
|
|
35
|
-
base::Memcpy(&r, reinterpret_cast<void*>(p), sizeof(V));
|
|
36
|
-
return r;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
template <typename V>
|
|
40
|
-
static inline void WriteUnalignedValue(Address p, V value) {
|
|
41
|
-
ASSERT_TRIVIALLY_COPYABLE(V);
|
|
42
|
-
base::Memcpy(reinterpret_cast<void*>(p), &value, sizeof(V));
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
template <typename V>
|
|
46
|
-
static inline V ReadLittleEndianValue(Address p) {
|
|
47
|
-
#if defined(V8_TARGET_LITTLE_ENDIAN)
|
|
48
|
-
return ReadUnalignedValue<V>(p);
|
|
49
|
-
#elif defined(V8_TARGET_BIG_ENDIAN)
|
|
50
|
-
V ret{};
|
|
51
|
-
const byte* src = reinterpret_cast<const byte*>(p);
|
|
52
|
-
byte* dst = reinterpret_cast<byte*>(&ret);
|
|
53
|
-
for (size_t i = 0; i < sizeof(V); i++) {
|
|
54
|
-
dst[i] = src[sizeof(V) - i - 1];
|
|
55
|
-
}
|
|
56
|
-
return ret;
|
|
57
|
-
#endif // V8_TARGET_LITTLE_ENDIAN
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
template <typename V>
|
|
61
|
-
static inline void WriteLittleEndianValue(Address p, V value) {
|
|
62
|
-
#if defined(V8_TARGET_LITTLE_ENDIAN)
|
|
63
|
-
WriteUnalignedValue<V>(p, value);
|
|
64
|
-
#elif defined(V8_TARGET_BIG_ENDIAN)
|
|
65
|
-
byte* src = reinterpret_cast<byte*>(&value);
|
|
66
|
-
byte* dst = reinterpret_cast<byte*>(p);
|
|
67
|
-
for (size_t i = 0; i < sizeof(V); i++) {
|
|
68
|
-
dst[i] = src[sizeof(V) - i - 1];
|
|
69
|
-
}
|
|
70
|
-
#endif // V8_TARGET_LITTLE_ENDIAN
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
template <typename V>
|
|
74
|
-
static inline V ReadLittleEndianValue(V* p) {
|
|
75
|
-
return ReadLittleEndianValue<V>(reinterpret_cast<Address>(p));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
template <typename V>
|
|
79
|
-
static inline void WriteLittleEndianValue(V* p, V value) {
|
|
80
|
-
static_assert(
|
|
81
|
-
!std::is_array<V>::value,
|
|
82
|
-
"Passing an array decays to pointer, causing unexpected results.");
|
|
83
|
-
WriteLittleEndianValue<V>(reinterpret_cast<Address>(p), value);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
} // namespace base
|
|
87
|
-
} // namespace v8
|
|
88
|
-
|
|
89
|
-
#endif // V8_BASE_MEMORY_H_
|
|
@@ -1,108 +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
|
-
// emulates google3/base/once.h
|
|
6
|
-
//
|
|
7
|
-
// This header is intended to be included only by v8's internal code. Users
|
|
8
|
-
// should not use this directly.
|
|
9
|
-
//
|
|
10
|
-
// This is basically a portable version of pthread_once().
|
|
11
|
-
//
|
|
12
|
-
// This header declares:
|
|
13
|
-
// * A type called OnceType.
|
|
14
|
-
// * A macro V8_DECLARE_ONCE() which declares a (global) variable of type
|
|
15
|
-
// OnceType.
|
|
16
|
-
// * A function CallOnce(OnceType* once, void (*init_func)()).
|
|
17
|
-
// This function, when invoked multiple times given the same OnceType object,
|
|
18
|
-
// will invoke init_func on the first call only, and will make sure none of
|
|
19
|
-
// the calls return before that first call to init_func has finished.
|
|
20
|
-
//
|
|
21
|
-
// Additionally, the following features are supported:
|
|
22
|
-
// * A macro V8_ONCE_INIT which is expanded into the expression used to
|
|
23
|
-
// initialize a OnceType. This is only useful when clients embed a OnceType
|
|
24
|
-
// into a structure of their own and want to initialize it statically.
|
|
25
|
-
// * The user can provide a parameter which CallOnce() forwards to the
|
|
26
|
-
// user-provided function when it is called. Usage example:
|
|
27
|
-
// CallOnce(&my_once, &MyFunctionExpectingIntArgument, 10);
|
|
28
|
-
// * This implementation guarantees that OnceType is a POD (i.e. no static
|
|
29
|
-
// initializer generated).
|
|
30
|
-
//
|
|
31
|
-
// This implements a way to perform lazy initialization. It's more efficient
|
|
32
|
-
// than using mutexes as no lock is needed if initialization has already
|
|
33
|
-
// happened.
|
|
34
|
-
//
|
|
35
|
-
// Example usage:
|
|
36
|
-
// void Init();
|
|
37
|
-
// V8_DECLARE_ONCE(once_init);
|
|
38
|
-
//
|
|
39
|
-
// // Calls Init() exactly once.
|
|
40
|
-
// void InitOnce() {
|
|
41
|
-
// CallOnce(&once_init, &Init);
|
|
42
|
-
// }
|
|
43
|
-
//
|
|
44
|
-
// Note that if CallOnce() is called before main() has begun, it must
|
|
45
|
-
// only be called by the thread that will eventually call main() -- that is,
|
|
46
|
-
// the thread that performs dynamic initialization. In general this is a safe
|
|
47
|
-
// assumption since people don't usually construct threads before main() starts,
|
|
48
|
-
// but it is technically not guaranteed. Unfortunately, Win32 provides no way
|
|
49
|
-
// whatsoever to statically-initialize its synchronization primitives, so our
|
|
50
|
-
// only choice is to assume that dynamic initialization is single-threaded.
|
|
51
|
-
|
|
52
|
-
#ifndef V8_BASE_ONCE_H_
|
|
53
|
-
#define V8_BASE_ONCE_H_
|
|
54
|
-
|
|
55
|
-
#include <stddef.h>
|
|
56
|
-
|
|
57
|
-
#include <atomic>
|
|
58
|
-
#include <functional>
|
|
59
|
-
|
|
60
|
-
#include "src/base/base-export.h"
|
|
61
|
-
#include "src/base/template-utils.h"
|
|
62
|
-
|
|
63
|
-
namespace v8 {
|
|
64
|
-
namespace base {
|
|
65
|
-
|
|
66
|
-
using OnceType = std::atomic<uint8_t>;
|
|
67
|
-
|
|
68
|
-
#define V8_ONCE_INIT \
|
|
69
|
-
{ 0 }
|
|
70
|
-
|
|
71
|
-
#define V8_DECLARE_ONCE(NAME) ::v8::base::OnceType NAME
|
|
72
|
-
|
|
73
|
-
enum : uint8_t {
|
|
74
|
-
ONCE_STATE_UNINITIALIZED = 0,
|
|
75
|
-
ONCE_STATE_EXECUTING_FUNCTION = 1,
|
|
76
|
-
ONCE_STATE_DONE = 2
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
using PointerArgFunction = void (*)(void* arg);
|
|
80
|
-
|
|
81
|
-
template <typename... Args>
|
|
82
|
-
struct FunctionWithArgs {
|
|
83
|
-
using type = void (*)(Args...);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
V8_BASE_EXPORT void CallOnceImpl(OnceType* once,
|
|
87
|
-
std::function<void()> init_func);
|
|
88
|
-
|
|
89
|
-
inline void CallOnce(OnceType* once, std::function<void()> init_func) {
|
|
90
|
-
if (once->load(std::memory_order_acquire) != ONCE_STATE_DONE) {
|
|
91
|
-
CallOnceImpl(once, init_func);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
template <typename... Args, typename = std::enable_if_t<
|
|
96
|
-
conjunction<std::is_scalar<Args>...>::value>>
|
|
97
|
-
inline void CallOnce(OnceType* once,
|
|
98
|
-
typename FunctionWithArgs<Args...>::type init_func,
|
|
99
|
-
Args... args) {
|
|
100
|
-
if (once->load(std::memory_order_acquire) != ONCE_STATE_DONE) {
|
|
101
|
-
CallOnceImpl(once, [=]() { init_func(args...); });
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
} // namespace base
|
|
106
|
-
} // namespace v8
|
|
107
|
-
|
|
108
|
-
#endif // V8_BASE_ONCE_H_
|