react-native-executorch 0.5.2 → 0.5.3
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/android/CMakeLists.txt +24 -0
- package/android/build.gradle +1 -0
- package/android/src/main/cpp/CMakeLists.txt +25 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/RnExecutorchPackage.kt +1 -13
- package/common/rnexecutorch/RnExecutorchInstaller.cpp +52 -18
- package/common/rnexecutorch/RnExecutorchInstaller.h +0 -25
- package/common/rnexecutorch/TokenizerModule.cpp +1 -1
- package/common/rnexecutorch/TokenizerModule.h +4 -1
- package/common/rnexecutorch/data_processing/FileUtils.h +2 -2
- package/common/rnexecutorch/data_processing/ImageProcessing.cpp +5 -5
- package/common/rnexecutorch/data_processing/ImageProcessing.h +2 -2
- package/common/rnexecutorch/data_processing/Numerical.cpp +13 -0
- package/common/rnexecutorch/host_objects/JsiConversions.h +43 -62
- package/common/rnexecutorch/host_objects/ModelHostObject.h +43 -24
- package/common/rnexecutorch/metaprogramming/ConstructorHelpers.h +8 -6
- package/common/rnexecutorch/metaprogramming/FunctionHelpers.h +1 -1
- package/common/rnexecutorch/models/BaseModel.cpp +2 -2
- package/common/rnexecutorch/models/BaseModel.h +5 -0
- package/common/rnexecutorch/models/EncoderDecoderBase.cpp +2 -2
- package/common/rnexecutorch/models/EncoderDecoderBase.h +2 -2
- package/common/rnexecutorch/models/classification/Classification.cpp +6 -6
- package/common/rnexecutorch/models/classification/Classification.h +5 -0
- package/common/rnexecutorch/models/classification/Constants.h +3 -3
- package/common/rnexecutorch/models/embeddings/BaseEmbeddings.cpp +2 -2
- package/common/rnexecutorch/models/embeddings/BaseEmbeddings.h +2 -2
- package/common/rnexecutorch/models/embeddings/image/ImageEmbeddings.cpp +3 -3
- package/common/rnexecutorch/models/embeddings/image/ImageEmbeddings.h +5 -0
- package/common/rnexecutorch/models/embeddings/text/TextEmbeddings.cpp +2 -2
- package/common/rnexecutorch/models/embeddings/text/TextEmbeddings.h +6 -1
- package/common/rnexecutorch/models/image_segmentation/Constants.h +3 -3
- package/common/rnexecutorch/models/image_segmentation/ImageSegmentation.cpp +6 -5
- package/common/rnexecutorch/models/image_segmentation/ImageSegmentation.h +8 -1
- package/common/rnexecutorch/models/llm/LLM.cpp +58 -0
- package/common/rnexecutorch/models/llm/LLM.h +35 -0
- package/common/rnexecutorch/models/object_detection/Constants.h +3 -3
- package/common/rnexecutorch/models/object_detection/ObjectDetection.cpp +8 -8
- package/common/rnexecutorch/models/object_detection/ObjectDetection.h +11 -5
- package/common/rnexecutorch/models/object_detection/Types.h +13 -0
- package/common/rnexecutorch/models/object_detection/Utils.cpp +13 -11
- package/common/rnexecutorch/models/object_detection/Utils.h +7 -13
- package/common/rnexecutorch/models/ocr/CTCLabelConverter.cpp +2 -2
- package/common/rnexecutorch/models/ocr/CTCLabelConverter.h +2 -2
- package/common/rnexecutorch/models/ocr/Constants.h +33 -26
- package/common/rnexecutorch/models/ocr/Detector.cpp +20 -22
- package/common/rnexecutorch/models/ocr/Detector.h +4 -4
- package/common/rnexecutorch/models/ocr/OCR.cpp +9 -8
- package/common/rnexecutorch/models/ocr/OCR.h +11 -3
- package/common/rnexecutorch/models/ocr/RecognitionHandler.cpp +20 -19
- package/common/rnexecutorch/models/ocr/RecognitionHandler.h +9 -7
- package/common/rnexecutorch/models/ocr/Recognizer.cpp +7 -7
- package/common/rnexecutorch/models/ocr/Recognizer.h +2 -2
- package/common/rnexecutorch/models/ocr/Types.h +4 -6
- package/common/rnexecutorch/models/ocr/{DetectorUtils.cpp → utils/DetectorUtils.cpp} +70 -63
- package/common/rnexecutorch/models/ocr/{DetectorUtils.h → utils/DetectorUtils.h} +12 -11
- package/common/rnexecutorch/models/ocr/{RecognitionHandlerUtils.cpp → utils/RecognitionHandlerUtils.cpp} +14 -11
- package/common/rnexecutorch/models/ocr/{RecognitionHandlerUtils.h → utils/RecognitionHandlerUtils.h} +5 -5
- package/common/rnexecutorch/models/ocr/{RecognizerUtils.cpp → utils/RecognizerUtils.cpp} +28 -26
- package/common/rnexecutorch/models/ocr/{RecognizerUtils.h → utils/RecognizerUtils.h} +15 -14
- package/common/rnexecutorch/models/speech_to_text/SpeechToText.cpp +2 -2
- package/common/rnexecutorch/models/speech_to_text/SpeechToText.h +9 -2
- package/common/rnexecutorch/models/speech_to_text/SpeechToTextStrategy.h +2 -2
- package/common/rnexecutorch/models/speech_to_text/WhisperStrategy.cpp +2 -2
- package/common/rnexecutorch/models/speech_to_text/WhisperStrategy.h +2 -2
- package/common/rnexecutorch/models/style_transfer/StyleTransfer.cpp +5 -5
- package/common/rnexecutorch/models/style_transfer/StyleTransfer.h +6 -0
- package/common/rnexecutorch/models/vertical_ocr/VerticalDetector.cpp +23 -22
- package/common/rnexecutorch/models/vertical_ocr/VerticalDetector.h +4 -4
- package/common/rnexecutorch/models/vertical_ocr/VerticalOCR.cpp +34 -34
- package/common/rnexecutorch/models/vertical_ocr/VerticalOCR.h +27 -20
- package/{third-party/ios/ExecutorchLib/ExecutorchLib/sampler → common/runner}/sampler.cpp +3 -2
- package/{third-party/ios/ExecutorchLib/ExecutorchLib/sampler → common/runner}/sampler.h +3 -2
- package/ios/libs/executorch/libbackend_coreml_ios.a +0 -0
- package/ios/libs/executorch/libbackend_coreml_simulator.a +0 -0
- package/{third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/ios-arm64 → ios/libs/executorch}/libbackend_mps_ios.a +0 -0
- package/{third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/ios-arm64-simulator → ios/libs/executorch}/libbackend_mps_simulator.a +0 -0
- package/ios/libs/executorch/libbackend_xnnpack_ios.a +0 -0
- package/ios/libs/executorch/libbackend_xnnpack_simulator.a +0 -0
- package/ios/libs/executorch/libexecutorch_ios.a +0 -0
- package/ios/libs/executorch/libexecutorch_simulator.a +0 -0
- package/ios/libs/executorch/libkernels_custom_ios.a +0 -0
- package/ios/libs/executorch/libkernels_custom_simulator.a +0 -0
- package/ios/libs/executorch/libkernels_optimized_ios.a +0 -0
- package/ios/libs/executorch/libkernels_optimized_simulator.a +0 -0
- package/ios/libs/executorch/libkernels_portable_ios.a +0 -0
- package/ios/libs/executorch/libkernels_portable_simulator.a +0 -0
- package/ios/libs/executorch/libkernels_quantized_ios.a +0 -0
- package/ios/libs/executorch/libkernels_quantized_simulator.a +0 -0
- package/ios/libs/tokenizers-cpp/physical-arm64-release/libsentencepiece.a +0 -0
- package/ios/{ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib → libs/tokenizers-cpp/physical-arm64-release/libtokenizers_c.a} +0 -0
- package/ios/libs/tokenizers-cpp/physical-arm64-release/libtokenizers_cpp.a +0 -0
- package/ios/libs/tokenizers-cpp/simulator-arm64-debug/libsentencepiece.a +0 -0
- package/ios/{ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib → libs/tokenizers-cpp/simulator-arm64-debug/libtokenizers_c.a} +0 -0
- package/ios/libs/tokenizers-cpp/simulator-arm64-debug/libtokenizers_cpp.a +0 -0
- package/lib/Error.js +9 -6
- package/lib/ThreadPool.d.ts +10 -0
- package/lib/ThreadPool.js +28 -0
- package/lib/constants/modelUrls.js +1 -1
- package/lib/controllers/OCRController.js +9 -14
- package/lib/controllers/VerticalOCRController.js +9 -14
- package/lib/hooks/computer_vision/useOCR.js +7 -8
- package/lib/hooks/computer_vision/useVerticalOCR.js +3 -5
- package/lib/index.d.ts +0 -2
- package/lib/index.js +1 -3
- package/lib/module/controllers/LLMController.js +6 -10
- package/lib/module/controllers/LLMController.js.map +1 -1
- package/lib/module/hooks/computer_vision/useClassification.js +2 -2
- package/lib/module/hooks/computer_vision/useClassification.js.map +1 -1
- package/lib/module/hooks/computer_vision/useImageEmbeddings.js +2 -2
- package/lib/module/hooks/computer_vision/useImageEmbeddings.js.map +1 -1
- package/lib/module/hooks/computer_vision/useImageSegmentation.js +2 -2
- package/lib/module/hooks/computer_vision/useImageSegmentation.js.map +1 -1
- package/lib/module/hooks/computer_vision/useObjectDetection.js +2 -2
- package/lib/module/hooks/computer_vision/useObjectDetection.js.map +1 -1
- package/lib/module/hooks/computer_vision/useStyleTransfer.js +2 -2
- package/lib/module/hooks/computer_vision/useStyleTransfer.js.map +1 -1
- package/lib/module/hooks/general/useExecutorchModule.js +2 -2
- package/lib/module/hooks/general/useExecutorchModule.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js +2 -2
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js.map +1 -1
- package/lib/module/hooks/useModule.js +13 -9
- package/lib/module/hooks/useModule.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/BaseModule.js +9 -17
- package/lib/module/modules/BaseModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ClassificationModule.js +2 -2
- package/lib/module/modules/computer_vision/ClassificationModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ImageEmbeddingsModule.js +2 -2
- package/lib/module/modules/computer_vision/ImageEmbeddingsModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js +2 -2
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js +2 -2
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js.map +1 -1
- package/lib/module/modules/computer_vision/StyleTransferModule.js +2 -2
- package/lib/module/modules/computer_vision/StyleTransferModule.js.map +1 -1
- package/lib/module/modules/general/ExecutorchModule.js +2 -2
- package/lib/module/modules/general/ExecutorchModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js +2 -2
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js.map +1 -1
- package/lib/module/native/RnExecutorchModules.js +1 -2
- package/lib/module/native/RnExecutorchModules.js.map +1 -1
- package/lib/module/utils/SpeechToTextModule/ASR.js +3 -3
- package/lib/module/utils/SpeechToTextModule/ASR.js.map +1 -1
- package/lib/modules/computer_vision/OCRModule.d.ts +4 -5
- package/lib/modules/computer_vision/OCRModule.js +9 -12
- package/lib/modules/computer_vision/VerticalOCRModule.d.ts +4 -5
- package/lib/modules/computer_vision/VerticalOCRModule.js +9 -12
- package/lib/native/RnExecutorchModules.d.ts +5 -1
- package/lib/native/RnExecutorchModules.js +3 -1
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/common.d.ts +1 -0
- package/lib/typescript/controllers/LLMController.d.ts +1 -1
- package/lib/typescript/controllers/LLMController.d.ts.map +1 -1
- package/lib/typescript/hooks/useModule.d.ts +8 -5
- package/lib/typescript/hooks/useModule.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/modules/BaseModule.d.ts +7 -6
- package/lib/typescript/modules/BaseModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts +2 -2
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ImageEmbeddingsModule.d.ts +2 -2
- package/lib/typescript/modules/computer_vision/ImageEmbeddingsModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts +2 -2
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts +2 -2
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts +2 -2
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts.map +1 -1
- package/lib/typescript/modules/general/ExecutorchModule.d.ts +2 -2
- package/lib/typescript/modules/general/ExecutorchModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts +2 -2
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts.map +1 -1
- package/lib/typescript/native/RnExecutorchModules.d.ts +1 -3
- package/lib/typescript/native/RnExecutorchModules.d.ts.map +1 -1
- package/lib/utils/ResourceFetcherUtils.js +0 -1
- package/lib/utils/llm.js +0 -1
- package/package.json +1 -2
- package/react-native-executorch.podspec +47 -44
- package/src/controllers/LLMController.ts +8 -13
- package/src/hooks/computer_vision/useClassification.ts +2 -2
- package/src/hooks/computer_vision/useImageEmbeddings.ts +2 -2
- package/src/hooks/computer_vision/useImageSegmentation.ts +2 -2
- package/src/hooks/computer_vision/useObjectDetection.ts +2 -2
- package/src/hooks/computer_vision/useStyleTransfer.ts +2 -2
- package/src/hooks/general/useExecutorchModule.ts +2 -2
- package/src/hooks/natural_language_processing/useTextEmbeddings.ts +2 -2
- package/src/hooks/useModule.ts +23 -13
- package/src/index.ts +3 -2
- package/src/modules/BaseModule.ts +17 -28
- package/src/modules/computer_vision/ClassificationModule.ts +2 -2
- package/src/modules/computer_vision/ImageEmbeddingsModule.ts +2 -2
- package/src/modules/computer_vision/ImageSegmentationModule.ts +2 -2
- package/src/modules/computer_vision/ObjectDetectionModule.ts +2 -2
- package/src/modules/computer_vision/StyleTransferModule.ts +2 -2
- package/src/modules/general/ExecutorchModule.ts +2 -2
- package/src/modules/natural_language_processing/TextEmbeddingsModule.ts +2 -2
- package/src/native/RnExecutorchModules.ts +1 -5
- package/src/utils/SpeechToTextModule/ASR.ts +4 -4
- package/third-party/android/libs/cpuinfo/arm64-v8a/libcpuinfo.so +0 -0
- package/third-party/android/libs/pthreadpool/arm64-v8a/libpthreadpool.so +0 -0
- package/third-party/include/cpuinfo/cpuinfo.h +2305 -0
- package/third-party/include/executorch/extension/threadpool/cpuinfo_utils.h +26 -0
- package/third-party/include/executorch/extension/threadpool/threadpool.h +94 -0
- package/third-party/include/pthreadpool/pthreadpool.h +2236 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/LLM.kt +0 -63
- package/ios/ExecutorchLib.xcframework/Info.plist +0 -43
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/ETModel.h +0 -27
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +0 -14
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/LLaMARunner.h +0 -32
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/ETModel.h +0 -27
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +0 -14
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/LLaMARunner.h +0 -32
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/RnExecutorch/LLM.h +0 -5
- package/ios/RnExecutorch/LLM.mm +0 -78
- package/lib/Error.d.ts +0 -30
- package/lib/constants/directories.d.ts +0 -1
- package/lib/constants/ocr/symbols.d.ts +0 -75
- package/lib/controllers/OCRController.d.ts +0 -23
- package/lib/controllers/VerticalOCRController.d.ts +0 -25
- package/lib/hooks/useModule.d.ts +0 -17
- package/lib/module/modules/BaseNonStaticModule.js +0 -17
- package/lib/module/modules/BaseNonStaticModule.js.map +0 -1
- package/lib/module/native/NativeLLM.js +0 -5
- package/lib/module/native/NativeLLM.js.map +0 -1
- package/lib/modules/BaseModule.d.ts +0 -8
- package/lib/modules/BaseNonStaticModule.d.ts +0 -9
- package/lib/native/NativeETInstaller.d.ts +0 -6
- package/lib/native/NativeOCR.d.ts +0 -8
- package/lib/native/NativeVerticalOCR.d.ts +0 -8
- package/lib/types/imageSegmentation.d.ts +0 -24
- package/lib/types/objectDetection.d.ts +0 -104
- package/lib/types/ocr.d.ts +0 -11
- package/lib/typescript/modules/BaseNonStaticModule.d.ts +0 -10
- package/lib/typescript/modules/BaseNonStaticModule.d.ts.map +0 -1
- package/lib/typescript/native/NativeLLM.d.ts +0 -12
- package/lib/typescript/native/NativeLLM.d.ts.map +0 -1
- package/lib/utils/stt.d.ts +0 -1
- package/src/modules/BaseNonStaticModule.ts +0 -26
- package/src/native/NativeLLM.ts +0 -14
- package/third-party/include/tokenizers-cpp/tokenizers_c.h +0 -61
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.h +0 -27
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.mm +0 -249
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/HuggingFaceTokenizer.h +0 -14
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/HuggingFaceTokenizer.mm +0 -80
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/LLaMARunner.h +0 -32
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/LLaMARunner.mm +0 -95
- package/third-party/ios/ExecutorchLib/ExecutorchLib/InputType.h +0 -12
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Utils.hpp +0 -217
- package/third-party/ios/ExecutorchLib/ExecutorchLib/model/Model.cpp +0 -11
- package/third-party/ios/ExecutorchLib/ExecutorchLib/model/Model.h +0 -11
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/base64.h +0 -202
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/bpe_tokenizer.cpp +0 -313
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/bpe_tokenizer.h +0 -57
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/llama_tiktoken.cpp +0 -78
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/llama_tiktoken.h +0 -23
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tiktoken.cpp +0 -427
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tiktoken.h +0 -87
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tokenizer.h +0 -76
- package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.pbxproj +0 -683
- package/third-party/ios/ExecutorchLib/build.sh +0 -44
- package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/ios-arm64/libbackend_coreml_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/ios-arm64-simulator/libbackend_coreml_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/ios-arm64/libbackend_xnnpack_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/ios-arm64-simulator/libbackend_xnnpack_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/Info.plist +0 -47
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/macros/Export.h +0 -163
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/macros/Macros.h +0 -497
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16-inl.h +0 -342
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16-math.h +0 -266
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16.h +0 -125
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/Half-inl.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/Half.h +0 -416
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/TypeSafeSignMath.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/bit_cast.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/floating_point_utils.h +0 -33
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/irange.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorch.h +0 -13
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchError.h +0 -16
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchLog.h +0 -76
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchModule.h +0 -286
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchTensor.h +0 -742
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchValue.h +0 -219
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/module/module.h +0 -492
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor.h +0 -13
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_accessor.h +0 -190
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_ptr.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_ptr_maker.h +0 -653
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/backend_execution_context.h +0 -71
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/backend_init_context.h +0 -72
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/interface.h +0 -166
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/array_ref.h +0 -235
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/data_loader.h +0 -136
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/defines.h +0 -20
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/error.h +0 -229
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/evalue.h +0 -521
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer.h +0 -565
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer_hooks.h +0 -323
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer_hooks_delegate.h +0 -197
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/exec_aten.h +0 -147
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/dim_order_util.h +0 -263
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/scalar_type_util.h +0 -1331
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h +0 -21
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_shape_to_c_string.h +0 -69
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_util.h +0 -1250
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/freeable_buffer.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/hierarchical_allocator.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/memory_allocator.h +0 -198
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/named_data_map.h +0 -86
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bfloat16.h +0 -27
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bfloat16_math.h +0 -14
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bits_types.h +0 -83
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Export.h +0 -163
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h +0 -497
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-inl.h +0 -342
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-math.h +0 -266
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16.h +0 -125
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half-inl.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half.h +0 -416
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/TypeSafeSignMath.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/bit_cast.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/floating_point_utils.h +0 -33
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/irange.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/complex.h +0 -44
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/device.h +0 -70
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/half.h +0 -27
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/optional.h +0 -36
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/qint_types.h +0 -83
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/scalar.h +0 -110
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/scalar_type.h +0 -154
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/string_view.h +0 -29
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor.h +0 -142
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor_impl.h +0 -261
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor_options.h +0 -60
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/result.h +0 -258
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/span.h +0 -93
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tag.h +0 -71
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tensor_layout.h +0 -79
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tensor_shape_dynamism.h +0 -39
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/memory_manager.h +0 -113
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/method.h +0 -387
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/method_meta.h +0 -251
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/program.h +0 -320
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/pte_data_map.h +0 -144
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/tensor_parser.h +0 -156
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/kernel/kernel_runtime_context.h +0 -122
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/kernel/operator_registry.h +0 -278
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/abort.h +0 -36
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/assert.h +0 -119
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/clock.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/compat_unistd.h +0 -75
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/compiler.h +0 -191
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/log.h +0 -177
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/platform.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/profiler.h +0 -292
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/runtime.h +0 -35
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/system.h +0 -49
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/types.h +0 -24
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/schema/extended_header.h +0 -76
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/module.modulemap +0 -5
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/libexecutorch_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/macros/Export.h +0 -163
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/macros/Macros.h +0 -497
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16-inl.h +0 -342
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16-math.h +0 -266
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16.h +0 -125
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/Half-inl.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/Half.h +0 -416
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/TypeSafeSignMath.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/bit_cast.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/floating_point_utils.h +0 -33
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/irange.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorch.h +0 -13
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchError.h +0 -16
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchLog.h +0 -76
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchModule.h +0 -286
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchTensor.h +0 -742
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchValue.h +0 -219
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/module/module.h +0 -492
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor.h +0 -13
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_accessor.h +0 -190
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_ptr.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_ptr_maker.h +0 -653
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/backend_execution_context.h +0 -71
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/backend_init_context.h +0 -72
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/interface.h +0 -166
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/array_ref.h +0 -235
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/data_loader.h +0 -136
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/defines.h +0 -20
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/error.h +0 -229
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/evalue.h +0 -521
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer.h +0 -565
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer_hooks.h +0 -323
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer_hooks_delegate.h +0 -197
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/exec_aten.h +0 -147
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/dim_order_util.h +0 -263
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/scalar_type_util.h +0 -1331
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h +0 -21
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_shape_to_c_string.h +0 -69
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_util.h +0 -1250
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/freeable_buffer.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/hierarchical_allocator.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/memory_allocator.h +0 -198
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/named_data_map.h +0 -86
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bfloat16.h +0 -27
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bfloat16_math.h +0 -14
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bits_types.h +0 -83
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Export.h +0 -163
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h +0 -497
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-inl.h +0 -342
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-math.h +0 -266
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16.h +0 -125
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half-inl.h +0 -347
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half.h +0 -416
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/TypeSafeSignMath.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/bit_cast.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/floating_point_utils.h +0 -33
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/irange.h +0 -107
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/complex.h +0 -44
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/device.h +0 -70
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/half.h +0 -27
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/optional.h +0 -36
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/qint_types.h +0 -83
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/scalar.h +0 -110
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/scalar_type.h +0 -154
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/string_view.h +0 -29
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor.h +0 -142
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor_impl.h +0 -261
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor_options.h +0 -60
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/result.h +0 -258
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/span.h +0 -93
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tag.h +0 -71
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tensor_layout.h +0 -79
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tensor_shape_dynamism.h +0 -39
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/memory_manager.h +0 -113
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/method.h +0 -387
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/method_meta.h +0 -251
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/program.h +0 -320
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/pte_data_map.h +0 -144
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/tensor_parser.h +0 -156
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/kernel/kernel_runtime_context.h +0 -122
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/kernel/operator_registry.h +0 -278
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/abort.h +0 -36
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/assert.h +0 -119
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/clock.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/compat_unistd.h +0 -75
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/compiler.h +0 -191
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/log.h +0 -177
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/platform.h +0 -133
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/profiler.h +0 -292
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/runtime.h +0 -35
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/system.h +0 -49
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/types.h +0 -24
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/schema/extended_header.h +0 -76
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/module.modulemap +0 -5
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/libexecutorch_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/ios-arm64/libkernels_custom_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/ios-arm64-simulator/libkernels_custom_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/ios-arm64/libkernels_optimized_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/ios-arm64-simulator/libkernels_optimized_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/ios-arm64/libkernels_portable_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/ios-arm64-simulator/libkernels_portable_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/ios-arm64/libkernels_quantized_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/ios-arm64-simulator/libkernels_quantized_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/Info.plist +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/bitmap256.h +0 -82
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/filtered_re2.h +0 -111
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/pod_array.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prefilter.h +0 -130
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prefilter_tree.h +0 -139
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prog.h +0 -483
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/re2.h +0 -994
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/regexp.h +0 -692
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/set.h +0 -85
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/sparse_array.h +0 -367
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/sparse_set.h +0 -241
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/stringpiece.h +0 -205
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/unicode_casefold.h +0 -78
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/unicode_groups.h +0 -64
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/walker-inl.h +0 -235
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Info.plist +0 -26
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/re2 +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/bitmap256.h +0 -82
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/filtered_re2.h +0 -111
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/pod_array.h +0 -43
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prefilter.h +0 -130
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prefilter_tree.h +0 -139
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prog.h +0 -483
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/re2.h +0 -994
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/regexp.h +0 -692
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/set.h +0 -85
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/sparse_array.h +0 -367
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/sparse_set.h +0 -241
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/stringpiece.h +0 -205
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/unicode_casefold.h +0 -78
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/unicode_groups.h +0 -64
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/walker-inl.h +0 -235
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Info.plist +0 -26
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/re2 +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/irunner.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/runner.cpp +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/runner.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/stats.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_decoder_runner.cpp +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_decoder_runner.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_prefiller.cpp +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_prefiller.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/text_token_generator.h +0 -0
- /package/{third-party/ios/ExecutorchLib/ExecutorchLib → common}/runner/util.h +0 -0
|
@@ -1,483 +0,0 @@
|
|
|
1
|
-
// Copyright 2007 The RE2 Authors. All Rights Reserved.
|
|
2
|
-
// Use of this source code is governed by a BSD-style
|
|
3
|
-
// license that can be found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
#ifndef RE2_PROG_H_
|
|
6
|
-
#define RE2_PROG_H_
|
|
7
|
-
|
|
8
|
-
// Compiled representation of regular expressions.
|
|
9
|
-
// See regexp.h for the Regexp class, which represents a regular
|
|
10
|
-
// expression symbolically.
|
|
11
|
-
|
|
12
|
-
#include <functional>
|
|
13
|
-
#include <mutex>
|
|
14
|
-
#include <stdint.h>
|
|
15
|
-
#include <string>
|
|
16
|
-
#include <type_traits>
|
|
17
|
-
#include <vector>
|
|
18
|
-
|
|
19
|
-
#include "re2/pod_array.h"
|
|
20
|
-
#include "re2/re2.h"
|
|
21
|
-
#include "re2/sparse_array.h"
|
|
22
|
-
#include "re2/sparse_set.h"
|
|
23
|
-
#include "util/logging.h"
|
|
24
|
-
#include "util/util.h"
|
|
25
|
-
|
|
26
|
-
namespace re2 {
|
|
27
|
-
|
|
28
|
-
// Opcodes for Inst
|
|
29
|
-
enum InstOp {
|
|
30
|
-
kInstAlt = 0, // choose between out_ and out1_
|
|
31
|
-
kInstAltMatch, // Alt: out_ is [00-FF] and back, out1_ is match; or vice
|
|
32
|
-
// versa.
|
|
33
|
-
kInstByteRange, // next (possible case-folded) byte must be in [lo_, hi_]
|
|
34
|
-
kInstCapture, // capturing parenthesis number cap_
|
|
35
|
-
kInstEmptyWidth, // empty-width special (^ $ ...); bit(s) set in empty_
|
|
36
|
-
kInstMatch, // found a match!
|
|
37
|
-
kInstNop, // no-op; occasionally unavoidable
|
|
38
|
-
kInstFail, // never match; occasionally unavoidable
|
|
39
|
-
kNumInst,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// Bit flags for empty-width specials
|
|
43
|
-
enum EmptyOp {
|
|
44
|
-
kEmptyBeginLine = 1 << 0, // ^ - beginning of line
|
|
45
|
-
kEmptyEndLine = 1 << 1, // $ - end of line
|
|
46
|
-
kEmptyBeginText = 1 << 2, // \A - beginning of text
|
|
47
|
-
kEmptyEndText = 1 << 3, // \z - end of text
|
|
48
|
-
kEmptyWordBoundary = 1 << 4, // \b - word boundary
|
|
49
|
-
kEmptyNonWordBoundary = 1 << 5, // \B - not \b
|
|
50
|
-
kEmptyAllFlags = (1 << 6) - 1,
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
class DFA;
|
|
54
|
-
class Regexp;
|
|
55
|
-
|
|
56
|
-
// Compiled form of regexp program.
|
|
57
|
-
class Prog {
|
|
58
|
-
public:
|
|
59
|
-
Prog();
|
|
60
|
-
~Prog();
|
|
61
|
-
|
|
62
|
-
// Single instruction in regexp program.
|
|
63
|
-
class Inst {
|
|
64
|
-
public:
|
|
65
|
-
// See the assertion below for why this is so.
|
|
66
|
-
Inst() = default;
|
|
67
|
-
|
|
68
|
-
// Copyable.
|
|
69
|
-
Inst(const Inst &) = default;
|
|
70
|
-
Inst &operator=(const Inst &) = default;
|
|
71
|
-
|
|
72
|
-
// Constructors per opcode
|
|
73
|
-
void InitAlt(uint32_t out, uint32_t out1);
|
|
74
|
-
void InitByteRange(int lo, int hi, int foldcase, uint32_t out);
|
|
75
|
-
void InitCapture(int cap, uint32_t out);
|
|
76
|
-
void InitEmptyWidth(EmptyOp empty, uint32_t out);
|
|
77
|
-
void InitMatch(int id);
|
|
78
|
-
void InitNop(uint32_t out);
|
|
79
|
-
void InitFail();
|
|
80
|
-
|
|
81
|
-
// Getters
|
|
82
|
-
int id(Prog *p) { return static_cast<int>(this - p->inst_.data()); }
|
|
83
|
-
InstOp opcode() { return static_cast<InstOp>(out_opcode_ & 7); }
|
|
84
|
-
int last() { return (out_opcode_ >> 3) & 1; }
|
|
85
|
-
int out() { return out_opcode_ >> 4; }
|
|
86
|
-
int out1() {
|
|
87
|
-
DCHECK(opcode() == kInstAlt || opcode() == kInstAltMatch);
|
|
88
|
-
return out1_;
|
|
89
|
-
}
|
|
90
|
-
int cap() {
|
|
91
|
-
DCHECK_EQ(opcode(), kInstCapture);
|
|
92
|
-
return cap_;
|
|
93
|
-
}
|
|
94
|
-
int lo() {
|
|
95
|
-
DCHECK_EQ(opcode(), kInstByteRange);
|
|
96
|
-
return lo_;
|
|
97
|
-
}
|
|
98
|
-
int hi() {
|
|
99
|
-
DCHECK_EQ(opcode(), kInstByteRange);
|
|
100
|
-
return hi_;
|
|
101
|
-
}
|
|
102
|
-
int foldcase() {
|
|
103
|
-
DCHECK_EQ(opcode(), kInstByteRange);
|
|
104
|
-
return hint_foldcase_ & 1;
|
|
105
|
-
}
|
|
106
|
-
int hint() {
|
|
107
|
-
DCHECK_EQ(opcode(), kInstByteRange);
|
|
108
|
-
return hint_foldcase_ >> 1;
|
|
109
|
-
}
|
|
110
|
-
int match_id() {
|
|
111
|
-
DCHECK_EQ(opcode(), kInstMatch);
|
|
112
|
-
return match_id_;
|
|
113
|
-
}
|
|
114
|
-
EmptyOp empty() {
|
|
115
|
-
DCHECK_EQ(opcode(), kInstEmptyWidth);
|
|
116
|
-
return empty_;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
bool greedy(Prog *p) {
|
|
120
|
-
DCHECK_EQ(opcode(), kInstAltMatch);
|
|
121
|
-
return p->inst(out())->opcode() == kInstByteRange ||
|
|
122
|
-
(p->inst(out())->opcode() == kInstNop &&
|
|
123
|
-
p->inst(p->inst(out())->out())->opcode() == kInstByteRange);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// Does this inst (an kInstByteRange) match c?
|
|
127
|
-
inline bool Matches(int c) {
|
|
128
|
-
DCHECK_EQ(opcode(), kInstByteRange);
|
|
129
|
-
if (foldcase() && 'A' <= c && c <= 'Z')
|
|
130
|
-
c += 'a' - 'A';
|
|
131
|
-
return lo_ <= c && c <= hi_;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Returns string representation for debugging.
|
|
135
|
-
std::string Dump();
|
|
136
|
-
|
|
137
|
-
// Maximum instruction id.
|
|
138
|
-
// (Must fit in out_opcode_. PatchList/last steal another bit.)
|
|
139
|
-
static const int kMaxInst = (1 << 28) - 1;
|
|
140
|
-
|
|
141
|
-
private:
|
|
142
|
-
void set_opcode(InstOp opcode) {
|
|
143
|
-
out_opcode_ = (out() << 4) | (last() << 3) | opcode;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
void set_last() { out_opcode_ = (out() << 4) | (1 << 3) | opcode(); }
|
|
147
|
-
|
|
148
|
-
void set_out(int out) {
|
|
149
|
-
out_opcode_ = (out << 4) | (last() << 3) | opcode();
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
void set_out_opcode(int out, InstOp opcode) {
|
|
153
|
-
out_opcode_ = (out << 4) | (last() << 3) | opcode;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
uint32_t out_opcode_; // 28 bits: out, 1 bit: last, 3 (low) bits: opcode
|
|
157
|
-
union { // additional instruction arguments:
|
|
158
|
-
uint32_t out1_; // opcode == kInstAlt
|
|
159
|
-
// alternate next instruction
|
|
160
|
-
|
|
161
|
-
int32_t cap_; // opcode == kInstCapture
|
|
162
|
-
// Index of capture register (holds text
|
|
163
|
-
// position recorded by capturing parentheses).
|
|
164
|
-
// For \n (the submatch for the nth parentheses),
|
|
165
|
-
// the left parenthesis captures into register 2*n
|
|
166
|
-
// and the right one captures into register 2*n+1.
|
|
167
|
-
|
|
168
|
-
int32_t match_id_; // opcode == kInstMatch
|
|
169
|
-
// Match ID to identify this match (for re2::Set).
|
|
170
|
-
|
|
171
|
-
struct { // opcode == kInstByteRange
|
|
172
|
-
uint8_t lo_; // byte range is lo_-hi_ inclusive
|
|
173
|
-
uint8_t hi_; //
|
|
174
|
-
uint16_t
|
|
175
|
-
hint_foldcase_; // 15 bits: hint, 1 (low) bit: foldcase
|
|
176
|
-
// hint to execution engines: the delta to the
|
|
177
|
-
// next instruction (in the current list) worth
|
|
178
|
-
// exploring iff this instruction matched; 0
|
|
179
|
-
// means there are no remaining possibilities,
|
|
180
|
-
// which is most likely for character classes.
|
|
181
|
-
// foldcase: A-Z -> a-z before checking range.
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
EmptyOp empty_; // opcode == kInstEmptyWidth
|
|
185
|
-
// empty_ is bitwise OR of kEmpty* flags above.
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
friend class Compiler;
|
|
189
|
-
friend struct PatchList;
|
|
190
|
-
friend class Prog;
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
// Inst must be trivial so that we can freely clear it with memset(3).
|
|
194
|
-
// Arrays of Inst are initialised by copying the initial elements with
|
|
195
|
-
// memmove(3) and then clearing any remaining elements with memset(3).
|
|
196
|
-
static_assert(std::is_trivial<Inst>::value, "Inst must be trivial");
|
|
197
|
-
|
|
198
|
-
// Whether to anchor the search.
|
|
199
|
-
enum Anchor {
|
|
200
|
-
kUnanchored, // match anywhere
|
|
201
|
-
kAnchored, // match only starting at beginning of text
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
// Kind of match to look for (for anchor != kFullMatch)
|
|
205
|
-
//
|
|
206
|
-
// kLongestMatch mode finds the overall longest
|
|
207
|
-
// match but still makes its submatch choices the way
|
|
208
|
-
// Perl would, not in the way prescribed by POSIX.
|
|
209
|
-
// The POSIX rules are much more expensive to implement,
|
|
210
|
-
// and no one has needed them.
|
|
211
|
-
//
|
|
212
|
-
// kFullMatch is not strictly necessary -- we could use
|
|
213
|
-
// kLongestMatch and then check the length of the match -- but
|
|
214
|
-
// the matching code can run faster if it knows to consider only
|
|
215
|
-
// full matches.
|
|
216
|
-
enum MatchKind {
|
|
217
|
-
kFirstMatch, // like Perl, PCRE
|
|
218
|
-
kLongestMatch, // like egrep or POSIX
|
|
219
|
-
kFullMatch, // match only entire text; implies anchor==kAnchored
|
|
220
|
-
kManyMatch // for SearchDFA, records set of matches
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
Inst *inst(int id) { return &inst_[id]; }
|
|
224
|
-
int start() { return start_; }
|
|
225
|
-
void set_start(int start) { start_ = start; }
|
|
226
|
-
int start_unanchored() { return start_unanchored_; }
|
|
227
|
-
void set_start_unanchored(int start) { start_unanchored_ = start; }
|
|
228
|
-
int size() { return size_; }
|
|
229
|
-
bool reversed() { return reversed_; }
|
|
230
|
-
void set_reversed(bool reversed) { reversed_ = reversed; }
|
|
231
|
-
int list_count() { return list_count_; }
|
|
232
|
-
int inst_count(InstOp op) { return inst_count_[op]; }
|
|
233
|
-
uint16_t *list_heads() { return list_heads_.data(); }
|
|
234
|
-
size_t bit_state_text_max_size() { return bit_state_text_max_size_; }
|
|
235
|
-
int64_t dfa_mem() { return dfa_mem_; }
|
|
236
|
-
void set_dfa_mem(int64_t dfa_mem) { dfa_mem_ = dfa_mem; }
|
|
237
|
-
bool anchor_start() { return anchor_start_; }
|
|
238
|
-
void set_anchor_start(bool b) { anchor_start_ = b; }
|
|
239
|
-
bool anchor_end() { return anchor_end_; }
|
|
240
|
-
void set_anchor_end(bool b) { anchor_end_ = b; }
|
|
241
|
-
int bytemap_range() { return bytemap_range_; }
|
|
242
|
-
const uint8_t *bytemap() { return bytemap_; }
|
|
243
|
-
bool can_prefix_accel() { return prefix_size_ != 0; }
|
|
244
|
-
|
|
245
|
-
// Accelerates to the first likely occurrence of the prefix.
|
|
246
|
-
// Returns a pointer to the first byte or NULL if not found.
|
|
247
|
-
const void *PrefixAccel(const void *data, size_t size) {
|
|
248
|
-
DCHECK(can_prefix_accel());
|
|
249
|
-
if (prefix_foldcase_) {
|
|
250
|
-
return PrefixAccel_ShiftDFA(data, size);
|
|
251
|
-
} else if (prefix_size_ != 1) {
|
|
252
|
-
return PrefixAccel_FrontAndBack(data, size);
|
|
253
|
-
} else {
|
|
254
|
-
return memchr(data, prefix_front_, size);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// Configures prefix accel using the analysis performed during compilation.
|
|
259
|
-
void ConfigurePrefixAccel(const std::string &prefix, bool prefix_foldcase);
|
|
260
|
-
|
|
261
|
-
// An implementation of prefix accel that uses prefix_dfa_ to perform
|
|
262
|
-
// case-insensitive search.
|
|
263
|
-
const void *PrefixAccel_ShiftDFA(const void *data, size_t size);
|
|
264
|
-
|
|
265
|
-
// An implementation of prefix accel that looks for prefix_front_ and
|
|
266
|
-
// prefix_back_ to return fewer false positives than memchr(3) alone.
|
|
267
|
-
const void *PrefixAccel_FrontAndBack(const void *data, size_t size);
|
|
268
|
-
|
|
269
|
-
// Returns string representation of program for debugging.
|
|
270
|
-
std::string Dump();
|
|
271
|
-
std::string DumpUnanchored();
|
|
272
|
-
std::string DumpByteMap();
|
|
273
|
-
|
|
274
|
-
// Returns the set of kEmpty flags that are in effect at
|
|
275
|
-
// position p within context.
|
|
276
|
-
static uint32_t EmptyFlags(const StringPiece &context, const char *p);
|
|
277
|
-
|
|
278
|
-
// Returns whether byte c is a word character: ASCII only.
|
|
279
|
-
// Used by the implementation of \b and \B.
|
|
280
|
-
// This is not right for Unicode, but:
|
|
281
|
-
// - it's hard to get right in a byte-at-a-time matching world
|
|
282
|
-
// (the DFA has only one-byte lookahead).
|
|
283
|
-
// - even if the lookahead were possible, the Progs would be huge.
|
|
284
|
-
// This crude approximation is the same one PCRE uses.
|
|
285
|
-
static bool IsWordChar(uint8_t c) {
|
|
286
|
-
return ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z') ||
|
|
287
|
-
('0' <= c && c <= '9') || c == '_';
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
// Execution engines. They all search for the regexp (run the prog)
|
|
291
|
-
// in text, which is in the larger context (used for ^ $ \b etc).
|
|
292
|
-
// Anchor and kind control the kind of search.
|
|
293
|
-
// Returns true if match found, false if not.
|
|
294
|
-
// If match found, fills match[0..nmatch-1] with submatch info.
|
|
295
|
-
// match[0] is overall match, match[1] is first set of parens, etc.
|
|
296
|
-
// If a particular submatch is not matched during the regexp match,
|
|
297
|
-
// it is set to NULL.
|
|
298
|
-
//
|
|
299
|
-
// Matching text == StringPiece(NULL, 0) is treated as any other empty
|
|
300
|
-
// string, but note that on return, it will not be possible to distinguish
|
|
301
|
-
// submatches that matched that empty string from submatches that didn't
|
|
302
|
-
// match anything. Either way, match[i] == NULL.
|
|
303
|
-
|
|
304
|
-
// Search using NFA: can find submatches but kind of slow.
|
|
305
|
-
bool SearchNFA(const StringPiece &text, const StringPiece &context,
|
|
306
|
-
Anchor anchor, MatchKind kind, StringPiece *match, int nmatch);
|
|
307
|
-
|
|
308
|
-
// Search using DFA: much faster than NFA but only finds
|
|
309
|
-
// end of match and can use a lot more memory.
|
|
310
|
-
// Returns whether a match was found.
|
|
311
|
-
// If the DFA runs out of memory, sets *failed to true and returns false.
|
|
312
|
-
// If matches != NULL and kind == kManyMatch and there is a match,
|
|
313
|
-
// SearchDFA fills matches with the match IDs of the final matching state.
|
|
314
|
-
bool SearchDFA(const StringPiece &text, const StringPiece &context,
|
|
315
|
-
Anchor anchor, MatchKind kind, StringPiece *match0,
|
|
316
|
-
bool *failed, SparseSet *matches);
|
|
317
|
-
|
|
318
|
-
// The callback issued after building each DFA state with BuildEntireDFA().
|
|
319
|
-
// If next is null, then the memory budget has been exhausted and building
|
|
320
|
-
// will halt. Otherwise, the state has been built and next points to an array
|
|
321
|
-
// of bytemap_range()+1 slots holding the next states as per the bytemap and
|
|
322
|
-
// kByteEndText. The number of the state is implied by the callback sequence:
|
|
323
|
-
// the first callback is for state 0, the second callback is for state 1, ...
|
|
324
|
-
// match indicates whether the state is a matching state.
|
|
325
|
-
using DFAStateCallback = std::function<void(const int *next, bool match)>;
|
|
326
|
-
|
|
327
|
-
// Build the entire DFA for the given match kind.
|
|
328
|
-
// Usually the DFA is built out incrementally, as needed, which
|
|
329
|
-
// avoids lots of unnecessary work.
|
|
330
|
-
// If cb is not empty, it receives one callback per state built.
|
|
331
|
-
// Returns the number of states built.
|
|
332
|
-
// FOR TESTING OR EXPERIMENTAL PURPOSES ONLY.
|
|
333
|
-
int BuildEntireDFA(MatchKind kind, const DFAStateCallback &cb);
|
|
334
|
-
|
|
335
|
-
// Compute bytemap.
|
|
336
|
-
void ComputeByteMap();
|
|
337
|
-
|
|
338
|
-
// Run peep-hole optimizer on program.
|
|
339
|
-
void Optimize();
|
|
340
|
-
|
|
341
|
-
// One-pass NFA: only correct if IsOnePass() is true,
|
|
342
|
-
// but much faster than NFA (competitive with PCRE)
|
|
343
|
-
// for those expressions.
|
|
344
|
-
bool IsOnePass();
|
|
345
|
-
bool SearchOnePass(const StringPiece &text, const StringPiece &context,
|
|
346
|
-
Anchor anchor, MatchKind kind, StringPiece *match,
|
|
347
|
-
int nmatch);
|
|
348
|
-
|
|
349
|
-
// Bit-state backtracking. Fast on small cases but uses memory
|
|
350
|
-
// proportional to the product of the list count and the text size.
|
|
351
|
-
bool CanBitState() { return list_heads_.data() != NULL; }
|
|
352
|
-
bool SearchBitState(const StringPiece &text, const StringPiece &context,
|
|
353
|
-
Anchor anchor, MatchKind kind, StringPiece *match,
|
|
354
|
-
int nmatch);
|
|
355
|
-
|
|
356
|
-
static const int kMaxOnePassCapture = 5; // $0 through $4
|
|
357
|
-
|
|
358
|
-
// Backtracking search: the gold standard against which the other
|
|
359
|
-
// implementations are checked. FOR TESTING ONLY.
|
|
360
|
-
// It allocates a ton of memory to avoid running forever.
|
|
361
|
-
// It is also recursive, so can't use in production (will overflow stacks).
|
|
362
|
-
// The name "Unsafe" here is supposed to be a flag that
|
|
363
|
-
// you should not be using this function.
|
|
364
|
-
bool UnsafeSearchBacktrack(const StringPiece &text,
|
|
365
|
-
const StringPiece &context, Anchor anchor,
|
|
366
|
-
MatchKind kind, StringPiece *match, int nmatch);
|
|
367
|
-
|
|
368
|
-
// Computes range for any strings matching regexp. The min and max can in
|
|
369
|
-
// some cases be arbitrarily precise, so the caller gets to specify the
|
|
370
|
-
// maximum desired length of string returned.
|
|
371
|
-
//
|
|
372
|
-
// Assuming PossibleMatchRange(&min, &max, N) returns successfully, any
|
|
373
|
-
// string s that is an anchored match for this regexp satisfies
|
|
374
|
-
// min <= s && s <= max.
|
|
375
|
-
//
|
|
376
|
-
// Note that PossibleMatchRange() will only consider the first copy of an
|
|
377
|
-
// infinitely repeated element (i.e., any regexp element followed by a '*' or
|
|
378
|
-
// '+' operator). Regexps with "{N}" constructions are not affected, as those
|
|
379
|
-
// do not compile down to infinite repetitions.
|
|
380
|
-
//
|
|
381
|
-
// Returns true on success, false on error.
|
|
382
|
-
bool PossibleMatchRange(std::string *min, std::string *max, int maxlen);
|
|
383
|
-
|
|
384
|
-
// Outputs the program fanout into the given sparse array.
|
|
385
|
-
void Fanout(SparseArray<int> *fanout);
|
|
386
|
-
|
|
387
|
-
// Compiles a collection of regexps to Prog. Each regexp will have
|
|
388
|
-
// its own Match instruction recording the index in the output vector.
|
|
389
|
-
static Prog *CompileSet(Regexp *re, RE2::Anchor anchor, int64_t max_mem);
|
|
390
|
-
|
|
391
|
-
// Flattens the Prog from "tree" form to "list" form. This is an in-place
|
|
392
|
-
// operation in the sense that the old instructions are lost.
|
|
393
|
-
void Flatten();
|
|
394
|
-
|
|
395
|
-
// Walks the Prog; the "successor roots" or predecessors of the reachable
|
|
396
|
-
// instructions are marked in rootmap or predmap/predvec, respectively.
|
|
397
|
-
// reachable and stk are preallocated scratch structures.
|
|
398
|
-
void MarkSuccessors(SparseArray<int> *rootmap, SparseArray<int> *predmap,
|
|
399
|
-
std::vector<std::vector<int>> *predvec,
|
|
400
|
-
SparseSet *reachable, std::vector<int> *stk);
|
|
401
|
-
|
|
402
|
-
// Walks the Prog from the given "root" instruction; the "dominator root"
|
|
403
|
-
// of the reachable instructions (if such exists) is marked in rootmap.
|
|
404
|
-
// reachable and stk are preallocated scratch structures.
|
|
405
|
-
void MarkDominator(int root, SparseArray<int> *rootmap,
|
|
406
|
-
SparseArray<int> *predmap,
|
|
407
|
-
std::vector<std::vector<int>> *predvec,
|
|
408
|
-
SparseSet *reachable, std::vector<int> *stk);
|
|
409
|
-
|
|
410
|
-
// Walks the Prog from the given "root" instruction; the reachable
|
|
411
|
-
// instructions are emitted in "list" form and appended to flat.
|
|
412
|
-
// reachable and stk are preallocated scratch structures.
|
|
413
|
-
void EmitList(int root, SparseArray<int> *rootmap, std::vector<Inst> *flat,
|
|
414
|
-
SparseSet *reachable, std::vector<int> *stk);
|
|
415
|
-
|
|
416
|
-
// Computes hints for ByteRange instructions in [begin, end).
|
|
417
|
-
void ComputeHints(std::vector<Inst> *flat, int begin, int end);
|
|
418
|
-
|
|
419
|
-
// Controls whether the DFA should bail out early if the NFA would be faster.
|
|
420
|
-
// FOR TESTING ONLY.
|
|
421
|
-
static void TESTING_ONLY_set_dfa_should_bail_when_slow(bool b);
|
|
422
|
-
|
|
423
|
-
private:
|
|
424
|
-
friend class Compiler;
|
|
425
|
-
|
|
426
|
-
DFA *GetDFA(MatchKind kind);
|
|
427
|
-
void DeleteDFA(DFA *dfa);
|
|
428
|
-
|
|
429
|
-
bool anchor_start_; // regexp has explicit start anchor
|
|
430
|
-
bool anchor_end_; // regexp has explicit end anchor
|
|
431
|
-
bool reversed_; // whether program runs backward over input
|
|
432
|
-
bool did_flatten_; // has Flatten been called?
|
|
433
|
-
bool did_onepass_; // has IsOnePass been called?
|
|
434
|
-
|
|
435
|
-
int start_; // entry point for program
|
|
436
|
-
int start_unanchored_; // unanchored entry point for program
|
|
437
|
-
int size_; // number of instructions
|
|
438
|
-
int bytemap_range_; // bytemap_[x] < bytemap_range_
|
|
439
|
-
|
|
440
|
-
bool prefix_foldcase_; // whether prefix is case-insensitive
|
|
441
|
-
size_t prefix_size_; // size of prefix (0 if no prefix)
|
|
442
|
-
union {
|
|
443
|
-
uint64_t *prefix_dfa_; // "Shift DFA" for prefix
|
|
444
|
-
struct {
|
|
445
|
-
int prefix_front_; // first byte of prefix
|
|
446
|
-
int prefix_back_; // last byte of prefix
|
|
447
|
-
};
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
int list_count_; // count of lists (see above)
|
|
451
|
-
int inst_count_[kNumInst]; // count of instructions by opcode
|
|
452
|
-
PODArray<uint16_t> list_heads_; // sparse array enumerating list heads
|
|
453
|
-
// not populated if size_ is overly large
|
|
454
|
-
size_t bit_state_text_max_size_; // upper bound (inclusive) on text.size()
|
|
455
|
-
|
|
456
|
-
PODArray<Inst> inst_; // pointer to instruction array
|
|
457
|
-
PODArray<uint8_t> onepass_nodes_; // data for OnePass nodes
|
|
458
|
-
|
|
459
|
-
int64_t dfa_mem_; // Maximum memory for DFAs.
|
|
460
|
-
DFA *dfa_first_; // DFA cached for kFirstMatch/kManyMatch
|
|
461
|
-
DFA *dfa_longest_; // DFA cached for kLongestMatch/kFullMatch
|
|
462
|
-
|
|
463
|
-
uint8_t bytemap_[256]; // map from input bytes to byte classes
|
|
464
|
-
|
|
465
|
-
std::once_flag dfa_first_once_;
|
|
466
|
-
std::once_flag dfa_longest_once_;
|
|
467
|
-
|
|
468
|
-
Prog(const Prog &) = delete;
|
|
469
|
-
Prog &operator=(const Prog &) = delete;
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
// std::string_view in MSVC has iterators that aren't just pointers and
|
|
473
|
-
// that don't allow comparisons between different objects - not even if
|
|
474
|
-
// those objects are views into the same string! Thus, we provide these
|
|
475
|
-
// conversion functions for convenience.
|
|
476
|
-
static inline const char *BeginPtr(const StringPiece &s) { return s.data(); }
|
|
477
|
-
static inline const char *EndPtr(const StringPiece &s) {
|
|
478
|
-
return s.data() + s.size();
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
} // namespace re2
|
|
482
|
-
|
|
483
|
-
#endif // RE2_PROG_H_
|