@hxmc/source 0.0.0-stage → 0.1.0-nightly.20261016.4501bd3
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/COPYING +339 -0
- package/LICENSE +44 -0
- package/haxe/src/codegen/Codegen.hx +165 -0
- package/haxe/src/codegen/Dump.hx +267 -0
- package/haxe/src/codegen/FixOverrides.hx +174 -0
- package/haxe/src/codegen/Genxml.hx +318 -0
- package/haxe/src/codegen/JavaModern.hx +1322 -0
- package/haxe/src/codegen/Overloads.hx +287 -0
- package/haxe/src/codegen/SwfLoader.hx +956 -0
- package/haxe/src/compiler/Args.hx +903 -0
- package/haxe/src/compiler/CompilationCache.hx +610 -0
- package/haxe/src/compiler/Compiler.hx +623 -0
- package/haxe/src/compiler/DisplayOutput.hx +103 -0
- package/haxe/src/compiler/DisplayProcessing.hx +317 -0
- package/haxe/src/compiler/DisplayProcessingGlobals.hx +5 -0
- package/haxe/src/compiler/Generate.hx +248 -0
- package/haxe/src/compiler/Helper.hx +80 -0
- package/haxe/src/compiler/HighLevel.hx +158 -0
- package/haxe/src/compiler/MessageReporting.hx +388 -0
- package/haxe/src/compiler/ParsedArg.hx +168 -0
- package/haxe/src/compiler/PipeThings.hx +292 -0
- package/haxe/src/compiler/Tasks.hx +61 -0
- package/haxe/src/compiler/hxb/HxbData.hx +167 -0
- package/haxe/src/compiler/hxb/HxbLib.hx +95 -0
- package/haxe/src/compiler/hxb/HxbReader.hx +2435 -0
- package/haxe/src/compiler/hxb/HxbReaderApi.hx +37 -0
- package/haxe/src/compiler/hxb/HxbWriter.hx +2485 -0
- package/haxe/src/compiler/hxb/HxbWriterConfig.hx +141 -0
- package/haxe/src/compiler/io/CompilerIo.hx +184 -0
- package/haxe/src/compiler/io/CompilerMessage.hx +134 -0
- package/haxe/src/compiler/io/CompilerOutput.hx +139 -0
- package/haxe/src/compiler/server/Server.hx +540 -0
- package/haxe/src/compiler/server/ServerCache.hx +816 -0
- package/haxe/src/compiler/server/ServerCompilationContext.hx +107 -0
- package/haxe/src/compiler/server/ServerConfig.hx +20 -0
- package/haxe/src/compiler/server/ServerMessage.hx +283 -0
- package/haxe/src/context/AbstractCast.hx +504 -0
- package/haxe/src/context/Common.hx +1223 -0
- package/haxe/src/context/CommonCache.hx +189 -0
- package/haxe/src/context/CoreApiConfig.hx +96 -0
- package/haxe/src/context/DotGraph.hx +29 -0
- package/haxe/src/context/DumpConfig.hx +81 -0
- package/haxe/src/context/FormatString.hx +122 -0
- package/haxe/src/context/HxbReaderStats.hx +19 -0
- package/haxe/src/context/Lookup.hx +59 -0
- package/haxe/src/context/Memory.hx +169 -0
- package/haxe/src/context/NativeLibraries.hx +76 -0
- package/haxe/src/context/NativeLibraryHandler.hx +52 -0
- package/haxe/src/context/Parallel.hx +111 -0
- package/haxe/src/context/PlatformConfig.hx +200 -0
- package/haxe/src/context/PurityState.hx +77 -0
- package/haxe/src/context/Resolution.hx +250 -0
- package/haxe/src/context/SafeCom.hx +259 -0
- package/haxe/src/context/Sourcemaps.hx +333 -0
- package/haxe/src/context/Typecore.hx +1050 -0
- package/haxe/src/context/TyperPass.hx +24 -0
- package/haxe/src/context/display/DeprecationCheck.hx +150 -0
- package/haxe/src/context/display/Diagnostics.hx +217 -0
- package/haxe/src/context/display/DiagnosticsPrinter.hx +337 -0
- package/haxe/src/context/display/Display.hx +140 -0
- package/haxe/src/context/display/DisplayEmitter.hx +241 -0
- package/haxe/src/context/display/DisplayException.hx +268 -0
- package/haxe/src/context/display/DisplayFields.hx +527 -0
- package/haxe/src/context/display/DisplayJson.hx +837 -0
- package/haxe/src/context/display/DisplayMemory.hx +280 -0
- package/haxe/src/context/display/DisplayPath.hx +243 -0
- package/haxe/src/context/display/DisplayTexpr.hx +214 -0
- package/haxe/src/context/display/DisplayToplevel.hx +650 -0
- package/haxe/src/context/display/DocumentSymbols.hx +196 -0
- package/haxe/src/context/display/ExprPreprocessing.hx +254 -0
- package/haxe/src/context/display/FindReferences.hx +197 -0
- package/haxe/src/context/display/ImportHandling.hx +344 -0
- package/haxe/src/context/display/Statistics.hx +381 -0
- package/haxe/src/context/display/SyntaxExplorer.hx +215 -0
- package/haxe/src/core/Abstract.hx +174 -0
- package/haxe/src/core/Ast.hx +1333 -0
- package/haxe/src/core/AstExprMapper.hx +213 -0
- package/haxe/src/core/AstPrinter.hx +198 -0
- package/haxe/src/core/ClassPath.hx +103 -0
- package/haxe/src/core/ClassPaths.hx +237 -0
- package/haxe/src/core/Define.hx +423 -0
- package/haxe/src/core/DefineRegistry.hx +369 -0
- package/haxe/src/core/DisplayTypes.hx +423 -0
- package/haxe/src/core/Error.hx +438 -0
- package/haxe/src/core/Globals.hx +230 -0
- package/haxe/src/core/InheritDoc.hx +195 -0
- package/haxe/src/core/Json.hx +326 -0
- package/haxe/src/core/Message.hx +177 -0
- package/haxe/src/core/Meta.hx +423 -0
- package/haxe/src/core/MetaList.hx +1237 -0
- package/haxe/src/core/Naming.hx +60 -0
- package/haxe/src/core/Native.hx +95 -0
- package/haxe/src/core/Numeric.hx +126 -0
- package/haxe/src/core/OcamlFilename.hx +129 -0
- package/haxe/src/core/Path.hx +485 -0
- package/haxe/src/core/Socket.hx +82 -0
- package/haxe/src/core/StringError.hx +94 -0
- package/haxe/src/core/StringHelper.hx +202 -0
- package/haxe/src/core/TFunctions.hx +1016 -0
- package/haxe/src/core/TOther.hx +414 -0
- package/haxe/src/core/TPrinting.hx +693 -0
- package/haxe/src/core/TType.hx +1012 -0
- package/haxe/src/core/TUnification.hx +1598 -0
- package/haxe/src/core/Texpr.hx +1596 -0
- package/haxe/src/core/Timer.hx +267 -0
- package/haxe/src/core/Type.hx +39 -0
- package/haxe/src/core/Warning.hx +65 -0
- package/haxe/src/core/WarningList.hx +268 -0
- package/haxe/src/core/WithType.hx +85 -0
- package/haxe/src/core/ZipInput.hx +237 -0
- package/haxe/src/core/ZipOutput.hx +93 -0
- package/haxe/src/core/data/DataReaderApi.hx +30 -0
- package/haxe/src/core/data/DataWriterApi.hx +24 -0
- package/haxe/src/core/data/JsonDataApi.hx +69 -0
- package/haxe/src/core/data/MetaDataApi.hx +75 -0
- package/haxe/src/core/display/CompletionItem.hx +984 -0
- package/haxe/src/core/display/DisplayPosition.hx +108 -0
- package/haxe/src/core/display/Javadoc.hx +141 -0
- package/haxe/src/core/ds/ArgumentError.hx +4 -0
- package/haxe/src/core/ds/ArrayTools.hx +54 -0
- package/haxe/src/core/ds/AtomicLazy.hx +81 -0
- package/haxe/src/core/ds/Cancelled.hx +6 -0
- package/haxe/src/core/ds/ExceptionTools.hx +20 -0
- package/haxe/src/core/ds/Exit.hx +17 -0
- package/haxe/src/core/ds/Failure.hx +4 -0
- package/haxe/src/core/ds/FastThrow.hx +11 -0
- package/haxe/src/core/ds/GcPolicy.hx +56 -0
- package/haxe/src/core/ds/GlobalsIntMap.hx +82 -0
- package/haxe/src/core/ds/Hashtbl.hx +162 -0
- package/haxe/src/core/ds/InvalidArgument.hx +6 -0
- package/haxe/src/core/ds/Key.hx +177 -0
- package/haxe/src/core/ds/List.hx +79 -0
- package/haxe/src/core/ds/MapEntry.hx +13 -0
- package/haxe/src/core/ds/NotFound.hx +22 -0
- package/haxe/src/core/ds/NowOrLater.hx +47 -0
- package/haxe/src/core/ds/OcamlFloat.hx +66 -0
- package/haxe/src/core/ds/OcamlHash.hx +112 -0
- package/haxe/src/core/ds/OcamlHashtbl.hx +219 -0
- package/haxe/src/core/ds/OcamlInt.hx +64 -0
- package/haxe/src/core/ds/OcamlInt32.hx +6 -0
- package/haxe/src/core/ds/OcamlInt64.hx +55 -0
- package/haxe/src/core/ds/OcamlPrintf.hx +148 -0
- package/haxe/src/core/ds/OcamlStr.hx +768 -0
- package/haxe/src/core/ds/PMap.hx +58 -0
- package/haxe/src/core/ds/PersistentMap.hx +70 -0
- package/haxe/src/core/ds/PriorityQueue.hx +66 -0
- package/haxe/src/core/ds/Record.hx +52 -0
- package/haxe/src/core/ds/Ring.hx +51 -0
- package/haxe/src/core/ds/ScopedIntMap.hx +53 -0
- package/haxe/src/core/ds/StrTools.hx +62 -0
- package/haxe/src/core/ds/Stream.hx +82 -0
- package/haxe/src/core/ds/StringDynArray.hx +33 -0
- package/haxe/src/core/ds/StringPool.hx +61 -0
- package/haxe/src/core/ds/TaskPool.hx +184 -0
- package/haxe/src/core/ds/ThreadSafeHashtbl.hx +79 -0
- package/haxe/src/core/json/Genjson.hx +718 -0
- package/haxe/src/core/json/JsonRpc.hx +113 -0
- package/haxe/src/core/json/JsonRpcSocket.hx +13 -0
- package/haxe/src/core/json/JsonrpcHandler.hx +104 -0
- package/haxe/src/coro/ContTypes.hx +57 -0
- package/haxe/src/coro/Coro.hx +576 -0
- package/haxe/src/coro/CoroConfig.hx +139 -0
- package/haxe/src/coro/CoroControl.hx +3 -0
- package/haxe/src/coro/CoroDebug.hx +125 -0
- package/haxe/src/coro/CoroElsewhere.hx +86 -0
- package/haxe/src/coro/CoroFromTexpr.hx +744 -0
- package/haxe/src/coro/CoroFunctions.hx +155 -0
- package/haxe/src/coro/CoroInit.hx +43 -0
- package/haxe/src/coro/CoroScopeConfig.hx +52 -0
- package/haxe/src/coro/CoroToTexpr.hx +487 -0
- package/haxe/src/coro/CoroTypes.hx +184 -0
- package/haxe/src/filters/ES6Ctors.hx +317 -0
- package/haxe/src/filters/FilterContext.hx +36 -0
- package/haxe/src/filters/Filters.hx +592 -0
- package/haxe/src/filters/FiltersCommon.hx +57 -0
- package/haxe/src/filters/LocalUsage.hx +109 -0
- package/haxe/src/filters/RenameVars.hx +471 -0
- package/haxe/src/filters/Tre.hx +230 -0
- package/haxe/src/filters/exception/ExceptionFunctions.hx +61 -0
- package/haxe/src/filters/exception/ExceptionInit.hx +81 -0
- package/haxe/src/filters/exception/Exceptions.hx +479 -0
- package/haxe/src/filters/exception/SaveStacks.hx +121 -0
- package/haxe/src/filters/safe/AddFieldInits.hx +89 -0
- package/haxe/src/filters/safe/AddFinalReturn.hx +44 -0
- package/haxe/src/filters/safe/CapturedVars.hx +262 -0
- package/haxe/src/filters/safe/CheckVarInit.hx +155 -0
- package/haxe/src/filters/safe/LocalStatic.hx +118 -0
- package/haxe/src/filters/safe/SafeFilters.hx +106 -0
- package/haxe/src/filters/safe/Sanitize.hx +189 -0
- package/haxe/src/generators/FlashProps.hx +81 -0
- package/haxe/src/generators/Gctx.hx +149 -0
- package/haxe/src/generators/Gencpp.hx +555 -0
- package/haxe/src/generators/Genhl.hx +4944 -0
- package/haxe/src/generators/Genhxold.hx +349 -0
- package/haxe/src/generators/Genjs.hx +2214 -0
- package/haxe/src/generators/Genjvm.hx +3841 -0
- package/haxe/src/generators/Genlua.hx +2585 -0
- package/haxe/src/generators/Genneko.hx +978 -0
- package/haxe/src/generators/Genphp7.hx +1327 -0
- package/haxe/src/generators/Genpy.hx +2722 -0
- package/haxe/src/generators/Genshared.hx +479 -0
- package/haxe/src/generators/Genswf.hx +985 -0
- package/haxe/src/generators/Genswf9.hx +3393 -0
- package/haxe/src/generators/Hl2c.hx +2628 -0
- package/haxe/src/generators/Hlcode.hx +1365 -0
- package/haxe/src/generators/Hlinterp.hx +4111 -0
- package/haxe/src/generators/Hlopt.hx +1366 -0
- package/haxe/src/generators/JsSourcemap.hx +167 -0
- package/haxe/src/generators/cpp/CppAst.hx +448 -0
- package/haxe/src/generators/cpp/CppAstTools.hx +766 -0
- package/haxe/src/generators/cpp/CppContext.hx +130 -0
- package/haxe/src/generators/cpp/CppError.hx +43 -0
- package/haxe/src/generators/cpp/CppMarshalling.hx +61 -0
- package/haxe/src/generators/cpp/CppRetyper.hx +2239 -0
- package/haxe/src/generators/cpp/CppSourceWriter.hx +196 -0
- package/haxe/src/generators/cpp/CppStrings.hx +178 -0
- package/haxe/src/generators/cpp/CppTypeUtils.hx +333 -0
- package/haxe/src/generators/cpp/filters/CppFilterAutoCast.hx +186 -0
- package/haxe/src/generators/cpp/filters/CppFilterValueType.hx +82 -0
- package/haxe/src/generators/cpp/gen/CppCppia.hx +1719 -0
- package/haxe/src/generators/cpp/gen/CppGen.hx +1884 -0
- package/haxe/src/generators/cpp/gen/CppGenClassHeader.hx +350 -0
- package/haxe/src/generators/cpp/gen/CppGenClassImplementation.hx +1067 -0
- package/haxe/src/generators/cpp/gen/CppGenEnum.hx +202 -0
- package/haxe/src/generators/cpp/gen/CppGenInterfaceHeader.hx +191 -0
- package/haxe/src/generators/cpp/gen/CppGenInterfaceImplementation.hx +300 -0
- package/haxe/src/generators/cpp/gen/CppReferences.hx +324 -0
- package/haxe/src/generators/genphp7/CodeWriter.hx +2022 -0
- package/haxe/src/generators/genphp7/TypeBuilders.hx +1097 -0
- package/haxe/src/generators/genphp7/TypeWrappers.hx +226 -0
- package/haxe/src/generators/jvm/JvmAttribute.hx +283 -0
- package/haxe/src/generators/jvm/JvmBuilder.hx +119 -0
- package/haxe/src/generators/jvm/JvmClass.hx +273 -0
- package/haxe/src/generators/jvm/JvmCode.hx +670 -0
- package/haxe/src/generators/jvm/JvmConstantPool.hx +262 -0
- package/haxe/src/generators/jvm/JvmData.hx +306 -0
- package/haxe/src/generators/jvm/JvmFunctions.hx +479 -0
- package/haxe/src/generators/jvm/JvmGlobals.hx +228 -0
- package/haxe/src/generators/jvm/JvmMethod.hx +1457 -0
- package/haxe/src/generators/jvm/JvmSignature.hx +458 -0
- package/haxe/src/generators/jvm/JvmVerificationTypeInfo.hx +77 -0
- package/haxe/src/generators/jvm/JvmWriter.hx +535 -0
- package/haxe/src/haxe/Main.hx +296 -0
- package/haxe/src/libs/extc/Extc.hx +274 -0
- package/haxe/src/libs/extc/Zlib.hx +2034 -0
- package/haxe/src/libs/extlib/IO.hx +458 -0
- package/haxe/src/libs/neko/Binast.hx +310 -0
- package/haxe/src/libs/neko/IO.hx +61 -0
- package/haxe/src/libs/neko/Nast.hx +241 -0
- package/haxe/src/libs/neko/Nbytecode.hx +426 -0
- package/haxe/src/libs/neko/Ncompile.hx +1169 -0
- package/haxe/src/libs/neko/Nxml.hx +191 -0
- package/haxe/src/libs/swflib/ActionScript.hx +703 -0
- package/haxe/src/libs/swflib/As3.hx +340 -0
- package/haxe/src/libs/swflib/As3code.hx +690 -0
- package/haxe/src/libs/swflib/As3hl.hx +290 -0
- package/haxe/src/libs/swflib/As3hlparse.hx +1071 -0
- package/haxe/src/libs/swflib/As3parse.hx +905 -0
- package/haxe/src/libs/swflib/Png.hx +358 -0
- package/haxe/src/libs/swflib/Swf.hx +648 -0
- package/haxe/src/libs/swflib/SwfParser.hx +2314 -0
- package/haxe/src/libs/ziplib/Zip.hx +305 -0
- package/haxe/src/macros/MacroApi.hx +3389 -0
- package/haxe/src/macros/eval/EvalArray.hx +345 -0
- package/haxe/src/macros/eval/EvalAtomic.hx +205 -0
- package/haxe/src/macros/eval/EvalBytesUnicase.hx +125 -0
- package/haxe/src/macros/eval/EvalContext.hx +791 -0
- package/haxe/src/macros/eval/EvalDataApi.hx +61 -0
- package/haxe/src/macros/eval/EvalDebug.hx +154 -0
- package/haxe/src/macros/eval/EvalDebugMisc.hx +503 -0
- package/haxe/src/macros/eval/EvalDebugSocket.hx +1025 -0
- package/haxe/src/macros/eval/EvalDecode.hx +218 -0
- package/haxe/src/macros/eval/EvalEmitter.hx +1226 -0
- package/haxe/src/macros/eval/EvalEncode.hx +323 -0
- package/haxe/src/macros/eval/EvalExceptions.hx +324 -0
- package/haxe/src/macros/eval/EvalField.hx +94 -0
- package/haxe/src/macros/eval/EvalHash.hx +279 -0
- package/haxe/src/macros/eval/EvalHostNet.hx +157 -0
- package/haxe/src/macros/eval/EvalIntegers.hx +546 -0
- package/haxe/src/macros/eval/EvalJit.hx +853 -0
- package/haxe/src/macros/eval/EvalJitContext.hx +208 -0
- package/haxe/src/macros/eval/EvalLock.hx +161 -0
- package/haxe/src/macros/eval/EvalLuv.hx +3648 -0
- package/haxe/src/macros/eval/EvalMain.hx +741 -0
- package/haxe/src/macros/eval/EvalMisc.hx +443 -0
- package/haxe/src/macros/eval/EvalPrinting.hx +214 -0
- package/haxe/src/macros/eval/EvalProcess.hx +116 -0
- package/haxe/src/macros/eval/EvalPrototype.hx +573 -0
- package/haxe/src/macros/eval/EvalSsl.hx +407 -0
- package/haxe/src/macros/eval/EvalStackTrace.hx +59 -0
- package/haxe/src/macros/eval/EvalStdLib.hx +826 -0
- package/haxe/src/macros/eval/EvalStdLibA.hx +2048 -0
- package/haxe/src/macros/eval/EvalStdLibB.hx +2323 -0
- package/haxe/src/macros/eval/EvalString.hx +236 -0
- package/haxe/src/macros/eval/EvalThread.hx +129 -0
- package/haxe/src/macros/eval/EvalTypes.hx +10 -0
- package/haxe/src/macros/eval/EvalValue.hx +599 -0
- package/haxe/src/optimization/Analyzer.hx +1111 -0
- package/haxe/src/optimization/AnalyzerConfig.hx +167 -0
- package/haxe/src/optimization/AnalyzerTexpr.hx +1329 -0
- package/haxe/src/optimization/AnalyzerTexprTransformer.hx +795 -0
- package/haxe/src/optimization/AnalyzerTypes.hx +727 -0
- package/haxe/src/optimization/Dce.hx +1024 -0
- package/haxe/src/optimization/Inline.hx +967 -0
- package/haxe/src/optimization/InlineConstructors.hx +883 -0
- package/haxe/src/optimization/Optimizer.hx +223 -0
- package/haxe/src/optimization/OptimizerTexpr.hx +239 -0
- package/haxe/src/syntax/Grammar.hx +3216 -0
- package/haxe/src/syntax/Lexer.hx +1405 -0
- package/haxe/src/syntax/Parser.hx +634 -0
- package/haxe/src/syntax/ParserConfig.hx +22 -0
- package/haxe/src/syntax/ParserEntry.hx +472 -0
- package/haxe/src/syntax/Reification.hx +447 -0
- package/haxe/src/syntax/SemVer.hx +142 -0
- package/haxe/src/typing/CallUnification.hx +773 -0
- package/haxe/src/typing/Calls.hx +543 -0
- package/haxe/src/typing/FieldAccess.hx +192 -0
- package/haxe/src/typing/FieldCallCandidate.hx +58 -0
- package/haxe/src/typing/Fields.hx +712 -0
- package/haxe/src/typing/Finalization.hx +242 -0
- package/haxe/src/typing/ForLoop.hx +596 -0
- package/haxe/src/typing/FunctionArguments.hx +237 -0
- package/haxe/src/typing/Generic.hx +570 -0
- package/haxe/src/typing/InstanceBuilder.hx +155 -0
- package/haxe/src/typing/MacroContext.hx +1397 -0
- package/haxe/src/typing/Matcher.hx +171 -0
- package/haxe/src/typing/NullSafety.hx +1881 -0
- package/haxe/src/typing/Operators.hx +876 -0
- package/haxe/src/typing/OverloadResolution.hx +211 -0
- package/haxe/src/typing/StrictMeta.hx +205 -0
- package/haxe/src/typing/TanonIdentification.hx +246 -0
- package/haxe/src/typing/Typeload.hx +1007 -0
- package/haxe/src/typing/TypeloadCacheHook.hx +44 -0
- package/haxe/src/typing/TypeloadCheck.hx +876 -0
- package/haxe/src/typing/TypeloadFields.hx +1943 -0
- package/haxe/src/typing/TypeloadFunction.hx +318 -0
- package/haxe/src/typing/TypeloadModule.hx +930 -0
- package/haxe/src/typing/TypeloadParse.hx +442 -0
- package/haxe/src/typing/Typer.hx +2002 -0
- package/haxe/src/typing/TyperBase.hx +398 -0
- package/haxe/src/typing/TyperDisplay.hx +901 -0
- package/haxe/src/typing/TyperDotPath.hx +153 -0
- package/haxe/src/typing/TyperEntry.hx +332 -0
- package/haxe/src/typing/UnifyMin.hx +149 -0
- package/haxe/src/typing/matcher/Bind.hx +26 -0
- package/haxe/src/typing/matcher/Case.hx +235 -0
- package/haxe/src/typing/matcher/Compile.hx +454 -0
- package/haxe/src/typing/matcher/Constructor.hx +96 -0
- package/haxe/src/typing/matcher/DecisionTree.hx +168 -0
- package/haxe/src/typing/matcher/ExprToPattern.hx +475 -0
- package/haxe/src/typing/matcher/MatcherGlobals.hx +36 -0
- package/haxe/src/typing/matcher/Pattern.hx +42 -0
- package/haxe/src/typing/matcher/Subject.hx +50 -0
- package/haxe/src/typing/matcher/TexprConverter.hx +396 -0
- package/haxe/src/typing/matcher/Useless.hx +224 -0
- package/hxmc/bootstrap/hxmc-rebuild +5 -0
- package/hxmc/bootstrap/rebuild.mjs +125 -0
- package/hxmc/src/hxmc/A64Reloc.hx +69 -0
- package/hxmc/src/hxmc/Abi.hx +127 -0
- package/hxmc/src/hxmc/Buf.hx +114 -0
- package/hxmc/src/hxmc/CoffReader.hx +363 -0
- package/hxmc/src/hxmc/DataGen.hx +457 -0
- package/hxmc/src/hxmc/Driver.hx +485 -0
- package/hxmc/src/hxmc/ElfReader.hx +187 -0
- package/hxmc/src/hxmc/ElfWriter.hx +193 -0
- package/hxmc/src/hxmc/Fingerprint.hx +379 -0
- package/hxmc/src/hxmc/HaxeMain.hx +109 -0
- package/hxmc/src/hxmc/Inline.hx +317 -0
- package/hxmc/src/hxmc/Link.hx +400 -0
- package/hxmc/src/hxmc/LinkInputs.hx +109 -0
- package/hxmc/src/hxmc/LinkMachO.hx +768 -0
- package/hxmc/src/hxmc/LinkPE.hx +471 -0
- package/hxmc/src/hxmc/Lir.hx +166 -0
- package/hxmc/src/hxmc/LowerCache.hx +867 -0
- package/hxmc/src/hxmc/MachOReader.hx +282 -0
- package/hxmc/src/hxmc/Main.hx +130 -0
- package/hxmc/src/hxmc/Mir.hx +238 -0
- package/hxmc/src/hxmc/MirBuild.hx +2522 -0
- package/hxmc/src/hxmc/MkRt.hx +297 -0
- package/hxmc/src/hxmc/MkStd.hx +65 -0
- package/hxmc/src/hxmc/Obj.hx +161 -0
- package/hxmc/src/hxmc/Opt.hx +1126 -0
- package/hxmc/src/hxmc/Options.hx +73 -0
- package/hxmc/src/hxmc/Prep.hx +89 -0
- package/hxmc/src/hxmc/Regalloc.hx +1079 -0
- package/hxmc/src/hxmc/Roots.hx +542 -0
- package/hxmc/src/hxmc/Target.hx +31 -0
- package/hxmc/src/hxmc/TypesCache.hx +331 -0
- package/hxmc/src/hxmc/UpToDate.hx +114 -0
- package/hxmc/src/hxmc/a64/Asm.hx +490 -0
- package/hxmc/src/hxmc/a64/Emit.hx +373 -0
- package/hxmc/src/hxmc/a64/Isel.hx +1079 -0
- package/hxmc/src/hxmc/ir/CInterop.hx +308 -0
- package/hxmc/src/hxmc/ir/Facts.hx +661 -0
- package/hxmc/src/hxmc/ir/FnLower.hx +1851 -0
- package/hxmc/src/hxmc/ir/Ir.hx +389 -0
- package/hxmc/src/hxmc/ir/Lower.hx +933 -0
- package/hxmc/src/hxmc/wasm/Enc.hx +228 -0
- package/hxmc/src/hxmc/wasm/LinkWasm.hx +690 -0
- package/hxmc/src/hxmc/wasm/WasmEmitter.hx +60 -0
- package/hxmc/src/hxmc/wasm/WasmGen.hx +1412 -0
- package/hxmc/src/hxmc/x64/Asm.hx +776 -0
- package/hxmc/src/hxmc/x64/Emit.hx +407 -0
- package/hxmc/src/hxmc/x64/Isel.hx +1324 -0
- package/hxmc/std/EReg.hx +178 -0
- package/hxmc/std/LICENSE +22 -0
- package/hxmc/std/Math.hx +311 -0
- package/hxmc/std/Reflect.hx +205 -0
- package/hxmc/std/Std.hx +140 -0
- package/hxmc/std/StringBuf.hx +13 -0
- package/hxmc/std/StringTools.hx +664 -0
- package/hxmc/std/Sys.hx +230 -0
- package/hxmc/std/Type.hx +326 -0
- package/hxmc/std/haxe/Exception.hx +59 -0
- package/hxmc/std/haxe/Int64.hx +262 -0
- package/hxmc/std/haxe/NativeStackTrace.hx +20 -0
- package/hxmc/std/haxe/atomic/AtomicInt.hx +125 -0
- package/hxmc/std/haxe/atomic/AtomicObject.hx +89 -0
- package/hxmc/std/haxe/ds/IntMap.hx +234 -0
- package/hxmc/std/haxe/ds/ObjectMap.hx +236 -0
- package/hxmc/std/haxe/ds/StringMap.hx +233 -0
- package/hxmc/std/haxe/io/Bytes.hx +44 -0
- package/hxmc/std/haxe/io/BytesBuffer.hx +22 -0
- package/hxmc/std/haxe/io/BytesData.hx +19 -0
- package/hxmc/std/haxe/io/FPHelper.hx +14 -0
- package/hxmc/std/hxmc/I64.hx +67 -0
- package/hxmc/std/hxmc/Native.hx +6 -0
- package/hxmc/std/hxmc/NativeGc.hx +9 -0
- package/hxmc/std/hxmc/NativeNet.hx +95 -0
- package/hxmc/std/hxmc/NativeSsl.hx +9 -0
- package/hxmc/std/hxmc/NativeSys.hx +157 -0
- package/hxmc/std/hxmc/NativeThread.hx +10 -0
- package/hxmc/std/hxmc/NativeUv.hx +12 -0
- package/hxmc/std/hxmc/NativeZip.hx +322 -0
- package/hxmc/std/hxmc/Regex.hx +632 -0
- package/hxmc/std/hxmc/RegexUnicode.hx +44 -0
- package/hxmc/std/hxmc/rt/Arr.hx +351 -0
- package/hxmc/std/hxmc/rt/Boxes.hx +328 -0
- package/hxmc/std/hxmc/rt/Bytes.hx +262 -0
- package/hxmc/std/hxmc/rt/C.hx +41 -0
- package/hxmc/std/hxmc/rt/Census.hx +534 -0
- package/hxmc/std/hxmc/rt/Date.hx +201 -0
- package/hxmc/std/hxmc/rt/Dyn.hx +1068 -0
- package/hxmc/std/hxmc/rt/FloatText.hx +715 -0
- package/hxmc/std/hxmc/rt/Gc.hx +1236 -0
- package/hxmc/std/hxmc/rt/GcPaths.hx +24 -0
- package/hxmc/std/hxmc/rt/Layouts.hx +213 -0
- package/hxmc/std/hxmc/rt/LibM.hx +1138 -0
- package/hxmc/std/hxmc/rt/MemOps.hx +24 -0
- package/hxmc/std/hxmc/rt/Modules.hx +39 -0
- package/hxmc/std/hxmc/rt/Names.hx +288 -0
- package/hxmc/std/hxmc/rt/Os.hx +411 -0
- package/hxmc/std/hxmc/rt/PosixNet.hx +438 -0
- package/hxmc/std/hxmc/rt/PosixSys.hx +574 -0
- package/hxmc/std/hxmc/rt/Runtime.hx +41 -0
- package/hxmc/std/hxmc/rt/Ssl.hx +595 -0
- package/hxmc/std/hxmc/rt/Start.hx +138 -0
- package/hxmc/std/hxmc/rt/Str.hx +584 -0
- package/hxmc/std/hxmc/rt/ThreadApi.hx +290 -0
- package/hxmc/std/hxmc/rt/Threads.hx +550 -0
- package/hxmc/std/hxmc/rt/Types.hx +139 -0
- package/hxmc/std/hxmc/rt/Uv.hx +1777 -0
- package/hxmc/std/hxmc/rt/UvLayouts.hx +233 -0
- package/hxmc/std/hxmc/rt/WasiNet.hx +76 -0
- package/hxmc/std/hxmc/rt/WasiSys.hx +457 -0
- package/hxmc/std/hxmc/rt/WinNet.hx +451 -0
- package/hxmc/std/hxmc/rt/WinRt.hx +252 -0
- package/hxmc/std/hxmc/rt/WinSys.hx +836 -0
- package/hxmc/std/hxmc/rt/wasm/Exit.hx +26 -0
- package/hxmc/std/hxmc/rt/wasm/Gc.hx +691 -0
- package/hxmc/std/hxmc/rt/wasm/Heap.hx +280 -0
- package/hxmc/std/hxmc/rt/wasm/Libc.hx +124 -0
- package/hxmc/std/hxmc/rt/wasm/NoSsl.hx +47 -0
- package/hxmc/std/hxmc/rt/wasm/NoUv.hx +152 -0
- package/hxmc/std/hxmc/rt/wasm/Threads.hx +116 -0
- package/hxmc/std/hxmc/rt/wasm/Wasi.hx +395 -0
- package/hxmc/std/hxmc/rt/wasm/WasiApi.hx +33 -0
- package/hxmc/std/hxmc/rt/wasm/Wasm.hx +15 -0
- package/hxmc/std/hxmc/unsafe/Arena.hx +131 -0
- package/hxmc/std/hxmc/unsafe/Atomic.hx +21 -0
- package/hxmc/std/hxmc/unsafe/CString.hx +20 -0
- package/hxmc/std/hxmc/unsafe/Callback.hx +21 -0
- package/hxmc/std/hxmc/unsafe/Float32.hx +6 -0
- package/hxmc/std/hxmc/unsafe/Int16.hx +89 -0
- package/hxmc/std/hxmc/unsafe/Int32.hx +4 -0
- package/hxmc/std/hxmc/unsafe/Int64.hx +5 -0
- package/hxmc/std/hxmc/unsafe/Int8.hx +89 -0
- package/hxmc/std/hxmc/unsafe/LibC.hx +32 -0
- package/hxmc/std/hxmc/unsafe/Mem.hx +101 -0
- package/hxmc/std/hxmc/unsafe/Posix.hx +83 -0
- package/hxmc/std/hxmc/unsafe/Ptr.hx +85 -0
- package/hxmc/std/hxmc/unsafe/Struct.hx +12 -0
- package/hxmc/std/hxmc/unsafe/UInt16.hx +89 -0
- package/hxmc/std/hxmc/unsafe/UInt32.hx +4 -0
- package/hxmc/std/hxmc/unsafe/UInt64.hx +27 -0
- package/hxmc/std/hxmc/unsafe/UInt8.hx +89 -0
- package/hxmc/std/hxmc/unsafe/Win32.hx +63 -0
- package/hxmc/std/hxmc/unsafe/Winsock.hx +34 -0
- package/hxmc/std/sys/FileSystem.hx +128 -0
- package/hxmc/std/sys/io/File.hx +132 -0
- package/hxmc/std/sys/io/FileInput.hx +54 -0
- package/hxmc/std/sys/io/FileOutput.hx +43 -0
- package/hxmc/std/sys/io/Process.hx +84 -0
- package/hxmc/std/sys/net/Host.hx +34 -0
- package/hxmc/std/sys/net/Socket.hx +183 -0
- package/hxmc/std/sys/ssl/Certificate.hx +92 -0
- package/hxmc/std/sys/ssl/Key.hx +49 -0
- package/hxmc/std/sys/ssl/Mbedtls.hx +61 -0
- package/hxmc/std/sys/ssl/Socket.hx +218 -0
- package/hxmc/std/sys/thread/Condition.hx +109 -0
- package/hxmc/std/sys/thread/Deque.hx +68 -0
- package/hxmc/std/sys/thread/Lock.hx +65 -0
- package/hxmc/std/sys/thread/Mutex.hx +50 -0
- package/hxmc/std/sys/thread/Semaphore.hx +45 -0
- package/hxmc/std/sys/thread/Thread.hx +304 -0
- package/hxmc/std/sys/thread/ThreadCallback.hx +196 -0
- package/hxmc/std/sys/thread/ThreadImpl.hx +22 -0
- package/hxmc/std/sys/thread/Tls.hx +33 -0
- package/package.json +26 -4
- package/README.md +0 -3
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
package typing;
|
|
2
|
+
|
|
3
|
+
import core.TType;
|
|
4
|
+
import core.Globals.Pos;
|
|
5
|
+
import core.TFunctions.*;
|
|
6
|
+
import core.TOther.*;
|
|
7
|
+
import core.TOther;
|
|
8
|
+
import core.TOther.TClassTools;
|
|
9
|
+
import core.Abstract;
|
|
10
|
+
import core.Texpr.Builder;
|
|
11
|
+
import core.Error.*;
|
|
12
|
+
import core.Error;
|
|
13
|
+
import context.Typecore;
|
|
14
|
+
import context.Typecore.FieldHost as FieldAccessHost;
|
|
15
|
+
import context.Typecore.FieldAccess as FieldAccessData;
|
|
16
|
+
import core.ds.NotFound;
|
|
17
|
+
|
|
18
|
+
enum FieldHost {
|
|
19
|
+
// Get the plain expression with applied field type parameters.
|
|
20
|
+
FGet;
|
|
21
|
+
// Does not apply field type parameters.
|
|
22
|
+
FCall;
|
|
23
|
+
// Actual reading, for FClosure and such.
|
|
24
|
+
FRead;
|
|
25
|
+
// Used as lhs, no semantic difference to FGet.
|
|
26
|
+
FWrite;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
enum AccessorResolution<A> {
|
|
30
|
+
// Accessor was found.
|
|
31
|
+
AccessorFound(value:A);
|
|
32
|
+
// Accessor was not found, but access was made on anonymous structure.
|
|
33
|
+
AccessorAnon;
|
|
34
|
+
// Accessor was not found.
|
|
35
|
+
AccessorNotFound;
|
|
36
|
+
// Accessor resolution was attempted on a non-property.
|
|
37
|
+
AccessorInvalid;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
class FieldAccess {
|
|
41
|
+
public static function create(e:TExpr, cf:TClassField, fh:FieldAccessHost, doInline:Bool, p:Pos, ?fieldPos:Pos):FieldAccessData {
|
|
42
|
+
return {
|
|
43
|
+
faOn: e,
|
|
44
|
+
faField: cf,
|
|
45
|
+
faHost: fh,
|
|
46
|
+
faInline: doInline,
|
|
47
|
+
faPos: p,
|
|
48
|
+
faFieldPos: fieldPos
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Creates the `tfield_access` corresponding to this field access, using the provided field.
|
|
53
|
+
public static function applyFa(cf:TClassField, host:FieldAccessHost):TFieldAccess return switch host {
|
|
54
|
+
case FHStatic(c): FStatic(c, cf);
|
|
55
|
+
case FHInstance(c, tl): FInstance(c, tl, cf);
|
|
56
|
+
case FHAbstract(a, tl, c): FStatic(c, cf);
|
|
57
|
+
case FHAnon: FAnon(cf);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
public static function getHost(c:TClass, cf:TClassField):FieldAccessHost {
|
|
61
|
+
if (hasClassFieldFlag(cf, CfStatic)) return FHStatic(c);
|
|
62
|
+
return switch c.clKind {
|
|
63
|
+
case KAbstractImpl(a): FHAbstract(a, extractParamTypes(a.aParams), c);
|
|
64
|
+
case _: FHInstance(c, extractParamTypes(c.clParams));
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public static function getHostClassRaise(host:FieldAccessHost):TClass return switch host {
|
|
69
|
+
case FHStatic(c) | FHInstance(c, _) | FHAbstract(_, _, c): c;
|
|
70
|
+
case FHAnon: throw NotFound.raise();
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// Returns the mapping function to apply type parameters.
|
|
74
|
+
public static function getMapFunction(fa:FieldAccessData):T->T return switch fa.faHost {
|
|
75
|
+
case FHStatic(_) | FHAnon: function(t) return t;
|
|
76
|
+
case FHInstance(c, tl): TClassTools.getMapFunction(c, tl);
|
|
77
|
+
case FHAbstract(a, tl, _): function(t) return applyParams(a.aParams, tl, t);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// Converts the field access to a `TField` node, using the provided `mode`.
|
|
81
|
+
public static function getFieldExpr(fa:FieldAccessData, mode:FieldHost):TExpr {
|
|
82
|
+
var cf = fa.faField;
|
|
83
|
+
var t = mode == FCall ? cf.cfType : fieldType(cf);
|
|
84
|
+
var access:TFieldAccess = switch fa.faHost {
|
|
85
|
+
case FHStatic(c): FStatic(c, cf);
|
|
86
|
+
case FHInstance(c, tl):
|
|
87
|
+
t = TClassTools.getMapFunction(c, tl)(t);
|
|
88
|
+
switch cf.cfKind {
|
|
89
|
+
case Method(_) if (mode == FRead): FClosure({cls: c, params: tl}, cf);
|
|
90
|
+
case _: FInstance(c, tl, cf);
|
|
91
|
+
}
|
|
92
|
+
case FHAbstract(a, tl, c):
|
|
93
|
+
t = applyParams(a.aParams, tl, t);
|
|
94
|
+
FStatic(c, cf);
|
|
95
|
+
case FHAnon:
|
|
96
|
+
switch cf.cfKind {
|
|
97
|
+
case Method(_) if (mode == FRead): FClosure(null, cf);
|
|
98
|
+
case _: FAnon(cf);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
return mk(TField(fa.faOn, access), t, fa.faPos);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public static function findAccessorForField(host:FieldAccessHost, cf:TClassField, t:T,
|
|
105
|
+
mode:AccessMode):AccessorResolution<{field:TClassField, host:FieldAccessHost}> {
|
|
106
|
+
return switch cf.cfKind {
|
|
107
|
+
case Var(v):
|
|
108
|
+
var writing = switch mode {
|
|
109
|
+
case MSet(_): true;
|
|
110
|
+
case _: false;
|
|
111
|
+
};
|
|
112
|
+
switch (writing ? v.vWrite : v.vRead) {
|
|
113
|
+
case AccCall | AccPrivateCall:
|
|
114
|
+
var name = (writing ? "set_" : "get_") + cf.cfName;
|
|
115
|
+
switch host {
|
|
116
|
+
case FHStatic(c):
|
|
117
|
+
var accessor = c.clStatics.get(name);
|
|
118
|
+
// TODO: Check if this is correct, there's a case in hxcpp's VirtualArray
|
|
119
|
+
accessor == null ? AccessorAnon : AccessorFound({field: accessor, host: host});
|
|
120
|
+
case FHInstance(c, tl):
|
|
121
|
+
try {
|
|
122
|
+
// Accessors can be overridden, so we have to check the actual type.
|
|
123
|
+
var actual = switch follow(t) {
|
|
124
|
+
case TInst(c, tl): {cls: c, params: tl};
|
|
125
|
+
case _: {cls: c, params: tl};
|
|
126
|
+
};
|
|
127
|
+
var found = rawClassField(function(f) return f.cfType, actual.cls, actual.params, name);
|
|
128
|
+
var newHost = found.owner == null ? FHAnon : FHInstance(found.owner.cls, found.owner.params);
|
|
129
|
+
AccessorFound({field: found.field, host: newHost});
|
|
130
|
+
} catch (error:NotFound) {
|
|
131
|
+
hasClassFlag(c, CExtern) ? AccessorAnon : AccessorNotFound;
|
|
132
|
+
}
|
|
133
|
+
case FHAbstract(a, tl, c):
|
|
134
|
+
var accessor = c.clStatics.get(name);
|
|
135
|
+
accessor == null ? AccessorAnon : AccessorFound({field: accessor, host: host});
|
|
136
|
+
case FHAnon: AccessorAnon;
|
|
137
|
+
}
|
|
138
|
+
case _: AccessorInvalid;
|
|
139
|
+
}
|
|
140
|
+
case _: AccessorInvalid;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Resolves the accessor on the field access, using the provided `mode`.
|
|
145
|
+
public static function resolveAccessor(fa:FieldAccessData, mode:AccessMode):AccessorResolution<FieldAccessData> {
|
|
146
|
+
return switch findAccessorForField(fa.faHost, fa.faField, fa.faOn.etype, mode) {
|
|
147
|
+
case AccessorFound(found): AccessorFound(create(fa.faOn, found.field, found.host, fa.faInline, fa.faPos, fa.faFieldPos));
|
|
148
|
+
case AccessorInvalid: AccessorInvalid;
|
|
149
|
+
case AccessorAnon: AccessorAnon;
|
|
150
|
+
case AccessorNotFound: AccessorNotFound;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
public static function getConstructorAccess(c:TClass, tl:TParams, p:Pos):FieldAccessData {
|
|
155
|
+
try {
|
|
156
|
+
var eStatic = Builder.makeStaticThis(c, p);
|
|
157
|
+
var actual = switch c.clKind {
|
|
158
|
+
case KAbstractImpl(a): switch Abstract.followWithForwardCtor(TAbstract(a, tl)) {
|
|
159
|
+
case TInst(c, tl): {cls: c, params: tl};
|
|
160
|
+
case TAbstract(a, tl) if (a.aImpl != null): {cls: a.aImpl, params: tl};
|
|
161
|
+
case _: {cls: c, params: tl};
|
|
162
|
+
}
|
|
163
|
+
case _: {cls: c, params: tl};
|
|
164
|
+
};
|
|
165
|
+
var host:FieldAccessHost;
|
|
166
|
+
var cf = switch actual.cls.clKind {
|
|
167
|
+
case KAbstractImpl(a):
|
|
168
|
+
if (a.aConstructor == null) throw NotFound.raise();
|
|
169
|
+
host = FHAbstract(a, actual.params, actual.cls);
|
|
170
|
+
a.aConstructor;
|
|
171
|
+
case _:
|
|
172
|
+
host = FHInstance(actual.cls, actual.params);
|
|
173
|
+
getConstructor(actual.cls);
|
|
174
|
+
};
|
|
175
|
+
return create(eStatic, cf, host, false, p);
|
|
176
|
+
} catch (error:NotFound) {
|
|
177
|
+
return raiseTypingErrorExt(makeError(NoConstructor(switch c.clKind {
|
|
178
|
+
case KAbstractImpl(a): TAbstractDecl(a);
|
|
179
|
+
case _: TClassDecl(c);
|
|
180
|
+
}), p));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
public static function makeStaticExtensionAccess(c:TClass, cf:TClassField, eThis:TExpr, doInline:Bool, p:Pos):StaticExtensionAccess {
|
|
185
|
+
return {seThis: eThis, seAccess: create(Builder.makeStaticThis(c, p), cf, FHStatic(c), doInline, p)};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
public static function makeAbstractStaticExtensionAccess(a:TAbstract, tl:TParams, c:TClass, cf:TClassField, eThis:TExpr,
|
|
189
|
+
doInline:Bool, p:Pos):StaticExtensionAccess {
|
|
190
|
+
return {seThis: eThis, seAccess: create(Builder.makeStaticThis(c, p), cf, FHAbstract(a, tl, c), doInline, p)};
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
package typing;
|
|
2
|
+
|
|
3
|
+
import core.TType;
|
|
4
|
+
import core.TPrinting;
|
|
5
|
+
|
|
6
|
+
// This record holds transient information about an (attempted) call on a field. It is created when resolving
|
|
7
|
+
// field calls and is passed to overload filters.
|
|
8
|
+
@:structInit class FieldCallCandidateData<A> {
|
|
9
|
+
// The argument expressions for this call and whether or not the argument is optional on the
|
|
10
|
+
// target function.
|
|
11
|
+
public var fcArgs:Array<TExpr>;
|
|
12
|
+
// The applied return type.
|
|
13
|
+
public var fcRet:T;
|
|
14
|
+
// The applied function type.
|
|
15
|
+
public var fcType:T;
|
|
16
|
+
// The class field being called.
|
|
17
|
+
public var fcField:TClassField;
|
|
18
|
+
// The field monomorphs that were created for this call.
|
|
19
|
+
public var fcMonos:Array<T>;
|
|
20
|
+
// The custom data associated with this call.
|
|
21
|
+
public var fcData:A;
|
|
22
|
+
|
|
23
|
+
public inline function new(fcArgs:Array<TExpr>, fcRet:T, fcType:T, fcField:TClassField, fcMonos:Array<T>, fcData:A) {
|
|
24
|
+
this.fcArgs = fcArgs;
|
|
25
|
+
this.fcRet = fcRet;
|
|
26
|
+
this.fcType = fcType;
|
|
27
|
+
this.fcField = fcField;
|
|
28
|
+
this.fcMonos = fcMonos;
|
|
29
|
+
this.fcData = fcData;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public inline function clone():FieldCallCandidateData<A> return new FieldCallCandidateData(fcArgs, fcRet, fcType, fcField, fcMonos,
|
|
33
|
+
fcData);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
class FieldCallCandidate {
|
|
37
|
+
public static function makeFieldCallCandidate<A>(args:Array<TExpr>, ret:T, monos:Array<T>, t:T, cf:TClassField,
|
|
38
|
+
data:A):FieldCallCandidateData<A> {
|
|
39
|
+
return {
|
|
40
|
+
fcArgs: args,
|
|
41
|
+
fcType: t,
|
|
42
|
+
fcField: cf,
|
|
43
|
+
fcData: data,
|
|
44
|
+
fcRet: ret,
|
|
45
|
+
fcMonos: monos
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public static function sFieldCallCandidate<A>(fcc:FieldCallCandidateData<A>):String {
|
|
50
|
+
var pctx = TPrinting.printContext();
|
|
51
|
+
var se = function(e) return TPrinting.sExprPretty(false, "", false, function(t) return TPrinting.sType(pctx, t), e);
|
|
52
|
+
return Printer.sRecordFields("", [
|
|
53
|
+
{name: "fc_args", value: fcc.fcArgs.map(se).join(", ")},
|
|
54
|
+
{name: "fc_type", value: TPrinting.sType(pctx, fcc.fcType)},
|
|
55
|
+
{name: "fc_field", value: fcc.fcField.cfName + ": " + TPrinting.sType(pctx, fcc.fcField.cfType)}
|
|
56
|
+
]);
|
|
57
|
+
}
|
|
58
|
+
}
|