@triniwiz/nativescript-masonkit 1.0.0-alpha.8 → 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,258 +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
|
-
// The LazyInstance<Type, Traits> class manages a single instance of Type,
|
|
6
|
-
// which will be lazily created on the first time it's accessed. This class is
|
|
7
|
-
// useful for places you would normally use a function-level static, but you
|
|
8
|
-
// need to have guaranteed thread-safety. The Type constructor will only ever
|
|
9
|
-
// be called once, even if two threads are racing to create the object. Get()
|
|
10
|
-
// and Pointer() will always return the same, completely initialized instance.
|
|
11
|
-
//
|
|
12
|
-
// LazyInstance is completely thread safe, assuming that you create it safely.
|
|
13
|
-
// The class was designed to be POD initialized, so it shouldn't require a
|
|
14
|
-
// static constructor. It really only makes sense to declare a LazyInstance as
|
|
15
|
-
// a global variable using the LAZY_INSTANCE_INITIALIZER initializer.
|
|
16
|
-
//
|
|
17
|
-
// LazyInstance is similar to Singleton, except it does not have the singleton
|
|
18
|
-
// property. You can have multiple LazyInstance's of the same type, and each
|
|
19
|
-
// will manage a unique instance. It also preallocates the space for Type, as
|
|
20
|
-
// to avoid allocating the Type instance on the heap. This may help with the
|
|
21
|
-
// performance of creating the instance, and reducing heap fragmentation. This
|
|
22
|
-
// requires that Type be a complete type so we can determine the size. See
|
|
23
|
-
// notes for advanced users below for more explanations.
|
|
24
|
-
//
|
|
25
|
-
// Example usage:
|
|
26
|
-
// static LazyInstance<MyClass>::type my_instance = LAZY_INSTANCE_INITIALIZER;
|
|
27
|
-
// void SomeMethod() {
|
|
28
|
-
// my_instance.Get().SomeMethod(); // MyClass::SomeMethod()
|
|
29
|
-
//
|
|
30
|
-
// MyClass* ptr = my_instance.Pointer();
|
|
31
|
-
// ptr->DoDoDo(); // MyClass::DoDoDo
|
|
32
|
-
// }
|
|
33
|
-
//
|
|
34
|
-
// Additionally you can override the way your instance is constructed by
|
|
35
|
-
// providing your own trait:
|
|
36
|
-
// Example usage:
|
|
37
|
-
// struct MyCreateTrait {
|
|
38
|
-
// static void Construct(void* allocated_ptr) {
|
|
39
|
-
// new (allocated_ptr) MyClass(/* extra parameters... */);
|
|
40
|
-
// }
|
|
41
|
-
// };
|
|
42
|
-
// static LazyInstance<MyClass, MyCreateTrait>::type my_instance =
|
|
43
|
-
// LAZY_INSTANCE_INITIALIZER;
|
|
44
|
-
//
|
|
45
|
-
// WARNINGS:
|
|
46
|
-
// - This implementation of LazyInstance IS THREAD-SAFE by default. See
|
|
47
|
-
// SingleThreadInitOnceTrait if you don't care about thread safety.
|
|
48
|
-
// - Lazy initialization comes with a cost. Make sure that you don't use it on
|
|
49
|
-
// critical path. Consider adding your initialization code to a function
|
|
50
|
-
// which is explicitly called once.
|
|
51
|
-
//
|
|
52
|
-
// Notes for advanced users:
|
|
53
|
-
// LazyInstance can actually be used in two different ways:
|
|
54
|
-
//
|
|
55
|
-
// - "Static mode" which is the default mode since it is the most efficient
|
|
56
|
-
// (no extra heap allocation). In this mode, the instance is statically
|
|
57
|
-
// allocated (stored in the global data section at compile time).
|
|
58
|
-
// The macro LAZY_STATIC_INSTANCE_INITIALIZER (= LAZY_INSTANCE_INITIALIZER)
|
|
59
|
-
// must be used to initialize static lazy instances.
|
|
60
|
-
//
|
|
61
|
-
// - "Dynamic mode". In this mode, the instance is dynamically allocated and
|
|
62
|
-
// constructed (using new) by default. This mode is useful if you have to
|
|
63
|
-
// deal with some code already allocating the instance for you (e.g.
|
|
64
|
-
// OS::Mutex() which returns a new private OS-dependent subclass of Mutex).
|
|
65
|
-
// The macro LAZY_DYNAMIC_INSTANCE_INITIALIZER must be used to initialize
|
|
66
|
-
// dynamic lazy instances.
|
|
67
|
-
|
|
68
|
-
#ifndef V8_BASE_LAZY_INSTANCE_H_
|
|
69
|
-
#define V8_BASE_LAZY_INSTANCE_H_
|
|
70
|
-
|
|
71
|
-
#include <type_traits>
|
|
72
|
-
|
|
73
|
-
#include "src/base/macros.h"
|
|
74
|
-
#include "src/base/once.h"
|
|
75
|
-
|
|
76
|
-
namespace v8 {
|
|
77
|
-
namespace base {
|
|
78
|
-
|
|
79
|
-
#define LAZY_STATIC_INSTANCE_INITIALIZER { V8_ONCE_INIT, { {} } }
|
|
80
|
-
#define LAZY_DYNAMIC_INSTANCE_INITIALIZER { V8_ONCE_INIT, 0 }
|
|
81
|
-
|
|
82
|
-
// Default to static mode.
|
|
83
|
-
#define LAZY_INSTANCE_INITIALIZER LAZY_STATIC_INSTANCE_INITIALIZER
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
template <typename T>
|
|
87
|
-
struct LeakyInstanceTrait {
|
|
88
|
-
static void Destroy(T* /* instance */) {}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
// Traits that define how an instance is allocated and accessed.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
template <typename T>
|
|
96
|
-
struct StaticallyAllocatedInstanceTrait {
|
|
97
|
-
using StorageType =
|
|
98
|
-
typename std::aligned_storage<sizeof(T), alignof(T)>::type;
|
|
99
|
-
|
|
100
|
-
static T* MutableInstance(StorageType* storage) {
|
|
101
|
-
return reinterpret_cast<T*>(storage);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
template <typename ConstructTrait>
|
|
105
|
-
static void InitStorageUsingTrait(StorageType* storage) {
|
|
106
|
-
ConstructTrait::Construct(storage);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
template <typename T>
|
|
112
|
-
struct DynamicallyAllocatedInstanceTrait {
|
|
113
|
-
using StorageType = T*;
|
|
114
|
-
|
|
115
|
-
static T* MutableInstance(StorageType* storage) {
|
|
116
|
-
return *storage;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
template <typename CreateTrait>
|
|
120
|
-
static void InitStorageUsingTrait(StorageType* storage) {
|
|
121
|
-
*storage = CreateTrait::Create();
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
template <typename T>
|
|
127
|
-
struct DefaultConstructTrait {
|
|
128
|
-
// Constructs the provided object which was already allocated.
|
|
129
|
-
static void Construct(void* allocated_ptr) { new (allocated_ptr) T(); }
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
template <typename T>
|
|
134
|
-
struct DefaultCreateTrait {
|
|
135
|
-
static T* Create() {
|
|
136
|
-
return new T();
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
struct ThreadSafeInitOnceTrait {
|
|
142
|
-
template <typename Function, typename Storage>
|
|
143
|
-
static void Init(OnceType* once, Function function, Storage storage) {
|
|
144
|
-
CallOnce(once, function, storage);
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
// Initialization trait for users who don't care about thread-safety.
|
|
150
|
-
struct SingleThreadInitOnceTrait {
|
|
151
|
-
template <typename Function, typename Storage>
|
|
152
|
-
static void Init(OnceType* once, Function function, Storage storage) {
|
|
153
|
-
if (*once == ONCE_STATE_UNINITIALIZED) {
|
|
154
|
-
function(storage);
|
|
155
|
-
*once = ONCE_STATE_DONE;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
// TODO(pliard): Handle instances destruction (using global destructors).
|
|
162
|
-
template <typename T, typename AllocationTrait, typename CreateTrait,
|
|
163
|
-
typename InitOnceTrait, typename DestroyTrait /* not used yet. */>
|
|
164
|
-
struct LazyInstanceImpl {
|
|
165
|
-
public:
|
|
166
|
-
using StorageType = typename AllocationTrait::StorageType;
|
|
167
|
-
|
|
168
|
-
private:
|
|
169
|
-
static void InitInstance(void* storage) {
|
|
170
|
-
AllocationTrait::template InitStorageUsingTrait<CreateTrait>(
|
|
171
|
-
static_cast<StorageType*>(storage));
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
void Init() const {
|
|
175
|
-
InitOnceTrait::Init(&once_, &InitInstance, static_cast<void*>(&storage_));
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
public:
|
|
179
|
-
T* Pointer() {
|
|
180
|
-
Init();
|
|
181
|
-
return AllocationTrait::MutableInstance(&storage_);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const T& Get() const {
|
|
185
|
-
Init();
|
|
186
|
-
return *AllocationTrait::MutableInstance(&storage_);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
mutable OnceType once_;
|
|
190
|
-
// Note that the previous field, OnceType, is an AtomicWord which guarantees
|
|
191
|
-
// 4-byte alignment of the storage field below. If compiling with GCC (>4.2),
|
|
192
|
-
// the LAZY_ALIGN macro above will guarantee correctness for any alignment.
|
|
193
|
-
mutable StorageType storage_;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
template <typename T,
|
|
198
|
-
typename CreateTrait = DefaultConstructTrait<T>,
|
|
199
|
-
typename InitOnceTrait = ThreadSafeInitOnceTrait,
|
|
200
|
-
typename DestroyTrait = LeakyInstanceTrait<T> >
|
|
201
|
-
struct LazyStaticInstance {
|
|
202
|
-
using type = LazyInstanceImpl<T, StaticallyAllocatedInstanceTrait<T>,
|
|
203
|
-
CreateTrait, InitOnceTrait, DestroyTrait>;
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
template <typename T,
|
|
208
|
-
typename CreateTrait = DefaultConstructTrait<T>,
|
|
209
|
-
typename InitOnceTrait = ThreadSafeInitOnceTrait,
|
|
210
|
-
typename DestroyTrait = LeakyInstanceTrait<T> >
|
|
211
|
-
struct LazyInstance {
|
|
212
|
-
// A LazyInstance is a LazyStaticInstance.
|
|
213
|
-
using type = typename LazyStaticInstance<T, CreateTrait, InitOnceTrait,
|
|
214
|
-
DestroyTrait>::type;
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
template <typename T,
|
|
219
|
-
typename CreateTrait = DefaultCreateTrait<T>,
|
|
220
|
-
typename InitOnceTrait = ThreadSafeInitOnceTrait,
|
|
221
|
-
typename DestroyTrait = LeakyInstanceTrait<T> >
|
|
222
|
-
struct LazyDynamicInstance {
|
|
223
|
-
using type = LazyInstanceImpl<T, DynamicallyAllocatedInstanceTrait<T>,
|
|
224
|
-
CreateTrait, InitOnceTrait, DestroyTrait>;
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
// LeakyObject<T> wraps an object of type T, which is initialized in the
|
|
228
|
-
// constructor but never destructed. Thus LeakyObject<T> is trivially
|
|
229
|
-
// destructible and can be used in static (lazily initialized) variables.
|
|
230
|
-
template <typename T>
|
|
231
|
-
class LeakyObject {
|
|
232
|
-
public:
|
|
233
|
-
template <typename... Args>
|
|
234
|
-
explicit LeakyObject(Args&&... args) {
|
|
235
|
-
new (&storage_) T(std::forward<Args>(args)...);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
LeakyObject(const LeakyObject&) = delete;
|
|
239
|
-
LeakyObject& operator=(const LeakyObject&) = delete;
|
|
240
|
-
|
|
241
|
-
T* get() { return reinterpret_cast<T*>(&storage_); }
|
|
242
|
-
|
|
243
|
-
private:
|
|
244
|
-
typename std::aligned_storage<sizeof(T), alignof(T)>::type storage_;
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
// Define a function which returns a pointer to a lazily initialized and never
|
|
248
|
-
// destructed object of type T.
|
|
249
|
-
#define DEFINE_LAZY_LEAKY_OBJECT_GETTER(T, FunctionName, ...) \
|
|
250
|
-
T* FunctionName() { \
|
|
251
|
-
static ::v8::base::LeakyObject<T> object{__VA_ARGS__}; \
|
|
252
|
-
return object.get(); \
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
} // namespace base
|
|
256
|
-
} // namespace v8
|
|
257
|
-
|
|
258
|
-
#endif // V8_BASE_LAZY_INSTANCE_H_
|
|
@@ -1,417 +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
|
-
#ifndef V8_BASE_LOGGING_H_
|
|
6
|
-
#define V8_BASE_LOGGING_H_
|
|
7
|
-
|
|
8
|
-
#include <cstring>
|
|
9
|
-
#include <sstream>
|
|
10
|
-
#include <string>
|
|
11
|
-
|
|
12
|
-
#include "src/base/base-export.h"
|
|
13
|
-
#include "src/base/build_config.h"
|
|
14
|
-
#include "src/base/compiler-specific.h"
|
|
15
|
-
#include "src/base/immediate-crash.h"
|
|
16
|
-
#include "src/base/template-utils.h"
|
|
17
|
-
|
|
18
|
-
V8_BASE_EXPORT V8_NOINLINE void V8_Dcheck(const char* file, int line,
|
|
19
|
-
const char* message);
|
|
20
|
-
|
|
21
|
-
#ifdef DEBUG
|
|
22
|
-
// In debug, include file, line, and full error message for all
|
|
23
|
-
// FATAL() calls.
|
|
24
|
-
[[noreturn]] PRINTF_FORMAT(3, 4) V8_BASE_EXPORT V8_NOINLINE
|
|
25
|
-
void V8_Fatal(const char* file, int line, const char* format, ...);
|
|
26
|
-
#define FATAL(...) V8_Fatal(__FILE__, __LINE__, __VA_ARGS__)
|
|
27
|
-
|
|
28
|
-
#else
|
|
29
|
-
[[noreturn]] PRINTF_FORMAT(1, 2) V8_BASE_EXPORT V8_NOINLINE
|
|
30
|
-
void V8_Fatal(const char* format, ...);
|
|
31
|
-
#if !defined(OFFICIAL_BUILD)
|
|
32
|
-
// In non-official release, include full error message, but drop file & line
|
|
33
|
-
// numbers. It saves binary size to drop the |file| & |line| as opposed to just
|
|
34
|
-
// passing in "", 0 for them.
|
|
35
|
-
#define FATAL(...) V8_Fatal(__VA_ARGS__)
|
|
36
|
-
#else
|
|
37
|
-
// FATAL(msg) -> IMMEDIATE_CRASH()
|
|
38
|
-
// FATAL(msg, ...) -> V8_Fatal(msg, ...)
|
|
39
|
-
#define FATAL_HELPER(_7, _6, _5, _4, _3, _2, _1, _0, ...) _0
|
|
40
|
-
#define FATAL_DISCARD_ARG(arg) IMMEDIATE_CRASH()
|
|
41
|
-
#define FATAL(...) \
|
|
42
|
-
FATAL_HELPER(__VA_ARGS__, V8_Fatal, V8_Fatal, V8_Fatal, V8_Fatal, V8_Fatal, \
|
|
43
|
-
V8_Fatal, FATAL_DISCARD_ARG) \
|
|
44
|
-
(__VA_ARGS__)
|
|
45
|
-
#endif // !defined(OFFICIAL_BUILD)
|
|
46
|
-
#endif // DEBUG
|
|
47
|
-
|
|
48
|
-
#define UNIMPLEMENTED() FATAL("unimplemented code")
|
|
49
|
-
#define UNREACHABLE() FATAL("unreachable code")
|
|
50
|
-
|
|
51
|
-
namespace v8 {
|
|
52
|
-
namespace base {
|
|
53
|
-
|
|
54
|
-
class CheckMessageStream : public std::ostringstream {};
|
|
55
|
-
|
|
56
|
-
// Overwrite the default function that prints a stack trace.
|
|
57
|
-
V8_BASE_EXPORT void SetPrintStackTrace(void (*print_stack_trace_)());
|
|
58
|
-
|
|
59
|
-
// Override the default function that handles DCHECKs.
|
|
60
|
-
V8_BASE_EXPORT void SetDcheckFunction(void (*dcheck_Function)(const char*, int,
|
|
61
|
-
const char*));
|
|
62
|
-
|
|
63
|
-
// In official builds, assume all check failures can be debugged given just the
|
|
64
|
-
// stack trace.
|
|
65
|
-
#if !defined(DEBUG) && defined(OFFICIAL_BUILD)
|
|
66
|
-
#define CHECK_FAILED_HANDLER(message) FATAL("ignored")
|
|
67
|
-
#else
|
|
68
|
-
#define CHECK_FAILED_HANDLER(message) FATAL("Check failed: %s.", message)
|
|
69
|
-
#endif
|
|
70
|
-
|
|
71
|
-
// CHECK dies with a fatal error if condition is not true. It is *not*
|
|
72
|
-
// controlled by DEBUG, so the check will be executed regardless of
|
|
73
|
-
// compilation mode.
|
|
74
|
-
//
|
|
75
|
-
// We make sure CHECK et al. always evaluates their arguments, as
|
|
76
|
-
// doing CHECK(FunctionWithSideEffect()) is a common idiom.
|
|
77
|
-
#define CHECK_WITH_MSG(condition, message) \
|
|
78
|
-
do { \
|
|
79
|
-
if (V8_UNLIKELY(!(condition))) { \
|
|
80
|
-
CHECK_FAILED_HANDLER(message); \
|
|
81
|
-
} \
|
|
82
|
-
} while (false)
|
|
83
|
-
#define CHECK(condition) CHECK_WITH_MSG(condition, #condition)
|
|
84
|
-
|
|
85
|
-
#ifdef DEBUG
|
|
86
|
-
|
|
87
|
-
#define DCHECK_WITH_MSG(condition, message) \
|
|
88
|
-
do { \
|
|
89
|
-
if (V8_UNLIKELY(!(condition))) { \
|
|
90
|
-
V8_Dcheck(__FILE__, __LINE__, message); \
|
|
91
|
-
} \
|
|
92
|
-
} while (false)
|
|
93
|
-
#define DCHECK(condition) DCHECK_WITH_MSG(condition, #condition)
|
|
94
|
-
|
|
95
|
-
// Helper macro for binary operators.
|
|
96
|
-
// Don't use this macro directly in your code, use CHECK_EQ et al below.
|
|
97
|
-
#define CHECK_OP(name, op, lhs, rhs) \
|
|
98
|
-
do { \
|
|
99
|
-
if (std::string* _msg = ::v8::base::Check##name##Impl< \
|
|
100
|
-
typename ::v8::base::pass_value_or_ref<decltype(lhs)>::type, \
|
|
101
|
-
typename ::v8::base::pass_value_or_ref<decltype(rhs)>::type>( \
|
|
102
|
-
(lhs), (rhs), #lhs " " #op " " #rhs)) { \
|
|
103
|
-
FATAL("Check failed: %s.", _msg->c_str()); \
|
|
104
|
-
delete _msg; \
|
|
105
|
-
} \
|
|
106
|
-
} while (false)
|
|
107
|
-
|
|
108
|
-
#define DCHECK_OP(name, op, lhs, rhs) \
|
|
109
|
-
do { \
|
|
110
|
-
if (std::string* _msg = ::v8::base::Check##name##Impl< \
|
|
111
|
-
typename ::v8::base::pass_value_or_ref<decltype(lhs)>::type, \
|
|
112
|
-
typename ::v8::base::pass_value_or_ref<decltype(rhs)>::type>( \
|
|
113
|
-
(lhs), (rhs), #lhs " " #op " " #rhs)) { \
|
|
114
|
-
V8_Dcheck(__FILE__, __LINE__, _msg->c_str()); \
|
|
115
|
-
delete _msg; \
|
|
116
|
-
} \
|
|
117
|
-
} while (false)
|
|
118
|
-
|
|
119
|
-
#else
|
|
120
|
-
|
|
121
|
-
// Make all CHECK functions discard their log strings to reduce code
|
|
122
|
-
// bloat for official release builds.
|
|
123
|
-
|
|
124
|
-
#define CHECK_OP(name, op, lhs, rhs) \
|
|
125
|
-
do { \
|
|
126
|
-
bool _cmp = ::v8::base::Cmp##name##Impl< \
|
|
127
|
-
typename ::v8::base::pass_value_or_ref<decltype(lhs)>::type, \
|
|
128
|
-
typename ::v8::base::pass_value_or_ref<decltype(rhs)>::type>((lhs), \
|
|
129
|
-
(rhs)); \
|
|
130
|
-
CHECK_WITH_MSG(_cmp, #lhs " " #op " " #rhs); \
|
|
131
|
-
} while (false)
|
|
132
|
-
|
|
133
|
-
#define DCHECK_WITH_MSG(condition, msg) void(0);
|
|
134
|
-
|
|
135
|
-
#endif
|
|
136
|
-
|
|
137
|
-
namespace detail {
|
|
138
|
-
template <typename... Ts>
|
|
139
|
-
std::string PrintToString(Ts&&... ts) {
|
|
140
|
-
CheckMessageStream oss;
|
|
141
|
-
int unused_results[]{((oss << std::forward<Ts>(ts)), 0)...};
|
|
142
|
-
(void)unused_results; // Avoid "unused variable" warning.
|
|
143
|
-
return oss.str();
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
template <typename T>
|
|
147
|
-
auto GetUnderlyingEnumTypeForPrinting(T val) {
|
|
148
|
-
using underlying_t = typename std::underlying_type<T>::type;
|
|
149
|
-
// For single-byte enums, return a 16-bit integer to avoid printing the value
|
|
150
|
-
// as a character.
|
|
151
|
-
using int_t = typename std::conditional_t<
|
|
152
|
-
sizeof(underlying_t) != 1, underlying_t,
|
|
153
|
-
std::conditional_t<std::is_signed<underlying_t>::value, int16_t,
|
|
154
|
-
uint16_t> >;
|
|
155
|
-
return static_cast<int_t>(static_cast<underlying_t>(val));
|
|
156
|
-
}
|
|
157
|
-
} // namespace detail
|
|
158
|
-
|
|
159
|
-
// Define PrintCheckOperand<T> for each T which defines operator<< for ostream.
|
|
160
|
-
template <typename T>
|
|
161
|
-
typename std::enable_if<
|
|
162
|
-
!std::is_function<typename std::remove_pointer<T>::type>::value &&
|
|
163
|
-
!std::is_enum<T>::value &&
|
|
164
|
-
has_output_operator<T, CheckMessageStream>::value,
|
|
165
|
-
std::string>::type
|
|
166
|
-
PrintCheckOperand(T val) {
|
|
167
|
-
return detail::PrintToString(std::forward<T>(val));
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// Provide an overload for functions and function pointers. Function pointers
|
|
171
|
-
// don't implicitly convert to void* but do implicitly convert to bool, so
|
|
172
|
-
// without this function pointers are always printed as 1 or 0. (MSVC isn't
|
|
173
|
-
// standards-conforming here and converts function pointers to regular
|
|
174
|
-
// pointers, so this is a no-op for MSVC.)
|
|
175
|
-
template <typename T>
|
|
176
|
-
typename std::enable_if<
|
|
177
|
-
std::is_function<typename std::remove_pointer<T>::type>::value,
|
|
178
|
-
std::string>::type
|
|
179
|
-
PrintCheckOperand(T val) {
|
|
180
|
-
return PrintCheckOperand(reinterpret_cast<const void*>(val));
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// Define PrintCheckOperand<T> for enums with an output operator.
|
|
184
|
-
template <typename T>
|
|
185
|
-
typename std::enable_if<std::is_enum<T>::value &&
|
|
186
|
-
has_output_operator<T, CheckMessageStream>::value,
|
|
187
|
-
std::string>::type
|
|
188
|
-
PrintCheckOperand(T val) {
|
|
189
|
-
std::string val_str = detail::PrintToString(val);
|
|
190
|
-
std::string int_str =
|
|
191
|
-
detail::PrintToString(detail::GetUnderlyingEnumTypeForPrinting(val));
|
|
192
|
-
// Printing the original enum might have printed a single non-printable
|
|
193
|
-
// character. Ignore it in that case. Also ignore if it printed the same as
|
|
194
|
-
// the integral representation.
|
|
195
|
-
// TODO(clemensb): Can we somehow statically find out if the output operator
|
|
196
|
-
// is the default one, printing the integral value?
|
|
197
|
-
if ((val_str.length() == 1 && !std::isprint(val_str[0])) ||
|
|
198
|
-
val_str == int_str) {
|
|
199
|
-
return int_str;
|
|
200
|
-
}
|
|
201
|
-
return detail::PrintToString(val_str, " (", int_str, ")");
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// Define PrintCheckOperand<T> for enums without an output operator.
|
|
205
|
-
template <typename T>
|
|
206
|
-
typename std::enable_if<std::is_enum<T>::value &&
|
|
207
|
-
!has_output_operator<T, CheckMessageStream>::value,
|
|
208
|
-
std::string>::type
|
|
209
|
-
PrintCheckOperand(T val) {
|
|
210
|
-
return detail::PrintToString(detail::GetUnderlyingEnumTypeForPrinting(val));
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// Define default PrintCheckOperand<T> for non-printable types.
|
|
214
|
-
template <typename T>
|
|
215
|
-
typename std::enable_if<!has_output_operator<T, CheckMessageStream>::value &&
|
|
216
|
-
!std::is_enum<T>::value,
|
|
217
|
-
std::string>::type
|
|
218
|
-
PrintCheckOperand(T val) {
|
|
219
|
-
return "<unprintable>";
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Define specializations for character types, defined in logging.cc.
|
|
223
|
-
#define DEFINE_PRINT_CHECK_OPERAND_CHAR(type) \
|
|
224
|
-
template <> \
|
|
225
|
-
V8_BASE_EXPORT std::string PrintCheckOperand<type>(type ch); \
|
|
226
|
-
template <> \
|
|
227
|
-
V8_BASE_EXPORT std::string PrintCheckOperand<type*>(type * cstr); \
|
|
228
|
-
template <> \
|
|
229
|
-
V8_BASE_EXPORT std::string PrintCheckOperand<const type*>(const type* cstr);
|
|
230
|
-
|
|
231
|
-
DEFINE_PRINT_CHECK_OPERAND_CHAR(char)
|
|
232
|
-
DEFINE_PRINT_CHECK_OPERAND_CHAR(signed char)
|
|
233
|
-
DEFINE_PRINT_CHECK_OPERAND_CHAR(unsigned char)
|
|
234
|
-
#undef DEFINE_PRINT_CHECK_OPERAND_CHAR
|
|
235
|
-
|
|
236
|
-
// Build the error message string. This is separate from the "Impl"
|
|
237
|
-
// function template because it is not performance critical and so can
|
|
238
|
-
// be out of line, while the "Impl" code should be inline. Caller
|
|
239
|
-
// takes ownership of the returned string.
|
|
240
|
-
template <typename Lhs, typename Rhs>
|
|
241
|
-
V8_NOINLINE std::string* MakeCheckOpString(Lhs lhs, Rhs rhs, char const* msg) {
|
|
242
|
-
std::string lhs_str = PrintCheckOperand<Lhs>(lhs);
|
|
243
|
-
std::string rhs_str = PrintCheckOperand<Rhs>(rhs);
|
|
244
|
-
CheckMessageStream ss;
|
|
245
|
-
ss << msg;
|
|
246
|
-
constexpr size_t kMaxInlineLength = 50;
|
|
247
|
-
if (lhs_str.size() <= kMaxInlineLength &&
|
|
248
|
-
rhs_str.size() <= kMaxInlineLength) {
|
|
249
|
-
ss << " (" << lhs_str << " vs. " << rhs_str << ")";
|
|
250
|
-
} else {
|
|
251
|
-
ss << "\n " << lhs_str << "\n vs.\n " << rhs_str << "\n";
|
|
252
|
-
}
|
|
253
|
-
return new std::string(ss.str());
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
// Commonly used instantiations of MakeCheckOpString<>. Explicitly instantiated
|
|
257
|
-
// in logging.cc.
|
|
258
|
-
#define EXPLICIT_CHECK_OP_INSTANTIATION(type) \
|
|
259
|
-
extern template V8_BASE_EXPORT std::string* MakeCheckOpString<type, type>( \
|
|
260
|
-
type, type, char const*); \
|
|
261
|
-
extern template V8_BASE_EXPORT std::string PrintCheckOperand<type>(type);
|
|
262
|
-
|
|
263
|
-
EXPLICIT_CHECK_OP_INSTANTIATION(int)
|
|
264
|
-
EXPLICIT_CHECK_OP_INSTANTIATION(long) // NOLINT(runtime/int)
|
|
265
|
-
EXPLICIT_CHECK_OP_INSTANTIATION(long long) // NOLINT(runtime/int)
|
|
266
|
-
EXPLICIT_CHECK_OP_INSTANTIATION(unsigned int)
|
|
267
|
-
EXPLICIT_CHECK_OP_INSTANTIATION(unsigned long) // NOLINT(runtime/int)
|
|
268
|
-
EXPLICIT_CHECK_OP_INSTANTIATION(unsigned long long) // NOLINT(runtime/int)
|
|
269
|
-
EXPLICIT_CHECK_OP_INSTANTIATION(void const*)
|
|
270
|
-
#undef EXPLICIT_CHECK_OP_INSTANTIATION
|
|
271
|
-
|
|
272
|
-
// comparison_underlying_type provides the underlying integral type of an enum,
|
|
273
|
-
// or std::decay<T>::type if T is not an enum. Booleans are converted to
|
|
274
|
-
// "unsigned int", to allow "unsigned int == bool" comparisons.
|
|
275
|
-
template <typename T>
|
|
276
|
-
struct comparison_underlying_type {
|
|
277
|
-
// std::underlying_type must only be used with enum types, thus use this
|
|
278
|
-
// {Dummy} type if the given type is not an enum.
|
|
279
|
-
enum Dummy {};
|
|
280
|
-
using decay = typename std::decay<T>::type;
|
|
281
|
-
static constexpr bool is_enum = std::is_enum<decay>::value;
|
|
282
|
-
using underlying = typename std::underlying_type<
|
|
283
|
-
typename std::conditional<is_enum, decay, Dummy>::type>::type;
|
|
284
|
-
using type_or_bool =
|
|
285
|
-
typename std::conditional<is_enum, underlying, decay>::type;
|
|
286
|
-
using type =
|
|
287
|
-
typename std::conditional<std::is_same<type_or_bool, bool>::value,
|
|
288
|
-
unsigned int, type_or_bool>::type;
|
|
289
|
-
};
|
|
290
|
-
// Cast a value to its underlying type
|
|
291
|
-
#define MAKE_UNDERLYING(Type, value) \
|
|
292
|
-
static_cast<typename comparison_underlying_type<Type>::type>(value)
|
|
293
|
-
|
|
294
|
-
// is_signed_vs_unsigned::value is true if both types are integral, Lhs is
|
|
295
|
-
// signed, and Rhs is unsigned. False in all other cases.
|
|
296
|
-
template <typename Lhs, typename Rhs>
|
|
297
|
-
struct is_signed_vs_unsigned {
|
|
298
|
-
using lhs_underlying = typename comparison_underlying_type<Lhs>::type;
|
|
299
|
-
using rhs_underlying = typename comparison_underlying_type<Rhs>::type;
|
|
300
|
-
static constexpr bool value = std::is_integral<lhs_underlying>::value &&
|
|
301
|
-
std::is_integral<rhs_underlying>::value &&
|
|
302
|
-
std::is_signed<lhs_underlying>::value &&
|
|
303
|
-
std::is_unsigned<rhs_underlying>::value;
|
|
304
|
-
};
|
|
305
|
-
// Same thing, other way around: Lhs is unsigned, Rhs signed.
|
|
306
|
-
template <typename Lhs, typename Rhs>
|
|
307
|
-
struct is_unsigned_vs_signed : public is_signed_vs_unsigned<Rhs, Lhs> {};
|
|
308
|
-
|
|
309
|
-
// Specialize the compare functions for signed vs. unsigned comparisons.
|
|
310
|
-
// std::enable_if ensures that this template is only instantiable if both Lhs
|
|
311
|
-
// and Rhs are integral types, and their signedness does not match.
|
|
312
|
-
#define MAKE_UNSIGNED(Type, value) \
|
|
313
|
-
static_cast<typename std::make_unsigned< \
|
|
314
|
-
typename comparison_underlying_type<Type>::type>::type>(value)
|
|
315
|
-
#define DEFINE_SIGNED_MISMATCH_COMP(CHECK, NAME, IMPL) \
|
|
316
|
-
template <typename Lhs, typename Rhs> \
|
|
317
|
-
V8_INLINE constexpr \
|
|
318
|
-
typename std::enable_if<CHECK<Lhs, Rhs>::value, bool>::type \
|
|
319
|
-
Cmp##NAME##Impl(Lhs lhs, Rhs rhs) { \
|
|
320
|
-
return IMPL; \
|
|
321
|
-
}
|
|
322
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_signed_vs_unsigned, EQ,
|
|
323
|
-
lhs >= 0 && MAKE_UNSIGNED(Lhs, lhs) ==
|
|
324
|
-
MAKE_UNDERLYING(Rhs, rhs))
|
|
325
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_signed_vs_unsigned, LT,
|
|
326
|
-
lhs < 0 || MAKE_UNSIGNED(Lhs, lhs) <
|
|
327
|
-
MAKE_UNDERLYING(Rhs, rhs))
|
|
328
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_signed_vs_unsigned, LE,
|
|
329
|
-
lhs <= 0 || MAKE_UNSIGNED(Lhs, lhs) <=
|
|
330
|
-
MAKE_UNDERLYING(Rhs, rhs))
|
|
331
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_signed_vs_unsigned, NE, !CmpEQImpl(lhs, rhs))
|
|
332
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_signed_vs_unsigned, GT, !CmpLEImpl(lhs, rhs))
|
|
333
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_signed_vs_unsigned, GE, !CmpLTImpl(lhs, rhs))
|
|
334
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_unsigned_vs_signed, EQ, CmpEQImpl(rhs, lhs))
|
|
335
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_unsigned_vs_signed, NE, CmpNEImpl(rhs, lhs))
|
|
336
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_unsigned_vs_signed, LT, CmpGTImpl(rhs, lhs))
|
|
337
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_unsigned_vs_signed, LE, CmpGEImpl(rhs, lhs))
|
|
338
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_unsigned_vs_signed, GT, CmpLTImpl(rhs, lhs))
|
|
339
|
-
DEFINE_SIGNED_MISMATCH_COMP(is_unsigned_vs_signed, GE, CmpLEImpl(rhs, lhs))
|
|
340
|
-
#undef MAKE_UNSIGNED
|
|
341
|
-
#undef DEFINE_SIGNED_MISMATCH_COMP
|
|
342
|
-
|
|
343
|
-
// Helper functions for CHECK_OP macro.
|
|
344
|
-
// The (float, float) and (double, double) instantiations are explicitly
|
|
345
|
-
// externalized to ensure proper 32/64-bit comparisons on x86.
|
|
346
|
-
// The Cmp##NAME##Impl function is only instantiable if one of the two types is
|
|
347
|
-
// not integral or their signedness matches (i.e. whenever no specialization is
|
|
348
|
-
// required, see above). Otherwise it is disabled by the enable_if construct,
|
|
349
|
-
// and the compiler will pick a specialization from above.
|
|
350
|
-
#define DEFINE_CHECK_OP_IMPL(NAME, op) \
|
|
351
|
-
template <typename Lhs, typename Rhs> \
|
|
352
|
-
V8_INLINE constexpr \
|
|
353
|
-
typename std::enable_if<!is_signed_vs_unsigned<Lhs, Rhs>::value && \
|
|
354
|
-
!is_unsigned_vs_signed<Lhs, Rhs>::value, \
|
|
355
|
-
bool>::type Cmp##NAME##Impl(Lhs lhs, Rhs rhs) { \
|
|
356
|
-
return lhs op rhs; \
|
|
357
|
-
} \
|
|
358
|
-
template <typename Lhs, typename Rhs> \
|
|
359
|
-
V8_INLINE constexpr std::string* Check##NAME##Impl(Lhs lhs, Rhs rhs, \
|
|
360
|
-
char const* msg) { \
|
|
361
|
-
using LhsPassT = typename pass_value_or_ref<Lhs>::type; \
|
|
362
|
-
using RhsPassT = typename pass_value_or_ref<Rhs>::type; \
|
|
363
|
-
bool cmp = Cmp##NAME##Impl<LhsPassT, RhsPassT>(lhs, rhs); \
|
|
364
|
-
return V8_LIKELY(cmp) \
|
|
365
|
-
? nullptr \
|
|
366
|
-
: MakeCheckOpString<LhsPassT, RhsPassT>(lhs, rhs, msg); \
|
|
367
|
-
}
|
|
368
|
-
DEFINE_CHECK_OP_IMPL(EQ, ==)
|
|
369
|
-
DEFINE_CHECK_OP_IMPL(NE, !=)
|
|
370
|
-
DEFINE_CHECK_OP_IMPL(LE, <=)
|
|
371
|
-
DEFINE_CHECK_OP_IMPL(LT, < )
|
|
372
|
-
DEFINE_CHECK_OP_IMPL(GE, >=)
|
|
373
|
-
DEFINE_CHECK_OP_IMPL(GT, > )
|
|
374
|
-
#undef DEFINE_CHECK_OP_IMPL
|
|
375
|
-
|
|
376
|
-
#define CHECK_EQ(lhs, rhs) CHECK_OP(EQ, ==, lhs, rhs)
|
|
377
|
-
#define CHECK_NE(lhs, rhs) CHECK_OP(NE, !=, lhs, rhs)
|
|
378
|
-
#define CHECK_LE(lhs, rhs) CHECK_OP(LE, <=, lhs, rhs)
|
|
379
|
-
#define CHECK_LT(lhs, rhs) CHECK_OP(LT, <, lhs, rhs)
|
|
380
|
-
#define CHECK_GE(lhs, rhs) CHECK_OP(GE, >=, lhs, rhs)
|
|
381
|
-
#define CHECK_GT(lhs, rhs) CHECK_OP(GT, >, lhs, rhs)
|
|
382
|
-
#define CHECK_NULL(val) CHECK((val) == nullptr)
|
|
383
|
-
#define CHECK_NOT_NULL(val) CHECK((val) != nullptr)
|
|
384
|
-
#define CHECK_IMPLIES(lhs, rhs) \
|
|
385
|
-
CHECK_WITH_MSG(!(lhs) || (rhs), #lhs " implies " #rhs)
|
|
386
|
-
|
|
387
|
-
} // namespace base
|
|
388
|
-
} // namespace v8
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
// The DCHECK macro is equivalent to CHECK except that it only
|
|
392
|
-
// generates code in debug builds.
|
|
393
|
-
#ifdef DEBUG
|
|
394
|
-
#define DCHECK_EQ(lhs, rhs) DCHECK_OP(EQ, ==, lhs, rhs)
|
|
395
|
-
#define DCHECK_NE(lhs, rhs) DCHECK_OP(NE, !=, lhs, rhs)
|
|
396
|
-
#define DCHECK_GT(lhs, rhs) DCHECK_OP(GT, >, lhs, rhs)
|
|
397
|
-
#define DCHECK_GE(lhs, rhs) DCHECK_OP(GE, >=, lhs, rhs)
|
|
398
|
-
#define DCHECK_LT(lhs, rhs) DCHECK_OP(LT, <, lhs, rhs)
|
|
399
|
-
#define DCHECK_LE(lhs, rhs) DCHECK_OP(LE, <=, lhs, rhs)
|
|
400
|
-
#define DCHECK_NULL(val) DCHECK((val) == nullptr)
|
|
401
|
-
#define DCHECK_NOT_NULL(val) DCHECK((val) != nullptr)
|
|
402
|
-
#define DCHECK_IMPLIES(lhs, rhs) \
|
|
403
|
-
DCHECK_WITH_MSG(!(lhs) || (rhs), #lhs " implies " #rhs)
|
|
404
|
-
#else
|
|
405
|
-
#define DCHECK(condition) ((void) 0)
|
|
406
|
-
#define DCHECK_EQ(v1, v2) ((void) 0)
|
|
407
|
-
#define DCHECK_NE(v1, v2) ((void) 0)
|
|
408
|
-
#define DCHECK_GT(v1, v2) ((void) 0)
|
|
409
|
-
#define DCHECK_GE(v1, v2) ((void) 0)
|
|
410
|
-
#define DCHECK_LT(v1, v2) ((void) 0)
|
|
411
|
-
#define DCHECK_LE(v1, v2) ((void) 0)
|
|
412
|
-
#define DCHECK_NULL(val) ((void) 0)
|
|
413
|
-
#define DCHECK_NOT_NULL(val) ((void) 0)
|
|
414
|
-
#define DCHECK_IMPLIES(v1, v2) ((void) 0)
|
|
415
|
-
#endif
|
|
416
|
-
|
|
417
|
-
#endif // V8_BASE_LOGGING_H_
|