diff --git a/.travis/run.sh b/.travis/run.sh index 1d662b0e..a89b23d2 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -27,5 +27,4 @@ echo "---------- Testing ----------" cd ../tests python test.py StdLib/RangesTest.spr --returnError -python test.py ../tools/formatTool.spr --returnError python test.py --returnError diff --git a/CMakeLists.txt b/CMakeLists.txt index 8415948a..2d8216f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,8 @@ option(BOOTSTRAP_SPARROW "Use system-wide SparrowCompiler to compile Sparrow fil message(STATUS "BOOTSTRAP_SPARROW: ${BOOTSTRAP_SPARROW}") option(SPARROW_PROFILING "Enable Tracy integration into Sparrow compiler" OFF) message(STATUS "SPARROW_PROFILING: ${SPARROW_PROFILING}") +option(ENABLE_TIDY "Enable clang-tidy checks when building" OFF) +message(STATUS "ENABLE_TIDY: ${ENABLE_TIDY}") # Where to output the results of the compilation set(OutDir ${CMAKE_CURRENT_SOURCE_DIR}/build/bin) @@ -121,39 +123,39 @@ endif() # Add target for clang-tidy set(TIDY_CHECKS - #-*, # Disable for non-debug builds + -*, # Disable for non-debug builds modernize-*, + bugprone-*, cppcoreguidelines-*, + -cppcoreguidelines-owning-memory, # not met, requires gsl -cppcoreguidelines-pro-bounds-array-to-pointer-decay, # not met, requires gsl -cppcoreguidelines-pro-bounds-constant-array-index, # not met, requires gsl -cppcoreguidelines-pro-bounds-pointer-arithmetic, # not met, requires gsl -cppcoreguidelines-pro-type-union-access, # not met (we use some unions) -cppcoreguidelines-pro-type-vararg, # not met (we are using printf) ) +string (REPLACE ";" " " TIDY_CHECKS "${TIDY_CHECKS}") -find_program(CLANG_TIDY_SCRIPT "run-clang-tidy.py" HINTS ${LLVM_TOOLS_BINARY_DIR}/../share/clang) -if(CLANG_TIDY_SCRIPT) +if(ENABLE_TIDY) # Search for clang-tidy and clang-apply-replacements find_program(CLANG_TIDY "clang-tidy" HINTS ${LLVM_TOOLS_BINARY_DIR}) - find_program(CLANG_APPLY_REPLACEMENTS "clang-apply-replacements" HINTS ${LLVM_TOOLS_BINARY_DIR}) + + message(STATUS "Tidy checks: ${TIDY_CHECKS}") + + set(TIDY_HEADER_FILTER ${CMAKE_SOURCE_DIR}/*) # Set extra arguments - set(TIDY_FIX 0) - set(TIDY_EXTRA_ARGS -quiet -format -style file) + set(TIDY_FIX 1) + set(TIDY_EXTRA_ARGS -quiet;-format-style=file) if (TIDY_FIX) - set(TIDY_EXTRA_ARGS ${TIDY_EXTRA_ARGS} -j 1 -fix) + set(TIDY_EXTRA_ARGS ${TIDY_EXTRA_ARGS};-fix) endif() - # Actually add the target - add_custom_target( - clang-tidy - COMMAND - ${CLANG_TIDY_SCRIPT} -header-filter='\.\.\/src\/.*\.hpp' -checks='${TIDY_CHECKS}' - -clang-tidy-binary ${CLANG_TIDY} - -clang-apply-replacements-binary ${CLANG_APPLY_REPLACEMENTS} - ${TIDY_EXTRA_ARGS} - ) + set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY};-checks=\"${TIDY_CHECKS}\";-header-filter='${TIDY_HEADER_FILTER}';${TIDY_EXTRA_ARGS}" + CACHE STRING "" FORCE) +else() + set(CMAKE_CXX_CLANG_TIDY "") endif() # Ensure generation of compile_commands.json; needed for clang-tidy diff --git a/SparrowImplicitLib/assert.spr b/SparrowImplicitLib/assert.spr index 2868b1a7..2bb33d96 100644 --- a/SparrowImplicitLib/assert.spr +++ b/SparrowImplicitLib/assert.spr @@ -39,9 +39,9 @@ import std.vector, std.algorithms, std.string /// Macro that creates the expansion of the assert/verify fun _assertMacroBody(cond, message: AstNode): AstNode // Extract information about the assert condition - var loc = cond location - var filename = loc.sourceCode filename - var lineNum: Int = loc.start.line + let loc = cond location + let filename = loc.sourceCode filename + let lineNum: Int = loc.start.line // Extract the list of variables directly appearing the the expression var varsList: Vector(AstNode) @@ -60,38 +60,38 @@ import std.vector, std.algorithms, std.string // Build the annotated expression string // Walk over the list of variables, and if possible add the var value // Print all the expression string in between - var expr: String = loc getCorrespondingCode + let expr: String = loc getCorrespondingCode var lastIdx = 0 for i = 0..varsList.size - var v = varsList(i) - var vl = v location + let v = varsList(i) + let vl = v location if vl.end.line != loc.start.line break // Stop expanding variables when we are going on another line - var endPos = vl.end.col - loc.start.col + let endPos = vl.end.col - loc.start.col if endPos != lastIdx // Print the expression sting up until (and containing) the var - var exprPart = expr.subrange(lastIdx, endPos-lastIdx) + let exprPart = expr.subrange(lastIdx, endPos-lastIdx) _addPrint(loc, prints, mkStringLiteral(loc, exprPart)) // Add a block for printing the value of the write // Ensure that this is printable var argsToEval = mkNodeList(loc) addToNodeList(argsToEval, mkInfixOp(loc, "<<", mkIdentifier(loc, "cout"), v clone)) - var cond = mkFunApplication(loc, mkIdentifier(loc, "isValid"), argsToEval) + let cond = mkFunApplication(loc, mkIdentifier(loc, "isValid"), argsToEval) // if body var varPrints: AstNode Vector _addPrint(loc, varPrints, mkStringLiteral(loc, "[=")) _addPrint(loc, varPrints, v clone) _addPrint(loc, varPrints, mkStringLiteral(loc, "]")) - var varPrintsBlock = mkLocalSpace(loc, varPrints.all) + let varPrintsBlock = mkLocalSpace(loc, varPrints.all) // if statement prints += mkIf(loc, cond, varPrintsBlock, AstNode(), true) lastIdx = Int(endPos) // Write the last part of the expression (if any) - var sz = expr size + let sz = expr size if lastIdx < sz - var exprPart = expr.subrange(lastIdx, sz-lastIdx) + let exprPart = expr.subrange(lastIdx, sz-lastIdx) _addPrint(loc, prints, mkStringLiteral(loc, exprPart)) // Now, the last part of the printing @@ -101,22 +101,23 @@ import std.vector, std.algorithms, std.string _addPrint(loc, prints, message) _addPrint(loc, prints, mkStringLiteral(loc, "\n")) - var printsBlock = mkLocalSpace(loc, prints.all) + let printsBlock = mkLocalSpace(loc, prints.all) // Build the resulting code: // if !cond - var res = mkIf(loc, mkPrefixOp(loc, "!", mkParenthesisExp(loc, cond)), printsBlock, AstNode()) + let res = mkIf(loc, mkPrefixOp(loc, "!", mkParenthesisExp(loc, cond)), printsBlock, AstNode()) return res /// Adds a print statement node to the destination vector - fun _addPrint(loc: Location, dest: @Vector(AstNode), toPrint: AstNode) + fun _addPrint(loc: Location, dest: !Vector(AstNode), toPrint: AstNode) dest += mkInfixOp(loc, "<<", mkIdentifier(loc, "cout"), toPrint) /// Extract all the variables from the given node - fun _extractVars(node: AstNode, varsList: @Vector(AstNode)) - var nk = node nodeKind + fun _extractVars(node: AstNode, varsList: !Vector(AstNode)) + let nk = node nodeKind if nk == nkSparrowExpIdentifier - var exp = node explanation + node semanticCheck + let exp = node explanation if (exp isSet) && (exp nodeKind) == nkFeatherExpVarRef varsList += node else diff --git a/SparrowImplicitLib/check.spr b/SparrowImplicitLib/check.spr index e7786a8d..b523408d 100644 --- a/SparrowImplicitLib/check.spr +++ b/SparrowImplicitLib/check.spr @@ -10,13 +10,15 @@ datatype Gen(t: Type) using ValueType = t _generator: Function(t, UInt) -fun mkGen(t: Type, generator: @AnyType): Gen(t) if isValid(generator(UInt(0))) +concept _Generator(x) if isValid(x(UInt(0))) + +fun mkGen(t: Type, generator: _Generator): Gen(t) using FunType = Function(t, UInt) return Gen(t)(FunType(generator)) -fun ()(this: @Gen, sizeHint: UInt): ValueType = _generator(sizeHint) +fun ()(this: !Gen, sizeHint: UInt): ValueType = _generator(sizeHint) -fun isValid(this: @Gen): Bool = _generator isSet +fun isValid(this: Gen): Bool = _generator isSet concept GenType(x) \ if typeOf(x.ValueType) == Type \ @@ -35,7 +37,7 @@ fun arbitrary(t: Type): t Gen if Integer(#$t) datatype CheckConfig numTests, maxAttempts: UInt isVerbose: Bool -fun ctor(this: @CheckConfig) +fun ctor(this: !CheckConfig) numTests = 100 maxAttempts = 5*numTests isVerbose = false @@ -50,7 +52,7 @@ datatype TestableValue(t: Type) isTrivial: Bool classifier: String -fun ctor(this: @TestableValue, value: @this.ValueType) +fun ctor(this: !TestableValue, value: this.ValueType) this.value ctor value this.isTrivial ctor false this.classifier ctor "" @@ -66,13 +68,13 @@ concept TestableValuesRange(x: Range) if ( //! This will extract values from the input range and applies the predicate on //! them. Makes sure that the predicate holds for all these values. Reports the //! statistics of running the tests. -fun check(values: TestableValuesRange, pred: @AnyType): Bool \ +fun check(values: TestableValuesRange, pred: AnyType): Bool \ = check(values, pred, "") \ if !isValid(pred.v1) -fun check(values: TestableValuesRange, predMsg: @AnyType): Bool \ +fun check(values: TestableValuesRange, predMsg: AnyType): Bool \ = check(values, predMsg.v1, predMsg.v2) \ if isValid(predMsg.v1) -fun check(values: TestableValuesRange, pred: @AnyType, msg: StringRef, config: CheckConfig = CheckConfig()): Bool +fun check(values: TestableValuesRange, pred: AnyType, msg: StringRef, config: CheckConfig = CheckConfig()): Bool cout << "* Checking " << msg << endl var classes: Map(String, UInt) @@ -107,7 +109,7 @@ fun check(values: TestableValuesRange, pred: @AnyType, msg: StringRef, config: C classes.remove("") if !classes.isEmpty for c = classes.keys - var percent = classes(c)*100/n + let percent = classes(c)*100/n cout << percent << "% : " << c << endl // TODO: sort the classes before displaying them @@ -121,12 +123,12 @@ fun forAll(gen: GenType) = _Impl.ForAllGenerator(gen.ValueType)(gen) fun forAll(r: Range) = _Impl.ForAllRangeGenerator(typeOf(r))(r) //! Filter functionality - filters the testable values against the given predicate -fun forWhich(r: TestableValuesRange, pred: @AnyType) = _Impl.ForWhichRange(typeOf(r), typeOf(pred))(r, pred) +fun forWhich(r: TestableValuesRange, pred: AnyType) = _Impl.ForWhichRange(typeOf(r), typeOf(pred))(r, pred) //! Sets the triviality of the testable values according to the result of the predicate -fun withTrivials(r: TestableValuesRange, pred: @AnyType) = _Impl.TrivialsRange(typeOf(r), typeOf(pred))(r, pred) +fun withTrivials(r: TestableValuesRange, pred: AnyType) = _Impl.TrivialsRange(typeOf(r), typeOf(pred))(r, pred) //! Sets the classifier of the testable values according to the result of the predicate -fun withClassifier(r: TestableValuesRange, pred: @AnyType) = _Impl.ClassifierRange(typeOf(r), typeOf(pred))(r, pred) +fun withClassifier(r: TestableValuesRange, pred: AnyType) = _Impl.ClassifierRange(typeOf(r), typeOf(pred))(r, pred) //////////////////////////////////////////////////////////////////////////////// // Combinators @@ -143,8 +145,9 @@ fun elements(r: Range): r.RetType Gen = _Impl.ElementsGen(typeOf(r))(r).gen //! Given a set of generators, this will randomly chose one of them fun oneOf(gens: Range): gens.RetType if GenType(#$gens.RetType) if gens.isEmpty return gens.RetType() - gens advance randBetween(0, (gens rangeSize)) - return gens.front + var gensc = gens + gensc advance randBetween(0, (gens rangeSize)) + return gensc.front //! Same as oneOf, but for each generator we also have its frequency fun frequency(gens: Range): typeOf((#$gens.RetType).v2) if FreqGenType(#$gens.RetType) @@ -157,7 +160,7 @@ fun frequency(gens: Range): typeOf((#$gens.RetType).v2) if FreqGenType(#$gens.Re if sum == 0 return typeOf((#$gens.RetType).v2)() // Select a random number in the total sum of frequencies - var toSelect = randBetween(0, sum) + let toSelect = randBetween(0, sum) // Select the right generator from the distribution var curAcc = 0 for fg = gens @@ -169,7 +172,7 @@ fun frequency(gens: Range): typeOf((#$gens.RetType).v2) if FreqGenType(#$gens.Re fun randBetween(min, max: Integer): commonType(typeOf(min), typeOf(max)) using T = commonType(typeOf(min), typeOf(max)) using RAND_MAX = 0x7fffffff - var offset: T = T(Double(_Impl.rand()) / RAND_MAX * Double(max - min)) + let offset: T = T(Double(_Impl.rand()) / RAND_MAX * Double(max - min)) return T(min) + offset package _Impl @@ -181,7 +184,7 @@ package _Impl package NumericGen(t: Type) if SignedInteger(#$t) fun gen(sizeHint: UInt): t - var h: Int = sizeHint + 3 + let h: Int = sizeHint + 3 return t(randBetween(-h, h+1)) datatype ForAllGenerator(t: Type) @@ -191,17 +194,17 @@ package _Impl _gen: Gen(t) _count: UInt - fun ctor(this, other: @ForAllGenerator) + fun ctor(this, other: !ForAllGenerator) this._gen ctor other._gen this._count ctor other._count - fun ctor(this: @ForAllGenerator, gen: @Gen(this._T)) + fun ctor(this: !ForAllGenerator, gen: Gen(this._T)) this._gen ctor gen this._count = 0 - fun isEmpty(this: @ForAllGenerator) = !_gen.isValid - fun front(this: @ForAllGenerator): RetType = RetType(_gen(_count)) - fun popFront(this: @ForAllGenerator) { ++_count } + fun isEmpty(this: ForAllGenerator) = !_gen.isValid + fun front(this: !ForAllGenerator): RetType = RetType(_gen(_count)) + fun popFront(this: !ForAllGenerator) { ++_count } [initCtor] datatype ForAllRangeGenerator(rangeType: Type) @@ -209,9 +212,9 @@ package _Impl _range: rangeType - fun isEmpty(this: @ForAllRangeGenerator) = _range.isEmpty - fun front(this: @ForAllRangeGenerator): RetType = RetType(_range.front) - fun popFront(this: @ForAllRangeGenerator) { _range.popFront } + fun isEmpty(this: ForAllRangeGenerator) = _range.isEmpty + fun front(this: !ForAllRangeGenerator): RetType = RetType(_range.front) + fun popFront(this: !ForAllRangeGenerator) { _range.popFront } datatype ForWhichRange(rangeType, predType: Type) \ if typeOf((#$predType)((#$rangeType front).value)) == Bool @@ -223,17 +226,17 @@ package _Impl using _RangeType = rangeType using _PredType = predType - fun ctor(this: @ForWhichRange, range: this._RangeType, pred: this._PredType) + fun ctor(this: !ForWhichRange, range: this._RangeType, pred: this._PredType) this._range ctor range this._pred ctor pred this._lastVal ctor this._popUntilValid - fun isEmpty(this: @ForWhichRange) = _range.isEmpty() - fun front(this: @ForWhichRange): RetType = _lastVal - fun popFront(this: @ForWhichRange) { _range.popFront(); this._popUntilValid } + fun isEmpty(this: ForWhichRange) = _range.isEmpty() + fun front(this: ForWhichRange): RetType = _lastVal + fun popFront(this: !ForWhichRange) { _range.popFront(); this._popUntilValid } - fun _popUntilValid(this: @ForWhichRange) + fun _popUntilValid(this: !ForWhichRange) while !_range.isEmpty _lastVal = _range.front() if _pred(_lastVal.value) @@ -248,10 +251,10 @@ package _Impl _range: rangeType _pred: predType - fun isEmpty(this: @TrivialsRange) = _range.isEmpty() - fun popFront(this: @TrivialsRange) { _range.popFront() } - fun front(this: @TrivialsRange): RetType - var res = _range.front + fun isEmpty(this: TrivialsRange) = _range.isEmpty() + fun popFront(this: !TrivialsRange) { _range.popFront() } + fun front(this: !TrivialsRange): RetType + let res = _range.front res.isTrivial = _pred(res.value) return res @@ -263,10 +266,10 @@ package _Impl _range: rangeType _pred: predType - fun isEmpty(this: @ClassifierRange) = _range.isEmpty() - fun popFront(this: @ClassifierRange) { _range.popFront() } - fun front(this: @ClassifierRange): RetType - var res = _range.front + fun isEmpty(this: ClassifierRange) = _range.isEmpty() + fun popFront(this: !ClassifierRange) { _range.popFront() } + fun front(this: !ClassifierRange): RetType + let res = _range.front res.classifier = _pred(res.value) return res @@ -277,13 +280,13 @@ package _Impl _range: rangeType _count: SizeType - fun ctor(this: @ElementsGen, range: this._RangeType) + fun ctor(this: !ElementsGen, range: this._RangeType) this._range ctor range this._count ctor (range rangeSize) - fun ()(this: @ElementsGen, sizeHint: UInt): ElementType - var r = _range + fun ()(this: !ElementsGen, sizeHint: UInt): ElementType + let r = _range r advance randBetween(0, Int(_count)) return r.front - fun gen(this: @ElementsGen): Gen(ElementType) = ife(_count>0, mkGen(ElementType, this), Gen(ElementType)()) + fun gen(this: !ElementsGen): Gen(ElementType) = ife(_count>0, mkGen(ElementType, this), Gen(ElementType)()) diff --git a/SparrowImplicitLib/logic/lRef.spr b/SparrowImplicitLib/logic/lRef.spr index ad3b4e4e..50dd4109 100644 --- a/SparrowImplicitLib/logic/lRef.spr +++ b/SparrowImplicitLib/logic/lRef.spr @@ -32,10 +32,10 @@ using LInt = LRef(Int) datatype ScopeTracer str: StringRef -fun ctor(this: @ScopeTracer, name: StringRef) +fun ctor(this: !ScopeTracer, name: StringRef) str ctor name cout << '<<< ' << name << '\n' -fun dtor(this: @ScopeTracer) +fun dtor(this: !ScopeTracer) cout << '>>> ' << str << '\n' /// A logical reference @@ -53,7 +53,7 @@ datatype LRef(valueType: Type) _pptr: SharedPtr(Optional(ValueType)) -fun ctor(this: @LRef) +fun ctor(this: !LRef) _pptr ctor Optional(this.ValueType)() [ct] if ( isValid(logicDebug) && isValid(logicRefDebug) ) cout << "ctor: " << this << "\n" @@ -63,80 +63,80 @@ fun ctor(this: @LRef) // [ct] if ( isValid(logicDebug) && isValid(logicRefDebug) ) // cout << "value ctor: " << this << "\n" -[convert] fun ctor(this: @LRef, value: @AnyType) if isValid(this.ValueType(value)) +[convert] fun ctor(this: !LRef, value: AnyType) if isValid(this.ValueType(value)) _pptr ctor Optional(this.ValueType)(value) [ct] if ( isValid(logicDebug) && isValid(logicRefDebug) ) cout << "value ctor: " << this << "\n" -fun ctor(this, other: @LRef) +fun ctor(this, other: !LRef) _pptr ctor other._pptr [ct] if ( isValid(logicDebug) && isValid(logicRefDebug) ) cout << "copy ctor: " << this << "\n" [protected] - fun dtor(this: @LRef) + fun dtor(this: !LRef) [ct] if ( isValid(logicDebug) && isValid(logicRefDebug) ) cout << "dtor: " << this << "\n" - fun =(this, other: @LRef) + fun =(this, other: !LRef) if ( other.isSet ) this.reset(other.get) else this.reset [ct] if ( isValid(logicDebug) && isValid(logicRefDebug) ) cout << "LRef.=" << this << "\n" - fun =(this: @LRef, value: @this.ValueType) + fun =(this: !LRef, value: !this.ValueType) _pptr.get().reset(value) [ct] if ( isValid(logicDebug) && isValid(logicRefDebug) ) cout << "LRef.=" << this << "\n" - fun =(this: @LRef, value: AnyType) if isValid(ValueType(value)) + fun =(this: !LRef, value: AnyType) if isValid(ValueType(value)) _pptr.get().reset(value) [ct] if ( isValid(logicDebug) && isValid(logicRefDebug) ) cout << "LRef.=" << this << "\n" -fun get(this: @LRef): @ValueType = _pptr.get().get +fun get(this: !LRef): @ValueType = _pptr.get().get -fun reset(this: @LRef) +fun reset(this: !LRef) // Reset the value shared by the shared pointer _pptr.get().reset [ct] if ( isValid(logicDebug) && isValid(logicRefDebug) ) cout << "LRef.reset " << this << "\n" -fun reset(this: @LRef, value: @this.ValueType) +fun reset(this: !LRef, value: !this.ValueType) // Reset the value shared by the shared pointer _pptr.get().reset(value) [ct] if ( isValid(logicDebug) && isValid(logicRefDebug) ) cout << "LRef.reset " << this << "\n" -fun isUnique(this: @LRef) = _pptr.isUnique -fun useCount(this: @LRef): UInt = _pptr.useCount +fun isUnique(this: !LRef) = _pptr.isUnique +fun useCount(this: !LRef): UInt = _pptr.useCount -fun isNull(this: @LRef) = _pptr.get().isNull -fun isSet(this: @LRef) = _pptr.get().isSet +fun isNull(this: !LRef) = _pptr.get().isNull +fun isSet(this: !LRef) = _pptr.get().isSet -fun swap(this: @LRef, other: typeOf(this)) +fun swap(this: !LRef, other: typeOf(this)) _pptr.swap(other._pptr) -fun >>(this: @LRef, os: @OutStream) - os << "LRef(" << mkStreamRefWrapper(_pptr.get) << ", " << this.useCount << ", " << flush +fun >>(this: !LRef, os: !OutStream) + os << "LRef(" << UntypedPtr(_pptr.get) << ", " << this.useCount << ", " << flush if ( this.isSet ) os << this.get else os << "null" os << ")" << flush -fun mkLRef(x: @LRefType) = x -fun mkLRef(x: @StringRef) = LRef(String)(x) -fun mkLRef(x: @AnyType): LRef(-@typeOf(x)) = x if !LRefType(x) +fun mkLRef(x: !LRefType) = x +fun mkLRef(x: !StringRef) = LRef(String)(x) +fun mkLRef(x: !AnyType): LRef(-@typeOf(x)) = x if !LRefType(x) -fun mkValOrRef(x: @ValWrapper) = x -fun mkValOrRef(x: @StringRef) = Optional(String)(x) -fun mkValOrRef(x: @AnyType) = Optional(-@typeOf(x))(x) if !ValWrapper(x) +fun mkValOrRef(x: !ValWrapper) = x +fun mkValOrRef(x: !StringRef) = Optional(String)(x) +fun mkValOrRef(x: !AnyType) = Optional(-@typeOf(x))(x) if !ValWrapper(x) -fun /+/ (l, r: @AnyType) = _Impl.mkPlusOp(mkValOrRef(l), mkValOrRef(r)) -fun /-/ (l, r: @AnyType) = _Impl.mkMinusOp(mkValOrRef(l), mkValOrRef(r)) -fun |*| (l, r: @AnyType) = _Impl.mkMulOp(mkValOrRef(l), mkValOrRef(r)) -fun |/| (l, r: @AnyType) = _Impl.mkDivOp(mkValOrRef(l), mkValOrRef(r)) +fun /+/ (l, r: !AnyType) = _Impl.mkPlusOp(mkValOrRef(l), mkValOrRef(r)) +fun /-/ (l, r: !AnyType) = _Impl.mkMinusOp(mkValOrRef(l), mkValOrRef(r)) +fun |*| (l, r: !AnyType) = _Impl.mkMulOp(mkValOrRef(l), mkValOrRef(r)) +fun |/| (l, r: !AnyType) = _Impl.mkDivOp(mkValOrRef(l), mkValOrRef(r)) setOperPrecedence("/+/", getOperPrecedence("+") + 1) setOperPrecedence("/-/", getOperPrecedence("-") + 1) @@ -158,26 +158,26 @@ package _Impl _left: leftType _right: rightType - fun ctor(this: @BinaryOp, l: @this._LT, r: @this._RT) + fun ctor(this: !BinaryOp, l: !this._LT, r: !this._RT) this._left ctor l this._right ctor r - fun get(this: @BinaryOp): ValueType + fun get(this: !BinaryOp): ValueType if _myOper == _operPlus ; return _left.get + _right.get if _myOper == _operMinus ; return _left.get - _right.get if _myOper == _operMul ; return _left.get * _right.get if _myOper == _operDiv ; return _left.get / _right.get return _left.get - fun isNull(this: @BinaryOp) = _left.isNull || _right.isNull - fun isSet(this: @BinaryOp) = _left.isSet && _right.isSet + fun isNull(this: !BinaryOp) = _left.isNull || _right.isNull + fun isSet(this: !BinaryOp) = _left.isSet && _right.isSet - fun >>(this: @BinaryOp, os: @OutStream) + fun >>(this: !BinaryOp, os: !OutStream) os << "BinaryOp(left=" << _left << ", right=" << _right << ", " << _oper << ")" << flush - fun mkBinaryOp(l, r: @ValWrapper, oper: Int ct) = BinaryOp(-@typeOf(l), -@typeOf(r), oper)(l, r) + fun mkBinaryOp(l, r: !ValWrapper, oper: Int ct) = BinaryOp(-@typeOf(l), -@typeOf(r), oper)(l, r) - fun mkPlusOp(l, r: @ValWrapper) = mkBinaryOp(l, r, _operPlus) - fun mkMinusOp(l, r: @ValWrapper) = mkBinaryOp(l, r, _operMinus) - fun mkMulOp(l, r: @ValWrapper) = mkBinaryOp(l, r, _operMul) - fun mkDivOp(l, r: @ValWrapper) = mkBinaryOp(l, r, _operDiv) + fun mkPlusOp(l, r: !ValWrapper) = mkBinaryOp(l, r, _operPlus) + fun mkMinusOp(l, r: !ValWrapper) = mkBinaryOp(l, r, _operMinus) + fun mkMulOp(l, r: !ValWrapper) = mkBinaryOp(l, r, _operMul) + fun mkDivOp(l, r: !ValWrapper) = mkBinaryOp(l, r, _operDiv) diff --git a/SparrowImplicitLib/logic/predicates.spr b/SparrowImplicitLib/logic/predicates.spr index ce986462..062804e0 100644 --- a/SparrowImplicitLib/logic/predicates.spr +++ b/SparrowImplicitLib/logic/predicates.spr @@ -16,23 +16,23 @@ datatype Predicate predObj: Function(Bool) -fun ctor(this, other: @Predicate) +fun ctor(this, other: !Predicate) this.predObj ctor other.predObj [convert] -fun ctor(this: @Predicate, pred: @PredicateType) +fun ctor(this: !Predicate, pred: !PredicateType) predObj ctor pred -fun isNull(this: @Predicate) = predObj.isNull() -fun isSet(this: @Predicate) = predObj.isSet() +fun isNull(this: !Predicate) = predObj.isNull() +fun isSet(this: !Predicate) = predObj.isSet() -fun ()(this: @Predicate): Bool = predObj() +fun ()(this: !Predicate): Bool = predObj() /// Logic equality: equality test + inference -fun eq(l, r: @AnyType) = _mkEq(mkValOrRef(l), mkValOrRef(r)) +fun eq(l, r: !AnyType) = _mkEq(mkValOrRef(l), mkValOrRef(r)) fun /=/(l, r: @AnyType) = _mkEq(mkValOrRef(l), mkValOrRef(r)) // Assignment: used for native functions instead of unification -fun =/(out: @AnyType, in: AnyType): Bool if -@typeOf(out) == -@typeOf(in) +fun =/(out: !AnyType, in: AnyType): Bool if -@typeOf(out) == -@typeOf(in) out = in return true @@ -42,10 +42,10 @@ using oper_precedence_=/ = oper_precedence_== + 1 //setOperPrecedence("=/", getOperPrecedence("==") + 1) /// Logic Disjunction -fun ||(l, r: @PredicateType) = OrRelation(-@typeOf(l), -@typeOf(r))(l, r) +fun ||(l, r: !PredicateType) = OrRelation(-@typeOf(l), -@typeOf(r))(l, r) /// Logic Conjunction -fun &&(l, r: @PredicateType) = AndRelation(-@typeOf(l), -@typeOf(r))(l, r) +fun &&(l, r: !PredicateType) = AndRelation(-@typeOf(l), -@typeOf(r))(l, r) /// Relation that always returns false fun mkFalse = LFalse() @@ -62,14 +62,14 @@ datatype UnifyLR(leftType, rightType: Type) if ValWrapper(#$leftType) && ValWrap _leftVal: leftType _rightVal: rightType -fun ctor(this: @UnifyLR, l: @this.LeftType, r: @this.RightType) +fun ctor(this: !UnifyLR, l: !this.LeftType, r: !this.RightType) this._leftVal ctor l this._rightVal ctor r _coEntryPt ctor 0 [ct] if isValid(logicDebug) cout << "UnifyLR.ctor: " << this << "\n" -fun ctor(this, other: @UnifyLR) +fun ctor(this, other: !UnifyLR) this._leftVal ctor other._leftVal this._rightVal ctor other._rightVal this._coEntryPt ctor other._coEntryPt @@ -77,11 +77,11 @@ fun ctor(this, other: @UnifyLR) cout << "UnifyLR.copy ctor: " << this << "\n" [protected] - fun dtor(this: @UnifyLR) + fun dtor(this: !UnifyLR) [ct] if isValid(logicDebug) cout << "UnifyLR.dtor: " << this << "\n" -fun ()(this: @UnifyLR): Bool +fun ()(this: !UnifyLR): Bool //cout << "UnifyLR.(): ltype=" << TypeOp.description(LeftType) << ", rtype=" << TypeOp.description(RightType) << "\n" << flush [ct] if isValid(logicDebug) cout << "UnifyLR.(): " << this << "\n" @@ -95,7 +95,7 @@ fun ()(this: @UnifyLR): Bool _coEntryPt = -1 // Nothing more to do here [ct] if isValid(logicDebug) cout << "UnifyLR.(), checking equality: " << _leftVal << "==" << _rightVal << "\n" - var res = _leftVal.get() == _rightVal.get() + let res = _leftVal.get() == _rightVal.get() return res [ct] if LRefType(#$RightType) && isValid(_rightVal = _leftVal.get()) _rightVal = _leftVal.get() @@ -133,7 +133,7 @@ fun ()(this: @UnifyLR): Bool cout << "Unify, done\n" return false -fun _mkEq(l, r: @ValWrapper) = UnifyLR(-@typeOf(l), -@typeOf(r))(l, r) +fun _mkEq(l, r: !ValWrapper) = UnifyLR(-@typeOf(l), -@typeOf(r))(l, r) datatype OrRelation(leftPredicateType, rightPredicateType: Type) using ValueType = Bool @@ -145,7 +145,7 @@ datatype OrRelation(leftPredicateType, rightPredicateType: Type) _left: leftPredicateType _right: rightPredicateType -fun ctor(this: @OrRelation, l: @this._LType, r: @this._RType) +fun ctor(this: !OrRelation, l: !this._LType, r: !this._RType) this._left ctor l this._right ctor r _coEntryPt ctor 0 @@ -153,11 +153,11 @@ fun ctor(this: @OrRelation, l: @this._LType, r: @this._RType) cout << "OrRelation.ctor: " << this << "\n" [protected] - fun dtor(this: @OrRelation) + fun dtor(this: !OrRelation) [ct] if isValid(logicDebug) cout << "OrRelation.dtor: " << this << "\n" -fun ()(this: @OrRelation): Bool +fun ()(this: !OrRelation): Bool [ct] if isValid(logicDebug) cout << "OrRelation.(): " << this << "\n" if _coEntryPt == 0 // Never called before, or left is returning true @@ -191,7 +191,7 @@ datatype AndRelation(leftPredicateType, rightPredicateType: Type) _left: leftPredicateType _right, _rightBegin: rightPredicateType -fun ctor(this: @AndRelation, l: this._LType, r: this._RType) +fun ctor(this: !AndRelation, l: this._LType, r: this._RType) this._left ctor l this._right ctor r this._rightBegin ctor r @@ -199,7 +199,7 @@ fun ctor(this: @AndRelation, l: this._LType, r: this._RType) [ct] if isValid(logicDebug) cout << "AndRelation.ctor: " << this << "\n" -fun ()(this: @AndRelation): Bool +fun ()(this: !AndRelation): Bool [ct] if isValid(logicDebug) cout << "AndRelation.(): " << this << "\n" if _coEntryPt == 0 || _coEntryPt == 1 // Never called before stay here until we have a positive result @@ -228,21 +228,21 @@ datatype LTrue ; fun ()(this: LTrue) = true -fun >>(this: @Predicate, os: @OutStream) +fun >>(this: !Predicate, os: !OutStream) os << "Pred-" << predObj -fun >>(this: @UnifyLR, os: @OutStream) +fun >>(this: !UnifyLR, os: !OutStream) os << "UnifyLR(left=" << _leftVal << ", right=" << _rightVal << ", " << _coEntryPt << ")" << flush -fun >>(this: @OrRelation, os: @OutStream) +fun >>(this: !OrRelation, os: !OutStream) os << "OrRelation(left=" << _left << ", right=" << _right << ", " << _coEntryPt << ")" << flush -fun >>(this: @AndRelation, os: @OutStream) +fun >>(this: !AndRelation, os: !OutStream) os << "AndRelation(left=" << _left << ", right=" << _right << ", " << _coEntryPt << ")" << flush -fun >>(this: LFalse, os: @OutStream) +fun >>(this: LFalse, os: !OutStream) os << "LFalse" << flush -fun >>(this: LTrue, os: @OutStream) +fun >>(this: LTrue, os: !OutStream) os << "LTrue" << flush diff --git a/SparrowImplicitLib/logic/prolog.spr b/SparrowImplicitLib/logic/prolog.spr index 94b1ac26..7ff41d56 100644 --- a/SparrowImplicitLib/logic/prolog.spr +++ b/SparrowImplicitLib/logic/prolog.spr @@ -17,20 +17,20 @@ import assert import time = time [macro] fun compileProlog(sourceString: CompilerAstNode): CompilerAstNode - var sourceStr: meta.AstNode = sourceString + let sourceStr: meta.AstNode = sourceString [ct] if ( (sourceString nodeKind) != meta.nkSparrowExpLiteral ) - meta.report("compileProlog should take a string literal as argument", (sourceStr location)) - return CompilerAstNode() + meta.report("compileProlog should take a string literal as argument", (sourceStr location)); else sourceStr semanticCheck - var loc = sourceStr location - var ctx = sourceStr context - var str: String = astEval(sourceString clone) + let loc = sourceStr location + let ctx = sourceStr context + let str: String = astEval(sourceString clone) return handlePrologCode(str, loc, ctx) + ; -[ct] fun handlePrologCode(code: @String, location: meta.Location, context: meta.CompilationContext): meta.AstNode +[ct] fun handlePrologCode(code: !String, location: meta.Location, context: meta.CompilationContext): meta.AstNode //cout << "(" << location.startLineNo << ":" << location.startColNo << " - " << location.endLineNo << ":" << location.endColNo << ')' << endl << flush; - var t: time.Timer + let t: time.Timer var errorReporter: CompilerErrorReporter var lexer = mkLexer(code.all(), errorReporter, location) var parser = mkParser(lexer, errorReporter) @@ -42,7 +42,7 @@ import time = time cout << "Elapsed: " << t.elapsed() << endl << flush return res -[ct] fun prologToString(source: @String): String +[ct] fun prologToString(source: !String): String var errorReporter = mkConsoleErrorReporter(source.all()) var lexer = mkLexer(source.all(), errorReporter) var parser = mkParser(lexer, errorReporter) diff --git a/SparrowImplicitLib/logic/prologFrontend.spr b/SparrowImplicitLib/logic/prologFrontend.spr index 8b9e18b8..872af0ba 100644 --- a/SparrowImplicitLib/logic/prologFrontend.spr +++ b/SparrowImplicitLib/logic/prologFrontend.spr @@ -1,4 +1,4 @@ import prolog import meta.compiler -[ct] var dummy1 = registerFrontendFun(".pl", "logic/prolog.spr:handlePrologCode") +[ct] let _dummy1 = registerFrontendFun(".pl", "logic/prolog.spr:handlePrologCode") diff --git a/SparrowImplicitLib/logic/prologImpl/codeGen.spr b/SparrowImplicitLib/logic/prologImpl/codeGen.spr index 99d049e0..8dd2919c 100644 --- a/SparrowImplicitLib/logic/prologImpl/codeGen.spr +++ b/SparrowImplicitLib/logic/prologImpl/codeGen.spr @@ -4,16 +4,16 @@ import ir package meta import meta.sparrowNodes, meta.featherNodes, meta.compiler; -[ct] fun genProlog(sps: @SparrowPrologSystem): meta.AstNode = Impl.genPrologSystem(sps) +[ct] fun genProlog(sps: !SparrowPrologSystem): meta.AstNode = Impl.genPrologSystem(sps) package Impl using meta.AstNode using meta.Location - [ct] var nullNode: AstNode + [ct] let nullNode: AstNode - [ct] fun genPrologSystem(sps: @SparrowPrologSystem): AstNode - var l = sps.loc + [ct] fun genPrologSystem(sps: !SparrowPrologSystem): AstNode + let l = sps.loc var resNodes: Vector(AstNode) resNodes.reserve(3 * sps.predicates.size() + 3) @@ -30,14 +30,14 @@ package Impl return mkNodeList(l, resNodes.all); - [ct] fun genPredicate(pred: @SparrowPredicate, resNodes: @Vector(AstNode)) - var genNative = allowNativeCodeGen && pred.canBeNative + [ct] fun genPredicate(pred: !SparrowPredicate, resNodes: !Vector(AstNode)) + let genNative = allowNativeCodeGen && pred.canBeNative - var locPred = pred.firstClause.get().loc + let locPred = pred.firstClause.get().loc // Generate nodes for parameters and return type - var paramsNode = genParameters(pred, genNative) - var returnType = ( + let paramsNode = genParameters(pred, genNative) + let returnType = ( ife(genNative , mkIdentifier(locPred, "Bool") , mkIdentifier(locPred, "Predicate")) @@ -47,8 +47,8 @@ package Impl // Add local variables to body nodes for lv: @ExpressionPtr = pred.localVars.all() - var locVar = lv.get().loc - var typeName = getTypeName(pred, lv.get(), false, genNative) + let locVar = lv.get().loc + let typeName = getTypeName(pred, lv.get(), false, genNative) var init = nullNode if ( genNative ) // Don't initialize native integers @@ -60,22 +60,22 @@ package Impl // Add the main logic as a disjunction of all the clauses var logicNode: AstNode for clause: @PredicateClausePtr = pred.clauses.all() - var clauseNode = genClause(pred, clause.get()) + let clauseNode = genClause(pred, clause.get()) if ( clauseNode isSet ) if ( logicNode isNull ) logicNode = clauseNode; else logicNode = mkInfixOp(logicNode location, "||", logicNode, clauseNode); ; - //var logicNode = mkFunApplication(locPred, mkIdentifier(locPred, "mkTrue"), nullNode); + //let logicNode = mkFunApplication(locPred, mkIdentifier(locPred, "mkTrue"), nullNode); bodyNodes.pushBack(mkReturnStmt(locPred, logicNode)) // Finally create the function node - var body = mkLocalSpace(locPred, bodyNodes.all) + let body = mkLocalSpace(locPred, bodyNodes.all) var funName = pred.name if ( genNative ) funName += "_native"; - var res = mkSprFunction(locPred, funName.asStringRef(), paramsNode, returnType, body, nullNode) + let res = mkSprFunction(locPred, funName.asStringRef(), paramsNode, returnType, body, nullNode) resNodes.pushBack(res) if ( genNative ) @@ -83,43 +83,43 @@ package Impl resNodes.pushBack(genWrapperPredicate(pred)) ; - [ct] fun genParameters(pred: @SparrowPredicate, genNative: Bool): AstNode - var locPred = pred.firstClause.get().loc - var params = mkNodeList(locPred, AstNodeRange(), true) + [ct] fun genParameters(pred: !SparrowPredicate, genNative: Bool): AstNode + let locPred = pred.firstClause.get().loc + let params = mkNodeList(locPred, AstNodeRange(), true) for i = 0..pred.paramVars.size() - var param: @Parameter = pred.paramVars(i) - var p: @Expression = param.expr.get() - var locParam = p.loc - var paramName = String("p_") + intToString(Int(i+1)) - var isRef = !genNative || param.isOutput - var typeName = getTypeName(pred, p, isRef, genNative) + let param: @Parameter = pred.paramVars(i) + let p: @Expression = param.expr.get() + let locParam = p.loc + let paramName = String("p_") + intToString(Int(i+1)) + let isRef = !genNative || param.isOutput + let typeName = getTypeName(pred, p, isRef, genNative) addToNodeList(params, mkSprParameter(locParam, paramName.asStringRef(), typeName, nullNode)) return params - [ct] fun genClause(pred: @SparrowPredicate, clause: @PredicateClause): AstNode + [ct] fun genClause(pred: !SparrowPredicate, clause: !PredicateClause): AstNode var res = nullNode res = genBoundArgs(pred, clause) res = genConditions(pred, clause, res) if ( res isNull ) - var loc = clause.loc + let loc = clause.loc res = mkFunApplication(loc, mkIdentifier(loc, "mkTrue"), nullNode) return res - [ct] fun genBoundArgs(pred: @SparrowPredicate, clause: @PredicateClause): AstNode - var genNative = allowNativeCodeGen && pred.canBeNative + [ct] fun genBoundArgs(pred: !SparrowPredicate, clause: !PredicateClause): AstNode + let genNative = allowNativeCodeGen && pred.canBeNative var res = nullNode for i = 0..clause.args.size() - var arg: @ExpressionPtr = clause.args(i) + let arg: @ExpressionPtr = clause.args(i) if ( arg.isSet() && arg.get().kind != ekVar ) - var loc = arg.get().loc - var name = String("p_") + intToString(Int(i+1)) - var argName = mkIdentifier(loc, name.asStringRef()) - var argValue = genExpr(pred, arg.get()) + let loc = arg.get().loc + let name = String("p_") + intToString(Int(i+1)) + let argName = mkIdentifier(loc, name.asStringRef()) + let argValue = genExpr(pred, arg.get()) - var idx = arg.get().paramIdx + let idx = arg.get().paramIdx assert(idx >= 0) - var param: @Parameter = pred.paramVars(idx) + let param: @Parameter = pred.paramVars(idx) var oper: String if ( genNative && param.isInput ) oper = "=="; @@ -127,15 +127,15 @@ package Impl oper = "=/"; else oper = "/=/"; - var thisCond = mkInfixOp(loc, oper.asStringRef(), argName, argValue) + let thisCond = mkInfixOp(loc, oper.asStringRef(), argName, argValue) res = chainConditions(loc, res, thisCond) ; return res - [ct] fun genConditions(pred: @SparrowPredicate, clause: @PredicateClause, prevCond: AstNode): AstNode + [ct] fun genConditions(pred: !SparrowPredicate, clause: !PredicateClause, prevCond: AstNode): AstNode for cond: @ConditionPtr = clause.conditions.all() - var thisCond = nullNode + let thisCond = nullNode if ( cond.get().kind == ckPredCall ) thisCond = genPredCall(pred, clause, cond.get()); else @@ -144,7 +144,7 @@ package Impl prevCond = chainConditions(cond.get().loc, prevCond, thisCond); return prevCond - [ct] fun chainConditions(loc: @Location, prev, cur: AstNode): AstNode + [ct] fun chainConditions(loc: !Location, prev, cur: AstNode): AstNode if ( cur isSet ) if ( prev isNull ) prev = cur; @@ -152,14 +152,14 @@ package Impl prev = mkInfixOp(loc, "&&", prev, cur); return prev - [ct] fun genPredCall(pred: @SparrowPredicate, clause: @PredicateClause, predCall: @Condition): AstNode - var loc = predCall.loc + [ct] fun genPredCall(pred: !SparrowPredicate, clause: !PredicateClause, predCall: !Condition): AstNode + let loc = predCall.loc - var genNative = allowNativeCodeGen && pred.canBeNative - var isRecursive = predCall.predName == clause.name + let genNative = allowNativeCodeGen && pred.canBeNative + let isRecursive = predCall.predName == clause.name var argsAst = mkNodeList(loc, AstNodeRange(), true) - var size = predCall.args.size() + let size = predCall.args.size() if ( isRecursive && !genNative ) ++size; if ( isRecursive && !genNative ) @@ -177,16 +177,16 @@ package Impl funName = mkIdentifier(loc, predCall.predName.asStringRef()); return mkFunApplication(loc, funName, argsAst); - [ct] fun genIsExpr(pred: @SparrowPredicate, clause: @PredicateClause, isExpr: @Condition): AstNode - var genNative = allowNativeCodeGen && pred.canBeNative - var op = ife(genNative, "=/", "/=/") + [ct] fun genIsExpr(pred: !SparrowPredicate, clause: !PredicateClause, isExpr: !Condition): AstNode + let genNative = allowNativeCodeGen && pred.canBeNative + let op = ife(genNative, "=/", "/=/") return mkInfixOp(isExpr.loc, op, genExpr(pred, isExpr.args(0).get()), genExpr(pred, isExpr.args(1).get())) - [ct] fun genExpr(pred: @SparrowPredicate, expr: @Expression): AstNode - var genNative = allowNativeCodeGen && pred.canBeNative - var loc = expr.loc + [ct] fun genExpr(pred: !SparrowPredicate, expr: !Expression): AstNode + let genNative = allowNativeCodeGen && pred.canBeNative + let loc = expr.loc if ( expr.kind == ekAtom ) return mkStringLiteral(loc, expr.data.asStringRef()); if ( expr.kind == ekNumber ) @@ -206,9 +206,9 @@ package Impl assert("Invalid expression kind while generating code" != "") return nullNode - [ct] fun generateNodeForSparrowExp(loc: meta.Location, exp: @String): AstNode + [ct] fun generateNodeForSparrowExp(loc: meta.Location, exp: !String): AstNode return meta.parseSprExpression(loc, exp.asStringRef()); - //var sz = exp.size(); + //let sz = exp.size(); //if ( sz == 0 ) // return mkNop(loc); //if ( sz >= 2 && exp.front() == '"'.char && exp.back() == '"'.char ) @@ -218,23 +218,23 @@ package Impl //return mkIdentifier(loc, exp.asStringRef()); - [ct] fun getTypeName(pred: @SparrowPredicate, expr: @Expression, addRef: Bool, genNative: Bool): AstNode + [ct] fun getTypeName(pred: !SparrowPredicate, expr: !Expression, addRef: Bool, genNative: Bool): AstNode assert(expr.typeSetIdx >= 0) - var typeSet: @LTypeSet = pred.typeSets(expr.typeSetIdx) + let typeSet: @LTypeSet = pred.typeSets(expr.typeSetIdx) var str: StringRef if ( typeSet.type.isNumberOnly() ) str = ife(genNative, "Int", "LInt"); else str = ife(genNative, "String", "LStr"); - var loc = expr.loc + let loc = expr.loc //cout << "TypeName: " << str << " for " << expr << " with type=" << typeSet.type.bits << endl << flush; var res = ife(genNative, mkIdentifier(loc, str), mkIdentifier(loc, str)) if ( addRef ) res = mkPrefixOp(loc, "@", res); return res; - [ct] fun genWrapperClass(pred: @SparrowPredicate): AstNode - var loc = pred.firstClause.get().loc + [ct] fun genWrapperClass(pred: !SparrowPredicate): AstNode + let loc = pred.firstClause.get().loc var children = mkNodeList(loc, AstNodeRange(), true) if ( pred.arity > 0 ) @@ -242,51 +242,51 @@ package Impl addToNodeList(children, genWrapperClassCtor(pred)) addToNodeList(children, genWrapperClassCallOper(pred)) - var clsName = pred.name + "_pred_wrapper" + let clsName = pred.name + "_pred_wrapper" return mkSprDatatype(loc, clsName.asStringRef(), nullNode, nullNode, nullNode, children) - [ct] fun genWrapperClassVars(pred: @SparrowPredicate, classChildren: @AstNode) + [ct] fun genWrapperClassVars(pred: !SparrowPredicate, classChildren: !AstNode) for i = 0..pred.paramVars.size() - var pe: @Expression = pred.paramVars(i).expr.get() - var paramName = String("p_") + intToString(Int(i+1)) - var locVar = pe.loc - var typeName = getTypeName(pred,pe, false, false) + let pe: @Expression = pred.paramVars(i).expr.get() + let paramName = String("p_") + intToString(Int(i+1)) + let locVar = pe.loc + let typeName = getTypeName(pred,pe, false, false) addToNodeList(classChildren, mkSprVariable(locVar, paramName.asStringRef(), typeName, nullNode)) ; - [ct] fun genWrapperClassCtor(pred: @SparrowPredicate): AstNode - var loc = pred.firstClause.get().loc + [ct] fun genWrapperClassCtor(pred: !SparrowPredicate): AstNode + let loc = pred.firstClause.get().loc // Create the body var bodyNodes: Vector(AstNode) bodyNodes.reserve(pred.arity) for i = 0..pred.paramVars.size() - var pe: @Expression = pred.paramVars(i).expr.get() - var locParam = pe.loc - var paramName = String("p_") + intToString(Int(i+1)) - var left = mkCompoundExp(locParam, mkIdentifier(locParam, "this"), paramName.asStringRef()) - var right = mkIdentifier(locParam, paramName.asStringRef()) + let pe: @Expression = pred.paramVars(i).expr.get() + let locParam = pe.loc + let paramName = String("p_") + intToString(Int(i+1)) + let left = mkCompoundExp(locParam, mkIdentifier(locParam, "this"), paramName.asStringRef()) + let right = mkIdentifier(locParam, paramName.asStringRef()) bodyNodes.pushBack(mkInfixOp(locParam, "ctor", left, right)) - var body = mkLocalSpace(loc, bodyNodes.all) + let body = mkLocalSpace(loc, bodyNodes.all) // Finally create the function node - var paramsNode = genParameters(pred, false) + let paramsNode = genParameters(pred, false) return mkSprFunction(loc, "ctor", paramsNode, nullNode, body, nullNode) - [ct] fun genWrapperClassCallOper(pred: @SparrowPredicate): AstNode - var loc = pred.firstClause.get().loc + [ct] fun genWrapperClassCallOper(pred: !SparrowPredicate): AstNode + let loc = pred.firstClause.get().loc var bodyNodes: Vector(AstNode) bodyNodes.reserve(pred.arity + 1) // Checks for the input parameters var inputChecks = nullNode for i = 0..pred.paramVars.size() - var p: @Parameter = pred.paramVars(i) + let p: @Parameter = pred.paramVars(i) if ( p.isInput ) - var pe: @Expression = p.expr.get() - var locParam = pe.loc - var paramName = String("p_") + intToString(Int(i+1)) + let pe: @Expression = p.expr.get() + let locParam = pe.loc + let paramName = String("p_") + intToString(Int(i+1)) - var callFn = mkCompoundExp(locParam, mkIdentifier(locParam, paramName.asStringRef()), "isNull") - var call = mkFunApplication(locParam, callFn, nullNode) + let callFn = mkCompoundExp(locParam, mkIdentifier(locParam, paramName.asStringRef()), "isNull") + let call = mkFunApplication(locParam, callFn, nullNode) if ( inputChecks isNull ) inputChecks = call; @@ -294,59 +294,59 @@ package Impl inputChecks = mkInfixOp(locParam, "||", inputChecks, call); ; if ( inputChecks isSet ) - var thenClause = mkReturnStmt(loc, mkBoolLiteral(loc, false)) - var ifStmt = mkIf(loc, inputChecks, thenClause, nullNode) + let thenClause = mkReturnStmt(loc, mkBoolLiteral(loc, false)) + let ifStmt = mkIf(loc, inputChecks, thenClause, nullNode) bodyNodes.pushBack(ifStmt) // Create some values for the output parameters for i = 0..pred.paramVars.size() - var p: @Parameter = pred.paramVars(i) + let p: @Parameter = pred.paramVars(i) if ( p.isOutput ) - var pe: @Expression = p.expr.get() - var locParam = pe.loc - var paramName = String("p_") + intToString(Int(i+1)) + let pe: @Expression = p.expr.get() + let locParam = pe.loc + let paramName = String("p_") + intToString(Int(i+1)) - var paramId = mkIdentifier(locParam, paramName.asStringRef()) - var ctorCall = mkFunApplication(locParam, getTypeName(pred, pe, false, true), nullNode) - var valSet = mkInfixOp(locParam, "=", paramId, ctorCall) + let paramId = mkIdentifier(locParam, paramName.asStringRef()) + let ctorCall = mkFunApplication(locParam, getTypeName(pred, pe, false, true), nullNode) + let valSet = mkInfixOp(locParam, "=", paramId, ctorCall) bodyNodes.pushBack(valSet) ; // The call to the native function var callArgsNode = mkNodeList(loc, AstNodeRange(), true) for i = 0..pred.paramVars.size() - var p: @Parameter = pred.paramVars(i) - var pe: @Expression = p.expr.get() - var locParam = pe.loc - var paramName = String("p_") + intToString(Int(i+1)) - - var paramId = mkIdentifier(locParam, paramName.asStringRef()) - var getName = mkCompoundExp(locParam, paramId, "get") - var getCall = mkFunApplication(locParam, getName, nullNode) + let p: @Parameter = pred.paramVars(i) + let pe: @Expression = p.expr.get() + let locParam = pe.loc + let paramName = String("p_") + intToString(Int(i+1)) + + let paramId = mkIdentifier(locParam, paramName.asStringRef()) + let getName = mkCompoundExp(locParam, paramId, "get") + let getCall = mkFunApplication(locParam, getName, nullNode) addToNodeList(callArgsNode, getCall) - var nativeFunName = mkIdentifier(loc, (pred.name + "_native").asStringRef()) - var nativeFunCall = mkFunApplication(loc, nativeFunName, callArgsNode) + let nativeFunName = mkIdentifier(loc, (pred.name + "_native").asStringRef()) + let nativeFunCall = mkFunApplication(loc, nativeFunName, callArgsNode) bodyNodes.pushBack(mkReturnStmt(loc, nativeFunCall)) // Finally create the function node - var body = mkLocalSpace(loc, bodyNodes.all) - var returnType = mkIdentifier(loc, "Bool") + let body = mkLocalSpace(loc, bodyNodes.all) + let returnType = mkIdentifier(loc, "Bool") return mkSprFunction(loc, "()", nullNode, returnType, body, nullNode) - [ct] fun genWrapperPredicate(pred: @SparrowPredicate): AstNode - var loc = pred.firstClause.get().loc + [ct] fun genWrapperPredicate(pred: !SparrowPredicate): AstNode + let loc = pred.firstClause.get().loc // Create the function application to call the predicate wrapper ctor var argsAst = mkNodeList(loc, AstNodeRange(), true) for i = 0..pred.paramVars.size() - var p: @Expression = pred.paramVars(i).expr.get() - var locParam = p.loc - var paramName = String("p_") + intToString(Int(i+1)) + let p: @Expression = pred.paramVars(i).expr.get() + let locParam = p.loc + let paramName = String("p_") + intToString(Int(i+1)) addToNodeList(argsAst, mkIdentifier(locParam, paramName.asStringRef())) - var funName = mkIdentifier(loc, pred.name.asStringRef() + "_pred_wrapper") - var bodyExp = mkFunApplication(loc, funName, argsAst) + let funName = mkIdentifier(loc, pred.name.asStringRef() + "_pred_wrapper") + let bodyExp = mkFunApplication(loc, funName, argsAst) // Finally create the function node - var paramsNode = genParameters(pred, false) - var returnType = mkIdentifier(loc, "Predicate") + let paramsNode = genParameters(pred, false) + let returnType = mkIdentifier(loc, "Predicate") return mkSprFunctionExp(loc, pred.name.asStringRef(), paramsNode, returnType, bodyExp, nullNode) ; diff --git a/SparrowImplicitLib/logic/prologImpl/errorReporter.spr b/SparrowImplicitLib/logic/prologImpl/errorReporter.spr index 69728704..98d57a48 100644 --- a/SparrowImplicitLib/logic/prologImpl/errorReporter.spr +++ b/SparrowImplicitLib/logic/prologImpl/errorReporter.spr @@ -8,14 +8,14 @@ import os = os datatype ConsoleErrorReporter(sourceType: Type) if CharRange(#$sourceType) _source: sourceType; -fun raiseError(this: @ConsoleErrorReporter, loc: Location, message: StringRef) +fun raiseError(this: !ConsoleErrorReporter, loc: Location, message: StringRef) cout << message << flush this._printLocation(cout, loc) cout << flush os.exit(-1) -fun _printLocation(this: @ConsoleErrorReporter, os: @OutStream, loc: Location) - var line = this._getLineAtLocation(loc) +fun _printLocation(this: !ConsoleErrorReporter, os: !OutStream, loc: Location) + let line = this._getLineAtLocation(loc) //os << "(" << loc.start.line << ":" << loc.start.col << " - " << loc.end.line << ":" << loc.end.col << ")\n"; os << '>' << line << '\n' @@ -31,7 +31,7 @@ fun _printLocation(this: @ConsoleErrorReporter, os: @OutStream, loc: Location) os << '~'; os << '\n'; -fun _getLineAtLocation(this: @ConsoleErrorReporter, loc: Location): String +fun _getLineAtLocation(this: !ConsoleErrorReporter, loc: Location): String var sourceCopy = _source // Skip until our line @@ -41,10 +41,10 @@ fun _getLineAtLocation(this: @ConsoleErrorReporter, loc: Location): String sourceCopy.popFront() ++curLine - var len = indexOf(sourceCopy, '\n'.char) + let len = indexOf(sourceCopy, '\n'.char) return String(take(sourceCopy, len)) -fun mkConsoleErrorReporter(source: @CharRange) = ConsoleErrorReporter(-@typeOf(source))(source) +fun mkConsoleErrorReporter(source: !CharRange) = ConsoleErrorReporter(-@typeOf(source))(source) [ct] datatype CompilerErrorReporter diff --git a/SparrowImplicitLib/logic/prologImpl/ir.spr b/SparrowImplicitLib/logic/prologImpl/ir.spr index ab0ade57..14f49023 100644 --- a/SparrowImplicitLib/logic/prologImpl/ir.spr +++ b/SparrowImplicitLib/logic/prologImpl/ir.spr @@ -12,18 +12,18 @@ using allowNativeCodeGen = true predicates: Vector(SparrowPredicate) loc: LLocation - fun ctor(this: @SparrowPrologSystem, program: @PrologProgramPtr) + fun ctor(this: !SparrowPrologSystem, program: !PrologProgramPtr) this.predicates ctor this.loc ctor program.get().loc // Handle all predicate clauses for pptr: @PredicateClausePtr = program.get().predicates.all - var p: @PredicateClause = pptr.get - var name: @String = p.name - var arity: UInt = p.args.size + let p: @PredicateClause = pptr.get + let name: @String = p.name + let arity: UInt = p.args.size // Search for an existing predicate with same name and same arity - var r = findIf(predicates.all, + let r = findIf(predicates.all, (fun.{name,arity} (sp: @SparrowPredicate) = sp.name == name && sp.arity == arity)) // Id the predicate does not exist add it; otherwise add a clause to it @@ -32,7 +32,7 @@ using allowNativeCodeGen = true else r.front().addClause(p) - fun semanticCheck(this: @SparrowPrologSystem) + fun semanticCheck(this: !SparrowPrologSystem) for pred: @SparrowPredicate = predicates.all pred.semanticCheck @@ -53,7 +53,7 @@ using allowNativeCodeGen = true typeSets: Vector(LTypeSet) canBeNative: Bool - fun ctor(this: @SparrowPredicate, firstClause: @PredicateClausePtr) + fun ctor(this: !SparrowPredicate, firstClause: !PredicateClausePtr) this.name ctor firstClause.get().name this.arity ctor UInt(firstClause.get().args.size) this.firstClause ctor firstClause @@ -66,11 +66,11 @@ using allowNativeCodeGen = true this.addClause(firstClause) paramVars.resize(arity) - fun addClause(this: @SparrowPredicate, clause: @PredicateClausePtr) + fun addClause(this: !SparrowPredicate, clause: !PredicateClausePtr) assert(clause.get().args.size == arity) clauses.pushBack(clause) - fun semanticCheck(this: @SparrowPredicate) + fun semanticCheck(this: !SparrowPredicate) // Update the variables from all the clauses // Compute the types of the expressions and variables for i = 0..clauses.size @@ -80,7 +80,7 @@ using allowNativeCodeGen = true if ( allowNativeCodeGen ) this._checkNative - fun _checkClause(this: @SparrowPredicate, clause: @PredicateClause, clauseIdx: Int) + fun _checkClause(this: !SparrowPredicate, clause: !PredicateClause, clauseIdx: Int) // Assign type sets for bound args for i = 0..clause.args.size var arg: @ExpressionPtr = clause.args(i) @@ -96,7 +96,7 @@ using allowNativeCodeGen = true // Check conditions for c = clause.conditions.all this._checkCondition(clause, clauseIdx, c.get) - fun _checkCondition(this: @SparrowPredicate, clause: @PredicateClause, clauseIdx: Int, cond: @Condition) + fun _checkCondition(this: !SparrowPredicate, clause: !PredicateClause, clauseIdx: Int, cond: !Condition) if ( cond.kind == ckPredCall ) for arg = cond.args.all this._checkExpr(clause, clauseIdx, arg) @@ -106,10 +106,10 @@ using allowNativeCodeGen = true // The two expressions must have the same type this._mergeTypeSets(cond.args(0), cond.args(1)) - fun _checkExpr(this: @SparrowPredicate, clause: @PredicateClause, clauseIdx: Int, exprPtr: @ExpressionPtr) + fun _checkExpr(this: !SparrowPredicate, clause: !PredicateClause, clauseIdx: Int, exprPtr: !ExpressionPtr) var typeSet: @LTypeSet = this._getCreateTypeSet(exprPtr) - var expr: @Expression = exprPtr.get + let expr: @Expression = exprPtr.get if ( expr.kind == ekAtom ) typeSet.setAtomOnly(expr.loc) else if ( expr.kind == ekNumber ) @@ -174,7 +174,7 @@ using allowNativeCodeGen = true param.isRead = true param.isInput = true - fun _checkNative(this: @SparrowPredicate) + fun _checkNative(this: !SparrowPredicate) // Rules: // - input parameters: // - at least once present in a binary operations, where they require a value @@ -195,10 +195,10 @@ using allowNativeCodeGen = true for clause: @PredicateClausePtr = clauses.all for c: @ConditionPtr = clause.get().conditions.all - var cond: @Condition = c.get + let cond: @Condition = c.get if ( cond.kind == ckIsExpr ) - var left: @Expression = cond.args(0).get - var right: @Expression = cond.args(1).get + let left: @Expression = cond.args(0).get + let right: @Expression = cond.args(1).get // Right should always be a value if ( !this._isValue(right) ) @@ -206,8 +206,8 @@ using allowNativeCodeGen = true return // A name (param / local var) cannot be twice in an 'is' condition - var varName: @String = left.data - var idx: DiffType = indexOf(isVars.all, left.data) + let varName: @String = left.data + let idx: DiffType = indexOf(isVars.all, left.data) if ( idx >= 0 ) canBeNative = false return @@ -236,23 +236,23 @@ using allowNativeCodeGen = true canBeNative = false return - fun _isValue(this: @SparrowPredicate, expr: @Expression): Bool + fun _isValue(this: !SparrowPredicate, expr: !Expression): Bool // Anything except a variable is a value return expr.kind != ekVar - fun _checkCreateTypeSet(this: @SparrowPredicate, exp: @ExpressionPtr) + fun _checkCreateTypeSet(this: !SparrowPredicate, exp: !ExpressionPtr) if ( exp.get().typeSetIdx < 0 ) // Create a new type set - var idx = Int(typeSets.size) + let idx = Int(typeSets.size) typeSets.pushBack(LTypeSet(idx, LType())) var res: @LTypeSet = typeSets(idx) res.addExpression(exp) - fun _getCreateTypeSet(this: @SparrowPredicate, exp: @ExpressionPtr): @LTypeSet + fun _getCreateTypeSet(this: !SparrowPredicate, exp: !ExpressionPtr): @LTypeSet this._checkCreateTypeSet(exp) return typeSets(exp.get().typeSetIdx) - fun _mergeTypeSets(this: @SparrowPredicate, exp1, exp2: @ExpressionPtr) + fun _mergeTypeSets(this: !SparrowPredicate, exp1, exp2: !ExpressionPtr) this._checkCreateTypeSet(exp1) this._checkCreateTypeSet(exp2) typeSets(exp1.get().typeSetIdx).mergeWith(typeSets(exp2.get().typeSetIdx), exp2.get().loc) diff --git a/SparrowImplicitLib/logic/prologImpl/lType.spr b/SparrowImplicitLib/logic/prologImpl/lType.spr index 01041128..fc83008e 100644 --- a/SparrowImplicitLib/logic/prologImpl/lType.spr +++ b/SparrowImplicitLib/logic/prologImpl/lType.spr @@ -19,15 +19,15 @@ import meta = meta.compilerCore fun isAtomOnly(this: LType): Bool = this._testBit(atom) && !this._testBit(number) fun isNumberOnly(this: LType): Bool = this._testBit(number) && !this._testBit(atom) - fun setAtomOnly(this: @LType): Bool = this._setAlternativeBits(atom, number) - fun setNumberOnly(this: @LType): Bool = this._setAlternativeBits(number, atom) + fun setAtomOnly(this: !LType): Bool = this._setAlternativeBits(atom, number) + fun setNumberOnly(this: !LType): Bool = this._setAlternativeBits(number, atom) //fun setInputOnly(this: @LType): Bool = this._setAlternativeBits(input, output) //fun setOutputOnly(this: @LType): Bool = this._setAlternativeBits(output, input) fun _testBit(this: LType, b: Int): Bool = ((_bits !&! b) != 0) - fun _setAlternativeBits(this: @LType, toSet, toClear: Int): Bool + fun _setAlternativeBits(this: !LType, toSet, toClear: Int): Bool if !this._testBit(toSet) return false if this._testBit(toClear) @@ -40,24 +40,24 @@ import meta = meta.compilerCore expList: Vector(ExpressionPtr) ///< The list of all the expressions in this set, that share the same type idx: Int ///< The index of this type set - fun ctor(this: @LTypeSet, idx: Int, type: LType) + fun ctor(this: !LTypeSet, idx: Int, type: LType) this.type ctor type this.expList ctor this.idx ctor idx - fun addExpression(this: @LTypeSet, exp: @ExpressionPtr) + fun addExpression(this: !LTypeSet, exp: !ExpressionPtr) expList.pushBack(exp) exp.get().typeSetIdx = idx - fun setAtomOnly(this: @LTypeSet, loc: @Location) + fun setAtomOnly(this: !LTypeSet, loc: !Location) if !type.setAtomOnly this._reportTypeError(loc) - fun setNumberOnly(this: @LTypeSet, loc: @Location) + fun setNumberOnly(this: !LTypeSet, loc: !Location) if !type.setNumberOnly this._reportTypeError(loc) - fun mergeWith(this: @LTypeSet, other: @LTypeSet, mergeLocation: @Location) + fun mergeWith(this: !LTypeSet, other: !LTypeSet, mergeLocation: !Location) if this === other return @@ -83,7 +83,7 @@ import meta = meta.compilerCore //cout << " => " << this << endl << flush - fun >>(this: @LTypeSet, os: @OutStream) + fun >>(this: !LTypeSet, os: !OutStream) os << '{' << idx << "} " if type.isAtomOnly os << "str" @@ -95,32 +95,32 @@ import meta = meta.compilerCore for pe = expList.all os << ' ' << pe.get - fun _reportTypeError(this: @LTypeSet, loc: @Location) - var l = loc + fun _reportTypeError(this: !LTypeSet, loc: !Location) + let l = loc meta.report(meta.diagError, l, "Type mismatch: cannot combine atom with number") - var atomExp = this._findAtomExp + let atomExp = this._findAtomExp if atomExp isSet - var lAtom = atomExp.get().loc + let lAtom = atomExp.get().loc meta.report(meta.diagInfo, lAtom, "See also atom expression") - var numExp = this._findNumberExp + let numExp = this._findNumberExp if numExp isSet - var lNum = numExp.get().loc + let lNum = numExp.get().loc meta.report(meta.diagInfo, lNum, "See also number expression") meta.raise - fun _findNumberExp(this: @LTypeSet): ExpressionPtr + fun _findNumberExp(this: !LTypeSet): ExpressionPtr for e = expList.all - var k = e.get().kind + let k = e.get().kind if k == ekNumber || k == ekOpPlus || k == ekOpMinus || k == ekOpMul || k == ekOpDiv return e return ExpressionPtr() - fun _findAtomExp(this: @LTypeSet): ExpressionPtr + fun _findAtomExp(this: !LTypeSet): ExpressionPtr for e = expList.all - var k = e.get().kind + let k = e.get().kind if k == ekAtom return e return ExpressionPtr() diff --git a/SparrowImplicitLib/logic/prologImpl/lexer.spr b/SparrowImplicitLib/logic/prologImpl/lexer.spr index 3556d563..35fe90b1 100644 --- a/SparrowImplicitLib/logic/prologImpl/lexer.spr +++ b/SparrowImplicitLib/logic/prologImpl/lexer.spr @@ -12,12 +12,12 @@ datatype Lexer(sourceType, errorReporterType: Type) _curToken: Token _curLocation: Location -fun ctor(this: @Lexer, source: @this._SourceType, errorReporter: @this._ErrorReporterType) - var startLoc: Location +fun ctor(this: !Lexer, source: !this._SourceType, errorReporter: !this._ErrorReporterType) + let startLoc: !Location startLoc setOne this.ctor(source, errorReporter, startLoc) -fun ctor(this: @Lexer, source: @this._SourceType, errorReporter: @this._ErrorReporterType, startLoc: Location) +fun ctor(this: !Lexer, source: !this._SourceType, errorReporter: !this._ErrorReporterType, startLoc: Location) this._source ctor source this._errorReporter ctor errorReporter this._curToken ctor @@ -28,18 +28,18 @@ fun ctor(this: @Lexer, source: @this._SourceType, errorReporter: @this._ErrorRep // Read the first token this._curToken = this._getNextToken -fun mkLexer(source: @CharRange, errorReporter: @AnyType) = Lexer(-@typeOf(source), -@typeOf(errorReporter))(source, errorReporter) -fun mkLexer(source: @CharRange, errorReporter: @AnyType, startLoc: Location) = Lexer(-@typeOf(source), -@typeOf(errorReporter))(source, errorReporter, startLoc) +fun mkLexer(source: !CharRange, errorReporter: !AnyType) = Lexer(-@typeOf(source), -@typeOf(errorReporter))(source, errorReporter) +fun mkLexer(source: !CharRange, errorReporter: !AnyType, startLoc: Location) = Lexer(-@typeOf(source), -@typeOf(errorReporter))(source, errorReporter, startLoc) -fun isEmpty(this: @Lexer) = _source.isEmpty -fun front(this: @Lexer) = _curToken -fun ()(this: @Lexer) = _curToken +fun isEmpty(this: !Lexer) = _source.isEmpty +fun front(this: !Lexer) = _curToken +fun ()(this: !Lexer) = _curToken -fun popFront(this: @Lexer) { _curToken = this._getNextToken } +fun popFront(this: !Lexer) { _curToken = this._getNextToken } //fun pre_++(this: @Lexer): RetType { this.popFront; return _curToken } -//fun post_++(this: @Lexer): RetType { var res = _curToken; this.popFront; return res } +//fun post_++(this: @Lexer): RetType { let res = _curToken; this.popFront; return res } -fun _getNextToken(this: @Lexer): Token +fun _getNextToken(this: !Lexer): Token // The current location starts where the last one ended _curLocation stepOver @@ -48,7 +48,7 @@ fun _getNextToken(this: @Lexer): Token return Token(_curLocation, tkEof) // Get the first character in the source - var ch = _source() + let ch = _source() // Check for whitespace if isSpace(ch) @@ -63,21 +63,21 @@ fun _getNextToken(this: @Lexer): Token if isAlnum(ch) // Check for numbers, variables and string atoms if isDigit(ch) - var data = this._consumeNumber + let data = this._consumeNumber return Token(_curLocation, tkNumber, data) else if isUpper(ch) - var data = this._consumeIdentifier + let data = this._consumeIdentifier return Token(_curLocation, tkVar, data) else - var data = this._consumeIdentifier + let data = this._consumeIdentifier if data == String("is") return Token(_curLocation, tkIs, data) return Token(_curLocation, tkAtom, data) else if ch == '$'.char - var data = this._consumeAntiQuote + let data = this._consumeAntiQuote return Token(_curLocation, tkAntiQuote, data) else - var chNext = this._advanceSource + let chNext = this._advanceSource if ch == '('.char return Token(_curLocation, tkLParen) else if ch == ')'.char @@ -102,36 +102,36 @@ fun _getNextToken(this: @Lexer): Token this._advanceSource return Token(_curLocation, tkClause) - var errMsg: String = "Invalid character found while parsing Prolog code: " + let errMsg: String = "Invalid character found while parsing Prolog code: " errMsg.append(ch) _errorReporter.raiseError(_curLocation, errMsg.asStringRef) return Token(_curLocation, tkEof) -fun _consumeWhiteSpace(this: @Lexer) +fun _consumeWhiteSpace(this: !Lexer) var ch = _source() while !_source.isEmpty && isSpace(ch) ch = this._advanceSource -fun _consumeLineComment(this: @Lexer) +fun _consumeLineComment(this: !Lexer) var ch = _source() while !_source.isEmpty && ch != '\n'.char ch = this._advanceSource if !_source.isEmpty this._advanceSource -fun _consumeNumber(this: @Lexer): String +fun _consumeNumber(this: !Lexer): String var res: String var ch = _source() while !_source.isEmpty && isDigit(ch) res.pushBack(ch) ch = this._advanceSource return res -fun _consumeIdentifier(this: @Lexer): String +fun _consumeIdentifier(this: !Lexer): String var res: String var ch = _source() while !_source.isEmpty && isAlnum(ch) res.pushBack(ch) ch = this._advanceSource return res -fun _consumeAntiQuote(this: @Lexer): String +fun _consumeAntiQuote(this: !Lexer): String var ch = this._advanceSource if ch == '{'.char var res: String @@ -156,7 +156,7 @@ fun _consumeAntiQuote(this: @Lexer): String _curLocation stepOver return this._consumeIdentifier -fun _advanceSource(this: @Lexer): Char +fun _advanceSource(this: !Lexer): Char if _source() == '\n'.char _curLocation addLines 1 else diff --git a/SparrowImplicitLib/logic/prologImpl/nodes.spr b/SparrowImplicitLib/logic/prologImpl/nodes.spr index 237790e4..ec9fcc21 100644 --- a/SparrowImplicitLib/logic/prologImpl/nodes.spr +++ b/SparrowImplicitLib/logic/prologImpl/nodes.spr @@ -36,13 +36,13 @@ using ckIsExpr = 9 args: Vector(SharedPtr(Expression)) predName: String - fun ctor(this: @Condition, loc: @Location, predName: @String, args: @Vector(SharedPtr(Expression))) + fun ctor(this: !Condition, loc: !Location, predName: !String, args: !Vector(SharedPtr(Expression))) this.kind ctor ckPredCall this.loc ctor loc this.predName ctor predName this.args ctor args - fun ctor(this: @Condition, loc: @Location, isLeft, isRight: @SharedPtr(Expression)) + fun ctor(this: !Condition, loc: !Location, isLeft, isRight: !SharedPtr(Expression)) this.kind ctor ckIsExpr this.loc ctor loc this.predName ctor @@ -59,7 +59,7 @@ using ckIsExpr = 9 typeSetIdx: Int paramIdx: Int - fun ctor(this: @Expression, kind: Int, loc: @Location) + fun ctor(this: !Expression, kind: Int, loc: !Location) this.kind ctor kind this.loc ctor loc this.data ctor @@ -68,7 +68,7 @@ using ckIsExpr = 9 this.typeSetIdx ctor -1 this.paramIdx ctor -1 - fun ctor(this: @Expression, kind: Int, loc: @Location, data: @String) + fun ctor(this: !Expression, kind: Int, loc: !Location, data: !String) this.kind ctor kind this.loc ctor loc this.data ctor data @@ -77,7 +77,7 @@ using ckIsExpr = 9 this.typeSetIdx ctor -1 this.paramIdx ctor -1 - fun ctor(this: @Expression, kind: Int, loc: @Location, left, right: @SharedPtr(Expression)) + fun ctor(this: !Expression, kind: Int, loc: !Location, left, right: !SharedPtr(Expression)) this.kind ctor kind this.loc ctor loc this.data ctor @@ -86,24 +86,24 @@ using ckIsExpr = 9 this.typeSetIdx ctor -1 this.paramIdx ctor -1 - fun mkAtom(loc: @Location, atom: @String): ExpressionPtr = mkShared(Expression, ekAtom, loc, atom) - fun mkNumber(loc: @Location, data: @String): ExpressionPtr = mkShared(Expression, ekNumber, loc, data) - fun mkVar(loc: @Location, varName: @String): ExpressionPtr = mkShared(Expression, ekVar, loc, varName) - fun mkAntiQuote(loc: @Location, aq: @String): ExpressionPtr = mkShared(Expression, ekAntiQuote, loc, aq) + fun mkAtom(loc: !Location, atom: !String): ExpressionPtr = mkShared(Expression, ekAtom, loc, atom) + fun mkNumber(loc: !Location, data: !String): ExpressionPtr = mkShared(Expression, ekNumber, loc, data) + fun mkVar(loc: !Location, varName: !String): ExpressionPtr = mkShared(Expression, ekVar, loc, varName) + fun mkAntiQuote(loc: !Location, aq: !String): ExpressionPtr = mkShared(Expression, ekAntiQuote, loc, aq) - fun mkOpPlus(loc: @Location, l, r: @ExpressionPtr): ExpressionPtr = mkShared(Expression, ekOpPlus, loc, l, r) - fun mkOpMinus(loc: @Location, l, r: @ExpressionPtr): ExpressionPtr = mkShared(Expression, ekOpMinus, loc, l, r) - fun mkOpMul(loc: @Location, l, r: @ExpressionPtr): ExpressionPtr = mkShared(Expression, ekOpMul, loc, l, r) - fun mkOpDiv(loc: @Location, l, r: @ExpressionPtr): ExpressionPtr = mkShared(Expression, ekOpDiv, loc, l, r) + fun mkOpPlus(loc: !Location, l, r: !ExpressionPtr): ExpressionPtr = mkShared(Expression, ekOpPlus, loc, l, r) + fun mkOpMinus(loc: !Location, l, r: !ExpressionPtr): ExpressionPtr = mkShared(Expression, ekOpMinus, loc, l, r) + fun mkOpMul(loc: !Location, l, r: !ExpressionPtr): ExpressionPtr = mkShared(Expression, ekOpMul, loc, l, r) + fun mkOpDiv(loc: !Location, l, r: !ExpressionPtr): ExpressionPtr = mkShared(Expression, ekOpDiv, loc, l, r) - fun mkPredCall(loc: @Location, predName: @String, args: @Vector(ExpressionPtr)): ConditionPtr = mkShared(Condition, loc, predName, args) - fun mkIsExpr(loc: @Location, l, r: @ExpressionPtr): ConditionPtr = mkShared(Condition, loc, l, r) + fun mkPredCall(loc: !Location, predName: !String, args: !Vector(ExpressionPtr)): ConditionPtr = mkShared(Condition, loc, predName, args) + fun mkIsExpr(loc: !Location, l, r: !ExpressionPtr): ConditionPtr = mkShared(Condition, loc, l, r) - fun >>(this: @PrologProgram, os: @OutStream) + fun >>(this: !PrologProgram, os: !OutStream) for p = predicates.all() os << p << endl - fun >>(this: @PredicateClause, os: @OutStream) + fun >>(this: !PredicateClause, os: !OutStream) os << name << "(" for i = 0..args.size() if i>0 @@ -116,7 +116,7 @@ using ckIsExpr = 9 os << conditions(i).get() os << "." - fun >>(this: @Condition, os: @OutStream) + fun >>(this: !Condition, os: !OutStream) if kind == ckPredCall os << predName << '(' for i = 0..args.size() @@ -127,7 +127,7 @@ using ckIsExpr = 9 else os << args(0).get() << " is " << args(1).get() - fun >>(this: @Expression, os: @OutStream) + fun >>(this: !Expression, os: !OutStream) if kind == ekAtom os << data else if kind == ekNumber diff --git a/SparrowImplicitLib/logic/prologImpl/parser.spr b/SparrowImplicitLib/logic/prologImpl/parser.spr index 3200295e..a4b99311 100644 --- a/SparrowImplicitLib/logic/prologImpl/parser.spr +++ b/SparrowImplicitLib/logic/prologImpl/parser.spr @@ -10,7 +10,7 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token _lexer: lexerType _errorReporter: errorReporterType - fun parse(this: @Parser): PrologProgramPtr + fun parse(this: !Parser): PrologProgramPtr var resptr = mkShared(PrologProgram) var res: @PrologProgram = resptr.get @@ -23,7 +23,7 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token return resptr - fun _parsePredicateClause(this: @Parser): PredicateClausePtr + fun _parsePredicateClause(this: !Parser): PredicateClausePtr var resptr = mkShared(PredicateClause) var res: @PredicateClause = resptr.get @@ -60,17 +60,17 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token res.loc copyEnd tok.loc return resptr - fun _parsePredicateClauseArgs(this: @Parser, predClause: @PredicateClause) + fun _parsePredicateClauseArgs(this: !Parser, predClause: !PredicateClause) while true // Expect a term appropriate for an argument - var arg = this._parseTerm - var argKind = arg.get().kind + let arg = this._parseTerm + let argKind = arg.get().kind if argKind != ekVar && argKind != ekAtom && argKind != ekNumber this._errorReporter.raiseError(arg.get().loc, "Invalid argument found expected variable, atom or number") predClause.args.pushBack(arg) // A right parenthesis is our terminator - var tok = this._lexer() + let tok = this._lexer() if tok.type == tkRParen break @@ -79,13 +79,13 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token ++this._lexer // The terminator (right parenthesis) is not consumed - fun _parsePredicateConditions(this: @Parser, predClause: @PredicateClause) + fun _parsePredicateConditions(this: !Parser, predClause: !PredicateClause) while true // Expect a condition expression predClause.conditions.pushBack(this._parseCondition) // A dot is our terminator - var tok = this._lexer() + let tok = this._lexer() if tok.type == tkDot break @@ -94,12 +94,12 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token ++this._lexer // The terminator (dot) is not consumed - fun _parseCondition(this: @Parser): ConditionPtr + fun _parseCondition(this: !Parser): ConditionPtr // A condition can be either a predicate call or an 'is' expression // We distinguish between them by the first token // If we start with an atom, it must be a predicate call - var tok = this._lexer() + let tok = this._lexer() if tok.type == tkAtom return this._parsePredicateCall @@ -108,12 +108,12 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token this._invalidToken(tok, String("atom or variable")) return this._parseIsExpression - fun _parsePredicateCall(this: @Parser): ConditionPtr + fun _parsePredicateCall(this: !Parser): ConditionPtr // Read predicate name var tok = (this._lexer++) this._expectToken(tok, tkAtom) var loc = tok.loc - var name = tok.data + let name = tok.data // Expect '(' tok = (this._lexer++) @@ -131,13 +131,13 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token loc copyEnd tok.loc return mkPredCall(loc, name, args) - fun _parsePredicateCallArgs(this: @Parser, args: @Vector(ExpressionPtr)) + fun _parsePredicateCallArgs(this: !Parser, args: !Vector(ExpressionPtr)) while true // Expect an expression args.pushBack(this._parseExpression) // A right parenthesis is our terminator - var tok = this._lexer() + let tok = this._lexer() if tok.type == tkRParen break @@ -146,11 +146,11 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token ++this._lexer // The terminator (right parenthesis) is not consumed - fun _parseIsExpression(this: @Parser): ConditionPtr + fun _parseIsExpression(this: !Parser): ConditionPtr // Read variable name var tok = this._lexer() this._expectToken(tok, tkVar) - var varName = this._parseTerm + let varName = this._parseTerm var loc = tok.loc // Expect 'is' @@ -158,15 +158,15 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token this._expectToken(tok, tkIs) // Expect an expression - var exp = this._parseExpression + let exp = this._parseExpression // Update the end part of the location loc copyEnd tok.loc return mkIsExpr(loc, varName, exp) - fun _parseExpression(this: @Parser) = this._parseMulDivExpression + fun _parseExpression(this: !Parser) = this._parseMulDivExpression - fun _parseMulDivExpression(this: @Parser): ExpressionPtr + fun _parseMulDivExpression(this: !Parser): ExpressionPtr // Parse left part of the expression var left = this._parsePlusMinusExpression var loc = left.get().loc @@ -174,13 +174,13 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token // Consume all the muls and divs while true // Is there also a right part? - var tok = this._lexer() + let tok = this._lexer() if tok.type != tkOpMul && tok.type != tkOpDiv return left // Yes, there is still a right part, so parse it ++this._lexer - var right = this._parsePlusMinusExpression + let right = this._parsePlusMinusExpression // Combine the left and right into one single expression loc copyEnd right.get().loc @@ -190,7 +190,7 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token left = mkOpDiv(loc, left, right) return ExpressionPtr() - fun _parsePlusMinusExpression(this: @Parser): ExpressionPtr + fun _parsePlusMinusExpression(this: !Parser): ExpressionPtr // Parse left part of the expression var left = this._parseSimpleExpression var loc = left.get().loc @@ -198,13 +198,13 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token // Consume all the pluses and minuses while true // Is there also a right part? - var tok = this._lexer() + let tok = this._lexer() if tok.type != tkOpPlus && tok.type != tkOpMinus return left // Yes, there is still a right part, so parse it ++this._lexer - var right = this._parseSimpleExpression + let right = this._parseSimpleExpression // Combine the left and right into one single expression loc copyEnd right.get().loc @@ -214,12 +214,12 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token left = mkOpMinus(loc, left, right) return ExpressionPtr() - fun _parseSimpleExpression(this: @Parser): ExpressionPtr + fun _parseSimpleExpression(this: !Parser): ExpressionPtr // Accept expression in parenthesis var tok = this._lexer() if tok.type == tkLParen ++this._lexer - var res = this._parseExpression + let res = this._parseExpression // Expect ')' tok = (this._lexer++) @@ -230,8 +230,8 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token // Otherwise this must be a term return this._parseTerm - fun _parseTerm(this: @Parser): ExpressionPtr - var tok = (this._lexer++) + fun _parseTerm(this: !Parser): ExpressionPtr + let tok = (this._lexer++) if tok.type == tkAtom return mkAtom(tok.loc, tok.data) else if tok.type == tkNumber @@ -244,12 +244,12 @@ concept TokenRange(x: Range) if -@(x.RetType) == Token this._invalidToken(tok, String("atom, variable, number or antiquote")) return ExpressionPtr() - fun _expectToken(this: @Parser, tok: @Token, expected: Int) + fun _expectToken(this: !Parser, tok: !Token, expected: Int) if tok.type != expected this._invalidToken(tok, tokenTypeToString(expected)) - fun _invalidToken(this: @Parser, tok: @Token, expected: @String) - var msg: String = String("Invalid token found: ") + tokenTypeToString(tok.type) + String("; expected: ") + expected + fun _invalidToken(this: !Parser, tok: !Token, expected: !String) + let msg: String = String("Invalid token found: ") + tokenTypeToString(tok.type) + String("; expected: ") + expected this._errorReporter.raiseError(tok.loc, msg.asStringRef) - fun mkParser(lexer: @TokenRange, errorReporter: @AnyType) = Parser(-@typeOf(lexer), -@typeOf(errorReporter))(lexer, errorReporter) + fun mkParser(lexer: !TokenRange, errorReporter: !AnyType) = Parser(-@typeOf(lexer), -@typeOf(errorReporter))(lexer, errorReporter) diff --git a/SparrowImplicitLib/logic/prologImpl/sprCodeDump.spr b/SparrowImplicitLib/logic/prologImpl/sprCodeDump.spr index 68407f13..8b128b3f 100644 --- a/SparrowImplicitLib/logic/prologImpl/sprCodeDump.spr +++ b/SparrowImplicitLib/logic/prologImpl/sprCodeDump.spr @@ -2,7 +2,7 @@ import ir import std.string //[ct] fun dumpProlog(os: @OutStream, sps: @SparrowPrologSystem) -[ct] fun dumpProlog(os: @StringOutputStream, sps: @SparrowPrologSystem) +[ct] fun dumpProlog(os: !StringOutputStream, sps: !SparrowPrologSystem) //Impl.dumpPrologSystem(os, sps); //testStringOutputStream var sos: OutStream = StringOutputStream() @@ -12,15 +12,15 @@ import std.string //os << flush; [ct] -fun testStream(os: @OutStream) +fun testStream(os: !OutStream) os << 1 package Impl - [ct] fun dumpPrologSystem(os: @OutStream, sps: @SparrowPrologSystem) + [ct] fun dumpPrologSystem(os: !OutStream, sps: !SparrowPrologSystem) for p: @SparrowPredicate = sps.predicates.all() dumpSprPredicate(os, p); - [ct] fun dumpSprPredicate(os: @OutStream, pred: @SparrowPredicate) + [ct] fun dumpSprPredicate(os: !OutStream, pred: !SparrowPredicate) // Dump the type sets //for typeSet: @LTypeSet = pred.typeSets.all() //{ @@ -28,7 +28,7 @@ package Impl //} //os << flush; - var genNative = allowNativeCodeGen && pred.canBeNative + let genNative = allowNativeCodeGen && pred.canBeNative // Header line os << "fun " << pred.name @@ -42,7 +42,7 @@ package Impl os << endl // If we have local variables, create a scope and put the variables in it - var withScope = !pred.localVars.isEmpty() + let withScope = !pred.localVars.isEmpty() var tab: StringRef = " " if ( withScope ) os << "{" << endl @@ -51,7 +51,7 @@ package Impl dumpType(os, pred, lv.get(), false, genNative) if ( genNative ) // Don't initialize native integers - var typeSet: @LTypeSet = pred.typeSets(lv.get().typeSetIdx) + let typeSet: @LTypeSet = pred.typeSets(lv.get().typeSetIdx) if ( typeSet.type.isNumberOnly() ) os << " = Uninitialized()"; os << ';' << endl @@ -77,15 +77,15 @@ package Impl if ( genNative ) dumpNativeWrapper(os, pred); - [ct] fun dumpParameters(os: @OutStream, pred: @SparrowPredicate, genNative: Bool) + [ct] fun dumpParameters(os: !OutStream, pred: !SparrowPredicate, genNative: Bool) if ( pred.arity > 0 ) os << "(" for i = 0..pred.paramVars.size() - var param: @Parameter = pred.paramVars(i) + let param: @Parameter = pred.paramVars(i) if ( i>0 ) os << ", "; os << "_" << (i+1) << ": " - var isRef = !genNative || param.isOutput + let isRef = !genNative || param.isOutput dumpType(os, pred, param.expr.get(), isRef, genNative) //if ( param.isInput ) // os << ""; @@ -94,17 +94,17 @@ package Impl os << ")" ; - [ct] fun dumpClause(os: @OutStream, pred: @SparrowPredicate, clause: @PredicateClause) + [ct] fun dumpClause(os: !OutStream, pred: !SparrowPredicate, clause: !PredicateClause) var condWritten = false dumpBoundArgs(os, pred, clause, condWritten) dumpClauseConditions(os, pred, clause, condWritten) if ( !condWritten ) os << " true"; - [ct] fun dumpBoundArgs(os: @OutStream, pred: @SparrowPredicate, clause: @PredicateClause, condWritten: @Bool) - var genNative = allowNativeCodeGen && pred.canBeNative + [ct] fun dumpBoundArgs(os: !OutStream, pred: !SparrowPredicate, clause: !PredicateClause, condWritten: !Bool) + let genNative = allowNativeCodeGen && pred.canBeNative for i = 0..clause.args.size() - var arg: @ExpressionPtr = clause.args(i) + let arg: @ExpressionPtr = clause.args(i) if ( arg.isSet() && arg.get().kind != ekVar ) if ( !condWritten ) condWritten = true; @@ -113,9 +113,9 @@ package Impl os << "_" << (i+1) - var idx = arg.get().paramIdx + let idx = arg.get().paramIdx assert(idx >= 0) - var param: @Parameter = pred.paramVars(idx) + let param: @Parameter = pred.paramVars(idx) if ( genNative && param.isInput ) os << " == "; else if ( genNative && param.isOutput ) @@ -127,7 +127,7 @@ package Impl ; ; - [ct] fun dumpClauseConditions(os: @OutStream, pred: @SparrowPredicate, clause: @PredicateClause, condWritten: @Bool) + [ct] fun dumpClauseConditions(os: !OutStream, pred: !SparrowPredicate, clause: !PredicateClause, condWritten: !Bool) for cond: @ConditionPtr = clause.conditions.all() if ( !condWritten ) condWritten = true; @@ -140,9 +140,9 @@ package Impl dumpIsExpr(os, pred, clause, cond.get()); ; - [ct] fun dumpPredCall(os: @OutStream, pred: @SparrowPredicate, clause: @PredicateClause, predCall: @Condition) - var genNative = allowNativeCodeGen && pred.canBeNative - var isRecursive = predCall.predName == clause.name + [ct] fun dumpPredCall(os: !OutStream, pred: !SparrowPredicate, clause: !PredicateClause, predCall: !Condition) + let genNative = allowNativeCodeGen && pred.canBeNative + let isRecursive = predCall.predName == clause.name if ( isRecursive ) if ( genNative ) os << predCall.predName << "_native("; @@ -156,17 +156,17 @@ package Impl dumpExpr(os, pred, predCall.args(i).get()); os << ')' - [ct] fun dumpIsExpr(os: @OutStream, pred: @SparrowPredicate, clause: @PredicateClause, isExpr: @Condition) - var left: @Expression = isExpr.args(0).get() - var right: @Expression = isExpr.args(1).get() - var genNative = allowNativeCodeGen && pred.canBeNative + [ct] fun dumpIsExpr(os: !OutStream, pred: !SparrowPredicate, clause: !PredicateClause, isExpr: !Condition) + let left: @Expression = isExpr.args(0).get() + let right: @Expression = isExpr.args(1).get() + let genNative = allowNativeCodeGen && pred.canBeNative dumpExpr(os, pred, left) os << ife(genNative, " =/ ", " /=/ ") dumpExpr(os, pred, right) - [ct] fun dumpExpr(os: @OutStream, pred: @SparrowPredicate, expr: @Expression) - var genNative = allowNativeCodeGen && pred.canBeNative + [ct] fun dumpExpr(os: !OutStream, pred: !SparrowPredicate, expr: !Expression) + let genNative = allowNativeCodeGen && pred.canBeNative if ( expr.kind == ekAtom ) os << '"' << expr.data << '"'; @@ -189,14 +189,14 @@ package Impl //os << ':'; //dumpType(os, pred, expr, false, false); - [ct] fun dumpBinExpr(os: @OutStream, pred: @SparrowPredicate, left, right: @Expression, op: StringRef) + [ct] fun dumpBinExpr(os: !OutStream, pred: !SparrowPredicate, left, right: !Expression, op: StringRef) os << '(' dumpExpr(os, pred, left) os << op dumpExpr(os, pred, right) os << ')' - [ct] fun dumpType(os: @OutStream, pred: @SparrowPredicate, expr: @Expression, isRef, genNative: Bool) + [ct] fun dumpType(os: !OutStream, pred: !SparrowPredicate, expr: !Expression, isRef, genNative: Bool) if ( isRef ) os << "@"; @@ -205,7 +205,7 @@ package Impl return assert(expr.typeSetIdx >= 0) - var typeSet: @LTypeSet = pred.typeSets(expr.typeSetIdx) + let typeSet: @LTypeSet = pred.typeSets(expr.typeSetIdx) if ( typeSet.type.isNumberOnly() ) dumpIntegerType(os, genNative); else if ( typeSet.type.isAtomOnly() ) @@ -214,19 +214,19 @@ package Impl dumpAtomType(os, genNative); // Defaults to atom type //os << '{' << expr.typeSetIdx << '}'; - [ct] fun dumpIntegerType(os: @OutStream, genNative: Bool) + [ct] fun dumpIntegerType(os: !OutStream, genNative: Bool) if ( genNative ) os << "Int"; else os << "LInt"; - [ct] fun dumpAtomType(os: @OutStream, genNative: Bool) + [ct] fun dumpAtomType(os: !OutStream, genNative: Bool) if ( genNative ) os << "String"; else os << "LStr"; - [ct] fun dumpNativeWrapper(os: @OutStream, pred: @SparrowPredicate) + [ct] fun dumpNativeWrapper(os: !OutStream, pred: !SparrowPredicate) dumpWrapperClass(os, pred) // Express the logic predicate in terms of the wrapper class @@ -239,10 +239,10 @@ package Impl os << "_" << (i+1); os << ");" << endl - [ct] fun dumpWrapperClass(os: @OutStream, pred: @SparrowPredicate) - var tab: StringRef = " " - var tab2: StringRef = " " - var tab3: StringRef = " " + [ct] fun dumpWrapperClass(os: !OutStream, pred: !SparrowPredicate) + let tab: StringRef = " " + let tab2: StringRef = " " + let tab3: StringRef = " " os << "class " << pred.name << "_pred_wrapper" << endl os << "{" << endl @@ -263,7 +263,7 @@ package Impl os << tab << '{' << endl // Checks for the input parameters for i = 0..pred.paramVars.size() - var p: @Parameter = pred.paramVars(i) + let p: @Parameter = pred.paramVars(i) if ( p.isInput ) if ( i==0 ) os << tab2 << "if ( "; @@ -276,7 +276,7 @@ package Impl os << tab3 << "return false;" << endl // Create some values for the output parameters for i = 0..pred.paramVars.size() - var p: @Parameter = pred.paramVars(i) + let p: @Parameter = pred.paramVars(i) if ( p.isOutput ) os << tab2 << "_" << (i+1) << " = " dumpType(os, pred, p.expr.get(), false, true) @@ -293,7 +293,7 @@ package Impl // The variables corresponding to the parameters for i = 0..pred.paramVars.size() - var p: @Parameter = pred.paramVars(i) + let p: @Parameter = pred.paramVars(i) os << tab << "var _" << (i+1) << ": " dumpType(os, pred, p.expr.get(), false, false) os << ';' << endl diff --git a/SparrowImplicitLib/logic/prologImpl/token.spr b/SparrowImplicitLib/logic/prologImpl/token.spr index 052a1e8f..6d988fd3 100644 --- a/SparrowImplicitLib/logic/prologImpl/token.spr +++ b/SparrowImplicitLib/logic/prologImpl/token.spr @@ -26,16 +26,16 @@ datatype Token type: Int data: String -fun ctor(this: @Token, loc: @Location, type: Int) +fun ctor(this: !Token, loc: !Location, type: Int) this.loc ctor loc this.type ctor type this.data ctor -fun ctor(this: @Token, loc: @Location, type: Int, data: @String) +fun ctor(this: !Token, loc: !Location, type: Int, data: !String) this.loc ctor loc this.type ctor type this.data ctor data -fun >>(this: @Token, os: @OutStream) +fun >>(this: !Token, os: !OutStream) if type == tkEof os << "" else if type == tkWhitespace diff --git a/SparrowImplicitLib/logic/recurse.spr b/SparrowImplicitLib/logic/recurse.spr index e2731a9f..90ae75a9 100644 --- a/SparrowImplicitLib/logic/recurse.spr +++ b/SparrowImplicitLib/logic/recurse.spr @@ -3,52 +3,52 @@ module logic.recurse import predicates import std.bind -fun rec(pred: @AnyType) \ +fun rec(pred: !AnyType) \ = _mkRecurse(mkBindAll(pred)) \ if isValid(pred()) -fun rec(pred, a1: @AnyType) \ +fun rec(pred, a1: !AnyType) \ = _mkRecurse(mkBindAll(pred, mkLRef(a1))) \ if isValid(pred(a1)) -fun rec(pred, a1, a2: @AnyType) \ +fun rec(pred, a1, a2: !AnyType) \ = _mkRecurse(mkBindAll(pred, a1, mkLRef(a2))) \ if isValid(pred(a1, a2)) -fun rec(pred, a1, a2, a3: @AnyType) \ +fun rec(pred, a1, a2, a3: !AnyType) \ = _mkRecurse(mkBindAll(pred, mkLRef(a1), mkLRef(a2), mkLRef(a3))) \ if isValid(pred(a1, a2, a3)) -fun rec(pred, a1, a2, a3, a4: @AnyType) \ +fun rec(pred, a1, a2, a3, a4: !AnyType) \ = _mkRecurse(mkBindAll(pred, mkLRef(a1), mkLRef(a2), mkLRef(a3), mkLRef(a4))) \ if isValid(pred(a1, a2, a3, a4)) -fun rec(pred, a1, a2, a3, a4, a5: @AnyType) \ +fun rec(pred, a1, a2, a3, a4, a5: !AnyType) \ = _mkRecurse(mkBindAll(pred, mkLRef(a1), mkLRef(a2), mkLRef(a3), mkLRef(a4), mkLRef(a5))) \ if isValid(pred(a1, a2, a3, a4, a5)) -fun _mkRecurse(predGenerator: @AnyType) = Recurse(-@typeOf(predGenerator))(predGenerator) +fun _mkRecurse(predGenerator: !AnyType) = Recurse(-@typeOf(predGenerator))(predGenerator) datatype Recurse(predGeneratorType: Type) _relation: Predicate _predGenerator: predGeneratorType using _PredGen = predGeneratorType -fun ctor(this: @Recurse, other: @Recurse) +fun ctor(this: !Recurse, other: !Recurse) this._relation ctor other._relation this._predGenerator ctor other._predGenerator [ct] if isValid(logicDebug) cout << "Recurse.copy ctor: " << this << "\n" -fun ctor(this: @Recurse, predGenerator: @this._PredGen) +fun ctor(this: !Recurse, predGenerator: !this._PredGen) this._relation ctor this._predGenerator ctor predGenerator [ct] if isValid(logicDebug) cout << "Recurse.ctor: " << this << "\n" -fun ()(this: @Recurse): Bool +fun ()(this: !Recurse): Bool if _relation.isNull() _relation = _predGenerator() [ct] if isValid(logicDebug) cout << "Recurse.(): " << this << "\n" return _relation() -fun >>(this: @Recurse, os: @OutStream) - os << "Recurse(this=" << mkStreamRefWrapper(this) \ +fun >>(this: !Recurse, os: !OutStream) + os << "Recurse(this=" << UntypedPtr(this) \ << ", fun=" << _relation [ct] if isValid( os << _predGenerator ) os << ", gen=" << _predGenerator diff --git a/SparrowImplicitLib/math.spr b/SparrowImplicitLib/math.spr index dd855d33..5f5e9eed 100644 --- a/SparrowImplicitLib/math.spr +++ b/SparrowImplicitLib/math.spr @@ -34,4 +34,4 @@ module math [native("llvm.rint.f64")] fun rint(x: Double): Double [native("llvm.rint.f64")] fun nearbyint(x: Double): Double -fun abs(x: Integer) = ife(x<0, -x, x) +fun abs(x: Integer) = ife(x<0, -x, typeOf(x)(x)) diff --git a/SparrowImplicitLib/meta/compiler.spr b/SparrowImplicitLib/meta/compiler.spr index d73f32cc..0b167db3 100644 --- a/SparrowImplicitLib/meta/compiler.spr +++ b/SparrowImplicitLib/meta/compiler.spr @@ -4,4 +4,4 @@ [native("$meta.Compiler.registerFrontendFun")] fun registerFrontendFun(ext, funName: StringRef): Bool [native("$meta.Compiler.parseSprExpression")] - fun parseSprExpression(loc: @Location, exp: StringRef): AstNode + fun parseSprExpression(loc: Location const, exp: StringRef): AstNode diff --git a/SparrowImplicitLib/meta/compilerCore.spr b/SparrowImplicitLib/meta/compilerCore.spr index 3162231e..cc7006eb 100644 --- a/SparrowImplicitLib/meta/compilerCore.spr +++ b/SparrowImplicitLib/meta/compilerCore.spr @@ -5,10 +5,12 @@ import std.contiguousMemoryRange /// Type representing a compilation context -- some information describing how /// a particular node should be compiled -[ct] datatype CompilationContext = UntypedPtr +[ct, bitcopiable] +datatype CompilationContext = UntypedPtr /// Type representing a compiler-internal type -[ct] datatype AstType = UntypedPtr +[ct, bitcopiable] +datatype AstType = UntypedPtr /// The compiler AST node using AstNode = CompilerAstNode @@ -44,8 +46,8 @@ fun mkDiagnostic(type: Int, loc: Location, message: StringRef): Diagnostic [ct] /// Function called to report a diagnostic in the compiler [native("$meta.report")] - fun report(type: Int, loc: @Location, message: StringRef) - fun report(diag: @Diagnostic) = report(diag.type, diag.loc, diag.message) + fun report(type: Int, loc: Location const, message: StringRef) + fun report(diag: Diagnostic const) = report(diag.type, diag.loc, diag.message) /// When this is called, we stop the compiler [native("$meta.raise")] @@ -129,16 +131,16 @@ fun mkDiagnostic(type: Int, loc: Location, message: StringRef): Diagnostic fun hasProperty(n: AstNode, name: StringRef): Bool /// Get a string property (can fail) [native("$meta.AstNode.getPropertyString")] - fun getPropertyString(n: AstNode, name: StringRef, value: @StringRef): Bool + fun getPropertyString(n: AstNode, name: StringRef, value: !StringRef): Bool /// Get an integer property (can fail) [native("$meta.AstNode.getPropertyInt")] - fun getPropertyInt(n: AstNode, name: StringRef, value: @Int): Bool + fun getPropertyInt(n: AstNode, name: StringRef, value: !Int): Bool /// Get an node property (can fail) [native("$meta.AstNode.getPropertyNode")] - fun getPropertyNode(n: AstNode, name: StringRef, value: @AstNode): Bool + fun getPropertyNode(n: AstNode, name: StringRef, value: !AstNode): Bool /// Get an type property (can fail) [native("$meta.AstNode.getPropertyType")] - fun getPropertyType(n: AstNode, name: StringRef, value: @AstType): Bool + fun getPropertyType(n: AstNode, name: StringRef, value: !AstType): Bool /// Set a string property [native("$meta.AstNode.setProperty")] fun setProperty(n: AstNode, name: StringRef, value: StringRef) diff --git a/SparrowImplicitLib/meta/featherNodes.spr b/SparrowImplicitLib/meta/featherNodes.spr index b058a052..aa2b8890 100644 --- a/SparrowImplicitLib/meta/featherNodes.spr +++ b/SparrowImplicitLib/meta/featherNodes.spr @@ -3,64 +3,64 @@ [ct] [native("$meta.Feather.mkNodeList")] - fun mkNodeList(loc: @Location, nodes: AstNodeRange = AstNodeRange(), voidResult: Bool = false): AstNode + fun mkNodeList(loc: Location const, nodes: AstNodeRange = AstNodeRange(), voidResult: Bool = false): AstNode [native("$meta.Feather.addToNodeList")] fun addToNodeList(list, newNode: AstNode): AstNode [native("$meta.Feather.appendNodeList")] fun appendNodeList(main, newList: AstNode): AstNode [native("$meta.Feather.mkNop")] - fun mkNop(loc: @Location): AstNode + fun mkNop(loc: Location const): AstNode [native("$meta.Feather.mkTypeNode")] - fun mkTypeNode(loc: @Location, type: AstType): AstNode + fun mkTypeNode(loc: Location const, type: AstType): AstNode [native("$meta.Feather.mkBackendCode")] - fun mkBackendCode(loc: @Location, code: StringRef, mode: Int): AstNode + fun mkBackendCode(loc: Location const, code: StringRef, mode: Int): AstNode [native("$meta.Feather.mkLocalSpace")] - fun mkLocalSpace(loc: @Location, children: AstNodeRange): AstNode + fun mkLocalSpace(loc: Location const, children: AstNodeRange): AstNode [native("$meta.Feather.mkGlobalConstructAction")] - fun mkGlobalConstructAction(loc: @Location, action: AstNode): AstNode + fun mkGlobalConstructAction(loc: Location const, action: AstNode): AstNode [native("$meta.Feather.mkGlobalDestructAction")] - fun mkGlobalDestructAction(loc: @Location, action: AstNode): AstNode + fun mkGlobalDestructAction(loc: Location const, action: AstNode): AstNode [native("$meta.Feather.mkScopeDestructAction")] - fun mkScopeDestructAction(loc: @Location, action: AstNode): AstNode + fun mkScopeDestructAction(loc: Location const, action: AstNode): AstNode [native("$meta.Feather.mkTempDestructAction")] - fun mkTempDestructAction(loc: @Location, action: AstNode): AstNode + fun mkTempDestructAction(loc: Location const, action: AstNode): AstNode [native("$meta.Feather.mkFunction")] - fun mkFunction(loc: @Location, name: StringRef, resType: AstNode, params: @AstNodeRange, body: AstNode, mode: Int): AstNode + fun mkFunction(loc: Location const, name: StringRef, resType: AstNode, params: !AstNodeRange, body: AstNode, mode: Int): AstNode [native("$meta.Feather.mkClass")] - fun mkClass(loc: @Location, name: StringRef, fields: @AstNodeRange, mode: Int): AstNode + fun mkClass(loc: Location const, name: StringRef, fields: !AstNodeRange, mode: Int): AstNode [native("$meta.Feather.mkVar")] - fun mkVar(loc: @Location, name: StringRef, type: AstNode, mode: Int): AstNode + fun mkVar(loc: Location const, name: StringRef, type: AstNode, mode: Int): AstNode [native("$meta.Feather.mkCtValue")] - fun mkCtValue(loc: @Location, type: AstType, data: StringRef): AstNode + fun mkCtValue(loc: Location const, type: AstType, data: StringRef): AstNode [native("$meta.Feather.mkNull")] - fun mkNull(loc: @Location, typeNode: AstNode): AstNode + fun mkNull(loc: Location const, typeNode: AstNode): AstNode [native("$meta.Feather.mkVarRef")] - fun mkVarRef(loc: @Location, varDecl: AstNode): AstNode + fun mkVarRef(loc: Location const, varDecl: AstNode): AstNode [native("$meta.Feather.mkFieldRef")] - fun mkFieldRef(loc: @Location, obj, fieldDecl: AstNode): AstNode + fun mkFieldRef(loc: Location const, obj, fieldDecl: AstNode): AstNode [native("$meta.Feather.mkFunRef")] - fun mkFunRef(loc: @Location, funDecl: AstNode, resType: AstNode): AstNode + fun mkFunRef(loc: Location const, funDecl: AstNode, resType: AstNode): AstNode [native("$meta.Feather.mkFunCall")] - fun mkFunCall(loc: @Location, funDecl: AstNode, args: @AstNode): AstNode + fun mkFunCall(loc: Location const, funDecl: AstNode, args: !AstNode): AstNode [native("$meta.Feather.mkMemLoad")] - fun mkMemLoad(loc: @Location, exp: AstNode): AstNode + fun mkMemLoad(loc: Location const, exp: AstNode): AstNode [native("$meta.Feather.mkMemStore")] - fun mkMemStore(loc: @Location, value, address: AstNode): AstNode + fun mkMemStore(loc: Location const, value, address: AstNode): AstNode [native("$meta.Feather.mkBitcast")] - fun mkBitcast(loc: @Location, destType: AstNode, node: AstNode): AstNode + fun mkBitcast(loc: Location const, destType: AstNode, node: AstNode): AstNode [native("$meta.Feather.mkConditional")] - fun mkConditional(loc: @Location, condition, alt1, alt2: AstNode): AstNode + fun mkConditional(loc: Location const, condition, alt1, alt2: AstNode): AstNode [native("$meta.Feather.mkIf")] - fun mkIf(loc: @Location, condition, thenClause, elseClause: AstNode, isCt: Bool = false): AstNode + fun mkIf(loc: Location const, condition, thenClause, elseClause: AstNode, isCt: Bool = false): AstNode [native("$meta.Feather.mkWhile")] - fun mkWhile(loc: @Location, condition, body, step: AstNode, isCt: Bool = false): AstNode + fun mkWhile(loc: Location const, condition, body, step: AstNode, isCt: Bool = false): AstNode [native("$meta.Feather.mkBreak")] fun mkBreak(loc: Location): AstNode [native("$meta.Feather.mkContinue")] fun mkContinue(loc: Location): AstNode [native("$meta.Feather.mkReturn")] - fun mkReturn(loc: @Location, exp: AstNode = AstNode()): AstNode + fun mkReturn(loc: Location const, exp: AstNode = AstNode()): AstNode diff --git a/SparrowImplicitLib/meta/location.spr b/SparrowImplicitLib/meta/location.spr index 342308ae..cffa04ce 100644 --- a/SparrowImplicitLib/meta/location.spr +++ b/SparrowImplicitLib/meta/location.spr @@ -1,16 +1,19 @@ module meta.location /// A line + column pair, indicating a position in a file +[bitcopiable] datatype LineCol line, col: UInt /// Type describing a source code; for now we just use an untyped Ptr -datatype SourceCode = @Byte +[bitcopiable] +datatype SourceCode = UntypedPtr -fun >>(s: @SourceCode, os: @OutStream) - os << mkStreamRefWrapper(s.data) +fun >>(s: SourceCode, os: !OutStream) + os << s.data /// Type that holds the location information: a source code and a range of chars into it +[bitcopiable] datatype Location sourceCode: SourceCode start, end: LineCol @@ -20,75 +23,75 @@ datatype Location // setOne(this) fun mkLineCol(line, col: UInt): LineCol - var res: LineCol + let res: !LineCol res.line = line res.col = col return res fun mkLocation: Location - var res: Location + let res: !Location setOne(res) return res [autoCt] fun mkLocation(sourceCode: SourceCode): Location - var res: Location + let res: !Location res.sourceCode = sourceCode setOne(res) return res fun mkLocation(sourceCode: SourceCode, start, end: LineCol): Location - var res: Location + let res: !Location res.sourceCode = sourceCode res.start = start res.end = end return res /// Set the location to (1,1,1,1), the first character in a stream -fun setOne(l: @Location) +fun setOne(l: !Location) l.start.line = 1 l.start.col = 1 l.end.line = 1 l.end.col = 1 /// Make the start position to be the same as the end position -fun stepOver(l: @Location) +fun stepOver(l: !Location) l.start = l.end /// Add the given number of columns to the end position; start position remains unchanged -fun addColumns(l: @Location, count: UInt) +fun addColumns(l: !Location, count: UInt) l.end.col += count /// Add the given number of lines to the end position; start position remains unchanged -fun addLines(l: @Location, count: UInt) +fun addLines(l: !Location, count: UInt) l.end.line += count l.end.col = 1 /// Set the start position of this location to the start position of the given location; the end position remains unchanged -fun copyStart(l, other: @Location) +fun copyStart(l: !Location, other: Location) l.start = other.start /// Set the end position of this location to the end position of the given location; the start position remains unchanged -fun copyEnd(l, other: @Location) +fun copyEnd(l: !Location, other: Location) l.end = other.end /// Set this location with both start and end to equal the start of the given location -fun setAsStartOf(l, other: @Location) +fun setAsStartOf(l: !Location, other: Location) l.start = other.start l.end = other.start /// Set this location with both start and end to equal the end of the given location -fun setAsEndOf(l, other: @Location) +fun setAsEndOf(l: !Location, other: Location) l.start = other.end l.end = other.end /// Computes a location that spans between the two given location -fun span(start, end: @Location): Location +fun span(start, end: Location): Location var res = start res copyEnd end return res /// Compare locations based on start pos then on end pos -fun <(lhs, rhs: @Location): Bool +fun <(lhs, rhs: Location): Bool if lhs.start.line < rhs.start.line ; return true if lhs.start.line > rhs.start.line ; return false if lhs.start.col < rhs.start.col ; return true @@ -98,17 +101,17 @@ fun <(lhs, rhs: @Location): Bool return lhs.end.col < rhs.end.col /// Compare location line-col -fun <(lhs, rhs: @LineCol): Bool +fun <(lhs, rhs: LineCol): Bool if lhs.line < rhs.line ; return true if lhs.line > rhs.line ; return false return lhs.col < rhs.col -fun >>(l: @Location, os: @OutStream) +fun >>(l: Location, os: !OutStream) os << l.start << '-' << l.end - if l.sourceCode.data !== null + if l.sourceCode.data != UntypedPtr() os << " @" << l.sourceCode -fun >>(lc: LineCol, os: @OutStream) +fun >>(lc: LineCol, os: !OutStream) os << lc.line << ':' << lc.col // Source code & location functions exposed by the compiler @@ -125,5 +128,5 @@ fun >>(lc: LineCol, os: @OutStream) /// Get the code string corresponding to the given location [native("$meta.Location.getCorrespondingCode")] - fun getCorrespondingCode(l: @Location): StringRef + fun getCorrespondingCode(l: Location const): StringRef diff --git a/SparrowImplicitLib/meta/sparrowNodes.spr b/SparrowImplicitLib/meta/sparrowNodes.spr index d3d2a7df..5308b324 100644 --- a/SparrowImplicitLib/meta/sparrowNodes.spr +++ b/SparrowImplicitLib/meta/sparrowNodes.spr @@ -2,92 +2,92 @@ [ct] [native("$meta.Sparrow.mkModifiers")] - fun mkModifiers(loc: @Location, main, mods: AstNode): AstNode + fun mkModifiers(loc: Location const, main, mods: AstNode): AstNode [native("$meta.Sparrow.mkModule")] - fun mkModule(loc: @Location, moduleName, declarations: AstNode): AstNode + fun mkModule(loc: Location const, moduleName, declarations: AstNode): AstNode [native("$meta.Sparrow.mkImportName")] - fun mkImportName(loc: @Location, moduleName, importedDeclNames: AstNode, alias: StringRef): AstNode + fun mkImportName(loc: Location const, moduleName, importedDeclNames: AstNode, alias: StringRef): AstNode [native("$meta.Sparrow.mkSprUsing")] - fun mkSprUsing(loc: @Location, alias: StringRef, usingNode: AstNode): AstNode + fun mkSprUsing(loc: Location const, alias: StringRef, usingNode: AstNode): AstNode [native("$meta.Sparrow.mkSprPackage")] - fun mkSprPackage(loc: @Location, name: StringRef, children: AstNode): AstNode + fun mkSprPackage(loc: Location const, name: StringRef, children: AstNode): AstNode [native("$meta.Sparrow.mkSprVariable")] - fun mkSprVariable(loc: @Location, name: StringRef, typeNode, init: AstNode): AstNode + fun mkSprVariable(loc: Location const, name: StringRef, typeNode, init: AstNode): AstNode [native("$meta.Sparrow.mkSprDatatype")] - fun mkSprDatatype(loc: @Location, name: StringRef, parameters, baseClasses, ifClause, children: AstNode): AstNode + fun mkSprDatatype(loc: Location const, name: StringRef, parameters, baseClasses, ifClause, children: AstNode): AstNode [native("$meta.Sparrow.mkSprField")] - fun mkSprField(loc: @Location, name: StringRef, typeNode, init: AstNode): AstNode + fun mkSprField(loc: Location const, name: StringRef, typeNode, init: AstNode): AstNode [native("$meta.Sparrow.mkSprConcept")] - fun mkSprConcept(loc: @Location, name: StringRef, paramName: StringRef, baseConcept, ifClause: AstNode): AstNode + fun mkSprConcept(loc: Location const, name: StringRef, paramName: StringRef, baseConcept, ifClause: AstNode): AstNode [native("$meta.Sparrow.mkSprFunction")] - fun mkSprFunction(loc: @Location, name: StringRef, parmeters, returnType, body, ifClause: AstNode): AstNode + fun mkSprFunction(loc: Location const, name: StringRef, parmeters, returnType, body, ifClause: AstNode): AstNode [native("$meta.Sparrow.mkSprFunctionExp")] - fun mkSprFunctionExp(loc: @Location, name: StringRef, parameters, returnType, bodyExp, ifClause: AstNode): AstNode + fun mkSprFunctionExp(loc: Location const, name: StringRef, parameters, returnType, bodyExp, ifClause: AstNode): AstNode [native("$meta.Sparrow.mkSprParameter")] - fun mkSprParameter(loc: @Location, name: StringRef, typeNode, init: AstNode): AstNode + fun mkSprParameter(loc: Location const, name: StringRef, typeNode, init: AstNode): AstNode [native("$meta.Sparrow.mkSprAutoParameter")] - fun mkSprAutoParameter(loc: @Location, name: StringRef): AstNode + fun mkSprAutoParameter(loc: Location const, name: StringRef): AstNode [native("$meta.Sparrow.mkIdentifier")] - fun mkIdentifier(loc: @Location, id: StringRef): AstNode + fun mkIdentifier(loc: Location const, id: StringRef): AstNode [native("$meta.Sparrow.mkCompoundExp")] - fun mkCompoundExp(loc: @Location, base: AstNode, id: StringRef): AstNode + fun mkCompoundExp(loc: Location const, base: AstNode, id: StringRef): AstNode [native("$meta.Sparrow.mkStarExp")] - fun mkStarExp(loc: @Location, base: AstNode, operName: StringRef): AstNode + fun mkStarExp(loc: Location const, base: AstNode, operName: StringRef): AstNode [native("$meta.Sparrow.mkPostfixOp")] - fun mkPostfixOp(loc: @Location, op: StringRef, base: AstNode): AstNode + fun mkPostfixOp(loc: Location const, op: StringRef, base: AstNode): AstNode [native("$meta.Sparrow.mkInfixOp")] - fun mkInfixOp(loc: @Location, op: StringRef, arg1, arg2: AstNode): AstNode + fun mkInfixOp(loc: Location const, op: StringRef, arg1, arg2: AstNode): AstNode [native("$meta.Sparrow.mkPrefixOp")] - fun mkPrefixOp(loc: @Location, op: StringRef, base: AstNode): AstNode + fun mkPrefixOp(loc: Location const, op: StringRef, base: AstNode): AstNode [native("$meta.Sparrow.mkFunApplication")] - fun mkFunApplication(loc: @Location, base, arguments: AstNode): AstNode + fun mkFunApplication(loc: Location const, base, arguments: AstNode): AstNode [native("$meta.Sparrow.mkOperatorCall")] - fun mkOperatorCall(loc: @Location, arg1: AstNode, op: StringRef, arg2: AstNode): AstNode + fun mkOperatorCall(loc: Location const, arg1: AstNode, op: StringRef, arg2: AstNode): AstNode [native("$meta.Sparrow.mkConditionalExp")] - fun mkConditionalExp(loc: @Location, cond, alt1, alt2: AstNode): AstNode + fun mkConditionalExp(loc: Location const, cond, alt1, alt2: AstNode): AstNode [native("$meta.Sparrow.mkParenthesisExp")] - fun mkParenthesisExp(loc: @Location, exp: AstNode): AstNode + fun mkParenthesisExp(loc: Location const, exp: AstNode): AstNode [native("$meta.Sparrow.mkIntLiteral")] - fun mkIntLiteral(loc: @Location, value: Int): AstNode + fun mkIntLiteral(loc: Location const, value: Int): AstNode [native("$meta.Sparrow.mkUIntLiteral")] - fun mkUIntLiteral(loc: @Location, value: UInt): AstNode + fun mkUIntLiteral(loc: Location const, value: UInt): AstNode [native("$meta.Sparrow.mkLongLiteral")] - fun mkLongLiteral(loc: @Location, value: Long): AstNode + fun mkLongLiteral(loc: Location const, value: Long): AstNode [native("$meta.Sparrow.mkULongLiteral")] - fun mkULongLiteral(loc: @Location, value: ULong): AstNode + fun mkULongLiteral(loc: Location const, value: ULong): AstNode [native("$meta.Sparrow.mkFloatLiteral")] - fun mkFloatLiteral(loc: @Location, value: Float): AstNode + fun mkFloatLiteral(loc: Location const, value: Float): AstNode [native("$meta.Sparrow.mkDoubleLiteral")] - fun mkDoubleLiteral(loc: @Location, value: Double): AstNode + fun mkDoubleLiteral(loc: Location const, value: Double): AstNode [native("$meta.Sparrow.mkCharLiteral")] - fun mkCharLiteral(loc: @Location, value: Char): AstNode + fun mkCharLiteral(loc: Location const, value: Char): AstNode [native("$meta.Sparrow.mkStringLiteral")] - fun mkStringLiteral(loc: @Location, value: StringRef): AstNode + fun mkStringLiteral(loc: Location const, value: StringRef): AstNode [native("$meta.Sparrow.mkNullLiteral")] fun mkNullLiteral(loc: Location): AstNode [native("$meta.Sparrow.mkBoolLiteral")] - fun mkBoolLiteral(loc: @Location, value: Bool): AstNode + fun mkBoolLiteral(loc: Location const, value: Bool): AstNode [native("$meta.Sparrow.mkLambdaExp")] - fun mkLambdaExp(loc: @Location, parameters, returnType, body, bodyExp, closureParams: AstNode): AstNode + fun mkLambdaExp(loc: Location const, parameters, returnType, body, bodyExp, closureParams: AstNode): AstNode [native("$meta.Sparrow.mkExpressionStmt")] - fun mkExpressionStmt(loc: @Location, exp: AstNode): AstNode + fun mkExpressionStmt(loc: Location const, exp: AstNode): AstNode [native("$meta.Sparrow.mkBlockStmt")] - fun mkBlockStmt(loc: @Location, statements: AstNode): AstNode + fun mkBlockStmt(loc: Location const, statements: AstNode): AstNode [native("$meta.Sparrow.mkIfStmt")] - fun mkIfStmt(loc: @Location, cond, thenClause, elseClause: AstNode): AstNode + fun mkIfStmt(loc: Location const, cond, thenClause, elseClause: AstNode): AstNode [native("$meta.Sparrow.mkForStmt")] - fun mkForStmt(loc: @Location, name: StringRef, type, range, action: AstNode): AstNode + fun mkForStmt(loc: Location const, name: StringRef, type, range, action: AstNode): AstNode [native("$meta.Sparrow.mkWhileStmt")] - fun mkWhileStmt(loc: @Location, cond, step, action: AstNode): AstNode + fun mkWhileStmt(loc: Location const, cond, step, action: AstNode): AstNode [native("$meta.Sparrow.mkBreakStmt")] fun mkBreakStmt(loc: Location): AstNode [native("$meta.Sparrow.mkContinueStmt")] fun mkContinueStmt(loc: Location): AstNode [native("$meta.Sparrow.mkReturnStmt")] - fun mkReturnStmt(loc: @Location, exp: AstNode): AstNode + fun mkReturnStmt(loc: Location const, exp: AstNode): AstNode diff --git a/SparrowImplicitLib/os.spr b/SparrowImplicitLib/os.spr index 1f8ded26..d1ef290b 100644 --- a/SparrowImplicitLib/os.spr +++ b/SparrowImplicitLib/os.spr @@ -8,62 +8,63 @@ fun exit(code: Int) fun systemCall(cmd: StringRef): Int return CApi.system(cmd.cStr) +[bitcopiable] datatype File = UntypedPtr [protected] - fun ctor(this: @File) + fun ctor(this: !File) ; - fun ctor(this: @File, filename: StringRef, mode: StringRef = "r") + fun ctor(this: !File, filename: StringRef, mode: StringRef = "r") this.data = CApi.fopen(filename.cStr, mode.cStr).data // Move ctor and operator - fun ctor(this, other: @File) + fun ctor(this, other: !File) this.data = other.data other.data = UntypedPtr() - fun dtor(this: @File) + fun dtor(this: !File) this.close - fun =(this, other: @File) + fun =(this, other: !File) this.data = other.data other.data = UntypedPtr() fun openFile(filename: StringRef, mode: StringRef = "r"): File return CApi.fopen(filename.cStr, mode.cStr) -fun close(this: @File) +fun close(this: !File) if this.isOpen CApi.fclose(this) data = UntypedPtr() -fun flush(this: @File) = ife(this.isOpen, CApi.fflush(this), -1) +fun flush(this: !File) = ife(this.isOpen, CApi.fflush(this), -1) -fun isOpen(this: @File) = data != UntypedPtr() -fun isEof(this: @File) = 0 != CApi.feof(this) +fun isOpen(this: !File) = data != UntypedPtr() +fun isEof(this: !File) = 0 != CApi.feof(this) -fun readChar(this: @File): Char = Char(CApi.fgetc(this)) -fun readLine(this: @File): String +fun readChar(this: !File): Char = Char(CApi.fgetc(this)) +fun readLine(this: !File): String var res: String = 256 - var cstr: @Char = CApi.fgets(res(0), 256, this) + let cstr: @Char = CApi.fgets(UntypedPtr(res(0)), 256, this) if cstr === null res.clear else res.resize(cStringLen(cstr)) return res -fun write(this: @File, data: StringRef): Int - var res: Int = CApi.fwrite(reinterpretCast(@Byte, data.begin), 1, UInt(data.size), this) +fun write(this: !File, data: StringRef): Int + var res: Int = CApi.fwrite(UntypedPtr(data.begin), 1, UInt(data.size), this) return res //! Returns the file size. //! Note: as a side effect, seeks the file to the beginning -fun size(this: @File): Int +fun size(this: !File): Int CApi.fseek(this, 0, CApi.SEEK_END) var res: Int = CApi.ftell(this) CApi.rewind(this) return res -fun all(this: @File) = FileRange(this) +fun all(this: !File) = FileRange(this) datatype FileRange using RetType = Char @@ -72,7 +73,7 @@ datatype FileRange _isEmpty: Bool _cur: Char -fun ctor(this: @FileRange, file: @File) +fun ctor(this: !FileRange, file: !File) this._file := file _isEmpty = true _cur ctor @@ -81,9 +82,9 @@ fun ctor(this: @FileRange, file: @File) _isEmpty = false [protected] - fun isEmpty(s: @FileRange) = s._isEmpty - fun front(s: @FileRange) = s._cur - fun popFront(s: @FileRange) + fun isEmpty(s: FileRange) = s._isEmpty + fun front(s: FileRange) = s._cur + fun popFront(s: !FileRange) // Try reading a char; we don't know yet about eof, we need to check it afterwards s._cur = s._file.readChar if s._file.isEof @@ -97,9 +98,9 @@ package CApi [native("fflush")] fun fflush(file: File): Int [native("feof")] fun feof(file: File): Int [native("fgetc")] fun fgetc(file: File): Int - [native("fgets")] fun fgets(buffer: @Char, bufSize: Int, file: File): @Char - [native("fread")] fun fread(buffer: @Byte, size, count: UInt, file: File): UInt - [native("fwrite")] fun fwrite(buffer: @Byte, size, count: UInt, file: File): UInt + [native("fgets")] fun fgets(buffer: UntypedPtr, bufSize: Int, file: File): @Char + [native("fread")] fun fread(buffer: UntypedPtr, size, count: UInt, file: File): UInt + [native("fwrite")] fun fwrite(buffer: UntypedPtr, size, count: UInt, file: File): UInt [native("fseek")] fun fseek(file: File, offset: Long, origin: Int) [native("rewind")] fun rewind(file: File) [native("ftell")] fun ftell(file: File): Long diff --git a/SparrowImplicitLib/par/atomic.spr b/SparrowImplicitLib/par/atomic.spr index 2d43c50c..e597dfa6 100644 --- a/SparrowImplicitLib/par/atomic.spr +++ b/SparrowImplicitLib/par/atomic.spr @@ -18,79 +18,79 @@ datatype Atomic(T: Type) if sizeOf(T) <= 8 _value: _UnderlyingType [protected] - fun ctor(this: @Atomic, v: this.ValueType) + fun ctor(this: !Atomic, v: this.ValueType) _value ctor _toUnderlying(this, v) - fun =(lhs: @AtomicType, rhs: typeOf(lhs)) + fun =(lhs: !AtomicType, rhs: typeOf(lhs)) lhs store (rhs load) //! Stores a value inside the given atomic, using the assignment operator - fun =(this: @AtomicType, val: this.ValueType) = this store val + fun =(this: !AtomicType, val: this.ValueType) = this store val //! Loads the value from an atomic; returns a non-atomic value - [native("_Atomic_load32")] fun load(this: @AtomicInt): Int - [native("_Atomic_load64")] fun load(this: @AtomicLong): Long - fun load(this: @NonStdAtomicType): ValueType \ + [native("_Atomic_load32")] fun load(this: AtomicInt const): Int + [native("_Atomic_load64")] fun load(this: AtomicLong const): Long + fun load(this: NonStdAtomicType): ValueType \ = this._fromUnderlying(this._baseAtomic load) //! Stores a value inside the given atomic - [native("_Atomic_store32")] fun store(this: @AtomicInt, newVal: Int) - [native("_Atomic_store64")] fun store(this: @AtomicLong, newVal: Long) - fun store(this: @NonStdAtomicType, newVal: AnyType) + [native("_Atomic_store32")] fun store(this: !AtomicInt, newVal: Int) + [native("_Atomic_store64")] fun store(this: !AtomicLong, newVal: Long) + fun store(this: !NonStdAtomicType, newVal: AnyType) this._baseAtomic store this._toUnderlying(newVal) //! Fetches the current value of an atomic, and stores a new value in the atomic - [native("_Atomic_fetchAndStore32")] fun fetchAndStore(x: @AtomicInt, newVal: Int): Int - [native("_Atomic_fetchAndStore64")] fun fetchAndStore(x: @AtomicLong, newVal: Long): Long - fun fetchAndStore(x: @NonStdAtomicType, newVal: AnyType): x.ValueType \ + [native("_Atomic_fetchAndStore32")] fun fetchAndStore(x: !AtomicInt, newVal: Int): Int + [native("_Atomic_fetchAndStore64")] fun fetchAndStore(x: !AtomicLong, newVal: Long): Long + fun fetchAndStore(x: !NonStdAtomicType, newVal: AnyType): x.ValueType \ = x._fromUnderlying(x._baseAtomic fetchAndStore x._toUnderlying(newVal)) //! Fetch the value of the atomic, and then add the given value to it - [native("_Atomic_fetchAndAdd32")] fun fetchAndAdd(x: @AtomicInt, val: Int): Int - [native("_Atomic_fetchAndAdd64")] fun fetchAndAdd(x: @AtomicLong, val: Long): Long - fun fetchAndAdd(x: @NonStdAtomicType, val: AnyType): x.ValueType \ + [native("_Atomic_fetchAndAdd32")] fun fetchAndAdd(x: !AtomicInt, val: Int): Int + [native("_Atomic_fetchAndAdd64")] fun fetchAndAdd(x: !AtomicLong, val: Long): Long + fun fetchAndAdd(x: !NonStdAtomicType, val: AnyType): x.ValueType \ = x._fromUnderlying(x._baseAtomic fetchAndAdd x._toUnderlying(val)) \ if Integer(#$x.ValueType) //! Fetch the value of the atomic and the increment it - fun fetchAndIncrement(x: @AtomicInteger) = x fetchAndAdd 1 + fun fetchAndIncrement(x: !AtomicInteger) = x fetchAndAdd 1 //! Fetch the value of the atomic and the decrement it - fun fetchAndDecrement(x: @AtomicInteger) = x fetchAndAdd -1 + fun fetchAndDecrement(x: !AtomicInteger) = x fetchAndAdd -1 //! Adds the given value to the atomic - fun += (x: @AtomicInteger, val: AnyType) { x fetchAndAdd val; } + fun += (x: !AtomicInteger, val: AnyType) { x fetchAndAdd val; } //! Subtracts the given value to the atomic - fun -= (x: @AtomicInteger, val: AnyType) { x fetchAndAdd (-val); } + fun -= (x: !AtomicInteger, val: AnyType) { x fetchAndAdd (-val); } //! Increment the atomic value; returns the new value - fun pre_++(x: @AtomicInteger): x.ValueType = (x fetchAndIncrement)+1 + fun pre_++(x: !AtomicInteger): x.ValueType = (x fetchAndIncrement)+1 //! Increment the atomic value; returns the old value - fun post_++(x: @AtomicInteger): x.ValueType = (x fetchAndIncrement) + fun post_++(x: !AtomicInteger): x.ValueType = (x fetchAndIncrement) //! Decrement the atomic value; returns the new value - fun pre_--(x: @AtomicInteger): x.ValueType = (x fetchAndDecrement)-1 + fun pre_--(x: !AtomicInteger): x.ValueType = (x fetchAndDecrement)-1 //! Decrement the atomic value; returns the old value - fun post_--(x: @AtomicInteger): x.ValueType = (x fetchAndDecrement) + fun post_--(x: !AtomicInteger): x.ValueType = (x fetchAndDecrement) - fun _toUnderlying(this: @Atomic, val: this.ValueType): this._UnderlyingType + fun _toUnderlying(this: Atomic, val: this.ValueType): this._UnderlyingType var res: _UnderlyingType reinterpretCast(@ValueType, res) = val return res - fun _fromUnderlying(this: @Atomic, val: this._UnderlyingType): this.ValueType + fun _fromUnderlying(this: Atomic, val: this._UnderlyingType): this.ValueType var res: ValueType res = reinterpretCast(@ValueType, val) return res - fun _baseAtomic(this: @Atomic): @Atomic(_UnderlyingType) = reinterpretCast(@Atomic(_UnderlyingType), this) + fun _baseAtomic(this: Atomic): @Atomic(_UnderlyingType) = reinterpretCast(@Atomic(_UnderlyingType), this) //! Compare the atomic value with the given comparand; if equal store 'newVal' and return true; if not equal returns false -[native("_Atomic_compareAndSwap32")] fun compareAndSwap(x: @AtomicInt, newVal, comparand: Int): Bool -[native("_Atomic_compareAndSwap64")] fun compareAndSwap(x: @AtomicLong, newVal, comparand: Long): Bool -fun compareAndSwap(x: @NonStdAtomicType, newVal, comparand: AnyType): Bool \ +[native("_Atomic_compareAndSwap32")] fun compareAndSwap(x: !AtomicInt, newVal, comparand: Int): Bool +[native("_Atomic_compareAndSwap64")] fun compareAndSwap(x: !AtomicLong, newVal, comparand: Long): Bool +fun compareAndSwap(x: !NonStdAtomicType, newVal, comparand: AnyType): Bool \ = compareAndSwap(x._baseAtomic, x._toUnderlying(newVal), x._toUnderlying(comparand)) //! Converts a regular value to an atomic value //! Returns the reference to the same memory address //! Used to make it possible to use atomic operations -fun asAtomic(val: @AnyType): @Atomic(-@typeOf(val)) if sizeOf(val) == sizeOf(Atomic(-@typeOf(val))) +fun asAtomic(val: !AnyType): @Atomic(-@typeOf(val)) if sizeOf(val) == sizeOf(Atomic(-@typeOf(val))) return reinterpretCast(@Atomic(-@typeOf(val)), val) package _Impl diff --git a/SparrowImplicitLib/par/config.spr b/SparrowImplicitLib/par/config.spr index 5ecdb210..deade66b 100644 --- a/SparrowImplicitLib/par/config.spr +++ b/SparrowImplicitLib/par/config.spr @@ -2,11 +2,12 @@ module par.config import std.ptr +[bitcopiable] datatype NativeThreadHandle = Byte Ptr // Opaque type -fun >>(h: NativeThreadHandle, os: @OutStream) +fun >>(h: NativeThreadHandle, os: !OutStream) if ( h.impl.isSet ) - os << mkStreamRefWrapper(h.impl.get) + os << UntypedPtr(h.impl.get) else os << "null" @@ -15,7 +16,7 @@ using InvalidThreadHandle = NativeThreadHandle() //! Get the number of available logical CPU cores for our process //! This dictates how much parallelism we have to be exploit fun getAvailableCoresNum(): UInt - var maxProcs: Long = _Impl.sysconf(_Impl._SC_NPROCESSORS_ONLN) + let maxProcs: Long = _Impl.sysconf(_Impl._SC_NPROCESSORS_ONLN) return ife(maxProcs<1, UInt(1), UInt(maxProcs)) // TODO: also consider process affinity diff --git a/SparrowImplicitLib/par/locks.spr b/SparrowImplicitLib/par/locks.spr index bd635d56..fe733f83 100644 --- a/SparrowImplicitLib/par/locks.spr +++ b/SparrowImplicitLib/par/locks.spr @@ -16,11 +16,11 @@ datatype ScopedLock(T: Type) if Lockable(#$T) _theLock: @LockType -fun ctor(this: @ScopedLock, theLock: @this.LockType) +fun ctor(this: !ScopedLock, theLock: !this.LockType) this._theLock := theLock _theLock lock -fun dtor(this: @ScopedLock) +fun dtor(this: !ScopedLock) _theLock unlock //! Class used to try to take the lock for the duration of a scope @@ -31,50 +31,50 @@ datatype ScopedTryLock(T: Type) if TryLockable(#$T) _theLock: @LockType _lockSucceeded: Bool -fun ctor(this: @ScopedTryLock, theLock: @this.LockType) +fun ctor(this: !ScopedTryLock, theLock: !this.LockType) this._theLock := theLock this._lockSucceeded = (_theLock tryLock) -fun dtor(this: @ScopedTryLock) +fun dtor(this: !ScopedTryLock) if _lockSucceeded _theLock unlock -fun isLocked(this: @ScopedTryLock) = _lockSucceeded +fun isLocked(this: ScopedTryLock) = _lockSucceeded //! A simple and fast mutual-exclusion lockable datatype Mutex handle: Impl.PThreadMutex -fun ctor(this: @Mutex) +fun ctor(this: !Mutex) handle.sig = Impl.PTHREAD_MUTEX_SIG_INIT -fun dtor(this: @Mutex) +fun dtor(this: !Mutex) Impl.pthread_mutex_destroy(handle) -fun >> (m: @Mutex, os: @OutStream) - cout << "Mutex(" << mkStreamRefWrapper(m) << ", " << m.handle.sig << ")" +fun >> (m: !Mutex, os: !OutStream) + cout << "Mutex(" << UntypedPtr(m) << ", " << m.handle.sig << ")" //! A mutual-exclusion lockable that is able to support recursive locking datatype RecMutex handle: Impl.PThreadMutex -fun ctor(this: @RecMutex) +fun ctor(this: !RecMutex) handle.sig = Impl.PTHREAD_RECURSIVE_MUTEX_SIG_INIT -fun dtor(this: @RecMutex) +fun dtor(this: !RecMutex) Impl.pthread_mutex_destroy(handle) //! Locks a lockable; if the lockable is already locked this call blocks until it's unblocked by the other party -fun lock(mutex: @Mutex) { var res = Impl.pthread_mutex_lock(mutex.handle); /*assert(res == 0);*/ } -fun lock(mutex: @RecMutex) { var res = Impl.pthread_mutex_lock(mutex.handle); /*assert(res == 0);*/ } +fun lock(mutex: !Mutex) { let res = Impl.pthread_mutex_lock(mutex.handle); /*assert(res == 0);*/ } +fun lock(mutex: !RecMutex) { let res = Impl.pthread_mutex_lock(mutex.handle); /*assert(res == 0);*/ } //! Attempts to lock a lockable; if already locked, returns false without locking anything -fun tryLock(mutex: @Mutex): Bool { var res = Impl.pthread_mutex_trylock(mutex.handle); return res == 0; } -fun tryLock(mutex: @RecMutex): Bool { var res = Impl.pthread_mutex_trylock(mutex.handle); return res == 0; } +fun tryLock(mutex: !Mutex): Bool { let res = Impl.pthread_mutex_trylock(mutex.handle); return res == 0; } +fun tryLock(mutex: !RecMutex): Bool { let res = Impl.pthread_mutex_trylock(mutex.handle); return res == 0; } //! Unlocks a lockable that was previously locked by a call to 'lock' -fun unlock(mutex: @Mutex) { var res = Impl.pthread_mutex_unlock(mutex.handle); /*assert(res == 0);*/ } -fun unlock(mutex: @RecMutex) { var res = Impl.pthread_mutex_unlock(mutex.handle); /*assert(res == 0);*/ } +fun unlock(mutex: !Mutex) { let res = Impl.pthread_mutex_unlock(mutex.handle); /*assert(res == 0);*/ } +fun unlock(mutex: !RecMutex) { let res = Impl.pthread_mutex_unlock(mutex.handle); /*assert(res == 0);*/ } package Impl using PTHREAD_MUTEX_SIZE = 56 @@ -85,8 +85,8 @@ package Impl sig: Long opaque: StaticArray(Byte, PTHREAD_MUTEX_SIZE) - [native("pthread_mutex_init")] fun pthread_mutex_init(mutex: @PThreadMutex, attr: @Byte): Int - [native("pthread_mutex_lock")] fun pthread_mutex_lock(mutex: @PThreadMutex): Int - [native("pthread_mutex_trylock")] fun pthread_mutex_trylock(mutex: @PThreadMutex): Int - [native("pthread_mutex_unlock")] fun pthread_mutex_unlock(mutex: @PThreadMutex): Int - [native("pthread_mutex_destroy")] fun pthread_mutex_destroy(mutex: @PThreadMutex): Int + [native("pthread_mutex_init")] fun pthread_mutex_init(mutex: !PThreadMutex, attr: UntypedPtr): Int + [native("pthread_mutex_lock")] fun pthread_mutex_lock(mutex: !PThreadMutex): Int + [native("pthread_mutex_trylock")] fun pthread_mutex_trylock(mutex: !PThreadMutex): Int + [native("pthread_mutex_unlock")] fun pthread_mutex_unlock(mutex: !PThreadMutex): Int + [native("pthread_mutex_destroy")] fun pthread_mutex_destroy(mutex: !PThreadMutex): Int diff --git a/SparrowImplicitLib/par/parFor.spr b/SparrowImplicitLib/par/parFor.spr index 84ebb73a..e1e27124 100644 --- a/SparrowImplicitLib/par/parFor.spr +++ b/SparrowImplicitLib/par/parFor.spr @@ -13,7 +13,7 @@ concept Partitioner(x) \ fun parFor(r: Range, f: AnyType) if isValid(f(r.front())) Impl.parFor(r, f, DefaultPartitioner(typeOf(r))()) -fun parFor(r: Range, f: AnyType, part: @Partitioner) if isValid(f(r.front())) +fun parFor(r: Range, f: AnyType, part: !Partitioner) if isValid(f(r.front())) Impl.parFor(r, f, part) datatype DefaultPartitioner(rangeType: Type) @@ -21,21 +21,21 @@ datatype DefaultPartitioner(rangeType: Type) _maxDepth: Int -fun partStart(this: @DefaultPartitioner) - var p: Int = getAvailableCoresNum +fun partStart(this: !DefaultPartitioner) + let p: Int = getAvailableCoresNum var depth = 1 while 2 !<> (d: Depth, os: @OutStream) +fun >> (d: Depth, os: !OutStream) if d.depth > 0 os << String(d.depth*2, ' '.char) diff --git a/SparrowImplicitLib/par/tasksImpl/emptyTask.spr b/SparrowImplicitLib/par/tasksImpl/emptyTask.spr index 2dde769d..dd9b11e5 100644 --- a/SparrowImplicitLib/par/tasksImpl/emptyTask.spr +++ b/SparrowImplicitLib/par/tasksImpl/emptyTask.spr @@ -7,9 +7,9 @@ import std.string datatype EmptyTask prefix: TaskPrefix -fun execute(task: @EmptyTask) {} +fun execute(task: !EmptyTask) {} -fun >>(t: EmptyTask, os: @OutStream) +fun >>(t: EmptyTask, os: !OutStream) os << "EmptyTask" -fun description(task: @EmptyTask): String = "EmptyTask" +fun description(task: !EmptyTask): String = "EmptyTask" diff --git a/SparrowImplicitLib/par/tasksImpl/idleCounter.spr b/SparrowImplicitLib/par/tasksImpl/idleCounter.spr index 500eb3c2..db73a397 100644 --- a/SparrowImplicitLib/par/tasksImpl/idleCounter.spr +++ b/SparrowImplicitLib/par/tasksImpl/idleCounter.spr @@ -7,13 +7,13 @@ datatype IdleCounter cnt: Int Atomic //! Called by a worker thread that just decided to go IDLE -fun goIdle(this: @IdleCounter) +fun goIdle(this: !IdleCounter) this.cnt++ //! Called by a worker thread who just got up from IDLE state -fun wakeUp(this: @IdleCounter) +fun wakeUp(this: !IdleCounter) this.cnt-- //! Check if we have some workers that are in the IDLE state -fun hasIdle(this: @IdleCounter) = (this.cnt load) > 0 +fun hasIdle(this: !IdleCounter) = (this.cnt load) > 0 //! Returns the number of workers that are in the IDLE state -fun numIdleWorkers(this: @IdleCounter) = this.cnt load +fun numIdleWorkers(this: !IdleCounter) = this.cnt load diff --git a/SparrowImplicitLib/par/tasksImpl/scheduler.spr b/SparrowImplicitLib/par/tasksImpl/scheduler.spr index f97c09c7..a66ce9b3 100644 --- a/SparrowImplicitLib/par/tasksImpl/scheduler.spr +++ b/SparrowImplicitLib/par/tasksImpl/scheduler.spr @@ -27,35 +27,35 @@ fun schedSpawn(task: TaskPtr) taskWorker.work pushFront task fun schedWaitForAll(parent: TaskPtr, child: TaskPtr) - var taskWroker: @Worker = parent.get() worker + var taskWorker: @Worker = parent.get() worker [ct] if isValidAndTrue(traceCalls) - tracer(taskWroker) << "schedWaitForAll(" << parent.get() << ", " << child.get() << ")" << endl + tracer(taskWorker) << "schedWaitForAll(" << parent.get() << ", " << child.get() << ")" << endl if child isSet child.get() assertValid parent.get() assertValid // Ensure the right depth is set in the worker - var oldDepth = taskWroker.curDepth - taskWroker.curDepth = parent.get().depth + let oldDepth = taskWorker.curDepth + taskWorker.curDepth = parent.get().depth - parent.get() setWaitingWorker taskWroker + parent.get() setWaitingWorker taskWorker - schedDoWait(taskWroker, child, parent) + schedDoWait(taskWorker, child, parent) // Restore the old depth - taskWroker.curDepth = oldDepth + taskWorker.curDepth = oldDepth fun schedSpawnRootAndWait(task: TaskPtr) - var taskWroker: @Worker = task.get() worker + var taskWorker: @Worker = task.get() worker [ct] if isValidAndTrue(traceCalls) - tracer(taskWroker) << "schedSpawnRootAndWait(" << task.get() << ")" << endl + tracer(taskWorker) << "schedSpawnRootAndWait(" << task.get() << ")" << endl task.get() assertValid // Ensure the right depth is set in the worker - var oldDepth = taskWroker.curDepth - taskWroker.curDepth = 0 + let oldDepth = taskWorker.curDepth + taskWorker.curDepth = 0 // Create a dummy task to wait for var waitingTask: EmptyTask @@ -64,32 +64,32 @@ fun schedSpawnRootAndWait(task: TaskPtr) task.get().parent = TaskPtr(waitingTask.prefix) // This is the task we are waiting for - waitingTask.prefix setWaitingWorker taskWroker + waitingTask.prefix setWaitingWorker taskWorker // Execute the root task and wait for it - schedDoWait(taskWroker, task, TaskPtr(waitingTask.prefix)) + schedDoWait(taskWorker, task, TaskPtr(waitingTask.prefix)) // Restore the old depth - taskWroker.curDepth = oldDepth + taskWorker.curDepth = oldDepth fun schedEnqueue(task: TaskPtr) - var taskWroker: @Worker = task.get() worker + var taskWorker: @Worker = task.get() worker [ct] if isValidAndTrue(traceCalls) - tracer(taskWroker) << "schedEnqueue(" << task.get() << ")" << endl + tracer(taskWorker) << "schedEnqueue(" << task.get() << ")" << endl task.get() assertValid // Announce new work in the task system - taskWroker.taskSystem onTaskAvailable + taskWorker.taskSystem onTaskAvailable // Enqueue the task - taskWroker.taskSystem.globalQueue pushFront task + taskWorker.taskSystem.globalQueue pushFront task /////////////////////////////////////////////////////////////////////////////// // Task execution logic [native('par.tasksImpl.scheduler.schedDoWait')] -fun schedDoWait(worker: @Worker, toExecute, waitingTask: TaskPtr) +fun schedDoWait(worker: !Worker, toExecute, waitingTask: TaskPtr) using maxRetriesBeforeGoingIdle = 1 var numRetries = maxRetriesBeforeGoingIdle @@ -130,7 +130,7 @@ fun schedDoWait(worker: @Worker, toExecute, waitingTask: TaskPtr) // Steal work from other queues if toExecute isNull // Try different queues until we find one we can steal from - var numStealAttempts = 2*(worker.taskSystem numAvailableWorkers) + let numStealAttempts = 2*(worker.taskSystem numAvailableWorkers) for i = 1..numStealAttempts // Get a queue from another worker; chose it randomly var otherQueue: @TaskQueue = (worker.taskSystem getRandomTaskQueue) @@ -138,7 +138,7 @@ fun schedDoWait(worker: @Worker, toExecute, waitingTask: TaskPtr) toExecute = (otherQueue popBack) if toExecute isSet // Change the worker for the stolen task - toExecute.get().worker = reinterpretCast(@Byte, worker) + toExecute.get().worker = UntypedPtr(worker) [ct] if isValidAndTrue(traceCalls) tracer(worker)<< "************************* Task stolen: " << toExecute.get() << "\n\n\n" @@ -181,8 +181,8 @@ fun schedDoWait(worker: @Worker, toExecute, waitingTask: TaskPtr) [ct] if isValidAndTrue(traceCalls) tracer(worker) << "task " << waitingTask.get() << " can continue; remaining work: " << TasksPrinter(TaskPtr(), worker.work) << endl -fun executeTask(task: @TaskPrefix): TaskPtr - var taskWroker: @Worker = task worker +fun executeTask(task: !TaskPrefix): TaskPtr + var taskWorker: @Worker = task worker // TODO: check cancellation if false @@ -190,7 +190,7 @@ fun executeTask(task: @TaskPrefix): TaskPtr // Execute the task [ct] if isValidAndTrue(traceCalls) - tracer(taskWroker) << "executing task " << task << "; parent=" << task.parent.get() << endl + tracer(taskWorker) << "executing task " << task << "; parent=" << task.parent.get() << endl task.executeFn(task) // Now check if we can execute the parent @@ -210,12 +210,12 @@ fun executeTask(task: @TaskPrefix): TaskPtr if cnt == 0 // If we are waiting on the parent task, make sure it's waiting worker is awake var ww: @Worker = task.parent.get() waitingWorker - if ww !== taskWroker && ww !== null + if ww !== taskWorker && ww !== null ww tryWakeUp // Enqueue the parent task for execution [ct] if isValidAndTrue(traceCalls) - tracer(taskWroker) << "Can continue with the parent task: " << task.parent.get() << endl + tracer(taskWorker) << "Can continue with the parent task: " << task.parent.get() << endl return task.parent return TaskPtr() diff --git a/SparrowImplicitLib/par/tasksImpl/schedulerIf.spr b/SparrowImplicitLib/par/tasksImpl/schedulerIf.spr index 21f70013..b8b59065 100644 --- a/SparrowImplicitLib/par/tasksImpl/schedulerIf.spr +++ b/SparrowImplicitLib/par/tasksImpl/schedulerIf.spr @@ -5,15 +5,15 @@ import sched = scheduler(schedSpawn, schedWaitForAll, schedSpawnRootAndWait, sch import worker = workerImpl(localWorker) import std.ptr -fun spawn(task: @TaskPrefix) +fun spawn(task: !TaskPrefix) sched.schedSpawn(TaskPtr(task)) -fun spawnAndWaitForAll(curTask, child: @TaskPrefix) +fun spawnAndWaitForAll(curTask, child: !TaskPrefix) sched.schedWaitForAll(TaskPtr(curTask), TaskPtr(child)) -fun spawnRootAndWait(root: @TaskPrefix) +fun spawnRootAndWait(root: !TaskPrefix) sched.schedSpawnRootAndWait(TaskPtr(root)) -fun waitForAll(curTask: @TaskPrefix) +fun waitForAll(curTask: !TaskPrefix) sched.schedWaitForAll(TaskPtr(curTask), TaskPtr()) -fun enqueue(task: @TaskPrefix) +fun enqueue(task: !TaskPrefix) sched.schedEnqueue(TaskPtr(task)) -fun localWorker(): Byte Ptr = reinterpretPtr(Byte, worker.localWorker()) +fun localWorker(): UntypedPtr = UntypedPtr(worker.localWorker().get()) diff --git a/SparrowImplicitLib/par/tasksImpl/taskPrefix.spr b/SparrowImplicitLib/par/tasksImpl/taskPrefix.spr index d40f618b..56fa7e8f 100644 --- a/SparrowImplicitLib/par/tasksImpl/taskPrefix.spr +++ b/SparrowImplicitLib/par/tasksImpl/taskPrefix.spr @@ -20,12 +20,12 @@ datatype TaskPrefix //! The worker that this task belongs to //! Use casts to avoid direct dependency - /*private*/ worker: Byte Ptr + /*private*/ worker: UntypedPtr // TODO: should this be atomic? //! The worker that waits for this task to finish //! Use casts to avoid direct dependency - /*private*/ waitingWorker: Byte Ptr + /*private*/ waitingWorker: UntypedPtr //! Used for chaining the tasks in the task queue /*private*/ prev: TaskPrefix Ptr @@ -35,22 +35,22 @@ datatype TaskPrefix /*private*/ desc: String /*private*/ depth: Int -fun >>(t: @TaskPrefix, os: @OutStream) +fun >>(t: TaskPrefix, os: !OutStream) if t === null os << "" else if !(t.desc isEmpty) os << '"' << t.desc << '"' - os << '<' << mkStreamRefWrapper(t) << ", " << (t.depth) << "," << (t.refCount load) << '>' + os << '<' << UntypedPtr(t) << ", " << (t.depth) << "," << (t.refCount load) << '>' -fun refCount(task: @TaskPrefix): Int = task.refCount load +fun refCount(task: !TaskPrefix): Int = task.refCount load -fun setRefCount(task: @TaskPrefix, count: Int) { task.refCount = count; } -fun addRefCount(task: @TaskPrefix, count: Int) { task.refCount += count; } -fun incrementRefCount(task: @TaskPrefix) = ++task.refCount -fun decrementRefCount(task: @TaskPrefix) = --task.refCount +fun setRefCount(task: !TaskPrefix, count: Int) { task.refCount = count; } +fun addRefCount(task: !TaskPrefix, count: Int) { task.refCount += count; } +fun incrementRefCount(task: !TaskPrefix) = ++task.refCount +fun decrementRefCount(task: !TaskPrefix) = --task.refCount -fun assertValid(task: @TaskPrefix) +fun assertValid(task: !TaskPrefix) [ct] if isValidAndTrue(DEBUG) using ExecuteFnType = FunctionPtr(Null rt, @TaskPrefix) diff --git a/SparrowImplicitLib/par/tasksImpl/taskQueue.spr b/SparrowImplicitLib/par/tasksImpl/taskQueue.spr index 10357827..6e5c65a0 100644 --- a/SparrowImplicitLib/par/tasksImpl/taskQueue.spr +++ b/SparrowImplicitLib/par/tasksImpl/taskQueue.spr @@ -22,15 +22,15 @@ datatype TaskQueue _mutex: Mutex // TODO: use a spin-mutex here -fun empty(q: @TaskQueue): Bool - var lock: ScopedLock(Mutex) = q._mutex +fun empty(q: !TaskQueue): Bool + let lock: ScopedLock(Mutex) = q._mutex return q._first isNull -fun size(q: @TaskQueue): SizeType - var lock: ScopedLock(Mutex) = q._mutex +fun size(q: !TaskQueue): SizeType + let lock: ScopedLock(Mutex) = q._mutex return q uncheckedSize -fun uncheckedSize(q: @TaskQueue): SizeType +fun uncheckedSize(q: !TaskQueue): SizeType var count: SizeType = 0 var p: TaskPtr = q._first while p isSet @@ -38,8 +38,8 @@ fun uncheckedSize(q: @TaskQueue): SizeType p = p.get().next return count -fun pushFront(q: @TaskQueue, task: TaskPtr) - var lock: ScopedLock(Mutex) = q._mutex +fun pushFront(q: !TaskQueue, task: TaskPtr) + let lock: ScopedLock(Mutex) = q._mutex // don't care what prev is task.get().next = q._first @@ -52,13 +52,13 @@ fun pushFront(q: @TaskQueue, task: TaskPtr) //assert(q._first isSet) //assert(q._last isSet) //assert(q._last.get().next isNull) -fun popFront(q: @TaskQueue): TaskPtr - var lock: ScopedLock(Mutex) = q._mutex +fun popFront(q: !TaskQueue): TaskPtr + let lock: ScopedLock(Mutex) = q._mutex if q._first isNull return TaskPtr() - var res = q._first + let res = q._first q._first = res.get().next if q._first isNull q._last.reset @@ -67,13 +67,13 @@ fun popFront(q: @TaskQueue): TaskPtr //assert(q._last.get().next isNull) return res -fun popBack(q: @TaskQueue): TaskPtr - var lock: ScopedLock(Mutex) = q._mutex +fun popBack(q: !TaskQueue): TaskPtr + let lock: ScopedLock(Mutex) = q._mutex if q._last isNull return TaskPtr() - var res = q._last + let res = q._last if q._first == q._last q._first.reset q._last.reset @@ -90,7 +90,7 @@ fun popBack(q: @TaskQueue): TaskPtr _first: TaskPtr list: @TaskQueue -fun >> (tasks: @TasksPrinter, os: @OutStream) +fun >> (tasks: TasksPrinter, os: !OutStream) if tasks._first isSet os << 'task=' os << tasks._first.get() << " + " diff --git a/SparrowImplicitLib/par/tasksImpl/taskSystem.spr b/SparrowImplicitLib/par/tasksImpl/taskSystem.spr index bbf016cf..951e2e77 100644 --- a/SparrowImplicitLib/par/tasksImpl/taskSystem.spr +++ b/SparrowImplicitLib/par/tasksImpl/taskSystem.spr @@ -20,9 +20,9 @@ datatype TaskSystem idleCounter: IdleCounter [protected] - fun ctor(this: @TaskSystem) {} + fun ctor(this: !TaskSystem) {} - fun dtor(this: @TaskSystem) {} + fun dtor(this: !TaskSystem) {} var globalTaskSystem: TaskSystem Ptr @@ -37,8 +37,8 @@ fun initTaskSystem(numWorkers: UInt = 0) //numWorkers = 1 var ts: @TaskSystem = globalTaskSystem.get() for i=0..numWorkers - var worker = ts createWorker - var p: Thread Ptr = new(Thread, InternalWorkerThread(worker)) + let worker = ts createWorker + let p: Thread Ptr = new(Thread, InternalWorkerThread(worker)) ts._threads.pushBack(p) fun getInitTaskSystem: TaskSystem Ptr @@ -48,20 +48,20 @@ fun getInitTaskSystem: TaskSystem Ptr return globalTaskSystem fun createWorker(ts: TaskSystem Ptr): Worker Ptr - var id: Int = ts.get().workers size - var p: Worker Ptr = new(Worker, ts.get(), id, ts.get().idleCounter) + let id: Int = ts.get().workers size + let p: Worker Ptr = new(Worker, ts.get(), id, ts.get().idleCounter) ts.get().workers.pushBack(p) return p // TODO: make it random var cnt: Int = 0 -fun getRandomTaskQueue(ts: @TaskSystem): @TaskQueue +fun getRandomTaskQueue(ts: !TaskSystem): @TaskQueue // TODO: make the selection truly random - var worker: Worker Ptr = ts.workers(++cnt % (ts.workers size)) + let worker: Worker Ptr = ts.workers(++cnt % (ts.workers size)) return worker.get().work -fun onTaskAvailable(ts: @TaskSystem) +fun onTaskAvailable(ts: !TaskSystem) // Do something only if we have at least one idle worker if ts.idleCounter hasIdle for w: Worker Ptr = ts.workers.all @@ -70,4 +70,4 @@ fun onTaskAvailable(ts: @TaskSystem) return //! Get the number of currently available workers -fun numAvailableWorkers(ts: @TaskSystem): SizeType = (ts.workers size) - (ts.idleCounter numIdleWorkers) +fun numAvailableWorkers(ts: !TaskSystem): SizeType = (ts.workers size) - (ts.idleCounter numIdleWorkers) diff --git a/SparrowImplicitLib/par/tasksImpl/taskType.spr b/SparrowImplicitLib/par/tasksImpl/taskType.spr index cf553162..baaf6866 100644 --- a/SparrowImplicitLib/par/tasksImpl/taskType.spr +++ b/SparrowImplicitLib/par/tasksImpl/taskType.spr @@ -14,6 +14,6 @@ concept TaskType(x) \ && ( isValidAndTrue(typeOf(x prefix) == @TaskPrefix) \ || isValidAndTrue(typeOf(x.prefix) == TaskPrefix) ) -fun getPrefix(t: @TaskType): @TaskPrefix = t prefix if isValid(t prefix) -fun getPrefix(t: @TaskType): @TaskPrefix = t.prefix if isValid(t.prefix) && !isValid(t prefix) +fun getPrefix(t: !TaskType): @TaskPrefix = t prefix if isValid(t prefix) +fun getPrefix(t: !TaskType): @TaskPrefix = t.prefix if isValid(t.prefix) && !isValid(t prefix) diff --git a/SparrowImplicitLib/par/tasksImpl/tasksMain.spr b/SparrowImplicitLib/par/tasksImpl/tasksMain.spr index 59f37243..7b3b1b7c 100644 --- a/SparrowImplicitLib/par/tasksImpl/tasksMain.spr +++ b/SparrowImplicitLib/par/tasksImpl/tasksMain.spr @@ -7,18 +7,17 @@ import taskPrefix(TaskPrefix) datatype ExecuteHelper(T: Type) fun doExecute(T: Type, prefix: @TaskPrefix): Null - var objP: @Byte = ptrAdd(reinterpretCast(@Byte, prefix), prefix.taskOffset) - var obj: @T = reinterpretCast(@T, objP) + var obj: @T = (UntypedPtr(prefix) ptrAdd prefix.taskOffset).asRefOf(T) obj execute return Null() fun getExecuteFn(T: Type): FunctionPtr(Null rt, @TaskPrefix) = \doExecute(T, TaskPrefix()) //! Initializes the fields required for a task -fun initTaskBasic(obj: @TaskType) +fun initTaskBasic(obj: !TaskType) // Init the execute function var prefix: @TaskPrefix = getPrefix(obj) - prefix.taskOffset = ptrDiff(reinterpretCast(@Byte, obj), reinterpretCast(@Byte, prefix)) + prefix.taskOffset = (UntypedPtr(obj) ptrDiff UntypedPtr(prefix)) prefix.executeFn = getExecuteFn(typeOf(obj)) // Get its description (if it has one) @@ -26,23 +25,23 @@ fun initTaskBasic(obj: @TaskType) prefix.desc = (obj description) //! Initializes a root task -fun initAsRoot(task: @TaskType) +fun initAsRoot(task: !TaskType) initTaskBasic(task) getPrefix(task).worker = schedulerIf.localWorker() //! Initializes a child task -fun initAsChildOf(task, parent: @TaskType) +fun initAsChildOf(task, parent: !TaskType) initTaskBasic(task) getPrefix(task).parent = getPrefix(parent) getPrefix(task).depth = 1+getPrefix(parent).depth getPrefix(task).worker = getPrefix(parent).worker //! Initialize a child task and spawn it -fun doSpawn(curTask, childTask: @TaskType) +fun doSpawn(curTask, childTask: !TaskType) initAsChildOf(childTask, curTask) schedulerIf.spawn(getPrefix(childTask)) //! Initialize a child task, then spawn it and wait -fun doSpawnAndWait(curTask, childTask: @TaskType) +fun doSpawnAndWait(curTask, childTask: !TaskType) initAsChildOf(childTask, curTask) schedulerIf.spawnAndWaitForAll(getPrefix(curTask), getPrefix(childTask)) diff --git a/SparrowImplicitLib/par/tasksImpl/workerImpl.spr b/SparrowImplicitLib/par/tasksImpl/workerImpl.spr index 0cd0b000..cd467dca 100644 --- a/SparrowImplicitLib/par/tasksImpl/workerImpl.spr +++ b/SparrowImplicitLib/par/tasksImpl/workerImpl.spr @@ -16,27 +16,27 @@ using traceCalls = true //! A worker class describes a thread that is doing some work on our task system datatype Worker - taskSystem: @TaskSystem + taskSystem: TaskSystem Ptr work: TaskQueue workerId: Int curDepth: Int //! The global counter that keeps track on how many internal threads are idle - _idleCounter: @IdleCounter + _idleCounter: IdleCounter Ptr //! Non-zero if this thread has work to do _isBusy: Int Atomic //! Semaphore used when sleeping _waitSem: Semaphore -fun ctor(this: @Worker, taskSystem: @TaskSystem, workerId: Int, idleCounter: @IdleCounter) - this.taskSystem := taskSystem +fun ctor(this: !Worker, taskSystem: TaskSystem Ptr, workerId: Int, idleCounter: IdleCounter Ptr) + this.taskSystem ctor taskSystem this.workerId = workerId this.curDepth = 0 - this._idleCounter := idleCounter + this._idleCounter ctor idleCounter this._isBusy store 0 this._waitSem ctor 0 -fun dtor(this: @Worker) {} +fun dtor(this: !Worker) {} using WorkerPtr = Worker Ptr @@ -52,7 +52,7 @@ fun localWorker: Worker Ptr fun setLocalWorker(worker: Worker Ptr) _tlsWorker = worker.get() -fun goIdle(w: @Worker) +fun goIdle(w: !Worker) if compareAndSwap(w._isBusy, 0, 1) // Change the global counter w._idleCounter goIdle @@ -66,7 +66,7 @@ fun goIdle(w: @Worker) [ct] if isValidAndTrue(traceCalls) tracer(w) << "woke up; we have " << (w._idleCounter.cnt load) << " idle workers" << endl -fun tryWakeUp(w: @Worker): Bool +fun tryWakeUp(w: !Worker): Bool //[ct] if isValidAndTrue(traceCalls) // tracer(w) << "trying to wake up; _isBusy= " << (w._isBusy load) << endl // If the thread was now busy, and we can set it to busy, @@ -82,14 +82,14 @@ fun tryWakeUp(w: @Worker): Bool return true return false -fun tracer(this: @Worker) = Tracer(workerId, curDepth) +fun tracer(this: !Worker) = Tracer(workerId, curDepth) //////////////////////////////////////////////////////////////////////////////// // TaskPrexix functions -fun worker(task: @TaskPrefix): @Worker = reinterpretCast(@Worker, task.worker.get()) -fun waitingWorker(task: @TaskPrefix): @Worker = reinterpretCast(@Worker, task.waitingWorker.get()) -fun setWaitingWorker(task: @TaskPrefix, w: @Worker) { task.waitingWorker = reinterpretCast(@Byte, w); } +fun worker(task: !TaskPrefix): @Worker = task.worker asRefOf Worker +fun waitingWorker(task: !TaskPrefix): @Worker = task.waitingWorker asRefOf Worker +fun setWaitingWorker(task: !TaskPrefix, w: !Worker) { task.waitingWorker = UntypedPtr(w); } //////////////////////////////////////////////////////////////////////////////// // TaskSystem datatype @@ -107,9 +107,9 @@ datatype TaskSystem idleCounter: IdleCounter [protected] - fun ctor(this: @TaskSystem) {} + fun ctor(this: !TaskSystem) {} - fun dtor(this: @TaskSystem) {} + fun dtor(this: !TaskSystem) {} var globalTaskSystem: TaskSystem Ptr @@ -124,8 +124,8 @@ fun initTaskSystem(numWorkers: UInt = 0) //numWorkers = 1 var ts = globalTaskSystem for i=0..numWorkers - var worker = ts createWorker - var p: Thread Ptr = new(Thread, InternalWorkerThread(worker)) + let worker = ts createWorker + let p: Thread Ptr = new(Thread, InternalWorkerThread(worker)) (ts.get)._threads.pushBack(p) fun getInitTaskSystem: TaskSystem Ptr @@ -135,20 +135,20 @@ fun getInitTaskSystem: TaskSystem Ptr return globalTaskSystem fun createWorker(ts: TaskSystem Ptr): Worker Ptr - var id: Int = ts.get().workers size - var p: Worker Ptr = new(Worker, ts.get(), id, ts.get().idleCounter) + let id: Int = ts.get().workers size + let p: Worker Ptr = new(Worker, ts, id, (IdleCounter Ptr)(ts.get().idleCounter)) ts.get().workers.pushBack(p) return p // TODO: make it random var cnt: Int = 0 -fun getRandomTaskQueue(ts: @TaskSystem): @TaskQueue +fun getRandomTaskQueue(ts: !TaskSystem): @TaskQueue // TODO: make the selection truly random - var worker: Worker Ptr = ts.workers(++cnt % (ts.workers size)) + let worker: Worker Ptr = ts.workers(++cnt % (ts.workers size)) return worker.get().work -fun onTaskAvailable(ts: @TaskSystem) +fun onTaskAvailable(ts: !TaskSystem) // Do something only if we have at least one idle worker if ts.idleCounter hasIdle for w: Worker Ptr = ts.workers.all @@ -157,7 +157,7 @@ fun onTaskAvailable(ts: @TaskSystem) return //! Get the number of currently available workers -fun numAvailableWorkers(ts: @TaskSystem): SizeType = (ts.workers size) - (ts.idleCounter numIdleWorkers) +fun numAvailableWorkers(ts: !TaskSystem): SizeType = (ts.workers size) - (ts.idleCounter numIdleWorkers) //////////////////////////////////////////////////////////////////////////////// // InternalWorkerThread datatype @@ -169,11 +169,11 @@ fun numAvailableWorkers(ts: @TaskSystem): SizeType = (ts.workers size) - (ts.idl //! The worker associated with this thread _worker: Worker Ptr -fun ()(this: @InternalWorkerThread) +fun ()(this: !InternalWorkerThread) setLocalWorker(_worker) schedDoWait(_worker.get(), TaskPtr(), TaskPtr()) // Defined in scheduler.spr [native('par.tasksImpl.scheduler.schedDoWait')] -fun schedDoWait(worker: @Worker, toExecute, waitingTask: TaskPtr) +fun schedDoWait(worker: !Worker, toExecute, waitingTask: TaskPtr) diff --git a/SparrowImplicitLib/par/thread.spr b/SparrowImplicitLib/par/thread.spr index b8991a2f..433a5855 100644 --- a/SparrowImplicitLib/par/thread.spr +++ b/SparrowImplicitLib/par/thread.spr @@ -5,35 +5,37 @@ import std.newDelete //import assert //! Datatype describing a thread ID +[bitcopiable] datatype ThreadId id: ULong -fun ctor(this: @ThreadId, id: ULong) +fun ctor(this: !ThreadId, id: ULong) this.id ctor id -fun ctor(this: @ThreadId, h: NativeThreadHandle) +fun ctor(this: !ThreadId, h: NativeThreadHandle) this.id ctor _Impl.pthread_threadid_np(h, id) -fun >>(tid: @ThreadId, os: @OutStream) +fun >>(tid: !ThreadId, os: !OutStream) os << tid.id +[bitcopiable] datatype Thread _handle: NativeThreadHandle //! Construct the Thread with a functor //! The functor can have state, not just executing code -fun ctor(this: @Thread, f: AnyType) if isValid(f()) +fun ctor(this: !Thread, f: @AnyType) if isValid(f()) _handle = _Impl.startThread(f) //! Cannot copy construct or assign a Thread object -[private] fun ctor(this, other: @Thread) -[private] fun =(this, other: @Thread) +[private] fun ctor(this, other: !Thread) +[private] fun =(this, other: !Thread) //! Destructor. Detach the thread if joinable -fun dtor(this: @Thread) +fun dtor(this: !Thread) if this isJoinable this detach -fun >>(t: @Thread, os: @OutStream) +fun >>(t: !Thread, os: !OutStream) if _handle != NativeThreadHandle() os << "Thread(" << _handle << ")" else @@ -48,18 +50,18 @@ fun isJoinable(t: Thread) = t._handle != NativeThreadHandle() //! Wait for the thread to finish //! This shouldn't be called from the same thread -fun join(t: @Thread) +fun join(t: !Thread) //assert(t isJoinable) //assert((t getId) !== curThreadId) - var res = _Impl.pthread_join(t._handle, null) + let res = _Impl.pthread_join(t._handle, UntypedPtr()) //assert(res == 0) t._handle = NativeThreadHandle() //! Detaches the given thread object from the actual thread of execution //! The actual thread may continue to execute after this call -fun detach(t: @Thread) +fun detach(t: !Thread) //assert(t isJoinable) - var res = _Impl.pthread_detach(t._handle) + let res = _Impl.pthread_detach(t._handle) //assert(res == 0) t._handle = NativeThreadHandle() @@ -77,43 +79,43 @@ fun yield = _Impl.sched_yield() //! Sleep the given amount of milliseconds fun sleep(durMs: UInt) - var req = _Impl.TimeSpec(durMs/1000, (durMs%1000)*1000000) - var rem = _Impl.TimeSpec(0, 0) + let req = _Impl.TimeSpec(durMs/1000, (durMs%1000)*1000000) + let rem = _Impl.TimeSpec(0, 0) _Impl.nanosleep(req, rem) package _Impl - using ThreadFun = FunctionPtr(@Byte rt, @Byte rt) + using ThreadFun = FunctionPtr(UntypedPtr, UntypedPtr) [initCtor] datatype Closure(FType: Type) f: FType - fun threadFun(closureType: Type, arg: @Byte): @Byte - var self: @closureType = reinterpretCast(@closureType, arg) + fun threadFun(closureType: Type, arg: UntypedPtr): UntypedPtr + let self: @closureType = arg asRefOf closureType self.f() self delete - return null + return UntypedPtr() - fun getFunPtr(closureType: Type): ThreadFun = \threadFun(closureType, null) + fun getFunPtr(closureType: Type): ThreadFun = \threadFun(closureType, UntypedPtr()) fun startThread(f: AnyType): NativeThreadHandle using ClosureType = Closure(typeOf(f)) - var closurePtr: @ClosureType = new(ClosureType, f) + let closurePtr: @ClosureType = new(ClosureType, f) var handle: NativeThreadHandle - var arg: @Byte = reinterpretCast(@Byte, closurePtr) - var status = pthread_create(handle, null, getFunPtr(ClosureType), arg) + let arg = UntypedPtr(closurePtr) + let status = pthread_create(handle, UntypedPtr(), getFunPtr(ClosureType), arg) return handle - [initCtor] datatype TimeSpec + [initCtor, bitcopiable] datatype TimeSpec tv_sec, tv_nsec: Long - [native("pthread_create")] fun pthread_create(handle: @NativeThreadHandle, attr: @Byte, f: ThreadFun, arg: @Byte): Int - [native("pthread_join")] fun pthread_join(handle: NativeThreadHandle, valPtr: @ @Byte): Int + [native("pthread_create")] fun pthread_create(handle: !NativeThreadHandle, attr: UntypedPtr, f: ThreadFun, arg: UntypedPtr): Int + [native("pthread_join")] fun pthread_join(handle: NativeThreadHandle, valPtr: UntypedPtr): Int [native("pthread_detach")] fun pthread_detach(handle: NativeThreadHandle): Int [native("pthread_self")] fun pthread_self: NativeThreadHandle - [native("pthread_threadid_np")] fun pthread_threadid_np(t: NativeThreadHandle, res: @ULong): Int + [native("pthread_threadid_np")] fun pthread_threadid_np(t: NativeThreadHandle, res: !ULong): Int [native("sched_yield")] fun sched_yield - [native("nanosleep")] fun nanosleep(req, rem: @TimeSpec): Int + [native("nanosleep")] fun nanosleep(req, rem: !TimeSpec): Int diff --git a/SparrowImplicitLib/par/tls.spr b/SparrowImplicitLib/par/tls.spr index 0fe3ff30..0fd0bcce 100644 --- a/SparrowImplicitLib/par/tls.spr +++ b/SparrowImplicitLib/par/tls.spr @@ -3,55 +3,52 @@ module par.tls import config import std.newDelete -datatype Tls(T: Type) if sizeOf(T) <= sizeOf(@Byte) +datatype Tls(T: Type) if sizeOf(T) <= sizeOf(UntypedPtr) _tls: _Impl.TlsCommon using ValueType = T -fun ctor(this: @Tls) +fun ctor(this: !Tls) [ct] if TypeOp.isRef(ValueType) - _tls ctor \_destructPtr(ValueType, null) + _tls ctor \_destructPtr(ValueType, UntypedPtr()) else _tls ctor -fun =(this: @Tls, other: typeOf(this)) +fun =(this: !Tls, other: typeOf(this)) _tls setValue (other._tls getValue) -fun =(this: @Tls, val: this.ValueType) - [ct] if TypeOp.isRef(ValueType) - _tls setValue reinterpretCast(@ @Byte, val) - else - _tls setValue reinterpretCast(@Byte, val) +fun =(this: !Tls, val: this.ValueType) + _tls setValue UntypedPtr(val) -fun get(this: @Tls): ValueType +fun get(this: Tls): ValueType [ct] if TypeOp.isRef(ValueType) - return reinterpretCast(ValueType, _tls getValue) + return reinterpretCast(ValueType, (_tls getValue).data) else - return reinterpretCast(@ValueType, _tls getValue) + return (_tls getValue) asRefOf ValueType -fun _destructPtr(t: Type, p: @Byte): Null - delete(reinterpretCast(t, p)) +fun _destructPtr(t: Type, p: UntypedPtr): Null + delete(reinterpretCast(t, p.data)) return Null() package _Impl - using DtorFun = FunctionPtr(Null rt, @Byte rt) + using DtorFun = FunctionPtr(Null, UntypedPtr) datatype TlsCommon key: KeyT - fun ctor(this: @TlsCommon) + fun ctor(this: !TlsCommon) pthread_key_create(key, DtorFun()) - fun ctor(this: @TlsCommon, dtorFun: DtorFun) + fun ctor(this: !TlsCommon, dtorFun: DtorFun) pthread_key_create(key, dtorFun) - fun dtor(this: @TlsCommon) + fun dtor(this: !TlsCommon) pthread_key_delete(key) - fun setValue(tls: @TlsCommon, val: @Byte) = pthread_setspecific(tls.key, val) - fun getValue(tls: @TlsCommon): @Byte = pthread_getspecific(tls.key) + fun setValue(tls: TlsCommon, val: UntypedPtr) = pthread_setspecific(tls.key, val) + fun getValue(tls: TlsCommon): UntypedPtr = pthread_getspecific(tls.key) using KeyT = ULong - [native("pthread_key_create")] fun pthread_key_create(k: @KeyT, dtorFun: DtorFun): Int + [native("pthread_key_create")] fun pthread_key_create(k: !KeyT, dtorFun: DtorFun): Int [native("pthread_key_delete")] fun pthread_key_delete(k: KeyT): Int - [native("pthread_setspecific")] fun pthread_setspecific(k: KeyT, val: @Byte): Int - [native("pthread_getspecific")] fun pthread_getspecific(k: KeyT): @Byte + [native("pthread_setspecific")] fun pthread_setspecific(k: KeyT, val: UntypedPtr): Int + [native("pthread_getspecific")] fun pthread_getspecific(k: KeyT): UntypedPtr diff --git a/SparrowImplicitLib/precedenceUtils.spr b/SparrowImplicitLib/precedenceUtils.spr index 83ccb4e0..0b012955 100644 --- a/SparrowImplicitLib/precedenceUtils.spr +++ b/SparrowImplicitLib/precedenceUtils.spr @@ -2,22 +2,22 @@ import meta.featherNodes, meta.sparrowNodes [ct, macro] fun setOperPrecedence(oper, value: CompilerAstNode): CompilerAstNode - var loc = oper location - var loc2 = value location - var operName = astEval(oper) - var precValue: Int = astEval(value) + let loc = oper location + let loc2 = value location + let operName = astEval(oper) + let precValue: Int = astEval(value) return mkSprUsing(loc, "oper_precedence_" + operName, mkIntLiteral(loc2, precValue)) fun getOperPrecedence(oper: CompilerAstNode): CompilerAstNode - var loc = oper location - var operName = astEval(oper) - var args = mkNodeList(loc) + let loc = oper location + let operName = astEval(oper) + let args = mkNodeList(loc) addToNodeList(args, mkIdentifier(loc, "oper_precedence_" + operName)) addToNodeList(args, mkIdentifier(loc, "oper_precedence_default")) return mkFunApplication(loc, mkIdentifier(loc, "valueIfValid"), args) fun setOperRightAssociativity(oper: CompilerAstNode): CompilerAstNode - var loc = oper location - var operName = astEval(oper) + let loc = oper location + let operName = astEval(oper) return mkSprUsing(loc, "oper_assoc_" + operName, mkIntLiteral(loc, -1)) diff --git a/SparrowImplicitLib/sprCore/basicDecls.spr b/SparrowImplicitLib/sprCore/basicDecls.spr index 45b4fe20..7db10005 100644 --- a/SparrowImplicitLib/sprCore/basicDecls.spr +++ b/SparrowImplicitLib/sprCore/basicDecls.spr @@ -7,9 +7,8 @@ datatype Type {} [ct, protected] - [native("_Type_ctor")] fun ctor(this: @Type) - [native("_Type_copy_ctor")] fun ctor(this: @Type, other: Type) - //fun dtor(this: @Type) {} + [native("_Type_ctor")] fun ctor(this: !Type) + [native("_Type_copy_ctor")] fun ctor(this: !Type, other: Type) [noDefault, bitcopiable] datatype Uninitialized {} @@ -38,226 +37,226 @@ // Everything can be initialized with 'Uninitialized', and does nothing [public] - fun ctor(this: @AnyType, nothing: Uninitialized) {} + fun ctor(this: !AnyType, nothing: Uninitialized) {} [protected] fun ctor(this: Null) {} fun ctor(this, other: Null) {} fun dtor(this: Null) {} - [native("_zero_init_1")] fun ctor(this: @Bool) - [native("_ass_1_1")] fun ctor(this: @Bool, src: Bool) - fun dtor(this: @Bool) {} - [autoCt, native("_ass_1_1")] fun = (this: @Bool, other: Bool): Bool - - [native("_zero_init_8")] fun ctor(this: @Byte) - [native("_ass_8_8")] fun ctor(this: @Byte, src: Byte) - [native("_ass_8_8")] fun ctor(this: @Byte, src: Char) - [native("_ass_8_8")] fun ctor(this: @Byte, src: UByte) - [native("_ass_8_16")] fun ctor(this: @Byte, src: Short) - [native("_ass_8_16")] fun ctor(this: @Byte, src: UShort) - [native("_ass_8_32")] fun ctor(this: @Byte, src: Int) - [native("_ass_8_32")] fun ctor(this: @Byte, src: UInt) - [native("_ass_8_64")] fun ctor(this: @Byte, src: Long) - [native("_ass_8_64")] fun ctor(this: @Byte, src: ULong) - [native("_ass_8_64")] fun ctor(this: @Byte, src: SizeType) - [native("_ass_8_64")] fun ctor(this: @Byte, src: DiffType) - [native("_ass_i8_f")] fun ctor(this: @Byte, src: Float) - [native("_ass_i8_d")] fun ctor(this: @Byte, src: Double) + [native("_zero_init_1")] fun ctor(this: !Bool) + [native("_ass_1_1")] fun ctor(this: !Bool, src: Bool) + fun dtor(this: Bool) {} + [autoCt, native("_ass_1_1")] fun = (this: !Bool, other: Bool): Bool + + [native("_zero_init_8")] fun ctor(this: !Byte) + [native("_ass_8_8")] fun ctor(this: !Byte, src: Byte) + [native("_ass_8_8")] fun ctor(this: !Byte, src: Char) + [native("_ass_8_8")] fun ctor(this: !Byte, src: UByte) + [native("_ass_8_16")] fun ctor(this: !Byte, src: Short) + [native("_ass_8_16")] fun ctor(this: !Byte, src: UShort) + [native("_ass_8_32")] fun ctor(this: !Byte, src: Int) + [native("_ass_8_32")] fun ctor(this: !Byte, src: UInt) + [native("_ass_8_64")] fun ctor(this: !Byte, src: Long) + [native("_ass_8_64")] fun ctor(this: !Byte, src: ULong) + [native("_ass_8_64")] fun ctor(this: !Byte, src: SizeType) + [native("_ass_8_64")] fun ctor(this: !Byte, src: DiffType) + [native("_ass_i8_f")] fun ctor(this: !Byte, src: Float) + [native("_ass_i8_d")] fun ctor(this: !Byte, src: Double) fun dtor(this: Byte) {} - [native("_ass_8_8")] fun = (this: @Byte, other: Byte) - - [native("_zero_init_8")] fun ctor(this: @UByte) - [native("_ass_8_8"), convert] fun ctor(this: @UByte, src: Byte) - [native("_ass_8_8")] fun ctor(this: @UByte, src: UByte) - [native("_ass_8_16")] fun ctor(this: @UByte, src: Short) - [native("_ass_8_16")] fun ctor(this: @UByte, src: UShort) - [native("_ass_8_32")] fun ctor(this: @UByte, src: Int) - [native("_ass_8_32")] fun ctor(this: @UByte, src: UInt) - [native("_ass_8_64")] fun ctor(this: @UByte, src: Long) - [native("_ass_8_64")] fun ctor(this: @UByte, src: ULong) - [native("_ass_8_64")] fun ctor(this: @UByte, src: SizeType) - [native("_ass_8_64")] fun ctor(this: @UByte, src: DiffType) - [native("_ass_u8_f")] fun ctor(this: @UByte, src: Float) - [native("_ass_u8_d")] fun ctor(this: @UByte, src: Double) + [native("_ass_8_8")] fun = (this: !Byte, other: Byte) + + [native("_zero_init_8")] fun ctor(this: !UByte) + [native("_ass_8_8"), convert] fun ctor(this: !UByte, src: Byte) + [native("_ass_8_8")] fun ctor(this: !UByte, src: UByte) + [native("_ass_8_16")] fun ctor(this: !UByte, src: Short) + [native("_ass_8_16")] fun ctor(this: !UByte, src: UShort) + [native("_ass_8_32")] fun ctor(this: !UByte, src: Int) + [native("_ass_8_32")] fun ctor(this: !UByte, src: UInt) + [native("_ass_8_64")] fun ctor(this: !UByte, src: Long) + [native("_ass_8_64")] fun ctor(this: !UByte, src: ULong) + [native("_ass_8_64")] fun ctor(this: !UByte, src: SizeType) + [native("_ass_8_64")] fun ctor(this: !UByte, src: DiffType) + [native("_ass_u8_f")] fun ctor(this: !UByte, src: Float) + [native("_ass_u8_d")] fun ctor(this: !UByte, src: Double) fun dtor(this: UByte) {} - [native("_ass_8_8")] fun = (this: @UByte, other: UByte) - - [native("_zero_init_16")] fun ctor(this: @Short) - [native("_ass_16_8s"), convert] fun ctor(this: @Short, src: Byte) - [native("_ass_16_8z"), convert] fun ctor(this: @Short, src: UByte) - [native("_ass_16_16")] fun ctor(this: @Short, src: Short) - [native("_ass_16_16")] fun ctor(this: @Short, src: UShort) - [native("_ass_16_32")] fun ctor(this: @Short, src: Int) - [native("_ass_16_32")] fun ctor(this: @Short, src: UInt) - [native("_ass_16_64")] fun ctor(this: @Short, src: Long) - [native("_ass_16_64")] fun ctor(this: @Short, src: ULong) - [native("_ass_16_64")] fun ctor(this: @Short, src: SizeType) - [native("_ass_16_64")] fun ctor(this: @Short, src: DiffType) - [native("_ass_i16_f")] fun ctor(this: @Short, src: Float) - [native("_ass_i16_d")] fun ctor(this: @Short, src: Double) + [native("_ass_8_8")] fun = (this: !UByte, other: UByte) + + [native("_zero_init_16")] fun ctor(this: !Short) + [native("_ass_16_8s"), convert] fun ctor(this: !Short, src: Byte) + [native("_ass_16_8z"), convert] fun ctor(this: !Short, src: UByte) + [native("_ass_16_16")] fun ctor(this: !Short, src: Short) + [native("_ass_16_16")] fun ctor(this: !Short, src: UShort) + [native("_ass_16_32")] fun ctor(this: !Short, src: Int) + [native("_ass_16_32")] fun ctor(this: !Short, src: UInt) + [native("_ass_16_64")] fun ctor(this: !Short, src: Long) + [native("_ass_16_64")] fun ctor(this: !Short, src: ULong) + [native("_ass_16_64")] fun ctor(this: !Short, src: SizeType) + [native("_ass_16_64")] fun ctor(this: !Short, src: DiffType) + [native("_ass_i16_f")] fun ctor(this: !Short, src: Float) + [native("_ass_i16_d")] fun ctor(this: !Short, src: Double) fun dtor(this: Short) {} - [native("_ass_16_16")] fun = (this: @Short, other: Short) - - [native("_zero_init_16")] fun ctor(this: @UShort) - [native("_ass_16_8z"), convert] fun ctor(this: @UShort, src: Byte) - [native("_ass_16_8z"), convert] fun ctor(this: @UShort, src: UByte) - [native("_ass_16_16"), convert] fun ctor(this: @UShort, src: Short) - [native("_ass_16_16")] fun ctor(this: @UShort, src: UShort) - [native("_ass_16_32")] fun ctor(this: @UShort, src: Int) - [native("_ass_16_32")] fun ctor(this: @UShort, src: UInt) - [native("_ass_16_64")] fun ctor(this: @UShort, src: Long) - [native("_ass_16_64")] fun ctor(this: @UShort, src: ULong) - [native("_ass_16_64")] fun ctor(this: @UShort, src: SizeType) - [native("_ass_16_64")] fun ctor(this: @UShort, src: DiffType) - [native("_ass_u16_f")] fun ctor(this: @UShort, src: Float) - [native("_ass_u16_d")] fun ctor(this: @UShort, src: Double) + [native("_ass_16_16")] fun = (this: !Short, other: Short) + + [native("_zero_init_16")] fun ctor(this: !UShort) + [native("_ass_16_8z"), convert] fun ctor(this: !UShort, src: Byte) + [native("_ass_16_8z"), convert] fun ctor(this: !UShort, src: UByte) + [native("_ass_16_16"), convert] fun ctor(this: !UShort, src: Short) + [native("_ass_16_16")] fun ctor(this: !UShort, src: UShort) + [native("_ass_16_32")] fun ctor(this: !UShort, src: Int) + [native("_ass_16_32")] fun ctor(this: !UShort, src: UInt) + [native("_ass_16_64")] fun ctor(this: !UShort, src: Long) + [native("_ass_16_64")] fun ctor(this: !UShort, src: ULong) + [native("_ass_16_64")] fun ctor(this: !UShort, src: SizeType) + [native("_ass_16_64")] fun ctor(this: !UShort, src: DiffType) + [native("_ass_u16_f")] fun ctor(this: !UShort, src: Float) + [native("_ass_u16_d")] fun ctor(this: !UShort, src: Double) fun dtor(this: UShort) {} - [native("_ass_16_16")] fun = (this: @UShort, other: UShort) - - [native("_zero_init_32")] fun ctor(this: @Int) - [native("_ass_32_8s"), convert] fun ctor(this: @Int, src: Byte) - [native("_ass_32_8z"), convert] fun ctor(this: @Int, src: UByte) - [native("_ass_32_16s"), convert] fun ctor(this: @Int, src: Short) - [native("_ass_32_16z"), convert] fun ctor(this: @Int, src: UShort) - [native("_ass_32_32")] fun ctor(this: @Int, src: Int) - [native("_ass_32_32")] fun ctor(this: @Int, src: UInt) - [native("_ass_32_64")] fun ctor(this: @Int, src: Long) - [native("_ass_32_64")] fun ctor(this: @Int, src: ULong) - [native("_ass_32_64")] fun ctor(this: @Int, src: SizeType) - [native("_ass_32_64")] fun ctor(this: @Int, src: DiffType) - [native("_ass_i32_f")] fun ctor(this: @Int, src: Float) - [native("_ass_i32_d")] fun ctor(this: @Int, src: Double) - [native("_ass_32_8z")] fun ctor(this: @Int, src: Char) + [native("_ass_16_16")] fun = (this: !UShort, other: UShort) + + [native("_zero_init_32")] fun ctor(this: !Int) + [native("_ass_32_8s"), convert] fun ctor(this: !Int, src: Byte) + [native("_ass_32_8z"), convert] fun ctor(this: !Int, src: UByte) + [native("_ass_32_16s"), convert] fun ctor(this: !Int, src: Short) + [native("_ass_32_16z"), convert] fun ctor(this: !Int, src: UShort) + [native("_ass_32_32")] fun ctor(this: !Int, src: Int) + [native("_ass_32_32")] fun ctor(this: !Int, src: UInt) + [native("_ass_32_64")] fun ctor(this: !Int, src: Long) + [native("_ass_32_64")] fun ctor(this: !Int, src: ULong) + [native("_ass_32_64")] fun ctor(this: !Int, src: SizeType) + [native("_ass_32_64")] fun ctor(this: !Int, src: DiffType) + [native("_ass_i32_f")] fun ctor(this: !Int, src: Float) + [native("_ass_i32_d")] fun ctor(this: !Int, src: Double) + [native("_ass_32_8z")] fun ctor(this: !Int, src: Char) fun dtor(this: Int) {} - [native("_ass_32_32")] fun = (this: @Int, other: Int) - - [native("_zero_init_32")] fun ctor(this: @UInt) - [native("_ass_32_8z"), convert] fun ctor(this: @UInt, src: Byte) - [native("_ass_32_8z"), convert] fun ctor(this: @UInt, src: UByte) - [native("_ass_32_16z"), convert] fun ctor(this: @UInt, src: Short) - [native("_ass_32_16z"), convert] fun ctor(this: @UInt, src: UShort) - [native("_ass_32_32"), convert] fun ctor(this: @UInt, src: Int) - [native("_ass_32_32")] fun ctor(this: @UInt, src: UInt) - [native("_ass_32_64")] fun ctor(this: @UInt, src: Long) - [native("_ass_32_64")] fun ctor(this: @UInt, src: ULong) - [native("_ass_32_64")] fun ctor(this: @UInt, src: SizeType) - [native("_ass_32_64")] fun ctor(this: @UInt, src: DiffType) - [native("_ass_u32_f")] fun ctor(this: @UInt, src: Float) - [native("_ass_u32_d")] fun ctor(this: @UInt, src: Double) + [native("_ass_32_32")] fun = (this: !Int, other: Int) + + [native("_zero_init_32")] fun ctor(this: !UInt) + [native("_ass_32_8z"), convert] fun ctor(this: !UInt, src: Byte) + [native("_ass_32_8z"), convert] fun ctor(this: !UInt, src: UByte) + [native("_ass_32_16z"), convert] fun ctor(this: !UInt, src: Short) + [native("_ass_32_16z"), convert] fun ctor(this: !UInt, src: UShort) + [native("_ass_32_32"), convert] fun ctor(this: !UInt, src: Int) + [native("_ass_32_32")] fun ctor(this: !UInt, src: UInt) + [native("_ass_32_64")] fun ctor(this: !UInt, src: Long) + [native("_ass_32_64")] fun ctor(this: !UInt, src: ULong) + [native("_ass_32_64")] fun ctor(this: !UInt, src: SizeType) + [native("_ass_32_64")] fun ctor(this: !UInt, src: DiffType) + [native("_ass_u32_f")] fun ctor(this: !UInt, src: Float) + [native("_ass_u32_d")] fun ctor(this: !UInt, src: Double) fun dtor(this: UInt) {} - [native("_ass_32_32")] fun = (this: @UInt, other: UInt) - - [native("_zero_init_64")] fun ctor(this: @Long) - [native("_ass_64_8s"), convert] fun ctor(this: @Long, src: Byte) - [native("_ass_64_8z"), convert] fun ctor(this: @Long, src: UByte) - [native("_ass_64_16s"), convert] fun ctor(this: @Long, src: Short) - [native("_ass_64_16z"), convert] fun ctor(this: @Long, src: UShort) - [native("_ass_64_32s"), convert] fun ctor(this: @Long, src: Int) - [native("_ass_64_32z"), convert] fun ctor(this: @Long, src: UInt) - [native("_ass_64_64")] fun ctor(this: @Long, src: Long) - [native("_ass_64_64")] fun ctor(this: @Long, src: ULong) - [native("_ass_64_64"), convert] fun ctor(this: @Long, src: SizeType) - [native("_ass_64_64"), convert] fun ctor(this: @Long, src: DiffType) - [native("_ass_i64_f")] fun ctor(this: @Long, src: Float) - [native("_ass_i64_d")] fun ctor(this: @Long, src: Double) + [native("_ass_32_32")] fun = (this: !UInt, other: UInt) + + [native("_zero_init_64")] fun ctor(this: !Long) + [native("_ass_64_8s"), convert] fun ctor(this: !Long, src: Byte) + [native("_ass_64_8z"), convert] fun ctor(this: !Long, src: UByte) + [native("_ass_64_16s"), convert] fun ctor(this: !Long, src: Short) + [native("_ass_64_16z"), convert] fun ctor(this: !Long, src: UShort) + [native("_ass_64_32s"), convert] fun ctor(this: !Long, src: Int) + [native("_ass_64_32z"), convert] fun ctor(this: !Long, src: UInt) + [native("_ass_64_64")] fun ctor(this: !Long, src: Long) + [native("_ass_64_64")] fun ctor(this: !Long, src: ULong) + [native("_ass_64_64"), convert] fun ctor(this: !Long, src: SizeType) + [native("_ass_64_64"), convert] fun ctor(this: !Long, src: DiffType) + [native("_ass_i64_f")] fun ctor(this: !Long, src: Float) + [native("_ass_i64_d")] fun ctor(this: !Long, src: Double) fun dtor(this: Long) {} - [native("_ass_64_64")] fun = (this: @Long, other: Long) - - [native("_zero_init_64")] fun ctor(this: @ULong) - [native("_ass_64_8z"), convert] fun ctor(this: @ULong, src: Byte) - [native("_ass_64_8z"), convert] fun ctor(this: @ULong, src: UByte) - [native("_ass_64_16z"), convert] fun ctor(this: @ULong, src: Short) - [native("_ass_64_16z"), convert] fun ctor(this: @ULong, src: UShort) - [native("_ass_64_32z"), convert] fun ctor(this: @ULong, src: Int) - [native("_ass_64_32z"), convert] fun ctor(this: @ULong, src: UInt) - [native("_ass_64_64"), convert] fun ctor(this: @ULong, src: Long) - [native("_ass_64_64")] fun ctor(this: @ULong, src: ULong) - [native("_ass_64_64"), convert] fun ctor(this: @ULong, src: SizeType) - [native("_ass_64_64"), convert] fun ctor(this: @ULong, src: DiffType) - [native("_ass_u64_f")] fun ctor(this: @ULong, src: Float) - [native("_ass_u64_d")] fun ctor(this: @ULong, src: Double) - fun dtor(this: @ULong) {} - [native("_ass_64_64")] fun = (this: @ULong, other: ULong) - - [native("_zero_init_64")] fun ctor(this: @SizeType) - [native("_ass_64_8z"), convert] fun ctor(this: @SizeType, src: Byte) - [native("_ass_64_8z"), convert] fun ctor(this: @SizeType, src: UByte) - [native("_ass_64_16z"), convert] fun ctor(this: @SizeType, src: Short) - [native("_ass_64_16z"), convert] fun ctor(this: @SizeType, src: UShort) - [native("_ass_64_32z"), convert] fun ctor(this: @SizeType, src: Int) - [native("_ass_64_32z"), convert] fun ctor(this: @SizeType, src: UInt) - [native("_ass_64_64")] fun ctor(this: @SizeType, src: Long) - [native("_ass_64_64")] fun ctor(this: @SizeType, src: ULong) - [native("_ass_64_64")] fun ctor(this: @SizeType, src: SizeType) - [native("_ass_64_64"), convert] fun ctor(this: @SizeType, src: DiffType) - [native("_ass_u64_f")] fun ctor(this: @SizeType, src: Float) - [native("_ass_u64_d")] fun ctor(this: @SizeType, src: Double) + [native("_ass_64_64")] fun = (this: !Long, other: Long) + + [native("_zero_init_64")] fun ctor(this: !ULong) + [native("_ass_64_8z"), convert] fun ctor(this: !ULong, src: Byte) + [native("_ass_64_8z"), convert] fun ctor(this: !ULong, src: UByte) + [native("_ass_64_16z"), convert] fun ctor(this: !ULong, src: Short) + [native("_ass_64_16z"), convert] fun ctor(this: !ULong, src: UShort) + [native("_ass_64_32z"), convert] fun ctor(this: !ULong, src: Int) + [native("_ass_64_32z"), convert] fun ctor(this: !ULong, src: UInt) + [native("_ass_64_64"), convert] fun ctor(this: !ULong, src: Long) + [native("_ass_64_64")] fun ctor(this: !ULong, src: ULong) + [native("_ass_64_64"), convert] fun ctor(this: !ULong, src: SizeType) + [native("_ass_64_64"), convert] fun ctor(this: !ULong, src: DiffType) + [native("_ass_u64_f")] fun ctor(this: !ULong, src: Float) + [native("_ass_u64_d")] fun ctor(this: !ULong, src: Double) + fun dtor(this: ULong) {} + [native("_ass_64_64")] fun = (this: !ULong, other: ULong) + + [native("_zero_init_64")] fun ctor(this: !SizeType) + [native("_ass_64_8z"), convert] fun ctor(this: !SizeType, src: Byte) + [native("_ass_64_8z"), convert] fun ctor(this: !SizeType, src: UByte) + [native("_ass_64_16z"), convert] fun ctor(this: !SizeType, src: Short) + [native("_ass_64_16z"), convert] fun ctor(this: !SizeType, src: UShort) + [native("_ass_64_32z"), convert] fun ctor(this: !SizeType, src: Int) + [native("_ass_64_32z"), convert] fun ctor(this: !SizeType, src: UInt) + [native("_ass_64_64")] fun ctor(this: !SizeType, src: Long) + [native("_ass_64_64")] fun ctor(this: !SizeType, src: ULong) + [native("_ass_64_64")] fun ctor(this: !SizeType, src: SizeType) + [native("_ass_64_64"), convert] fun ctor(this: !SizeType, src: DiffType) + [native("_ass_u64_f")] fun ctor(this: !SizeType, src: Float) + [native("_ass_u64_d")] fun ctor(this: !SizeType, src: Double) fun dtor(this: SizeType) {} - [native("_ass_64_64")] fun = (this: @SizeType, other: SizeType) - - [native("_zero_init_64")] fun ctor(this: @DiffType) - [native("_ass_64_8s"), convert] fun ctor(this: @DiffType, src: Byte) - [native("_ass_64_8z"), convert] fun ctor(this: @DiffType, src: UByte) - [native("_ass_64_16s"), convert] fun ctor(this: @DiffType, src: Short) - [native("_ass_64_16z"), convert] fun ctor(this: @DiffType, src: UShort) - [native("_ass_64_32s"), convert] fun ctor(this: @DiffType, src: Int) - [native("_ass_64_32z"), convert] fun ctor(this: @DiffType, src: UInt) - [native("_ass_64_64")] fun ctor(this: @DiffType, src: Long) - [native("_ass_64_64")] fun ctor(this: @DiffType, src: ULong) - [native("_ass_64_64")] fun ctor(this: @DiffType, src: SizeType) - [native("_ass_64_64")] fun ctor(this: @DiffType, src: DiffType) - [native("_ass_i64_f")] fun ctor(this: @DiffType, src: Float) - [native("_ass_i64_d")] fun ctor(this: @DiffType, src: Double) + [native("_ass_64_64")] fun = (this: !SizeType, other: SizeType) + + [native("_zero_init_64")] fun ctor(this: !DiffType) + [native("_ass_64_8s"), convert] fun ctor(this: !DiffType, src: Byte) + [native("_ass_64_8z"), convert] fun ctor(this: !DiffType, src: UByte) + [native("_ass_64_16s"), convert] fun ctor(this: !DiffType, src: Short) + [native("_ass_64_16z"), convert] fun ctor(this: !DiffType, src: UShort) + [native("_ass_64_32s"), convert] fun ctor(this: !DiffType, src: Int) + [native("_ass_64_32z"), convert] fun ctor(this: !DiffType, src: UInt) + [native("_ass_64_64")] fun ctor(this: !DiffType, src: Long) + [native("_ass_64_64")] fun ctor(this: !DiffType, src: ULong) + [native("_ass_64_64")] fun ctor(this: !DiffType, src: SizeType) + [native("_ass_64_64")] fun ctor(this: !DiffType, src: DiffType) + [native("_ass_i64_f")] fun ctor(this: !DiffType, src: Float) + [native("_ass_i64_d")] fun ctor(this: !DiffType, src: Double) fun dtor(this: DiffType) {} - [native("_ass_64_64")] fun = (this: @DiffType, other: DiffType) - - [native("_zero_init_f")] fun ctor(this: @Float) - [native("_ass_f_i8"), convert] fun ctor(this: @Float, src: Byte) - [native("_ass_f_u8"), convert] fun ctor(this: @Float, src: UByte) - [native("_ass_f_i16"), convert] fun ctor(this: @Float, src: Short) - [native("_ass_f_u16"), convert] fun ctor(this: @Float, src: UShort) - [native("_ass_f_i32"), convert] fun ctor(this: @Float, src: Int) - [native("_ass_f_u32"), convert] fun ctor(this: @Float, src: UInt) - [native("_ass_f_i64"), convert] fun ctor(this: @Float, src: Long) - [native("_ass_f_u64"), convert] fun ctor(this: @Float, src: ULong) - [native("_ass_f_i64"), convert] fun ctor(this: @Float, src: SizeType) - [native("_ass_f_u64"), convert] fun ctor(this: @Float, src: DiffType) - [native("_ass_f_f")] fun ctor(this: @Float, src: Float) - [native("_ass_f_d")] fun ctor(this: @Float, src: Double) + [native("_ass_64_64")] fun = (this: !DiffType, other: DiffType) + + [native("_zero_init_f")] fun ctor(this: !Float) + [native("_ass_f_i8"), convert] fun ctor(this: !Float, src: Byte) + [native("_ass_f_u8"), convert] fun ctor(this: !Float, src: UByte) + [native("_ass_f_i16"), convert] fun ctor(this: !Float, src: Short) + [native("_ass_f_u16"), convert] fun ctor(this: !Float, src: UShort) + [native("_ass_f_i32"), convert] fun ctor(this: !Float, src: Int) + [native("_ass_f_u32"), convert] fun ctor(this: !Float, src: UInt) + [native("_ass_f_i64"), convert] fun ctor(this: !Float, src: Long) + [native("_ass_f_u64"), convert] fun ctor(this: !Float, src: ULong) + [native("_ass_f_i64"), convert] fun ctor(this: !Float, src: SizeType) + [native("_ass_f_u64"), convert] fun ctor(this: !Float, src: DiffType) + [native("_ass_f_f")] fun ctor(this: !Float, src: Float) + [native("_ass_f_d")] fun ctor(this: !Float, src: Double) fun dtor(this: Float) {} - [native("_ass_f_f")] fun = (this: @Float, other: Float) - - [native("_zero_init_d")] fun ctor(this: @Double) - [native("_ass_d_i8"), convert] fun ctor(this: @Double, src: Byte) - [native("_ass_d_u8"), convert] fun ctor(this: @Double, src: UByte) - [native("_ass_d_i16"), convert] fun ctor(this: @Double, src: Short) - [native("_ass_d_u16"), convert] fun ctor(this: @Double, src: UShort) - [native("_ass_d_i32"), convert] fun ctor(this: @Double, src: Int) - [native("_ass_d_u32"), convert] fun ctor(this: @Double, src: UInt) - [native("_ass_d_i64"), convert] fun ctor(this: @Double, src: Long) - [native("_ass_d_u64"), convert] fun ctor(this: @Double, src: ULong) - [native("_ass_d_i64"), convert] fun ctor(this: @Double, src: SizeType) - [native("_ass_d_u64"), convert] fun ctor(this: @Double, src: DiffType) - [native("_ass_d_f"), convert] fun ctor(this: @Double, src: Float) - [native("_ass_d_d")] fun ctor(this: @Double, src: Double) + [native("_ass_f_f")] fun = (this: !Float, other: Float) + + [native("_zero_init_d")] fun ctor(this: !Double) + [native("_ass_d_i8"), convert] fun ctor(this: !Double, src: Byte) + [native("_ass_d_u8"), convert] fun ctor(this: !Double, src: UByte) + [native("_ass_d_i16"), convert] fun ctor(this: !Double, src: Short) + [native("_ass_d_u16"), convert] fun ctor(this: !Double, src: UShort) + [native("_ass_d_i32"), convert] fun ctor(this: !Double, src: Int) + [native("_ass_d_u32"), convert] fun ctor(this: !Double, src: UInt) + [native("_ass_d_i64"), convert] fun ctor(this: !Double, src: Long) + [native("_ass_d_u64"), convert] fun ctor(this: !Double, src: ULong) + [native("_ass_d_i64"), convert] fun ctor(this: !Double, src: SizeType) + [native("_ass_d_u64"), convert] fun ctor(this: !Double, src: DiffType) + [native("_ass_d_f"), convert] fun ctor(this: !Double, src: Float) + [native("_ass_d_d")] fun ctor(this: !Double, src: Double) fun dtor(this: Double) {} - [native("_ass_d_d")] fun = (this: @Double, other: Double) - - [native("_zero_init_8")] fun ctor(this: @Char) - [native("_ass_8_8")] fun ctor(this: @Char, src: Char) - [native("_ass_8_8")] fun ctor(this: @Char, src: Byte) - [native("_ass_8_8")] fun ctor(this: @Char, src: UByte) - [native("_ass_8_16")] fun ctor(this: @Char, src: Short) - [native("_ass_8_16")] fun ctor(this: @Char, src: UShort) - [native("_ass_8_32")] fun ctor(this: @Char, src: Int) - [native("_ass_8_32")] fun ctor(this: @Char, src: UInt) - [native("_ass_8_64")] fun ctor(this: @Char, src: Long) - [native("_ass_8_64")] fun ctor(this: @Char, src: ULong) - [native("_ass_8_64")] fun ctor(this: @Char, src: SizeType) - [native("_ass_8_64")] fun ctor(this: @Char, src: DiffType) + [native("_ass_d_d")] fun = (this: !Double, other: Double) + + [native("_zero_init_8")] fun ctor(this: !Char) + [native("_ass_8_8")] fun ctor(this: !Char, src: Char) + [native("_ass_8_8")] fun ctor(this: !Char, src: Byte) + [native("_ass_8_8")] fun ctor(this: !Char, src: UByte) + [native("_ass_8_16")] fun ctor(this: !Char, src: Short) + [native("_ass_8_16")] fun ctor(this: !Char, src: UShort) + [native("_ass_8_32")] fun ctor(this: !Char, src: Int) + [native("_ass_8_32")] fun ctor(this: !Char, src: UInt) + [native("_ass_8_64")] fun ctor(this: !Char, src: Long) + [native("_ass_8_64")] fun ctor(this: !Char, src: ULong) + [native("_ass_8_64")] fun ctor(this: !Char, src: SizeType) + [native("_ass_8_64")] fun ctor(this: !Char, src: DiffType) fun dtor(this: Char) {} - [native("_ass_8_8")] fun = (this: @Char, other: Char) + [native("_ass_8_8")] fun = (this: !Char, other: Char) concept SmallInteger(x) \ if typeOf(x) == Byte \ @@ -569,49 +568,49 @@ using oper_assoc_:= = -1 [native("_Float_opMinus1")] fun - (x: Float): Float [native("_Double_opMinus1")] fun - (x: Double): Double - fun pre_++(n: @Byte): Byte { n+=Byte(1); return n; } - fun pre_++(n: @UByte): UByte { n+=UByte(1); return n; } - fun pre_++(n: @Short): Short { n+=Short(1); return n; } - fun pre_++(n: @UShort): UShort { n+=UShort(1); return n; } - fun pre_++(n: @Int): Int { n+=1; return n; } - fun pre_++(n: @UInt): UInt { n+=UInt(1); return n; } - fun pre_++(n: @Long): Long { n+=Long(1); return n; } - fun pre_++(n: @ULong): ULong { n+=ULong(1); return n; } - fun pre_++(n: @SizeType): SizeType { n+=SizeType(1); return n; } - fun pre_++(n: @DiffType): DiffType { n+=DiffType(1); return n; } - - fun pre_--(n: @Byte): Byte { n-=Byte(1); return n; } - fun pre_--(n: @UByte): UByte { n-=UByte(1); return n; } - fun pre_--(n: @Short): Short { n-=Short(1); return n; } - fun pre_--(n: @UShort): UShort { n-=UShort(1); return n; } - fun pre_--(n: @Int): Int { n-=1; return n; } - fun pre_--(n: @UInt): UInt { n-=UInt(1); return n; } - fun pre_--(n: @Long): Long { n-=Long(1); return n; } - fun pre_--(n: @ULong): ULong { n-=ULong(1); return n; } - fun pre_--(n: @SizeType): SizeType { n-=SizeType(1); return n; } - fun pre_--(n: @DiffType): DiffType { n-=DiffType(1); return n; } - - fun post_++(n: @Byte): Byte { var old = n; n+=Byte(1); return old; } - fun post_++(n: @UByte): UByte { var old = n; n+=UByte(1); return old; } - fun post_++(n: @Short): Short { var old = n; n+=Short(1); return old; } - fun post_++(n: @UShort): UShort { var old = n; n+=UShort(1); return old; } - fun post_++(n: @Int): Int { var old = n; n+=1; return old; } - fun post_++(n: @UInt): UInt { var old = n; n+=UInt(1); return old; } - fun post_++(n: @Long): Long { var old = n; n+=Long(1); return old; } - fun post_++(n: @ULong): ULong { var old = n; n+=ULong(1); return old; } - fun post_++(n: @SizeType): SizeType { var old = n; n+=SizeType(1); return old; } - fun post_++(n: @DiffType): DiffType { var old = n; n+=DiffType(1); return old; } - - fun post_--(n: @Byte): Byte { var old = n; n-=Byte(1); return old; } - fun post_--(n: @UByte): UByte { var old = n; n-=UByte(1); return old; } - fun post_--(n: @Short): Short { var old = n; n-=Short(1); return old; } - fun post_--(n: @UShort): UShort { var old = n; n-=UShort(1); return old; } - fun post_--(n: @Int): Int { var old = n; n-=1; return old; } - fun post_--(n: @UInt): UInt { var old = n; n-=UInt(1); return old; } - fun post_--(n: @Long): Long { var old = n; n-=Long(1); return old; } - fun post_--(n: @ULong): ULong { var old = n; n-=ULong(1); return old; } - fun post_--(n: @SizeType): SizeType { var old = n; n-=SizeType(1); return old; } - fun post_--(n: @DiffType): DiffType { var old = n; n-=DiffType(1); return old; } + fun pre_++(n: !Byte): Byte { n+=Byte(1); return n; } + fun pre_++(n: !UByte): UByte { n+=UByte(1); return n; } + fun pre_++(n: !Short): Short { n+=Short(1); return n; } + fun pre_++(n: !UShort): UShort { n+=UShort(1); return n; } + fun pre_++(n: !Int): Int { n+=1; return n; } + fun pre_++(n: !UInt): UInt { n+=UInt(1); return n; } + fun pre_++(n: !Long): Long { n+=Long(1); return n; } + fun pre_++(n: !ULong): ULong { n+=ULong(1); return n; } + fun pre_++(n: !SizeType): SizeType { n+=SizeType(1); return n; } + fun pre_++(n: !DiffType): DiffType { n+=DiffType(1); return n; } + + fun pre_--(n: !Byte): Byte { n-=Byte(1); return n; } + fun pre_--(n: !UByte): UByte { n-=UByte(1); return n; } + fun pre_--(n: !Short): Short { n-=Short(1); return n; } + fun pre_--(n: !UShort): UShort { n-=UShort(1); return n; } + fun pre_--(n: !Int): Int { n-=1; return n; } + fun pre_--(n: !UInt): UInt { n-=UInt(1); return n; } + fun pre_--(n: !Long): Long { n-=Long(1); return n; } + fun pre_--(n: !ULong): ULong { n-=ULong(1); return n; } + fun pre_--(n: !SizeType): SizeType { n-=SizeType(1); return n; } + fun pre_--(n: !DiffType): DiffType { n-=DiffType(1); return n; } + + fun post_++(n: !Byte): Byte { let old = n; n+=Byte(1); return old; } + fun post_++(n: !UByte): UByte { let old = n; n+=UByte(1); return old; } + fun post_++(n: !Short): Short { let old = n; n+=Short(1); return old; } + fun post_++(n: !UShort): UShort { let old = n; n+=UShort(1); return old; } + fun post_++(n: !Int): Int { let old = n; n+=1; return old; } + fun post_++(n: !UInt): UInt { let old = n; n+=UInt(1); return old; } + fun post_++(n: !Long): Long { let old = n; n+=Long(1); return old; } + fun post_++(n: !ULong): ULong { let old = n; n+=ULong(1); return old; } + fun post_++(n: !SizeType): SizeType { let old = n; n+=SizeType(1); return old; } + fun post_++(n: !DiffType): DiffType { let old = n; n+=DiffType(1); return old; } + + fun post_--(n: !Byte): Byte { let old = n; n-=Byte(1); return old; } + fun post_--(n: !UByte): UByte { let old = n; n-=UByte(1); return old; } + fun post_--(n: !Short): Short { let old = n; n-=Short(1); return old; } + fun post_--(n: !UShort): UShort { let old = n; n-=UShort(1); return old; } + fun post_--(n: !Int): Int { let old = n; n-=1; return old; } + fun post_--(n: !UInt): UInt { let old = n; n-=UInt(1); return old; } + fun post_--(n: !Long): Long { let old = n; n-=Long(1); return old; } + fun post_--(n: !ULong): ULong { let old = n; n-=ULong(1); return old; } + fun post_--(n: !SizeType): SizeType { let old = n; n-=SizeType(1); return old; } + fun post_--(n: !DiffType): DiffType { let old = n; n-=DiffType(1); return old; } //////////////////////////////////////////////////////////////////////////////// /// StringRef @@ -622,54 +621,52 @@ using oper_assoc_:= = -1 datatype StringRef using RetType = @Char - begin: @Byte - end: @Byte + begin, end: UntypedPtr [protected] - fun ctor(this: @StringRef) - begin := null - end := null - - fun ctor(this: @StringRef, size: SizeType) - begin := malloc(size + 1) - end := ptrAdd(begin, size) - end = Byte(0) - fun ctor(this: @StringRef, other: StringRef) - begin := other.begin - end := other.end - fun ctor(this: @StringRef, begin, end: @Byte) - this.begin := begin - this.end := end - fun dtor(this: @StringRef) {} - - fun isEmpty(this: @StringRef) = ptrDiff(end, begin) == 0 - fun size(this: @StringRef): SizeType = ptrDiff(end, begin) - - fun front(this: @StringRef): @Char = reinterpretCast(@Char, begin) - fun back(this: @StringRef): @Char = reinterpretCast(@Char, ptrSub(end, 1)) - fun ()(this: @StringRef) : @Char = reinterpretCast(@Char, begin) - fun ()(this: @StringRef, index: SizeType): @Char = reinterpretCast(@Char, ptrAdd(begin, index)) - fun at(this: @StringRef, index: SizeType): @Char = reinterpretCast(@Char, ptrAdd(begin, index)) - - fun popFront(this: @StringRef) { begin := ptrAdd(begin, 1); } - fun popBack(this: @StringRef) { end := ptrSub(end, 1); } - fun popFront(this: @StringRef, n: SizeType) { begin := ptrAdd(begin, n); } - fun popBack(this: @StringRef, n: SizeType) { end := ptrSub(end, n); } - - fun subrange(this: @StringRef, index: SizeType, num: SizeType): StringRef - return StringRef(ptrAdd(begin, index), ptrAdd(begin, index+num)) - - fun cStr(this: @StringRef): @Char = reinterpretCast(@Char, begin) - -fun = (this: @StringRef, src: StringRef): @StringRef - begin := src.begin - end := src.end - + fun ctor(this: !StringRef) + begin ctor UntypedPtr() + end ctor UntypedPtr() + + fun ctor(this: !StringRef, size: SizeType) + begin = malloc(size + 1) + end = (begin ptrAdd size) + (end asRefOf Byte) = Byte(0) + fun ctor(this: !StringRef, other: StringRef) + begin = other.begin + end = other.end + fun ctor(this: !StringRef, begin, end: UntypedPtr) + this.begin = begin + this.end = end + fun dtor(this: StringRef) {} + + fun isEmpty(this: StringRef) = (end ptrDiff begin) == 0 + fun size(this: StringRef): SizeType = (end ptrDiff begin) + + fun front(this: StringRef): @Char = begin asRefOf Char + fun back(this: StringRef): @Char = end ptrSub 1 asRefOf Char + fun ()(this: StringRef) : @Char = begin asRefOf Char + fun ()(this: StringRef, index: SizeType): @Char = begin ptrAdd index asRefOf Char + fun at(this: StringRef, index: SizeType): @Char = begin ptrAdd index asRefOf Char + + fun popFront(this: !StringRef) { begin = (begin ptrAdd 1); } + fun popBack(this: !StringRef) { end = (begin ptrSub 1); } + fun popFront(this: !StringRef, n: SizeType) { begin = (begin ptrAdd n); } + fun popBack(this: !StringRef, n: SizeType) { end = (begin ptrAdd n); } + + fun subrange(this: StringRef, index: SizeType, num: SizeType): StringRef + return StringRef(begin ptrAdd index, begin ptrAdd (index+num)) + + fun cStr(this: StringRef): @Char = begin asRefOf Char + +fun = (this: !StringRef, src: StringRef): !StringRef + begin = src.begin + end = src.end return this [protected, autoCt] fun == (this, other: StringRef): Bool - var s = this.size + let s = this.size if s != other.size return false var i: SizeType = 0 @@ -677,43 +674,40 @@ fun == (this, other: StringRef): Bool if this.at(i) != other.at(i) return false return true - //return 0 == strcmp(begin, other.begin) - [autoCt, native("_String_fromCString")] fun fromCString(s: @Char): StringRef - var len = cStringLen(s) + let len = cStringLen(s) var res: StringRef - res.begin := reinterpretCast(@Byte, s) - res.end := ptrAdd(res.begin, len) + res.begin = UntypedPtr(s) + res.end = (res.begin ptrAdd len) return res fun cStringLen(s: @Char): SizeType - var p: @Byte - p := reinterpretCast(@Byte, s) var len: SizeType = 0 - while p != Byte(0) ; p:=ptrAdd(p, 1) - len = len+1 + var p: UntypedPtr = s + while p.asRefOf(Byte) != Byte(0) ; p = (p ptrAdd 1) + len++ return len [autoCt] - fun char(this: @StringRef): Char + fun char(this: StringRef): Char if this.isEmpty return Char() else return this.at(0) fun + (x,y: StringRef): StringRef - var sz1 = x.size() - var sz2 = y.size() + let sz1 = x.size() + let sz2 = y.size() var res: StringRef = sz1 + sz2 memcpy(res.begin, x.begin, sz1) - memcpy(ptrAdd(res.begin, sz1), y.begin, sz2) + memcpy(res.begin ptrAdd sz1, y.begin, sz2) return res fun + (x: StringRef, y: Char): StringRef - var sz1 = x.size() - var sz2 = 1 + let sz1 = x.size() + let sz2 = 1 var res: StringRef = sz1 + sz2 memcpy(res.begin, x.begin, sz1) - memcpy(ptrAdd(res.begin, sz1), reinterpretCast(@Byte, y), sz2) + memcpy(res.begin ptrAdd sz1, UntypedPtr(y), sz2) return res @@ -738,6 +732,21 @@ fun construct() [bitcopiable] datatype UntypedPtr = @Byte +[protected] + fun ctor(this: !UntypedPtr) + this.data := null + fun ctor(this: !UntypedPtr, other: UntypedPtr) + this.data := other.data + fun ctor(this: !UntypedPtr, val: @AnyType) + this.data := reinterpretCast(@Byte, val) + fun ctor(this: !UntypedPtr, nullptr: Null) + this.data := null + fun asRefOf(this: UntypedPtr, t: Type): @t = reinterpretCast(@t, this.data) + + [native("ptrAdd"), autoCt] fun ptrAdd(p: UntypedPtr, n: SizeType): UntypedPtr + [native("ptrSub"), autoCt] fun ptrSub(p: UntypedPtr, n: SizeType): UntypedPtr + [native("ptrDiff"), autoCt] fun ptrDiff(p1, p2: UntypedPtr): DiffType + [autoCt] [native("implOpRefEQ")] fun implOpRefEQ(x,y: @Byte): Bool [native("implOpRefNE")] fun implOpRefNE(x,y: @Byte): Bool @@ -763,6 +772,7 @@ package TypeOp [native("$typeNumRef")] fun numRef(t: Type): Int [native("$typeChangeMode")] fun changeMode(t: Type, mode: Int): Type [native("$typeChangeRefCount")] fun changeRefCount(t: Type, numRef: Int): Type + [native("$typeRemoveCat")] fun removeCat(t: Type): Type [native("$typeIsBitcopiable")] fun isBitcopiable(t: Type): Bool [ctGeneric] @@ -772,6 +782,10 @@ package TypeOp fun removeAllRef(t: Type) = changeRefCount(t, 0) fun atLeastOneRef(t: Type): Type = ife(isRef(t), t, addRef(t)) + fun copyVal(val: AnyType): typeOf(val) + fun copyVal(val: !AnyType): typeOf(val) + fun copyVal(val: @AnyType): removeRef(typeOf(val)) + /// Add reference operator [ct, native("$typeAddRef")] fun pre_@ (t: Type): Type //[ctGeneric] fun pre_@ (t: Type) = TypeOp.addRef(t) @@ -786,6 +800,11 @@ package TypeOp [ct, native("$ct")] fun ct(t: Type): Type [ct, native("$rt")] fun rt(t: Type): Type +[ct, native('$const')] fun const(t: Type): Type +[ct, native('$mut')] fun mut(t: Type): Type +[ct, native('$tmp')] fun tmp(t: Type): Type +[ct, native('$mut')] fun pre_!(t: Type): Type + [ct, native("$convertsTo")] fun convertsTo(src, dest: Type): Bool [ct, native("$staticBuffer")] fun static_buffer(n: SizeType): Type [ct, native("$commonType")] fun commonType(t, u: Type): Type @@ -801,20 +820,13 @@ fun #$(t: Type): t /// Some low-level helper functions /// -[native("malloc")] fun malloc(size: SizeType): @Byte -[native("calloc")] fun calloc(size, count: SizeType): @Byte -[native("realloc"), autoCt] fun realloc(p: @Byte, size: SizeType): @Byte -[native("free"), autoCt] fun free(p: @Byte) -[native("ptrAdd"), autoCt] fun ptrAdd(p: @Byte, n: SizeType): @Byte -[native("ptrSub"), autoCt] fun ptrSub(p: @Byte, n: SizeType): @Byte -[native("ptrDiff"), autoCt] fun ptrDiff(p1, p2: @Byte): DiffType -[native("ptrAdd"), autoCt] fun ptrAdd(p: UntypedPtr, n: SizeType): UntypedPtr -[native("ptrSub"), autoCt] fun ptrSub(p: UntypedPtr, n: SizeType): UntypedPtr -[native("ptrDiff"), autoCt] fun ptrDiff(p1, p2: UntypedPtr): DiffType -[native("_spr_memcpy"), autoCt] fun memcpy(dest, src: @Byte, size: SizeType) -[native("_spr_memmove"), autoCt] fun memmove(dest, src: @Byte, size: SizeType) -[native("_spr_memset"), autoCt] fun memset(dest: @Byte, val: Byte, count: SizeType) -[native("strcmp"), autoCt] fun strcmp(lhs, rhs: @Byte): Int +[native("malloc")] fun malloc(size: SizeType): UntypedPtr +[native("calloc")] fun calloc(size, count: SizeType): UntypedPtr +[native("realloc"), autoCt] fun realloc(p: UntypedPtr, size: SizeType): UntypedPtr +[native("free"), autoCt] fun free(p: UntypedPtr) +[native("_spr_memcpy"), autoCt] fun memcpy(dest, src: UntypedPtr, size: SizeType) +[native("_spr_memmove"), autoCt] fun memmove(dest, src: UntypedPtr, size: SizeType) +[native("_spr_memset"), autoCt] fun memset(dest: UntypedPtr, val: Byte, count: SizeType) [native("system")] fun systemNative(x: @Char) [native("sleep")] fun sleep(x: Int) diff --git a/SparrowImplicitLib/sprCore/basicMeta.spr b/SparrowImplicitLib/sprCore/basicMeta.spr index 7f55dac6..1927aca2 100644 --- a/SparrowImplicitLib/sprCore/basicMeta.spr +++ b/SparrowImplicitLib/sprCore/basicMeta.spr @@ -2,6 +2,7 @@ import basicDecls(UntypedPtr, Byte, StringRef, Null, pre_@) [ct] /// The type used to represent a compiler AST node + [bitcopiable] datatype CompilerAstNode = @Byte /// Taking an AST node, this will evaluate the node and produce the corresponding code diff --git a/SparrowImplicitLib/sprCore/functionPtr.spr b/SparrowImplicitLib/sprCore/functionPtr.spr index 57dbb3fc..81ac3fc0 100644 --- a/SparrowImplicitLib/sprCore/functionPtr.spr +++ b/SparrowImplicitLib/sprCore/functionPtr.spr @@ -1,48 +1,53 @@ -import basicDecls(Type, Byte, Int, Null, AnyType) +import basicDecls(Type, Byte, Int, AnyType, UntypedPtr) package _Impl0 + [bitcopiable] datatype FunctionPtr0(resT: Type) using arity = 0 using ResT = resT - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr0): ResT - fun ()(this: @FunctionPtr0): ResT = this._doCall() + [native("$funptr")] fun _doCall(this: FunctionPtr0 const): ResT + fun ()(this: FunctionPtr0): ResT = this._doCall() package _Impl1 + [bitcopiable] datatype FunctionPtr1(resT, t1: Type) using arity = 1 using ResT = resT using T1 = t1 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr1, p1: this.T1): ResT - fun ()(this: @FunctionPtr1, p1: this.T1): ResT = this._doCall(p1) + [native("$funptr")] fun _doCall(this: FunctionPtr1 const, p1: this.T1): ResT + fun ()(this: FunctionPtr1, p1: this.T1): ResT = this._doCall(p1) package _Impl2 + [bitcopiable] datatype FunctionPtr2(resT, t1, t2: Type) using arity = 2 using ResT = resT using T1 = t1 using T2 = t2 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr2, p1: this.T1, p2: this.T2): ResT - fun ()(this: @FunctionPtr2, p1: this.T1, p2: this.T2): ResT = this._doCall(p1, p2) + [native("$funptr")] fun _doCall(this: FunctionPtr2 const, p1: this.T1, p2: this.T2): ResT + fun ()(this: FunctionPtr2, p1: this.T1, p2: this.T2): ResT = this._doCall(p1, p2) package _Impl3 + [bitcopiable] datatype FunctionPtr3(resT, t1, t2, t3: Type) using arity = 3 using ResT = resT using T1 = t1 using T2 = t2 using T3 = t3 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr3, p1: this.T1, p2: this.T2, p3: this.T3): ResT - fun ()(this: @FunctionPtr3, p1: this.T1, p2: this.T2, p3: this.T3): ResT = this._doCall(p1, p2, p3) + [native("$funptr")] fun _doCall(this: FunctionPtr3 const, p1: this.T1, p2: this.T2, p3: this.T3): ResT + fun ()(this: FunctionPtr3, p1: this.T1, p2: this.T2, p3: this.T3): ResT = this._doCall(p1, p2, p3) package _Impl4 + [bitcopiable] datatype FunctionPtr4(resT, t1, t2, t3, t4: Type) using arity = 4 using ResT = resT @@ -50,12 +55,13 @@ package _Impl4 using T2 = t2 using T3 = t3 using T4 = t4 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr4, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4): ResT - fun ()(this: @FunctionPtr4, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4): ResT = this._doCall(p1, p2, p3, p4) + [native("$funptr")] fun _doCall(this: FunctionPtr4 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4): ResT + fun ()(this: FunctionPtr4, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4): ResT = this._doCall(p1, p2, p3, p4) package _Impl5 + [bitcopiable] datatype FunctionPtr5(resT, t1, t2, t3, t4, t5: Type) using arity = 5 using ResT = resT @@ -64,12 +70,13 @@ package _Impl5 using T3 = t3 using T4 = t4 using T5 = t5 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr5, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5): ResT - fun ()(this: @FunctionPtr5, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5): ResT = this._doCall(p1, p2, p3, p4, p5) + [native("$funptr")] fun _doCall(this: FunctionPtr5 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5): ResT + fun ()(this: FunctionPtr5, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5): ResT = this._doCall(p1, p2, p3, p4, p5) package _Impl6 + [bitcopiable] datatype FunctionPtr6(resT, t1, t2, t3, t4, t5, t6: Type) using arity = 6 using ResT = resT @@ -79,12 +86,13 @@ package _Impl6 using T4 = t4 using T5 = t5 using T6 = t6 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr6, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6): ResT - fun ()(this: @FunctionPtr6, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6): ResT = this._doCall(p1, p2, p3, p4, p5, p6) + [native("$funptr")] fun _doCall(this: FunctionPtr6 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6): ResT + fun ()(this: FunctionPtr6, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6): ResT = this._doCall(p1, p2, p3, p4, p5, p6) package _Impl7 + [bitcopiable] datatype FunctionPtr7(resT, t1, t2, t3, t4, t5, t6, t7: Type) using arity = 7 using ResT = resT @@ -95,12 +103,13 @@ package _Impl7 using T5 = t5 using T6 = t6 using T7 = t7 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr7, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7): ResT - fun ()(this: @FunctionPtr7, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7) + [native("$funptr")] fun _doCall(this: FunctionPtr7 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7): ResT + fun ()(this: FunctionPtr7, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7) package _Impl8 + [bitcopiable] datatype FunctionPtr8(resT, t1, t2, t3, t4, t5, t6, t7, t8: Type) using arity = 8 using ResT = resT @@ -112,12 +121,13 @@ package _Impl8 using T6 = t6 using T7 = t7 using T8 = t8 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr8, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8): ResT - fun ()(this: @FunctionPtr8, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8) + [native("$funptr")] fun _doCall(this: FunctionPtr8 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8): ResT + fun ()(this: FunctionPtr8, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8) package _Impl9 + [bitcopiable] datatype FunctionPtr9(resT, t1, t2, t3, t4, t5, t6, t7, t8, t9: Type) using arity = 9 using ResT = resT @@ -130,12 +140,13 @@ package _Impl9 using T7 = t7 using T8 = t8 using T9 = t9 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr9, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9): ResT - fun ()(this: @FunctionPtr9, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9) + [native("$funptr")] fun _doCall(this: FunctionPtr9 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9): ResT + fun ()(this: FunctionPtr9, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9) package _Impl10 + [bitcopiable] datatype FunctionPtr10(resT, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10: Type) using arity = 10 using ResT = resT @@ -149,12 +160,13 @@ package _Impl10 using T8 = t8 using T9 = t9 using T10 = t10 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr10, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10): ResT - fun ()(this: @FunctionPtr10, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) + [native("$funptr")] fun _doCall(this: FunctionPtr10 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10): ResT + fun ()(this: FunctionPtr10, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) package _Impl11 + [bitcopiable] datatype FunctionPtr11(resT, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11: Type) using arity = 11 using ResT = resT @@ -169,12 +181,13 @@ package _Impl11 using T9 = t9 using T10 = t10 using T11 = t11 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr11, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11): ResT - fun ()(this: @FunctionPtr11, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) + [native("$funptr")] fun _doCall(this: FunctionPtr11 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11): ResT + fun ()(this: FunctionPtr11, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) package _Impl12 + [bitcopiable] datatype FunctionPtr12(resT, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12: Type) using arity = 12 using ResT = resT @@ -190,12 +203,13 @@ package _Impl12 using T10 = t10 using T11 = t11 using T12 = t12 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr12, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12): ResT - fun ()(this: @FunctionPtr12, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) + [native("$funptr")] fun _doCall(this: FunctionPtr12 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12): ResT + fun ()(this: FunctionPtr12, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) package _Impl13 + [bitcopiable] datatype FunctionPtr13(resT, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13: Type) using arity = 13 using ResT = resT @@ -212,12 +226,13 @@ package _Impl13 using T11 = t11 using T12 = t12 using T13 = t13 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr13, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13): ResT - fun ()(this: @FunctionPtr13, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) + [native("$funptr")] fun _doCall(this: FunctionPtr13 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13): ResT + fun ()(this: FunctionPtr13, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) package _Impl14 + [bitcopiable] datatype FunctionPtr14(resT, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14: Type) using arity = 14 using ResT = resT @@ -235,12 +250,13 @@ package _Impl14 using T12 = t12 using T13 = t13 using T14 = t14 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr14, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14): ResT - fun ()(this: @FunctionPtr14, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) + [native("$funptr")] fun _doCall(this: FunctionPtr14 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14): ResT + fun ()(this: FunctionPtr14, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) package _Impl15 + [bitcopiable] datatype FunctionPtr15(resT, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15: Type) using arity = 15 using ResT = resT @@ -259,10 +275,10 @@ package _Impl15 using T13 = t13 using T14 = t14 using T15 = t15 - _funPtr: @Byte + _funPtr: UntypedPtr - [native("$funptr")] fun _doCall(this: @FunctionPtr15, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14, p15: this.T15): ResT - fun ()(this: @FunctionPtr15, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14, p15: this.T15): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) + [native("$funptr")] fun _doCall(this: FunctionPtr15 const, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14, p15: this.T15): ResT + fun ()(this: FunctionPtr15, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14, p15: this.T15): ResT = this._doCall(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) using FunctionPtr = _Impl0.FunctionPtr0 using FunctionPtr = _Impl1.FunctionPtr1 diff --git a/SparrowImplicitLib/sprCore/mainDef.spr b/SparrowImplicitLib/sprCore/mainDef.spr index d1985235..ebebec75 100644 --- a/SparrowImplicitLib/sprCore/mainDef.spr +++ b/SparrowImplicitLib/sprCore/mainDef.spr @@ -1,4 +1,4 @@ -import basicDecls(Char, Byte, Int, SizeType, DiffType, StringRef, Null, typeOf, reinterpretCast, sizeOf, ptrAdd, ptrSub, ptrDiff, fromCString, *) +import basicDecls(Char, Byte, Int, SizeType, DiffType, StringRef, Null, typeOf, reinterpretCast, sizeOf, UntypedPtr, ptrAdd, ptrSub, ptrDiff, fromCString, *) /// Range type that returns StringRef objects referring to program arguments datatype MainParameters @@ -6,33 +6,36 @@ datatype MainParameters _begin, _end: _Impl.CStrPtr -fun ctor(this: @MainParameters, argc: Int, argv: @ @Char) - this._begin = (_Impl.fromArgvPtr(argv)) - this._end = (this._begin + argc) +[protected] + fun ctor(this: @MainParameters, argc: Int, argv: @ @Char) + this._begin = (_Impl.fromArgvPtr(argv)) + this._end = (this._begin + argc) -fun isEmpty(this: MainParameters) = this.size == 0 -fun size(this: MainParameters): SizeType = _end - _begin + fun isEmpty(this: MainParameters) = this.size == 0 + fun size(this: MainParameters): SizeType = _end - _begin -fun front(this: MainParameters): RetType = _begin toStringRef -fun back(this: MainParameters): RetType = _end - 1 toStringRef -fun ()(this: MainParameters) : RetType = _begin toStringRef -fun ()(this: MainParameters, n: SizeType): RetType = _begin + n toStringRef + fun front(this: MainParameters): RetType = _begin toStringRef + fun back(this: MainParameters): RetType = _end - 1 toStringRef + fun ()(this: MainParameters) : RetType = _begin toStringRef + fun ()(this: MainParameters, n: SizeType): RetType = _begin + n toStringRef -fun popFront(this: @MainParameters) { _begin = (_begin + 1); } -fun popBack(this: @MainParameters) { _end = (_end - 1); } -fun popFront(this: @MainParameters, n: SizeType) { _begin = (_begin + n); } -fun popBack(this: @MainParameters, n: SizeType) { _end = (_end - n); } + fun popFront(this: @MainParameters) { _begin = (_begin + 1); } + fun popBack(this: @MainParameters) { _end = (_end - 1); } + fun popFront(this: @MainParameters, n: SizeType) { _begin = (_begin + n); } + fun popBack(this: @MainParameters, n: SizeType) { _end = (_end - n); } package _Impl + [bitcopiable] datatype CStr { cstr: @Char; } - [initCtor] datatype CStrPtr { ptr: @CStr; } + [initCtor, bitcopiable] + datatype CStrPtr { ptr: @CStr; } fun fromArgvPtr(argv: @ @Char): CStrPtr = CStrPtr(reinterpretCast(@CStr, argv)) - fun fromBytePtr(p: @Byte): CStrPtr = CStrPtr(reinterpretCast(@CStr, p)) - fun toBytePtr(p: CStrPtr): @Byte = reinterpretCast(@Byte, p.ptr) - fun +(p: CStrPtr, n: SizeType): CStrPtr = fromBytePtr( ptrAdd(toBytePtr(p), n*(sizeOf(CStrPtr))) ) - fun -(p: CStrPtr, n: SizeType): CStrPtr = fromBytePtr( ptrSub(toBytePtr(p), n*(sizeOf(CStrPtr))) ) - fun -(p, q: CStrPtr): SizeType = ptrDiff(toBytePtr(p), toBytePtr(q)) / (sizeOf(CStrPtr)) + fun toCStrPtr(p: UntypedPtr): CStrPtr = CStrPtr(p.asRefOf(CStr)) + fun toUntypedPtr(p: CStrPtr) = UntypedPtr(p.ptr) + fun +(p: CStrPtr, n: SizeType): CStrPtr = toUntypedPtr(p) ptrAdd (n*sizeOf(CStrPtr)) toCStrPtr + fun -(p: CStrPtr, n: SizeType): CStrPtr = toUntypedPtr(p) ptrSub (n*sizeOf(CStrPtr)) toCStrPtr + fun -(p, q: CStrPtr): SizeType = ptrDiff(toUntypedPtr(p), toUntypedPtr(q)) / (sizeOf(CStrPtr)) fun toStringRef(p: CStrPtr): StringRef = fromCString(p.ptr.cstr) diff --git a/SparrowImplicitLib/sprCore/streamBasic.spr b/SparrowImplicitLib/sprCore/streamBasic.spr index 481de04c..ca07fc9f 100644 --- a/SparrowImplicitLib/sprCore/streamBasic.spr +++ b/SparrowImplicitLib/sprCore/streamBasic.spr @@ -1,4 +1,4 @@ -import sprCore.basicDecls(AnyType, Number, Char, Bool, StringRef, Byte, Int, Double, Null, isValid, &&, !, oper_precedence___fapp__, oper_precedence___dot__, typeOf, reinterpretCast) +import sprCore.basicDecls(AnyType, Number, Char, Bool, StringRef, Byte, Int, Double, Null, isValid, &&, !, oper_precedence___fapp__, oper_precedence___dot__, typeOf, UntypedPtr) // An output stream must accept the basic types concept OutStream(x) if ( @@ -10,39 +10,32 @@ concept OutStream(x) if ( ) // If we define an ">>" operator in the type itself, make sure we can support the standard "<<" notation -fun << (s: @OutStream, x: @AnyType): typeOf(s) if isValid(x >> s) +fun << (s: !OutStream, x: AnyType): typeOf(s) if isValid(x >> s) x >> s return s // If no ">>" operator is defined in the class, then try to place the input element in the stream // The stream class must define an "<<<" operator for this element -fun << (s: @OutStream, x: @AnyType): typeOf(s) if !isValid(x.>>(s)) && isValid(s.<<<(x)) +fun << (s: !OutStream, x: AnyType): typeOf(s) if !isValid(x.>>(s)) && isValid(s.<<<(x)) s.<<<(x) return s -var endl: EndLineHelperClass -var flush: FlushHelperClass +let endl: EndLineHelperClass +let flush: FlushHelperClass datatype EndLineHelperClass ; -fun >>(this: EndLineHelperClass, os: @OutStream) +fun >>(this: EndLineHelperClass, os: !OutStream) os << '\n' datatype FlushHelperClass ; -fun >>(this: FlushHelperClass, os: @OutStream) +fun >>(this: FlushHelperClass, os: !OutStream) [ct] if isValid(os.flush) os.flush // TODO: make this work for streams other than ConsoleOutputStream -datatype StreamRefWrapperHelperClass - ptr: @Byte -fun >>(p: StreamRefWrapperHelperClass, os: @OutStream) - _Impl.writeRef(p.ptr) - -fun mkStreamRefWrapper(x: @AnyType): StreamRefWrapperHelperClass - var res: StreamRefWrapperHelperClass - res.ptr := reinterpretCast(@Byte, x) - return res +fun >>(p: UntypedPtr, os: !OutStream) + _Impl.writeRef(p) package _Impl - [native("writePointer")] fun writeRef(x: @Byte) + [native("writePointer")] fun writeRef(x: UntypedPtr) diff --git a/SparrowImplicitLib/std/algorithms.spr b/SparrowImplicitLib/std/algorithms.spr index 5eb2cc92..8250db2f 100644 --- a/SparrowImplicitLib/std/algorithms.spr +++ b/SparrowImplicitLib/std/algorithms.spr @@ -6,54 +6,56 @@ import ranges concept Swappable(x) if isValid(x.swap(x)) /// Return the maximum of the two values -fun max(value1, value2: @AnyType): typeOf(value1) +fun max(value1, value2: AnyType): typeOf(value1) if value1 < value2 return value2 return value1 /// Return the minimum of the two values -fun min(value1, value2: @AnyType): typeOf(value1) +fun min(value1, value2: AnyType): typeOf(value1) if value2 < value1 return value2 return value1 /// Return the maximum of the two values, given the less predicate -fun max(value1, value2: @AnyType, lessPred: AnyType): typeOf(value1) if isValid(lessPred(value1, value2)) +fun max(value1, value2: AnyType, lessPred: AnyType): typeOf(value1) if isValid(lessPred(value1, value2)) if lessPred(value1, value2) return value2 return value1 /// Return the minimum of the two values, given the less predicate -fun min(value1, value2: @AnyType, lessPred: AnyType): typeOf(value1) if typeOf(lessPred(value1, value2)) == Bool +fun min(value1, value2: AnyType, lessPred: AnyType): typeOf(value1) if typeOf(lessPred(value1, value2)) == Bool if lessPred(value2, value1) return value2 return value1 [autoCt] /// Swaps the two objects - fun swap(a, b: @AnyType) if typeOf(a) == typeOf(b) && !Swappable(a) - var tmp = a + fun swap(a, b: !AnyType) if typeOf(a) == typeOf(b) && !Swappable(a) + let tmp = a a = b b = tmp - fun swap(a, b: @Swappable) if typeOf(a) == typeOf(b) + fun swap(a, b: !Swappable) if typeOf(a) == typeOf(b) a.swap(b) /// Find the given value in the given range -fun find(r: Range, value: @AnyType): typeOf(r) if isValid(*r == value) - while !!r && !(*r == value) - ++r - return r +fun find(r: Range, value: AnyType): typeOf(r) if isValid(*r == value) + var rc = r + while !!rc && !(*rc == value) + ++rc + return rc /// Find in the range the first value that satisfy the given predicate fun findIf(r: Range, pred: AnyType): typeOf(r) if typeOf(pred(*r)) == Bool - while !!r && !pred(*r) - ++r - return r + var rc = r + while !!rc && !pred(*rc) + ++rc + return rc /// Finds the index of the given value in the range /// Returns -1 if not found -fun indexOf(r: Range, value: @AnyType): SizeType if isValid(*r == value) - var n: SizeType = 0 +fun indexOf(r: Range, value: AnyType): SizeType if isValid(*r == value) + let n: !SizeType = 0 for v: r.RetType = r if v == value return n @@ -63,7 +65,7 @@ fun indexOf(r: Range, value: @AnyType): SizeType if isValid(*r == value) /// Finds the index of the value that satisfy the given predicate /// Returns -1 if not found fun indexOfIf(r: Range, pred: AnyType): SizeType if typeOf(pred(*r)) == Bool - var n: SizeType = 0 + let n: !SizeType = 0 for v: r.RetType = r if pred(v) return n @@ -73,22 +75,24 @@ fun indexOfIf(r: Range, pred: AnyType): SizeType if typeOf(pred(*r)) == Bool /// Find the first value from r1 that matches any value in r2 /// Returns the subrange of r1 that starts with that value fun findFirstOf(r1, r2: Range): typeOf(r1) if isValid(*r1 == *r2) - while !!r1 ; r1 popFront + var r1c = r1 + while !!r1c ; r1c popFront for val: r2.RetType = r2 - if *r1 == val - return r1 - return r1 + if *r1c == val + return r1c + return r1c /// Same as above, but uses a predicate for comparison fun findFirstOfIf(r1, r2: Range, pred: AnyType): typeOf(r1) if typeOf(pred(*r1, *r2)) == Bool - while !!r1 ; r1 popFront + var r1c = r1 + while !!r1c ; r1c popFront for val: r2.RetType = r2 - if pred(*r1, val) - return r1 - return r1 + if pred(*r1c, val) + return r1c + return r1c /// Count how many values from the give range has the given value -fun count(range: Range, value: @AnyType): SizeType if isValid(*range == value) - var n: SizeType = 0 +fun count(range: Range, value: AnyType): SizeType if isValid(*range == value) + let n: !SizeType = 0 for v: range.RetType = range if v == value ++n @@ -96,7 +100,7 @@ fun count(range: Range, value: @AnyType): SizeType if isValid(*range == value) /// Count how many values from the given range satisfies the given predicate fun countIf(range: Range, pred: AnyType): SizeType if typeOf(pred(*range)) == Bool - var n: SizeType = 0 + let n: !SizeType = 0 for v: range.RetType = range if pred(v) ++n @@ -104,31 +108,39 @@ fun countIf(range: Range, pred: AnyType): SizeType if typeOf(pred(*range)) == Bo /// Check if the two given ranges are equal fun equal(r1, r2: Range): Bool if isValid(*r1 == *r2) - while !!r1 && !!r2 && *r1 == *r2 - r1 popFront - r2 popFront - return !r1 && !r2 + var r1c = r1 + var r2c = r2 + while !!r1c && !!r2c && *r1c == *r2c + r1c popFront + r2c popFront + return !r1c && !r2c /// Check if the two given ranges are satisfying the given equal predicate fun equalIf(r1, r2: Range, pred: AnyType): Bool if typeOf(pred(*r1, *r2)) == Bool - while !!r1 && !!r2 && pred(*r1, *r2) - r1 popFront - r2 popFront - return !r1 && !r2 + var r1c = r1 + var r2c = r2 + while !!r1c && !!r2c && pred(*r1c, *r2c) + r1c popFront + r2c popFront + return !r1c && !r2c /// Check if r1 starts with r2 fun startsWith(r1, r2: Range): Bool if isValid(*r1 == *r2) - while !!r1 && !!r2 && *r1 == *r2 - r1 popFront - r2 popFront - return !r2 + var r1c = r1 + var r2c = r2 + while !!r1c && !!r2c && *r1c == *r2c + r1c popFront + r2c popFront + return !r2c /// Check if r1 starts with r2 (according to the given equal predicate) fun startsWithIf(r1, r2: Range, pred: AnyType): Bool if typeOf(pred(*r1, *r2)) == Bool - while !!r1 && !!r2 && pred(*r1, *r2) - r1 popFront - r2 popFront - return !r2 + var r1c = r1 + var r2c = r2 + while !!r1c && !!r2c && pred(*r1c, *r2c) + r1c popFront + r2c popFront + return !r2c /// Find the first occurrence of r2 in r1 /// Complexity: O(n^2) @@ -143,11 +155,12 @@ fun findRange(r1, r2: Range): typeOf(r1) if isValid(*r1 == *r2) return find(r1, *r2) // General case - while !!r1 - if r1 startsWith r2 - return r1 - r1 popFront - return r1 + var r1c = r1 + while !!r1c + if r1c startsWith r2 + return r1c + r1c popFront + return r1c /// Find the first occurrence of r2 in r1, according to the given equal predicate /// Complexity: O(n^2) @@ -155,11 +168,12 @@ fun findRangeIf(r1, r2: Range, pred: AnyType): typeOf(r1) if typeOf(pred(*r1, *r if !r1 || !r2 return r1 - while !!r1 - if startsWithIf(r1, r2, pred) - return r1 - r1 popFront - return r1 + var r1c = r1 + while !!r1c + if startsWithIf(r1c, r2, pred) + return r1c + r1c popFront + return r1c /// Returns the index of the first occurrence of r2 in r1 /// Returns -1 if not found @@ -175,11 +189,12 @@ fun indexOfRange(r1, r2: Range): SizeType if isValid(*r1 == *r2) return indexOf(r1, *r2) // General case + var r1c = r1 var idx = 0 - while !!r1 - if r1 startsWith r2 + while !!r1c + if r1c startsWith r2 return idx - r1 popFront + r1c popFront ++idx return SizeType(DiffType(-1)) @@ -187,44 +202,48 @@ fun indexOfRange(r1, r2: Range): SizeType if isValid(*r1 == *r2) fun minElement(range: Range): typeOf(range) if isValid(*range < *range) if !range return range + var rc = range var res = range - range popFront - while !!range ; range popFront - if *range < *res - res = range + rc popFront + while !!rc ; rc popFront + if *rc < *res + res = rc return res /// Returns the position of the minimum element from the range, according to the given less predicate fun minElementIf(range: Range, pred: AnyType): typeOf(range) if typeOf(pred(*range, *range)) == Bool if !range return range + var rc = range var res = range - range popFront - while !!range ; range popFront - if pred(*range, *res) - res = range + rc popFront + while !!rc ; rc popFront + if pred(*rc, *res) + res = rc return res /// Returns the position of the maximum element from the range fun maxElement(range: Range): typeOf(range) if isValid(*range < *range) if !range return range + var rc = range var res = range - range popFront - while !!range ; range popFront - if *res < *range - res = range + rc popFront + while !!rc ; rc popFront + if *res < *rc + res = rc return res /// Returns the position of the maximum element from the range, according to the given less predicate fun maxElementIf(range: Range, pred: AnyType): typeOf(range) if typeOf(pred(*range, *range)) == Bool if !range return range + var rc = range var res = range - range popFront - while !!range ; range popFront - if pred(*res, *range) - res = range + rc popFront + while !!rc ; rc popFront + if pred(*res, *rc) + res = rc return res /// Returns the minimum and the maximum positions from the range @@ -233,13 +252,14 @@ fun minMaxElement(range: Range): typeOf(range ~ range) if isValid(*range < *rang return range ~ range var minRes = range var maxRes = range - range popFront - while !!range - if *minRes < *range - minRes = range - else if *range < *maxRes - maxRes = range - range popFront + var rc = range + rc popFront + while !!rc + if *minRes < *rc + minRes = rc + else if *rc < *maxRes + maxRes = rc + rc popFront return minRes ~ maxRes /// Returns the minimum and the maximum positions from the range, according to the given less predicate @@ -248,43 +268,49 @@ fun minMaxElementIf(range: Range, pred: AnyType): typeOf(range ~ range) if typeO return range ~ range var minRes = range var maxRes = range - range popFront - while !!range - if pred(*minRes, *range) - minRes = range - else if pred(*range, *maxRes) - maxRes = range - range popFront + var rc = range + rc popFront + while !!rc + if pred(*minRes, *rc) + minRes = rc + else if pred(*rc, *maxRes) + maxRes = rc + rc popFront return minRes ~ maxRes /// Compare the given ranges; emulates a less function fun compare(r1, r2: Range): Bool if isValid(*r1 < *r2) - while !!r1 && !!r2 - if !(*r1 < *r2) + var r1c = r1 + var r2c = r2 + while !!r1c && !!r2c + if !(*r1c < *r2c) return false - r1 popFront - r2 popFront - return !!r2 + r1c popFront + r2c popFront + return !!r2c /// Compare the given ranges according to the given less predicate; emulates a less function fun compare(r1, r2: Range, pred: AnyType): Bool if typeOf(pred(*r1, *r2)) == Bool - while !!r1 && !!r2 - if !pred(*r1, *r2) + var r1c = r1 + var r2c = r2 + while !!r1c && !!r2c + if !pred(*r1c, *r2c) return false - r1 popFront - r2 popFront - return !!r2 + r1c popFront + r2c popFront + return !!r2c /// Check if the given range is sorted fun isSorted(range: Range): Bool if isValid(*range < *range) if !range return true + var rc = range var next = range next popFront while !!next - if *next < *range + if *next < *rc return false - range = next + rc = next next popFront return true @@ -292,46 +318,49 @@ fun isSorted(range: Range): Bool if isValid(*range < *range) fun isSorted(range: Range, pred: AnyType): Bool if typeOf(pred(*range, *range)) == Bool if !range return true + var rc = range var next = range next popFront while !!next - if pred(*next, *range) + if pred(*next, *rc) return false - range = next + rc = next next popFront return true /// Applies the given functor in a fold fashion, from left, starting from the given seed -fun foldLeft(range: Range, function: AnyType, seed: @AnyType): -@typeOf(seed) \ - if isValid(seed = function(seed, *range)) +fun foldLeft(range: Range, function: AnyType, seed: AnyType): TypeOp.removeCat(typeOf(seed)) \ + if isValid(seed = function(seed, #$range.RetType)) var t = seed for v: range.RetType = range t = function(t, v) return t /// Applies the given functor in a fold fashion, from right, starting from the given seed -fun foldRight(range: BidirRange, function: AnyType, seed: @AnyType): -@typeOf(seed) \ +fun foldRight(range: BidirRange, function: AnyType, seed: AnyType): TypeOp.removeCat(typeOf(seed)) \ if isValid(seed = function(seed, *range)) return foldLeft(retro(range), function, seed) /// Copies the content of r1 over the content of r2 /// returns the position in r2 where we stopped copying fun copy(r1, r2: Range): typeOf(r2) if isValid(*r2 = *r1) - while !!r1 && !!r2 - *r2 = *r1 - ++r1 - ++r2 - return r2 + var r1c = r1 + var r2c = r2 + while !!r1c && !!r2c + *r2c = *r1c + ++r1c + ++r2c + return r2c /// Replaces a value in the given range -fun replace(r: Range, oldVal, newVal: @AnyType) \ +fun replace(r: Range, oldVal, newVal: AnyType) \ if isValid(*r == oldVal) && isValid(*r = newVal) for v: r.RetType = r if v == oldVal v = newVal /// Replaces all the value that match a predicate with the given value -fun replaceIf(r: Range, pred: AnyType, newVal: @AnyType) \ +fun replaceIf(r: Range, pred: AnyType, newVal: AnyType) \ if isValid(pred(*r)) && isValid(*r = newVal) for v: r.RetType = r if pred(v) @@ -339,44 +368,51 @@ fun replaceIf(r: Range, pred: AnyType, newVal: @AnyType) \ /// Reverse the values in the given range fun reverse(range: BidirRange) + var rc = range while true - if !range + if !rc return - var t: range.RetType = range-- - if !range + var t: rc.RetType = rc-- + if !rc return - *range swap t - range popFront + *rc swap t + rc popFront /// Merges r1 and r2 according to the standard less order, and copy the values into dest /// Dest needs to be large enough to fit r1 and r2 /// Returns the amount of dst that is fun merge(r1, r2, dest: Range): typeOf(dest) \ if isValid(*r2 < *r1) && isValid(*dest = *r1) && isValid(*dest = *r2) - while !!r1 && !!r2 - if *r2 < *r1 - *dest = *r2 - r2 popFront + var r1c = r1 + var r2c = r2 + var destc = dest + while !!r1c && !!r2c + if *r2c < *r1c + *destc = *r2c + r2c popFront else - *dest = *r1 - r1 popFront - dest popFront - return r2 copy (r1 copy dest); // Copy any remaining items + *destc = *r1c + r1c popFront + destc popFront + return r2c copy (r1c copy destc); // Copy any remaining items /// Merges r1 and r2 according to the given less predicate, and copy the values into dest /// Dest needs to be large enough to fit r1 and r2 /// Returns the amount of dst that is fun merge(r1, r2, dest: Range, pred: AnyType): typeOf(dest) \ if isValid(pred(*r2, *r1)) && isValid(*dest = *r1) && isValid(*dest = *r2) - while !!r1 && !!r2 - if pred(*r2, *r1) - *dest = *r2 - r2 popFront + var r1c = r1 + var r2c = r2 + var destc = dest + while !!r1c && !!r2c + if pred(*r2c, *r1c) + *destc = *r2c + r2c popFront else - *dest = *r1 - r1 popFront - dest popFront - return r2 copy (r1 copy dest); // Copy any remaining items + *destc = *r1c + r1c popFront + destc popFront + return r2c copy (r1c copy destc); // Copy any remaining items /// Sorts the given range fun sort(range: RandomAccessRange) @@ -393,10 +429,10 @@ fun _quickSort(range: RandomAccessRange, m, n: SizeType) if m >= n || n == SizeType(DiffType(-1)) return - var p = (m + n) / 2 + let p = (m + n) / 2 range(m) swap range(p) - var mv = range(m) + let mv = range(m) var i = m + 1 var j = n while i <= j @@ -414,10 +450,10 @@ fun _quickSort(range: RandomAccessRange, m, n: SizeType, pred: AnyType) if m >= n || n == SizeType(DiffType(-1)) return - var p = (m + n) / 2 + let p = (m + n) / 2 range(m) swap range(p) - var mv = range(m) + let mv = range(m) var i = m + 1 var j = n while i <= j @@ -433,29 +469,31 @@ fun _quickSort(range: RandomAccessRange, m, n: SizeType, pred: AnyType) /// Apply a binary search to find a value in a sorted range fun binarySearch(range: RandomAccessRange, value: AnyType): Bool \ if isValid(value == *range) - while !!range - var sz = range size - var mid = (sz - 1) / 2 - var t = range(mid) + var rc = range + while !!rc + let sz = rc size + let mid = (sz - 1) / 2 + let t = rc(mid) if value == t return true if value < t - range.popBack(sz - mid) + rc.popBack(sz - mid) else - range.popFront(mid + 1) + rc.popFront(mid + 1) return false /// Apply a binary search to find a value in a sorted range, according to the given less predicate fun binarySearch(range: RandomAccessRange, value: AnyType, pred: AnyType): Bool \ if typeOf(pred(value, *range)) == Bool - while !!range - var sz = range size - var mid = (sz - 1) / 2 - var t = range(mid) + var rc = range + while !!rc + let sz = rc size + let mid = (sz - 1) / 2 + let t = rc(mid) if pred(value, t) - range.popBack(sz - mid) + rc.popBack(sz - mid) else if pred(t, value) - range.popFront(mid + 1) + rc.popFront(mid + 1) else return true return false diff --git a/SparrowImplicitLib/std/array.spr b/SparrowImplicitLib/std/array.spr index 70226da0..08b9a6e7 100644 --- a/SparrowImplicitLib/std/array.spr +++ b/SparrowImplicitLib/std/array.spr @@ -11,14 +11,14 @@ datatype Array(valueType: Type) _begin, _end: RawPtr(ValueType) [protected] - fun ctorFromCt(this: @Array, src: Array ct) - [ct] var size = src size + fun ctorFromCt(this: !Array, src: Array ct) + [ct] let size = src size this ctor size [ct] for i = 0..size this(i) = src(i) - fun ctor(this: @Array, other: typeOf(this)) - var size = other.size + fun ctor(this: !Array, other: typeOf(this)) + let size = other.size _begin = allocRawPtr(ValueType, size) _end = _begin.advance(DiffType(size)) @@ -31,7 +31,7 @@ datatype Array(valueType: Type) dst = dst.advance src = src.advance - fun ctor(this: @Array, size: SizeType) + fun ctor(this: !Array, size: SizeType) _begin = allocRawPtr(ValueType, size) _end = _begin.advance(DiffType(size)) @@ -40,7 +40,7 @@ datatype Array(valueType: Type) while p != _end ; p = p.advance p.value ctor - fun ctor(this: @Array, size: SizeType, value: @this.ValueType) + fun ctor(this: !Array, size: SizeType, value: this.ValueType) _begin = allocRawPtr(ValueType, size) _end = _begin.advance(DiffType(size)) @@ -49,9 +49,9 @@ datatype Array(valueType: Type) while p != _end ; p = p.advance p.value ctor value - fun ctor(this: @Array, range: Range) if typeOf(range) != Array + fun ctor(this: !Array, range: Range) if typeOf(range) != Array if !range.isEmpty - var size = rangeSize(range) + let size = rangeSize(range) _begin = allocRawPtr(ValueType, size) _end = _begin.advance(DiffType(size)) @@ -62,7 +62,7 @@ datatype Array(valueType: Type) p.value ctor v p = p.advance - fun dtor(this: @Array) + fun dtor(this: !Array) if this.isEmpty return @@ -72,26 +72,27 @@ datatype Array(valueType: Type) p.value dtor _begin.freePtr - fun size(this: @Array): SizeType + fun size(this: Array): SizeType return _end.diff(_begin) - fun isEmpty(this: @Array): Bool + fun isEmpty(this: Array): Bool return _begin == _end - fun assign(this: @Array, range: Range) + fun assign(this: !Array, range: Range) var r = this.all + var rc = range - while !r.isEmpty && !range.isEmpty + while !r.isEmpty && !rc.isEmpty r.front dtor - r.front ctor range.front + r.front ctor rc.front r.popFront - range.popFront + rc.popFront while !r.isEmpty ; r.popFront r.front dtor r.front ctor - fun swap(this: @Array, other: typeOf(this)) + fun swap(this: !Array, other: !typeOf(this)) var tmp = _begin _begin = other._begin other._begin = tmp @@ -99,25 +100,25 @@ datatype Array(valueType: Type) _end = other._end other._end = tmp - fun at(this: @Array, index: SizeType): @ValueType + fun at(this: Array, index: SizeType): @ValueType return _begin.advance(DiffType(index)).value - fun ()(this: @Array, index: SizeType): @ValueType + fun ()(this: Array, index: SizeType): @ValueType return _begin.advance(DiffType(index)).value - fun all(this: @Array): RangeType + fun all(this: Array): RangeType return RangeType(_begin, _end) - fun subrange(this: @Array, index: SizeType, num: SizeType): RangeType + fun subrange(this: Array, index: SizeType, num: SizeType): RangeType return RangeType(_begin.advance(DiffType(index)), _begin.advance(DiffType(index + num))) - fun =(this, other: @Array): @typeOf(this) + fun =(this: !Array, other: typeOf(this)): @typeOf(this) var tmp = other tmp.swap(this) return this - fun ==(this, other: @Array): Bool + fun ==(this, other: Array): Bool if this.size != other.size return false @@ -132,10 +133,10 @@ datatype Array(valueType: Type) return true - fun !=(this, other: @Array): Bool + fun !=(this, other: Array): Bool return !(this == other) - fun >>(this: @Array, os: @OutStream) if isValid(os << #$ValueType) + fun >>(this: Array, os: !OutStream) if isValid(os << #$ValueType) var first = true for el = this.all if first @@ -143,8 +144,8 @@ datatype Array(valueType: Type) else os << ", " os << el - fun _dumpThis(this: @Array, prefix: StringRef) - cout << prefix << "dumping " << TypeOp.description(Array) << ": " << mkStreamRefWrapper(this) << endl - cout << " begin: " << mkStreamRefWrapper(_begin.bytePtr) << endl - cout << " end: " << mkStreamRefWrapper(_end.bytePtr) << endl + fun _dumpThis(this: Array, prefix: StringRef) + cout << prefix << "dumping " << TypeOp.description(Array) << ": " << UntypedPtr(this) << endl + cout << " begin: " << _begin.untypedPtr << endl + cout << " end: " << _end.untypedPtr << endl diff --git a/SparrowImplicitLib/std/bind.spr b/SparrowImplicitLib/std/bind.spr index be131cea..39f530ea 100644 --- a/SparrowImplicitLib/std/bind.spr +++ b/SparrowImplicitLib/std/bind.spr @@ -1,18 +1,18 @@ module std.bind -fun mkBindAll(ftor, a1: @AnyType) \ +fun mkBindAll(ftor, a1: AnyType) \ = BindAll1(-@typeOf(ftor), -@typeOf(a1))(ftor, a1) \ if isValid(ftor(a1)) -fun mkBindAll(ftor, a1, a2: @AnyType) \ +fun mkBindAll(ftor, a1, a2: AnyType) \ = BindAll2(-@typeOf(ftor), -@typeOf(a1), -@typeOf(a2))(ftor, a1, a2) \ if isValid(ftor(a1, a2)) -fun mkBindAll(ftor, a1, a2, a3: @AnyType) \ +fun mkBindAll(ftor, a1, a2, a3: AnyType) \ = BindAll3(-@typeOf(ftor), -@typeOf(a1), -@typeOf(a2), -@typeOf(a3))(ftor, a1, a2, a3) \ if isValid(ftor(a1, a2, a3)) -fun mkBindAll(ftor, a1, a2, a3, a4: @AnyType) \ +fun mkBindAll(ftor, a1, a2, a3, a4: AnyType) \ = BindAll4(-@typeOf(ftor), -@typeOf(a1), -@typeOf(a2), -@typeOf(a3), -@typeOf(a4))(ftor, a1, a2, a3, a4) \ if isValid(ftor(a1, a2, a3, a4)) -fun mkBindAll(ftor, a1, a2, a3, a4, a5: @AnyType) \ +fun mkBindAll(ftor, a1, a2, a3, a4, a5: AnyType) \ = BindAll5(-@typeOf(ftor), -@typeOf(a1), -@typeOf(a2), -@typeOf(a3), -@typeOf(a4), -@typeOf(a5))(ftor, a1, a2, a3, a4, a5) \ if isValid(ftor(a1, a2, a3, a4, a5)) @@ -62,15 +62,15 @@ datatype BindAll5(ftorType, T1, T2, T3, T4, T5: Type) a5: T5 [protected] - fun ()(this: @BindAll1) = ftor(a1) - fun ()(this: @BindAll2) = ftor(a1, a2) - fun ()(this: @BindAll3) = ftor(a1, a2, a3) - fun ()(this: @BindAll4) = ftor(a1, a2, a3, a4) - fun ()(this: @BindAll5) = ftor(a1, a2, a3, a4, a5) + fun ()(this: BindAll1) = ftor(a1) + fun ()(this: BindAll2) = ftor(a1, a2) + fun ()(this: BindAll3) = ftor(a1, a2, a3) + fun ()(this: BindAll4) = ftor(a1, a2, a3, a4) + fun ()(this: BindAll5) = ftor(a1, a2, a3, a4, a5) - fun >>(this: @BindAll1, os: @OutStream) { os << 'BindAll(' << a1 << ')' } - fun >>(this: @BindAll2, os: @OutStream) { os << 'BindAll(' << a1 << ', ' << a2 << ')' } - fun >>(this: @BindAll3, os: @OutStream) { os << 'BindAll(' << a1 << ', ' << a2 << ', ' << a3 << ')' } - fun >>(this: @BindAll4, os: @OutStream) { os << 'BindAll(' << a1 << ', ' << a2 << ', ' << a3 << ', ' << a4 << ')' } - fun >>(this: @BindAll5, os: @OutStream) { os << 'BindAll(' << a1 << ', ' << a2 << ', ' << a3 << ', ' << a4 << ', ' << a5 << ')' } + fun >>(this: BindAll1, os: !OutStream) { os << 'BindAll(' << a1 << ')' } + fun >>(this: BindAll2, os: !OutStream) { os << 'BindAll(' << a1 << ', ' << a2 << ')' } + fun >>(this: BindAll3, os: !OutStream) { os << 'BindAll(' << a1 << ', ' << a2 << ', ' << a3 << ')' } + fun >>(this: BindAll4, os: !OutStream) { os << 'BindAll(' << a1 << ', ' << a2 << ', ' << a3 << ', ' << a4 << ')' } + fun >>(this: BindAll5, os: !OutStream) { os << 'BindAll(' << a1 << ', ' << a2 << ', ' << a3 << ', ' << a4 << ', ' << a5 << ')' } diff --git a/SparrowImplicitLib/std/bitset.spr b/SparrowImplicitLib/std/bitset.spr index 8afbb661..f3ffc417 100644 --- a/SparrowImplicitLib/std/bitset.spr +++ b/SparrowImplicitLib/std/bitset.spr @@ -7,16 +7,16 @@ datatype Bitset _bits: Array(UByte) [protected] - fun ctor(this: @Bitset, noBits: SizeType) + fun ctor(this: !Bitset, noBits: SizeType) _bits.ctor(1 + (noBits-1)/8, UByte(0)) - fun setBit(this: @Bitset, n: SizeType) + fun setBit(this: !Bitset, n: SizeType) _bits(n/8) = _bits(n/8) !|! (UByte(1) !<>(this: ContiguousMemoryRange, os: @OutStream) if isValid(os << this.front) + fun >>(this: ContiguousMemoryRange, os: !OutStream) if isValid(os << this.front) os << "MemRange(" for i = 0..this.size if i > 0 diff --git a/SparrowImplicitLib/std/defaultHashFunction.spr b/SparrowImplicitLib/std/defaultHashFunction.spr index 01e81d88..72d5aaab 100644 --- a/SparrowImplicitLib/std/defaultHashFunction.spr +++ b/SparrowImplicitLib/std/defaultHashFunction.spr @@ -8,13 +8,13 @@ datatype DefaultHashFunction(type: Type) using ValueType = type [protected] - fun ()(this: DefaultHashFunction, arg: @this.ValueType) = defaultHash(arg) + fun ()(this: DefaultHashFunction, arg: !this.ValueType) = defaultHash(arg) fun defaultHash(arg: Char) = _doHash(Byte(arg), _seed) //fun defaultHash(arg: Integer) = _doHash(arg, _seed) fun defaultHash(arg: Integer) = SizeType(arg) fun defaultHash(arg: StringRef) = _doHash(arg, _seed) -fun defaultHash(arg: @String) = _doHash(arg.asStringRef(), _seed) +fun defaultHash(arg: String) = _doHash(arg.asStringRef(), _seed) using _seed = 0xfadef00d diff --git a/SparrowImplicitLib/std/function.spr b/SparrowImplicitLib/std/function.spr index cb5037df..58677eac 100644 --- a/SparrowImplicitLib/std/function.spr +++ b/SparrowImplicitLib/std/function.spr @@ -11,64 +11,67 @@ package _Impl //! We store the data in a type-agnostic fashion, and we use casts later on to make it the appropriate type. datatype FunctionData //! The object of the function; i.e., the one that indicates what needs to be called + first arg - obj: @Byte + obj: UntypedPtr //! The actual call function callFn: FunctionPtr(VoidType) //! Function that is able to clone the object - cloneFn: FunctionPtr(@Byte, @Byte) + cloneFn: FunctionPtr(UntypedPtr, UntypedPtr) //! Function that is able to destruct the object - destructFn: FunctionPtr(VoidType, @Byte) + destructFn: FunctionPtr(VoidType, UntypedPtr) //! Copy constructor - clones the object and copies the FunctionPtrs - fun ctor(this, other: @FunctionData) - if other.obj !== null - this.obj := other.cloneFn(other.obj) + fun ctor(this: !FunctionData, other: FunctionData) + if other.obj != UntypedPtr() + this.obj = other.cloneFn(other.obj) this.callFn ctor other.callFn this.cloneFn ctor other.cloneFn this.destructFn ctor other.destructFn //! Destructor - destroy the object - fun dtor(this: @FunctionData) - if obj !== null + fun dtor(this: !FunctionData) + if obj != UntypedPtr() destructFn(obj) // Call the right destructor delete(obj) // Free the memory for the object //! Assignment operator -- use copy ctor - fun =(this, other: @FunctionData) + fun =(this: !FunctionData, other: FunctionData) this dtor this ctor other //! Get the call function reinterpreted to the given FunctionPtr type - fun getCallFn(this: @FunctionData, reqType: Type): reqType = reinterpretCast(@reqType, callFn) + fun getCallFn(this: FunctionData, reqType: Type): reqType = reinterpretCast(@reqType, callFn) //! Makes an assignment of two incompatible types, with a reinterpretCast fun reinterpretCopy(dest, src: @AnyType) dest = reinterpretCast(typeOf(dest), src) - fun >>(this: @FunctionData, os: @OutStream) - os << 'Fun(obj=' << mkStreamRefWrapper(obj) \ - << ', funPtr=' << mkStreamRefWrapper(reinterpretCast(@ @Byte, callFn)) \ + fun >>(this: FunctionData, os: !OutStream) + os << 'Fun(obj=' << obj \ + << ', funPtr=' << reinterpretCast(@ UntypedPtr, callFn) \ << ')' package _Impl0 datatype Function0(resT: Type) using arity = 0 using ResT = resT - using _FunPtrType = FunctionPtr(resT, @Byte) + using _FunPtrType = FunctionPtr(resT, UntypedPtr) _data: _Impl.FunctionData - fun ctor(this: @Function0, ftor: @AnyType) if isValid(ftor()) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function0, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function0, ftor: @AnyType) if isValid(ftor()) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor()) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function0) = _data.obj === null - fun isSet(this: @Function0) = _data.obj !== null + fun isNull(this: Function0) = _data.obj == UntypedPtr() + fun isSet(this: Function0) = _data.obj != UntypedPtr() - fun () (this: @Function0): this.ResT = (_data getCallFn _FunPtrType)(_data.obj) + fun () (this: Function0): this.ResT = (_data getCallFn _FunPtrType)(_data.obj) - fun >>(this: @Function0, os: @OutStream) + fun >>(this: Function0, os: !OutStream) os << _data package _Impl1 @@ -76,21 +79,24 @@ package _Impl1 using arity = 1 using ResT = resT using T1 = t1 - using _FunPtrType = FunctionPtr(resT, @Byte, T1) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1) _data: _Impl.FunctionData - fun ctor(this: @Function1, ftor: @AnyType) if isValid(ftor(#$this.T1)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function1, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function1, ftor: @AnyType) if isValid(ftor(#$this.T1)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function1) = _data.obj === null - fun isSet(this: @Function1) = _data.obj !== null + fun isNull(this: Function1) = _data.obj == UntypedPtr() + fun isSet(this: Function1) = _data.obj != UntypedPtr() - fun () (this: @Function1, p1: this.T1): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1) + fun () (this: Function1, p1: this.T1): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1) - fun >>(this: @Function1, os: @OutStream) + fun >>(this: Function1, os: !OutStream) os << _data package _Impl2 @@ -99,21 +105,24 @@ package _Impl2 using ResT = resT using T1 = t1 using T2 = t2 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2) _data: _Impl.FunctionData - fun ctor(this: @Function2, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function2, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function2, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function2) = _data.obj === null - fun isSet(this: @Function2) = _data.obj !== null + fun isNull(this: Function2) = _data.obj == UntypedPtr() + fun isSet(this: Function2) = _data.obj != UntypedPtr() - fun () (this: @Function2, p1: this.T1, p2: this.T2): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2) + fun () (this: Function2, p1: this.T1, p2: this.T2): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2) - fun >>(this: @Function2, os: @OutStream) + fun >>(this: Function2, os: !OutStream) os << _data package _Impl3 @@ -123,21 +132,24 @@ package _Impl3 using T1 = t1 using T2 = t2 using T3 = t3 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3) _data: _Impl.FunctionData - fun ctor(this: @Function3, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function3, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function3, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function3) = _data.obj === null - fun isSet(this: @Function3) = _data.obj !== null + fun isNull(this: Function3) = _data.obj == UntypedPtr() + fun isSet(this: Function3) = _data.obj != UntypedPtr() - fun () (this: @Function3, p1: this.T1, p2: this.T2, p3: this.T3): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3) + fun () (this: Function3, p1: this.T1, p2: this.T2, p3: this.T3): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3) - fun >>(this: @Function3, os: @OutStream) + fun >>(this: Function3, os: !OutStream) os << _data package _Impl4 @@ -148,21 +160,24 @@ package _Impl4 using T2 = t2 using T3 = t3 using T4 = t4 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4) _data: _Impl.FunctionData - fun ctor(this: @Function4, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function4, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function4, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function4) = _data.obj === null - fun isSet(this: @Function4) = _data.obj !== null + fun isNull(this: Function4) = _data.obj == UntypedPtr() + fun isSet(this: Function4) = _data.obj != UntypedPtr() - fun () (this: @Function4, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4) + fun () (this: Function4, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4) - fun >>(this: @Function4, os: @OutStream) + fun >>(this: Function4, os: !OutStream) os << _data package _Impl5 @@ -174,21 +189,24 @@ package _Impl5 using T3 = t3 using T4 = t4 using T5 = t5 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5) _data: _Impl.FunctionData - fun ctor(this: @Function5, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function5, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function5, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function5) = _data.obj === null - fun isSet(this: @Function5) = _data.obj !== null + fun isNull(this: Function5) = _data.obj == UntypedPtr() + fun isSet(this: Function5) = _data.obj != UntypedPtr() - fun () (this: @Function5, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5) + fun () (this: Function5, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5) - fun >>(this: @Function5, os: @OutStream) + fun >>(this: Function5, os: !OutStream) os << _data package _Impl6 @@ -201,21 +219,24 @@ package _Impl6 using T4 = t4 using T5 = t5 using T6 = t6 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5, T6) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5, T6) _data: _Impl.FunctionData - fun ctor(this: @Function6, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function6, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function6, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5, #$T6)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function6) = _data.obj === null - fun isSet(this: @Function6) = _data.obj !== null + fun isNull(this: Function6) = _data.obj == UntypedPtr() + fun isSet(this: Function6) = _data.obj != UntypedPtr() - fun () (this: @Function6, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6) + fun () (this: Function6, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6) - fun >>(this: @Function6, os: @OutStream) + fun >>(this: Function6, os: !OutStream) os << _data package _Impl7 @@ -229,21 +250,24 @@ package _Impl7 using T5 = t5 using T6 = t6 using T7 = t7 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5, T6, T7) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5, T6, T7) _data: _Impl.FunctionData - fun ctor(this: @Function7, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function7, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function7, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5, #$T6, #$T7)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function7) = _data.obj === null - fun isSet(this: @Function7) = _data.obj !== null + fun isNull(this: Function7) = _data.obj == UntypedPtr() + fun isSet(this: Function7) = _data.obj != UntypedPtr() - fun () (this: @Function7, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7) + fun () (this: Function7, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7) - fun >>(this: @Function7, os: @OutStream) + fun >>(this: Function7, os: !OutStream) os << _data package _Impl8 @@ -258,21 +282,24 @@ package _Impl8 using T6 = t6 using T7 = t7 using T8 = t8 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5, T6, T7, T8) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5, T6, T7, T8) _data: _Impl.FunctionData - fun ctor(this: @Function8, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function8, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function8, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5, #$T6, #$T7, #$T8)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function8) = _data.obj === null - fun isSet(this: @Function8) = _data.obj !== null + fun isNull(this: Function8) = _data.obj == UntypedPtr() + fun isSet(this: Function8) = _data.obj != UntypedPtr() - fun () (this: @Function8, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8) + fun () (this: Function8, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8) - fun >>(this: @Function8, os: @OutStream) + fun >>(this: Function8, os: !OutStream) os << _data package _Impl9 @@ -288,21 +315,24 @@ package _Impl9 using T7 = t7 using T8 = t8 using T9 = t9 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5, T6, T7, T8, T9) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5, T6, T7, T8, T9) _data: _Impl.FunctionData - fun ctor(this: @Function9, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function9, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function9, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5, #$T6, #$T7, #$T8, #$T9)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function9) = _data.obj === null - fun isSet(this: @Function9) = _data.obj !== null + fun isNull(this: Function9) = _data.obj == UntypedPtr() + fun isSet(this: Function9) = _data.obj != UntypedPtr() - fun () (this: @Function9, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9) + fun () (this: Function9, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9) - fun >>(this: @Function9, os: @OutStream) + fun >>(this: Function9, os: !OutStream) os << _data package _Impl10 @@ -319,21 +349,24 @@ package _Impl10 using T8 = t8 using T9 = t9 using T10 = t10 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) _data: _Impl.FunctionData - fun ctor(this: @Function10, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function10, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function10, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5, #$T6, #$T7, #$T8, #$T9, #$T10)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function10) = _data.obj === null - fun isSet(this: @Function10) = _data.obj !== null + fun isNull(this: Function10) = _data.obj == UntypedPtr() + fun isSet(this: Function10) = _data.obj != UntypedPtr() - fun () (this: @Function10, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) + fun () (this: Function10, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) - fun >>(this: @Function10, os: @OutStream) + fun >>(this: Function10, os: !OutStream) os << _data package _Impl11 @@ -351,21 +384,24 @@ package _Impl11 using T9 = t9 using T10 = t10 using T11 = t11 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) _data: _Impl.FunctionData - fun ctor(this: @Function11, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10, #$this.T11)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function11, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function11, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10, #$this.T11)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5, #$T6, #$T7, #$T8, #$T9, #$T10, #$T11)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function11) = _data.obj === null - fun isSet(this: @Function11) = _data.obj !== null + fun isNull(this: Function11) = _data.obj == UntypedPtr() + fun isSet(this: Function11) = _data.obj != UntypedPtr() - fun () (this: @Function11, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) + fun () (this: Function11, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) - fun >>(this: @Function11, os: @OutStream) + fun >>(this: Function11, os: !OutStream) os << _data package _Impl12 @@ -384,21 +420,24 @@ package _Impl12 using T10 = t10 using T11 = t11 using T12 = t12 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) _data: _Impl.FunctionData - fun ctor(this: @Function12, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10, #$this.T11, #$this.T12)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function12, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function12, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10, #$this.T11, #$this.T12)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5, #$T6, #$T7, #$T8, #$T9, #$T10, #$T11, #$T12)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function12) = _data.obj === null - fun isSet(this: @Function12) = _data.obj !== null + fun isNull(this: Function12) = _data.obj == UntypedPtr() + fun isSet(this: Function12) = _data.obj != UntypedPtr() - fun () (this: @Function12, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) + fun () (this: Function12, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) - fun >>(this: @Function12, os: @OutStream) + fun >>(this: Function12, os: !OutStream) os << _data package _Impl13 @@ -418,21 +457,24 @@ package _Impl13 using T11 = t11 using T12 = t12 using T13 = t13 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) _data: _Impl.FunctionData - fun ctor(this: @Function13, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10, #$this.T11, #$this.T12, #$this.T13)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function13, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function13, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10, #$this.T11, #$this.T12, #$this.T13)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5, #$T6, #$T7, #$T8, #$T9, #$T10, #$T11, #$T12, #$T13)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function13) = _data.obj === null - fun isSet(this: @Function13) = _data.obj !== null + fun isNull(this: Function13) = _data.obj == UntypedPtr() + fun isSet(this: Function13) = _data.obj != UntypedPtr() - fun () (this: @Function13, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) + fun () (this: Function13, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) - fun >>(this: @Function13, os: @OutStream) + fun >>(this: Function13, os: !OutStream) os << _data package _Impl14 @@ -453,21 +495,24 @@ package _Impl14 using T12 = t12 using T13 = t13 using T14 = t14 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) _data: _Impl.FunctionData - fun ctor(this: @Function14, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10, #$this.T11, #$this.T12, #$this.T13, #$this.T14)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function14, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function14, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10, #$this.T11, #$this.T12, #$this.T13, #$this.T14)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5, #$T6, #$T7, #$T8, #$T9, #$T10, #$T11, #$T12, #$T13, #$T14)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function14) = _data.obj === null - fun isSet(this: @Function14) = _data.obj !== null + fun isNull(this: Function14) = _data.obj == UntypedPtr() + fun isSet(this: Function14) = _data.obj != UntypedPtr() - fun () (this: @Function14, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) + fun () (this: Function14, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) - fun >>(this: @Function14, os: @OutStream) + fun >>(this: Function14, os: !OutStream) os << _data package _Impl15 @@ -489,21 +534,24 @@ package _Impl15 using T13 = t13 using T14 = t14 using T15 = t15 - using _FunPtrType = FunctionPtr(resT, @Byte, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) + using _FunPtrType = FunctionPtr(resT, UntypedPtr, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) _data: _Impl.FunctionData - fun ctor(this: @Function15, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10, #$this.T11, #$this.T12, #$this.T13, #$this.T14, #$this.T15)) && typeOf(ftor) != typeOf(this) + fun ctor(this: !Function15, other: typeOf(this)) + _data ctor other._data + + fun ctor(this: !Function15, ftor: @AnyType) if isValid(ftor(#$this.T1, #$this.T2, #$this.T3, #$this.T4, #$this.T5, #$this.T6, #$this.T7, #$this.T8, #$this.T9, #$this.T10, #$this.T11, #$this.T12, #$this.T13, #$this.T14, #$this.T15)) && typeOf(ftor) != typeOf(this) _Impl.reinterpretCopy(this._data.callFn, \ftor(#$T1, #$T2, #$T3, #$T4, #$T5, #$T6, #$T7, #$T8, #$T9, #$T10, #$T11, #$T12, #$T13, #$T14, #$T15)) _Impl.reinterpretCopy(this._data.cloneFn, \new(-@typeOf(ftor), ftor)) _Impl.reinterpretCopy(this._data.destructFn, \ftor.dtor) - this._data.obj := _data.cloneFn(reinterpretCast(@Byte, ftor)) + this._data.obj = _data.cloneFn(UntypedPtr(ftor)) - fun isNull(this: @Function15) = _data.obj === null - fun isSet(this: @Function15) = _data.obj !== null + fun isNull(this: Function15) = _data.obj == UntypedPtr() + fun isSet(this: Function15) = _data.obj != UntypedPtr() - fun () (this: @Function15, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14, p15: this.T15): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) + fun () (this: Function15, p1: this.T1, p2: this.T2, p3: this.T3, p4: this.T4, p5: this.T5, p6: this.T6, p7: this.T7, p8: this.T8, p9: this.T9, p10: this.T10, p11: this.T11, p12: this.T12, p13: this.T13, p14: this.T14, p15: this.T15): this.ResT = (_data getCallFn _FunPtrType)(_data.obj, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) - fun >>(this: @Function15, os: @OutStream) + fun >>(this: Function15, os: !OutStream) os << _data using Function = _Impl0.Function0 diff --git a/SparrowImplicitLib/std/hashTable.spr b/SparrowImplicitLib/std/hashTable.spr index 334e19ad..1d5b91f2 100644 --- a/SparrowImplicitLib/std/hashTable.spr +++ b/SparrowImplicitLib/std/hashTable.spr @@ -25,10 +25,10 @@ datatype HashTable(keyType, valueType, valueToKeyType, traitsType: Type) _valToKey: ValueToKeyType _tr: traitsType -fun ctor(this: @HashTable) +fun ctor(this: !HashTable) this.ctor(0, _TraitsType()) -fun ctor(this: @HashTable, n: SizeType, traits: this._TraitsType) +fun ctor(this: !HashTable, n: SizeType, traits: this._TraitsType) _buckets ctor _tr ctor traits _guard ctor @@ -36,7 +36,7 @@ fun ctor(this: @HashTable, n: SizeType, traits: this._TraitsType) if n > 0 this.reserve(n) -fun ctor(this: @HashTable, range: Range, n: SizeType, traits: this._TraitsType) +fun ctor(this: !HashTable, range: Range, n: SizeType, traits: this._TraitsType) _buckets ctor _tr ctor traits _guard ctor @@ -45,7 +45,7 @@ fun ctor(this: @HashTable, range: Range, n: SizeType, traits: this._TraitsType) for v = range this._insertPlain(v) -fun ctor(this: @HashTable, other: typeOf(this)) +fun ctor(this: !HashTable, other: typeOf(this)) _buckets ctor other._buckets.size _tr ctor other.traits _numElements ctor 0 @@ -54,10 +54,10 @@ fun ctor(this: @HashTable, other: typeOf(this)) for v = other.all this._insertPlain(v) -fun dtor(this: @HashTable) +fun dtor(this: !HashTable) this._deleteElements -fun swap(this: @HashTable, other: typeOf(this)) +fun swap(this: !HashTable, other: !typeOf(this)) _buckets.swap(other._buckets) algo.swap(_guard, other._guard) algo.swap(this._tr, other._tr) @@ -70,12 +70,12 @@ fun swap(this: @HashTable, other: typeOf(this)) other._buckets(other._guard.next.get().hash % other._buckets.size) = other._guardNode [protected] - fun =(this, other: @HashTable): @typeOf(this) + fun =(this: !HashTable, other: typeOf(this)): @typeOf(this) var tmp: HashTable = other this swap tmp return this - fun ==(this, other: @HashTable): Bool + fun ==(this, other: HashTable): Bool if !(this._tr == other._tr && _numElements == other.size) return false @@ -85,15 +85,15 @@ fun swap(this: @HashTable, other: typeOf(this)) return true - fun traits(this: @HashTable) = _tr + fun traits(this: HashTable) = _tr - fun isEmpty(this: @HashTable) = (_numElements == 0) - fun size(this: @HashTable) = _numElements - fun bucketCount(this: @HashTable) = _buckets.size + fun isEmpty(this: HashTable) = (_numElements == 0) + fun size(this: HashTable) = _numElements + fun bucketCount(this: HashTable) = _buckets.size - fun all(this: @HashTable) = RangeType(_guard.next, _NodePtr()) + fun all(this: HashTable) = RangeType(_guard.next, _NodePtr()) - fun reserve(this: @HashTable, n: SizeType) + fun reserve(this: !HashTable, n: SizeType) // Resize only when we are big enough to re-hash if n <= _buckets.size * _loadFactor return @@ -104,7 +104,7 @@ fun swap(this: @HashTable, other: typeOf(this)) var i = 0 while _bucketCounts(i) < n ++i - var numBuckets = _bucketCounts(i) + let numBuckets = _bucketCounts(i) if numBuckets <= _buckets.size return @@ -120,63 +120,62 @@ fun swap(this: @HashTable, other: typeOf(this)) next = p.get().next this._insertNode(p) - fun insert(this: @HashTable, value: @this.ValueType): this.RangeType + fun insert(this: !HashTable, value: this.ValueType): this.RangeType this.reserve(_numElements + 1) return this._insertPlain(value) - fun insert(this: @HashTable, range: Range) + fun insert(this: !HashTable, range: Range) this.reserve(_numElements + (range rangeSize)) - var counter = 0 for v = range this._insertPlain(v) - fun remove(this: @HashTable, key: @this.KeyType) + fun remove(this: !HashTable, key: this.KeyType) if this.isEmpty return - var node = this._findNode(key) + let node = this._findNode(key) if node.isNull return - var prev = this._findPrev(node) + let prev = this._findPrev(node) this._removeNode(prev, node) - fun remove(this: @HashTable, range: this.RangeType) + fun remove(this: !HashTable, range: this.RangeType) if range.isEmpty return // Determine the element before the first element from the given range - var prev = this._findPrev(range._startElem) + let prev = this._findPrev(range._startElem) var p = range._startElem while p != range._endElem - var next = p.get().next + let next = p.get().next this._removeNode(prev, p) p = next - fun contains(this: @HashTable, key: @this.KeyType): Bool = this._findNode(key).isSet - fun count(this: @HashTable, key: @this.KeyType): SizeType = ife(this._findNode(key).isSet, 1, 0) + fun contains(this: HashTable, key: this.KeyType): Bool = this._findNode(key).isSet + fun count(this: HashTable, key: this.KeyType): SizeType = ife(this._findNode(key).isSet, 1, 0) - fun equalRange(this: @HashTable, key: @this.KeyType): this.RangeType - var p = this._findNode(key) + fun equalRange(this: HashTable, key: this.KeyType): this.RangeType + let p = this._findNode(key) return ife(p.isSet, RangeType(p, p.get().next), RangeType()) - fun find(this: @HashTable, key: @this.KeyType): this.RangeType - var p = this._findNode(key) + fun find(this: HashTable, key: this.KeyType): this.RangeType + let p = this._findNode(key) return ife(p.isSet, RangeType(p, _NodePtr()), RangeType()) - fun clear(this: @HashTable) + fun clear(this: !HashTable) _buckets dtor _buckets ctor _numElements = 0 this._deleteElements - fun >> (this: @HashTable, os: @OutStream) - os << "HashTable, first=" << mkStreamRefWrapper(_guard.next.get) << ", size=" << _numElements << endl + fun >> (this: HashTable, os: !OutStream) + os << "HashTable, first=" << UntypedPtr(_guard.next.get) << ", size=" << _numElements << endl if this.isEmpty return - var numBuckets = _buckets.size + let numBuckets = _buckets.size var prev = this._guardNode var p = prev.get().next var prevBi = numBuckets+1 @@ -195,18 +194,18 @@ fun swap(this: @HashTable, other: typeOf(this)) os << ' ' << prevBi << '-' << prev.get os << endl -fun _guardNode(this: @HashTable): this._NodePtr = reinterpretPtr(_MyNode, Ptr(_MyGuardNode)(_guard)) +fun _guardNode(this: HashTable): this._NodePtr = reinterpretPtr(_MyNode, Ptr(_MyGuardNode)(_guard)) -fun _findNode(this: @HashTable, key: @this.KeyType): this._NodePtr +fun _findNode(this: HashTable, key: this.KeyType): this._NodePtr return this._findNodeImpl(_tr.hash(key), key) -fun _findNodeImpl(this: @HashTable, hashVal: SizeType, key: @this.KeyType): this._NodePtr +fun _findNodeImpl(this: HashTable, hashVal: SizeType, key: this.KeyType): this._NodePtr if _numElements == 0 return _NodePtr() - var numBuckets = _buckets.size + let numBuckets = _buckets.size if numBuckets > 0 - var bi = hashVal % numBuckets + let bi = hashVal % numBuckets var p: _NodePtr = _buckets(bi) if p.isNull @@ -226,16 +225,16 @@ fun _findNodeImpl(this: @HashTable, hashVal: SizeType, key: @this.KeyType): this p = p.get().next return _NodePtr() -fun _findPrev(this: @HashTable, node: this._NodePtr): this._NodePtr - var numBuckets = _buckets.size +fun _findPrev(this: HashTable, node: this._NodePtr): this._NodePtr + let numBuckets = _buckets.size var p: _NodePtr = ife(numBuckets==0, this._guardNode, _buckets(node.get().hash % numBuckets)) while p.get().next != node p = p.get().next return p -fun _insertPlain(this: @HashTable, value: @this.ValueType): this.RangeType - var key = _valToKey(value) - var h = _tr.hash(key) +fun _insertPlain(this: !HashTable, value: this.ValueType): this.RangeType + let key = _valToKey(value) + let h = _tr.hash(key) // Insert only if the element is not found in the hash var node = this._findNodeImpl(h, key) @@ -245,8 +244,8 @@ fun _insertPlain(this: @HashTable, value: @this.ValueType): this.RangeType this._insertNode(node) return RangeType(node, _NodePtr()) -fun _insertNode(this: @HashTable, node: this._NodePtr) - var numBuckets = _buckets.size +fun _insertNode(this: !HashTable, node: this._NodePtr) + let numBuckets = _buckets.size if numBuckets == 0 // If we have no buckets, put this node in front node.get().next = _guard.next @@ -254,7 +253,7 @@ fun _insertNode(this: @HashTable, node: this._NodePtr) else // If there is no element in the bucket, put this in the bucket, and chain the element at the beginning of the global list // Otherwise, put this after the first element in the bucket - var bi = node.get().hash % numBuckets + let bi = node.get().hash % numBuckets if _buckets(bi).isNull node.get().next = _guard.next _guard.next = node @@ -266,13 +265,13 @@ fun _insertNode(this: @HashTable, node: this._NodePtr) node.get().next = _buckets(bi).get().next _buckets(bi).get().next = node -fun _removeNode(this: @HashTable, prev, node: this._NodePtr) - var numBuckets = _buckets.size +fun _removeNode(this: !HashTable, prev, node: this._NodePtr) + let numBuckets = _buckets.size if numBuckets == 0 prev.get().next = node.get().next else - var bi = node.get().hash % numBuckets - var next = node.get().next + let bi = node.get().hash % numBuckets + let next = node.get().next // If this is the only proper node for this bucket, clear the bucket if prev == this._guardNode || bi != (prev.get().hash % numBuckets) // this is second @@ -281,7 +280,7 @@ fun _removeNode(this: @HashTable, prev, node: this._NodePtr) // If the next node is in another bucket, update the first node from that bucket if next.isSet - var nextBi = next.get().hash % numBuckets + let nextBi = next.get().hash % numBuckets if bi != nextBi _buckets(nextBi) = prev @@ -290,7 +289,7 @@ fun _removeNode(this: @HashTable, prev, node: this._NodePtr) node.release --_numElements -fun _deleteElements(this: @HashTable) +fun _deleteElements(this: !HashTable) var p = _guard.next var next: _NodePtr while p.isSet ; p = next @@ -304,8 +303,8 @@ datatype _Node(valueType: Type) hash: SizeType data: valueType -fun >> (this: @_Node, os: @OutStream) - os << data << " <" << mkStreamRefWrapper(this) << '>' +fun >> (this: _Node, os: !OutStream) + os << data << " <" << UntypedPtr(this) << '>' [initCtor] datatype _GuardNode(valueType: Type) @@ -321,7 +320,7 @@ datatype _HashRange(valueType: Type) [protected] fun isEmpty(this: _HashRange) = _startElem == _endElem fun front(this: _HashRange): this.RetType = _startElem.get().data - fun popFront(this: @_HashRange) { _startElem = _startElem.get().next; } + fun popFront(this: !_HashRange) { _startElem = _startElem.get().next; } var _bucketCounts: StaticArray(SizeType, 31) diff --git a/SparrowImplicitLib/std/list.spr b/SparrowImplicitLib/std/list.spr index bb7c6aaa..a725818f 100644 --- a/SparrowImplicitLib/std/list.spr +++ b/SparrowImplicitLib/std/list.spr @@ -15,31 +15,31 @@ datatype List(valueType: Type) _listSize: SizeType [protected] - fun ctor(this: @List) + fun ctor(this: !List) _listSize = 0 _head.prev = this._headNode _head.next = this._headNode - fun ctor(this: @List, other: typeOf(this)) + fun ctor(this: !List, other: typeOf(this)) _listSize = 0 _head.prev = this._headNode _head.next = this._headNode for v = other.all this += v - fun ctor(this: @List, range: Range) if typeOf(range) != -@typeOf(this) + fun ctor(this: !List, range: Range) if typeOf(range) != -@typeOf(this) _listSize = 0 _head.prev = this._headNode _head.next = this._headNode for v = range this += v - fun dtor(this: @List) + fun dtor(this: !List) var p = _head.next - var hn = this._headNode + let hn = this._headNode while p != hn - var nextNode = p.value().next + let nextNode = p.value().next p.value().data.dtor p.freePtr @@ -49,7 +49,7 @@ datatype List(valueType: Type) var tmp = other this swap tmp - fun ==(this: @List, other: typeOf(this)): Bool + fun ==(this: List, other: typeOf(this)): Bool if _listSize != other._listSize return false @@ -65,24 +65,24 @@ datatype List(valueType: Type) return true - fun size(this: @List): SizeType = _listSize - fun isEmpty(this: @List) = _listSize == 0 + fun size(this: List): SizeType = _listSize + fun isEmpty(this: List) = _listSize == 0 - fun front(this: @List): RetType = _head.next.value().data - fun back(this: @List): RetType = _head.prev.value().data + fun front(this: List): RetType = _head.next.value().data + fun back(this: List): RetType = _head.prev.value().data - fun all(this: @List): RangeType = RangeType(_head.next, this._headNode) + fun all(this: List): RangeType = RangeType(_head.next, this._headNode) - fun assign(this: @List, range: Range) + fun assign(this: !List, range: Range) this.clear for v = range this += v - fun swap(this: @List, other: typeOf(this)) + fun swap(this: !List, other: !typeOf(this)) _head.prev.swap(other._head.prev) _head.next.swap(other._head.next) - var tmpSize = _listSize + let tmpSize = _listSize _listSize = other._listSize other._listSize = tmpSize @@ -99,8 +99,8 @@ datatype List(valueType: Type) other._head.prev.value().next = other._headNode other._head.next.value().prev = other._headNode - fun insertBefore(this: @List, value: @this.ValueType, pos: this.RangeType) - var tmp = allocRawPtr(_MyNodeType, 1) + fun insertBefore(this: !List, value: this.ValueType, pos: this.RangeType) + let tmp = allocRawPtr(_MyNodeType, 1) tmp.value().data ctor value tmp.value().next = pos._begin @@ -109,12 +109,12 @@ datatype List(valueType: Type) pos._begin.value().prev = tmp ++_listSize - fun insertBefore(this: @List, range: Range, pos: this.RangeType) + fun insertBefore(this: !List, range: Range, pos: this.RangeType) for v = range this.insertBefore(v, pos) - fun insertAfter(this: @List, value: @this.ValueType, pos: this.RangeType) - var tmp = allocRawPtr(_MyNodeType, 1) + fun insertAfter(this: !List, value: this.ValueType, pos: this.RangeType) + let tmp = allocRawPtr(_MyNodeType, 1) tmp.value().data ctor value tmp.value().next = pos._end @@ -123,12 +123,12 @@ datatype List(valueType: Type) pos._end.value().prev = tmp ++_listSize - fun insertAfter(this: @List, range: Range, pos: this.RangeType) + fun insertAfter(this: !List, range: Range, pos: this.RangeType) for v = range this.insertAfter(v, pos) - fun pushFront(this: @List, value: @this.ValueType) - var tmp = allocRawPtr(_MyNodeType, 1) + fun pushFront(this: !List, value: this.ValueType) + let tmp = allocRawPtr(_MyNodeType, 1) tmp.value().data ctor value tmp.value().next = _head.next @@ -137,8 +137,8 @@ datatype List(valueType: Type) _head.next = tmp ++_listSize - fun popFront(this: @List) - var right = _head.next.value().next + fun popFront(this: !List) + let right = _head.next.value().next _head.next.value().data.dtor _head.next.freePtr @@ -146,8 +146,8 @@ datatype List(valueType: Type) right.value().prev = this._headNode _listSize = _listSize - 1 - fun pushBack(this: @List, value: @this.ValueType) - var tmp = allocRawPtr(_MyNodeType, 1) + fun pushBack(this: !List, value: this.ValueType) + let tmp = allocRawPtr(_MyNodeType, 1) tmp.value().prev = _head.prev tmp.value().next = this._headNode @@ -156,10 +156,10 @@ datatype List(valueType: Type) _head.prev = tmp ++_listSize - fun +=(this: @List, value: @this.ValueType) { this.pushBack(value) } + fun +=(this: !List, value: this.ValueType) { this.pushBack(value) } - fun popBack(this: @List) - var left = _head.prev.value().prev + fun popBack(this: !List) + let left = _head.prev.value().prev _head.prev.value().data.dtor _head.prev.freePtr @@ -167,12 +167,12 @@ datatype List(valueType: Type) left.value().next = this._headNode _listSize = _listSize - 1 - fun remove(this: @List, value: @this.ValueType) + fun remove(this: !List, value: this.ValueType) var p = _head.next - var hn = this._headNode + let hn = this._headNode while p != hn - var tmp = p.value().next + let tmp = p.value().next if p.value().data == value p.value().prev.value().next = p.value().next @@ -182,12 +182,12 @@ datatype List(valueType: Type) _listSize = _listSize - 1 p = tmp - fun removeIf(this: @List, pred: AnyType) + fun removeIf(this: !List, pred: AnyType) var p = _head.next - var hn = this._headNode + let hn = this._headNode while p != hn - var tmp = p.value().next + let tmp = p.value().next if pred(p.value().data) p.value().prev.value().next = p.value().next @@ -197,20 +197,21 @@ datatype List(valueType: Type) _listSize = _listSize - 1 p = tmp - fun remove(this: @List, range: this.RangeType) - var left = range._begin.value().prev + fun remove(this: !List, range: this.RangeType) + let left = range._begin.value().prev + var rc = range - while !range.isEmpty - var tmp = range._begin.value().next + while !rc.isEmpty + let tmp = rc._begin.value().next - range._begin.value().data.dtor - range._begin.freePtr + rc._begin.value().data.dtor + rc._begin.freePtr _listSize = _listSize - 1 - range._begin = tmp - left.value().next = range._end - range._end.value().prev = left + rc._begin = tmp + left.value().next = rc._end + rc._end.value().prev = left - fun resize(this: @List, n: SizeType) + fun resize(this: !List, n: SizeType) if n == _listSize return @@ -220,7 +221,7 @@ datatype List(valueType: Type) _listSize = _listSize - t while t > 0 ; t -= 1 - var tmp = p.value().prev + let tmp = p.value().prev p.value().data.dtor p.freePtr @@ -234,15 +235,15 @@ datatype List(valueType: Type) while n > _listSize this += ValueType() - fun clear(this: @List) + fun clear(this: !List) if _listSize == 0 return var p = _head.next - var hn = this._headNode + let hn = this._headNode while p != hn - var tmp = p.value().next + let tmp = p.value().next p.value().data.dtor p.freePtr @@ -251,18 +252,18 @@ datatype List(valueType: Type) _head.prev = hn _listSize = 0 - fun unique(this: @List) + fun unique(this: !List) if _listSize <= 1 return var p = _head.next - var hn = this._headNode + let hn = this._headNode while p != hn var q = p.value().next while q != hn && p.value().data == q.value().data - var tmp = q.value().next + let tmp = q.value().next q.value().data.dtor q.freePtr @@ -273,18 +274,18 @@ datatype List(valueType: Type) q.value().prev = p p = q - fun unique(this: @List, pred: AnyType) + fun unique(this: !List, pred: AnyType) if _listSize <= 1 return var p = _head.next - var hn = this._headNode + let hn = this._headNode while p != hn var q = p.value().next while q != hn && pred(p.value().data, q.value().data) - var tmp = q.value().next + let tmp = q.value().next q.value().data.dtor q.freePtr @@ -295,13 +296,13 @@ datatype List(valueType: Type) q.value().prev = p p = q - fun spliceBefore(this: @List, pos: this.RangeType, other: typeOf(this)) + fun spliceBefore(this: !List, pos: this.RangeType, other: !typeOf(this)) if !other.isEmpty _transfer(pos._begin, other._head.next, other._headNode) _listSize = _listSize + other._listSize other._listSize = 0 - fun spliceBefore(this: @List, pos: this.RangeType, other: typeOf(this), range: this.RangeType) + fun spliceBefore(this: !List, pos: this.RangeType, other: !typeOf(this), range: this.RangeType) if !range.isEmpty var tmp = range @@ -315,13 +316,13 @@ datatype List(valueType: Type) other._listSize -= t _transfer(pos._begin, range._begin, range._end) - fun spliceAfter(this: @List, pos: this.RangeType, other: typeOf(this)) + fun spliceAfter(this: !List, pos: this.RangeType, other: !typeOf(this)) if !other.isEmpty _transfer(pos._end, other._head.next, other._headNode) _listSize = _listSize + other._listSize other._listSize = 0 - fun spliceAfter(this: @List, pos: this.RangeType, other: typeOf(this), range: this.RangeType) + fun spliceAfter(this: !List, pos: this.RangeType, other: !typeOf(this), range: this.RangeType) if !range.isEmpty var tmp = range @@ -335,7 +336,7 @@ datatype List(valueType: Type) other._listSize = other._listSize - t _transfer(pos._end, range._begin, range._end) - fun sort(this: @List, pred: AnyType) + fun sort(this: !List, pred: AnyType) if _listSize < 2 return @@ -366,13 +367,13 @@ datatype List(valueType: Type) counter(i).merge(counter(i - 1), pred) this swap counter(fill - 1) - fun merge(this: @List, other: typeOf(this), pred: AnyType) + fun merge(this: !List, other: !typeOf(this), pred: AnyType) var r1 = this.all var r2 = other.all while !r1.isEmpty && !r2.isEmpty if pred(r2.front, r1.front) - var tmp = r2._begin.value().next + let tmp = r2._begin.value().next _transfer(r1._begin, r2._begin, tmp) r2._begin = tmp @@ -383,21 +384,21 @@ datatype List(valueType: Type) _listSize = _listSize + other._listSize other._listSize = 0 - fun reverse(this: @List) + fun reverse(this: !List) if _listSize < 2 return var p = _head.next - var hn = this._headNode + let hn = this._headNode while p != hn - var tmp = p.value().prev + let tmp = p.value().prev p.value().prev = p.value().next p.value().next = tmp p = p.value().prev - var tmp = _head.prev + let tmp = _head.prev _head.prev = _head.next _head.next = tmp @@ -405,15 +406,19 @@ datatype List(valueType: Type) fun _headNode(this: @List) = mkRawPtr(reinterpretCast(@_MyNodeType, _head)) fun _transfer(pos, begin, end: /*_NodeTypePtr*/ AnyType) - end.value().prev.value().next = pos - begin.value().prev.value().next = end - pos.value().prev.value().next = begin + var posc = pos + var beginc = begin + var endc = end - var tmp = pos.value().prev + endc.value().prev.value().next = posc + beginc.value().prev.value().next = endc + posc.value().prev.value().next = beginc - pos.value().prev = end.value().prev - end.value().prev = begin.value().prev - begin.value().prev = tmp + let tmp = posc.value().prev + + posc.value().prev = endc.value().prev + endc.value().prev = beginc.value().prev + beginc.value().prev = tmp datatype _NodeLinks(valueType: Type) prev, next: RawPtr(_NodeType(valueType)) @@ -433,10 +438,10 @@ datatype _NodeType(valueType: Type) fun front(this: _ListRange): RetType = _begin.value().data fun back(this: _ListRange): RetType = _end.value().prev.value().data - fun popFront(this: @_ListRange) { _begin = _begin.value().next } - fun popBack(this: @_ListRange) { _end = _end.value().prev } + fun popFront(this: !_ListRange) { _begin = _begin.value().next } + fun popBack(this: !_ListRange) { _end = _end.value().prev } - fun >>(this: _ListRange, os: @OutStream) if isValid(os << #$valueType) + fun >>(this: _ListRange, os: !OutStream) if isValid(os << #$valueType) var first = true var p = _begin while p != _end ; p = p.value().next diff --git a/SparrowImplicitLib/std/map.spr b/SparrowImplicitLib/std/map.spr index a87f4740..d8eaf216 100644 --- a/SparrowImplicitLib/std/map.spr +++ b/SparrowImplicitLib/std/map.spr @@ -16,44 +16,44 @@ datatype Map(keyType, dataType: Type, traitsType: Type = DefaultTypeTraits) _hashTable: _ImplTable [protected] - fun ctor(this: @Map, n: SizeType) { _hashTable.ctor(n, TraitsType()); } - fun ctor(this: @Map, n: SizeType, traits: this.TraitsType) { _hashTable.ctor(n, traits); } - fun ctor(this: @Map, range: Range) { _hashTable.ctor(range, 0, TraitsType()); } - fun ctor(this: @Map, range: Range, n: SizeType) { _hashTable.ctor(range, n, HashType(), CompareType()); } - fun ctor(this: @Map, range: Range, n: SizeType, traits: this.TraitsType){ _hashTable.ctor(range, n, traits); } - - fun traits(this: @Map) = _hashTable.traits - - fun size(this: @Map) = _hashTable.size - fun isEmpty(this: @Map) = (_hashTable.size == 0) - fun bucketCount(this: @Map) = _hashTable.bucketCount - fun reserve(this: @Map, n: SizeType) { _hashTable.reserve(n); } - - fun all(this: @Map) = _hashTable.all - fun keys(this: @Map) = transform(_hashTable.all, PairFirst(ValueType)()) - fun values(this: @Map) = transform(_hashTable.all, PairSecond(ValueType)()) - - fun insert(this: @Map, key: @this.KeyType, data: @this.DataType) = _hashTable.insert(ValueType(key, data)) - fun insert(this: @Map, value: @this.ValueType) = _hashTable.insert(value) - fun insert(this: @Map, range: Range) { _hashTable.insert(range); } - fun remove(this: @Map, key: @this.KeyType) { _hashTable.remove(key); } - fun remove(this: @Map, range: this.RangeType) { _hashTable.remove(range); } - - fun contains(this: @Map, key: @this.KeyType) = _hashTable.contains(key) - fun count(this: @Map, key: @this.KeyType) = _hashTable.count(key) - fun equalRange(this: @Map, key: @this.KeyType) = _hashTable.equalRange(key) - fun find(this: @Map, key: @this.KeyType) = _hashTable.find(key) - - fun ()(this: @Map, key: @this.KeyType): @DataType = this.at(key) - fun at(this: @Map, key: @this.KeyType): @DataType + fun ctor(this: !Map, n: SizeType) { _hashTable.ctor(n, TraitsType()); } + fun ctor(this: !Map, n: SizeType, traits: this.TraitsType) { _hashTable.ctor(n, traits); } + fun ctor(this: !Map, range: Range) { _hashTable.ctor(range, 0, TraitsType()); } + fun ctor(this: !Map, range: Range, n: SizeType) { _hashTable.ctor(range, n, HashType(), CompareType()); } + fun ctor(this: !Map, range: Range, n: SizeType, traits: this.TraitsType){ _hashTable.ctor(range, n, traits); } + + fun traits(this: Map) = _hashTable.traits + + fun size(this: Map) = _hashTable.size + fun isEmpty(this: Map) = (_hashTable.size == 0) + fun bucketCount(this: Map) = _hashTable.bucketCount + fun reserve(this: !Map, n: SizeType) { _hashTable.reserve(n); } + + fun all(this: Map) = _hashTable.all + fun keys(this: Map) = transform(_hashTable.all, PairFirst(ValueType)()) + fun values(this: Map) = transform(_hashTable.all, PairSecond(ValueType)()) + + fun insert(this: !Map, key: this.KeyType, data: this.DataType) = _hashTable.insert(ValueType(key, data)) + fun insert(this: !Map, value: this.ValueType) = _hashTable.insert(value) + fun insert(this: !Map, range: Range) { _hashTable.insert(range); } + fun remove(this: !Map, key: this.KeyType) { _hashTable.remove(key); } + fun remove(this: !Map, range: this.RangeType) { _hashTable.remove(range); } + + fun contains(this: Map, key: this.KeyType) = _hashTable.contains(key) + fun count(this: Map, key: this.KeyType) = _hashTable.count(key) + fun equalRange(this: Map, key: this.KeyType) = _hashTable.equalRange(key) + fun find(this: Map, key: this.KeyType) = _hashTable.find(key) + + fun ()(this: !Map, key: this.KeyType): @DataType = this.at(key) + fun at(this: !Map, key: this.KeyType): @DataType var r = this.find(key) if r.isEmpty - var data: DataType + let data: DataType r = _hashTable.insert(ValueType(key, data)) return r.front().v2 - fun clear(this: @Map) { _hashTable.clear; } + fun clear(this: !Map) { _hashTable.clear; } - fun swap(this: @Map, other: typeOf(this)) { this._hashTable swap other._hashTable; } + fun swap(this: !Map, other: !typeOf(this)) { this._hashTable swap other._hashTable; } - fun >> (this: @Map, os: @OutStream) { _hashTable.>>(os); } + fun >> (this: Map, os: !OutStream) { _hashTable.>>(os); } diff --git a/SparrowImplicitLib/std/newDelete.spr b/SparrowImplicitLib/std/newDelete.spr index d0b285a8..05aebffc 100644 --- a/SparrowImplicitLib/std/newDelete.spr +++ b/SparrowImplicitLib/std/newDelete.spr @@ -1,48 +1,44 @@ module std.newDelete fun new(t: Type): @t - var res: @t = reinterpretCast(@t, malloc(sizeOf(t))) + var res: @t = reinterpretCast(@t, malloc(sizeOf(t)).data) res ctor return res -fun new(t: Type, arg1: @AnyType): @t if isValid(#$t ctor arg1) - var res: @t = reinterpretCast(@t, malloc(sizeOf(t))) +fun new(t: Type, arg1: AnyType): @t if isValid((#$ @t) ctor arg1) + var res: @t = reinterpretCast(@t, malloc(sizeOf(t)).data) res ctor arg1 return res -fun new(t: Type, arg1, arg2: @AnyType): @t if isValid((#$t).ctor(arg1, arg2)) - var res: @t = reinterpretCast(@t, malloc(sizeOf(t))) +fun new(t: Type, arg1, arg2: AnyType): @t if isValid((#$ @t).ctor(arg1, arg2)) + var res: @t = reinterpretCast(@t, malloc(sizeOf(t)).data) res.ctor(arg1, arg2) return res -fun new(t: Type, arg1, arg2, arg3: @AnyType): @t if isValid((#$t).ctor(arg1, arg2, arg3)) - var res: @t = reinterpretCast(@t, malloc(sizeOf(t))) +fun new(t: Type, arg1, arg2, arg3: AnyType): @t if isValid((#$ @t).ctor(arg1, arg2, arg3)) + var res: @t = reinterpretCast(@t, malloc(sizeOf(t)).data) res.ctor(arg1, arg2, arg3) return res -fun new(t: Type, arg1, arg2, arg3, arg4: @AnyType): @t if isValid((#$t).ctor(arg1, arg2, arg3, arg4)) - var res: @t = reinterpretCast(@t, malloc(sizeOf(t))) +fun new(t: Type, arg1, arg2, arg3, arg4: AnyType): @t if isValid((#$ @t).ctor(arg1, arg2, arg3, arg4)) + var res: @t = reinterpretCast(@t, malloc(sizeOf(t)).data) res.ctor(arg1, arg2, arg3, arg4) return res -fun new(t: Type, arg1, arg2, arg3, arg4, arg5: @AnyType): @t if isValid((#$t).ctor(arg1, arg2, arg3, arg4, arg5)) - var res: @t = reinterpretCast(@t, malloc(sizeOf(t))) +fun new(t: Type, arg1, arg2, arg3, arg4, arg5: AnyType): @t if isValid((#$ @t).ctor(arg1, arg2, arg3, arg4, arg5)) + var res: @t = reinterpretCast(@t, malloc(sizeOf(t)).data) res.ctor(arg1, arg2, arg3, arg4, arg5) return res -fun new(t: Type, arg1, arg2, arg3, arg4, arg5, arg6: @AnyType): @t if isValid((#$t).ctor(arg1, arg2, arg3, arg4, arg5, arg6)) - var res: @t = reinterpretCast(@t, malloc(sizeOf(t))) +fun new(t: Type, arg1, arg2, arg3, arg4, arg5, arg6: AnyType): @t if isValid((#$ @t).ctor(arg1, arg2, arg3, arg4, arg5, arg6)) + var res: @t = reinterpretCast(@t, malloc(sizeOf(t)).data) res.ctor(arg1, arg2, arg3, arg4, arg5, arg6) return res fun delete(obj: @AnyType) if !isValid(obj.release) if obj !== null obj dtor - free(reinterpretCast(@Byte, obj)) + free(UntypedPtr(obj)) -fun delete(ptr: @AnyType) if isValid(ptr.release) +fun delete(ptr: !AnyType) if isValid(ptr.release) ptr.release - -fun delete(r: Range) - for x = r - delete(x) diff --git a/SparrowImplicitLib/std/optional.spr b/SparrowImplicitLib/std/optional.spr index fe463640..0d8cc7d5 100644 --- a/SparrowImplicitLib/std/optional.spr +++ b/SparrowImplicitLib/std/optional.spr @@ -9,52 +9,52 @@ datatype Optional(valueType: Type) _constructed: Bool [noDefault] -fun ctor(this: @Optional) +fun ctor(this: !Optional) _constructed ctor false _value ctor Uninitialized() [noDefault] -fun ctor(this: @Optional, other: typeOf(this)) +fun ctor(this: !Optional, other: typeOf(this)) _constructed ctor other._constructed if other._constructed _value ctor other._value [noDefault] -fun ctor(this: @Optional, val: @this.ValueType) +fun ctor(this: !Optional, val: this.ValueType) _constructed ctor true _value ctor val [protected] - [noDefault] fun dtor(this: @Optional) + [noDefault] fun dtor(this: !Optional) this.reset() - fun =(this, other: @Optional) { if other._constructed ; this.reset(other._value) else this.reset } - fun =(this: @Optional, val: @this.ValueType) { this.reset(val) } + fun =(this: !Optional, other: typeOf(this)) { if other._constructed ; this.reset(other._value) else this.reset } + fun =(this: !Optional, val: this.ValueType) { this.reset(val) } - fun ==(this, other: @Optional) = _constructed == other._constructed && (!_constructed || _value == other._value) + fun ==(this, other: Optional) = _constructed == other._constructed && (!_constructed || _value == other._value) - fun some(x: @AnyType): -@typeOf(x) Optional = (-@typeOf(x) Optional)(x) + fun some(x: AnyType): -@typeOf(x) Optional = (-@typeOf(x) Optional)(x) fun none(t: Type) = (t Optional)() - fun isNull(this: @Optional) = !_constructed - fun isSet(this: @Optional) = _constructed - fun get(this: @Optional): @ValueType = _value - fun getOrElse(this: @Optional, default: @this.ValueType): @ValueType = ife(_constructed, cast(@ValueType, _value), default) + fun isNull(this: Optional) = !_constructed + fun isSet(this: Optional) = _constructed + fun get(this: Optional): @ValueType = _value + fun getOrElse(this: Optional, default: this.ValueType): @ValueType = ife(_constructed, cast(@ValueType, _value), default) - fun reset(this: @Optional) + fun reset(this: !Optional) if _constructed _value dtor _constructed = false - fun reset(this: @Optional, val: @this.ValueType) + fun reset(this: !Optional, val: this.ValueType) if _constructed _value dtor _value ctor val _constructed = true - fun swap(this: @Optional, other: typeOf(this)) - var tmp = this + fun swap(this: !Optional, other: !typeOf(this)) + let tmp = this this = other - other = this + other = tmp - fun >>(this: @Optional, os: @OutStream) if isValid(os << #$this.ValueType) + fun >>(this: Optional, os: !OutStream) if isValid(os << #$this.ValueType) if this.isSet os << "Optional(" << _value << ")" else diff --git a/SparrowImplicitLib/std/ptr.spr b/SparrowImplicitLib/std/ptr.spr index 9da5a4d6..74f290c7 100644 --- a/SparrowImplicitLib/std/ptr.spr +++ b/SparrowImplicitLib/std/ptr.spr @@ -9,24 +9,24 @@ datatype Ptr(type: Type) _ptr: @ValueType [protected] - fun =(this: @Ptr, ref: @this.ValueType) = _ptr := ref + fun =(this: !Ptr, ref: this.ValueType) = _ptr := ref - fun < (this, other: Ptr) = ptrDiff(reinterpretCast(@Byte, this._ptr), reinterpretCast(@Byte, other._ptr)) < DiffType(0) + fun < (this, other: Ptr) = (UntypedPtr(_ptr) ptrDiff UntypedPtr(other._ptr)) < DiffType(0) fun get(this: Ptr) = _ptr - fun isNull(this: Ptr) = _ptr === null - fun isSet(this: Ptr) = _ptr !== null + fun isNull(this: Ptr) = _ptr === null + fun isSet(this: Ptr) = _ptr !== null - fun reset(this: @Ptr) = _ptr := null - fun reset(this: @Ptr, ref: @this.ValueType) = _ptr := ref - fun release(this: @Ptr) { delete(_ptr); } + fun reset(this: !Ptr) = _ptr := null + fun reset(this: !Ptr, ref: !this.ValueType) = _ptr := ref + fun release(this: !Ptr) { delete(_ptr); } - fun swap(this: @Ptr, other: typeOf(this)) - var t: @ValueType = _ptr + fun swap(this: !Ptr, other: !typeOf(this)) + let t: @ValueType = _ptr _ptr := other._ptr other._ptr := t - fun >>(this: Ptr, os: @OutStream) if isValid(os << #$ValueType) + fun >>(this: Ptr, os: !OutStream) if isValid(os << #$ValueType) if ( _ptr !== null ) os << "Ptr(" << _ptr << ")" else @@ -36,5 +36,5 @@ datatype Ptr(type: Type) fun .(this: Ptr) = _ptr fun mkPtr(v: @AnyType) = Ptr(-@typeOf(v))(v) -fun reinterpretPtr(t: Type, ptr: AnyType): Ptr(t) //if isValid(p.isNull()) && isValid(p.get()) +fun reinterpretPtr(t: Type, ptr: Ptr): Ptr(t) return Ptr(t)(reinterpretCast(@t, ptr.get())) diff --git a/SparrowImplicitLib/std/rMath.spr b/SparrowImplicitLib/std/rMath.spr index 4a8b4844..55c0d9dd 100644 --- a/SparrowImplicitLib/std/rMath.spr +++ b/SparrowImplicitLib/std/rMath.spr @@ -7,7 +7,7 @@ fun sqr n = n*n fun sum(r: Range) = foldLeft(r, (fun x,y = x+y), r.RetType(0)) -fun mean(r: Range): Double if Number(r.front) +fun mean(r: Range): Double if Number(#$r.RetType) var sum: r.RetType = 0 var count = 0 for x = r diff --git a/SparrowImplicitLib/std/ranges.spr b/SparrowImplicitLib/std/ranges.spr index 4441706c..73d5f9e3 100644 --- a/SparrowImplicitLib/std/ranges.spr +++ b/SparrowImplicitLib/std/ranges.spr @@ -22,29 +22,29 @@ concept RandomAccessRange(x: BidirRange) if ( // /// Advances and return the new front value of the range -fun pre_++(r: @Range): r.RetType +fun pre_++(r: !Range): r.RetType r.popFront return r.front /// Advances and return the old front value of the range -fun post_++(r: @Range): r.RetType - var res: r.RetType = r.front +fun post_++(r: !Range): r.RetType + let res: r.RetType = r.front r.popFront return res /// Pops back and return the new back value of the range -fun pre_--(r: @BidirRange): r.RetType +fun pre_--(r: !BidirRange): r.RetType r.popBack return r.back /// Pops back and return the old back value of the range -fun post_--(r: @BidirRange): r.RetType - var res: r.RetType = r.back +fun post_--(r: !BidirRange): r.RetType + let res: r.RetType = r.back r.popBack return res /// Returns true if the range is empty -fun pre_!(r: @Range) = r.isEmpty +fun pre_!(r: Range) = r.isEmpty /// Returns true if the range is not empty -fun pre_!!(r: @Range) = !r.isEmpty +fun pre_!!(r: Range) = !r.isEmpty /// Get the front value of the range -fun pre_*(r: @Range): r.RetType = r.front +fun pre_*(r: Range): r.RetType = r.front // Call operator on range == range.front //fun post_()(r: @Range) = r.front @@ -55,8 +55,9 @@ fun pre_*(r: @Range): r.RetType = r.front /// Gets the size of the range -- generic case fun rangeSize(range: Range): SizeType + var rCopy = range; var n: SizeType = 0 - while !range.isEmpty ; range.popFront + while !rCopy.isEmpty ; rCopy.popFront ++n return n /// Gets the size of the range -- random-access-range case @@ -64,22 +65,22 @@ fun rangeSize(range: RandomAccessRange): SizeType return range.size /// Advances the given number of positions -- does not check for range validity -fun advance(range: @Range, n: SizeType) +fun advance(range: !Range, n: SizeType) while (n--) > 0 range.popFront /// Advances while the predicate is satisfied; checks the range validity -fun advanceIf(range: @Range, pred: AnyType) if isValid(pred(range.front)) +fun advanceIf(range: !Range, pred: AnyType) if isValid(pred(range.front)) while !range.isEmpty && pred(range.front) range.popFront /// Removes from back the given number of positions -- does not check for range validity -fun retract(range: @BidirRange, n: SizeType) +fun retract(range: !BidirRange, n: SizeType) while (n--) > 0 range.popBack /// Removes from back while the predicate is satisfied; checks the range validity -fun retractIf(range: @BidirRange, pred: AnyType) if isValid(pred(range.back)) +fun retractIf(range: !BidirRange, pred: AnyType) if isValid(pred(range.back)) while !(range.isEmpty) && pred(range.back) range.popBack @@ -107,7 +108,10 @@ fun retro(range: BidirRange) = RetroRange(typeOf(range))(range) fun take(range: Range, count: SizeType) = TakeRange(typeOf(range))(range, count) /// Skip the first 'count' elements from the range -fun skip(range: Range, count: SizeType): typeOf(range) { advance(range, count); return range; } +fun skip(range: Range, count: SizeType): typeOf(range) + var rc = range + rc advance count + return rc /// Take elements from the range while the given predicate is satisfied fun takeWhile(range: Range, pred: AnyType) = TakeWhileRange(typeOf(range), typeOf(pred))(range, pred) @@ -175,12 +179,12 @@ datatype NumericRangeInc(valueType: Type) if Number(#$valueType) using RetType = valueType -fun ctor(this: @NumericRangeInc, start, end: this.RetType) +fun ctor(this: !NumericRangeInc, start, end: this.RetType) this._begin ctor start this._end ctor end this._closed ctor false -fun ctor(this: @NumericRangeInc, start, end: this.RetType, closed: Bool) +fun ctor(this: !NumericRangeInc, start, end: this.RetType, closed: Bool) this._begin ctor start this._end ctor end this._closed ctor closed @@ -188,15 +192,15 @@ fun ctor(this: @NumericRangeInc, start, end: this.RetType, closed: Bool) [protected] fun isEmpty(this: NumericRangeInc) = ife(_closed, _begin > _end, _begin >= _end) fun front(this: NumericRangeInc): RetType = _begin - fun popFront(this: @NumericRangeInc) { _begin += _step } + fun popFront(this: !NumericRangeInc) { _begin += _step } fun back(this: NumericRangeInc): RetType = _begin + RetType(this.size-1) - fun popBack(this: @NumericRangeInc) { _end -= _step } + fun popBack(this: !NumericRangeInc) { _end -= _step } fun size(this: NumericRangeInc): SizeType = SizeType(ife(_closed, RetType(_end-_begin+1), _end-_begin)) - fun popFront(this: @NumericRangeInc, n: SizeType) { _begin += RetType(n) } - fun popBack(this: @NumericRangeInc, n: SizeType) { _end -= RetType(n) } + fun popFront(this: !NumericRangeInc, n: SizeType) { _begin += RetType(n) } + fun popBack(this: !NumericRangeInc, n: SizeType) { _end -= RetType(n) } fun ()(this: NumericRangeInc, n: SizeType): RetType = _begin + RetType(n) @@ -206,7 +210,7 @@ datatype NumericRangeWithStep(valueType: Type) if Number(#$valueType) using RetType = valueType -fun ctor(this: @NumericRangeWithStep, other: @NumericRangeInc(this.RetType)) +fun ctor(this: !NumericRangeWithStep, other: NumericRangeInc(this.RetType)) this._begin ctor other._begin this._end ctor other._end this._closed ctor other._closed @@ -215,13 +219,13 @@ fun ctor(this: @NumericRangeWithStep, other: @NumericRangeInc(this.RetType)) else _step = valueType(-1) -fun ctor(this: @NumericRangeWithStep, other: @NumericRangeInc(this.RetType), step: this.RetType) +fun ctor(this: !NumericRangeWithStep, other: NumericRangeInc(this.RetType), step: this.RetType) this._begin ctor other._begin this._end ctor other._end this._closed ctor other._closed this._step ctor step -fun ctor(this: @NumericRangeWithStep, start, end: this.RetType) +fun ctor(this: !NumericRangeWithStep, start, end: this.RetType) this._begin ctor start this._end ctor end this._closed ctor false @@ -230,7 +234,7 @@ fun ctor(this: @NumericRangeWithStep, start, end: this.RetType) else _step = valueType(-1) -fun ctor(this: @NumericRangeWithStep, start, end: this.RetType, closed: Bool) +fun ctor(this: !NumericRangeWithStep, start, end: this.RetType, closed: Bool) this._begin ctor start this._end ctor end this._closed ctor closed @@ -239,7 +243,7 @@ fun ctor(this: @NumericRangeWithStep, start, end: this.RetType, closed: Bool) else _step = valueType(-1) -fun ctor(this: @NumericRangeWithStep, start, end, step: this.RetType) +fun ctor(this: !NumericRangeWithStep, start, end, step: this.RetType) this._begin ctor start this._end ctor end this._step ctor step @@ -251,15 +255,15 @@ fun isEmpty(this: NumericRangeWithStep): Bool else return ife(_step < 0, _begin <= _end, _begin >= _end) fun front(this: NumericRangeWithStep): RetType = _begin -fun popFront(this: @NumericRangeWithStep) { _begin += _step } +fun popFront(this: !NumericRangeWithStep) { _begin += _step } fun back(this: NumericRangeWithStep): RetType = _begin + RetType(this.size-1)*_step -fun popBack(this: @NumericRangeWithStep) { _end -= _step } +fun popBack(this: !NumericRangeWithStep) { _end -= _step } fun size(this: NumericRangeWithStep): SizeType = SizeType(math.floor(ife(_closed, _end-_begin, _end-_begin+_step)/_step)) -fun popFront(this: @NumericRangeWithStep, n: SizeType) { _begin += RetType(n*_step) } -fun popBack(this: @NumericRangeWithStep, n: SizeType) { _end -= RetType(n*_step) } +fun popFront(this: !NumericRangeWithStep, n: SizeType) { _begin += RetType(n*_step) } +fun popBack(this: !NumericRangeWithStep, n: SizeType) { _end -= RetType(n*_step) } fun ()(this: NumericRangeWithStep, n: SizeType): RetType = _begin + RetType(n*_step) @@ -270,12 +274,12 @@ datatype RetroRange(rangeType: Type) if BidirRange(#$rangeType) using RetType = rangeType.RetType [protected] - fun isEmpty(this: @RetroRange) = _range.isEmpty - fun front(this: @RetroRange): RetType = _range.back - fun popFront(this: @RetroRange) { _range.popBack } + fun isEmpty(this: RetroRange) = _range.isEmpty + fun front(this: RetroRange): RetType = _range.back + fun popFront(this: !RetroRange) { _range.popBack } - fun back(this: @RetroRange): RetType = _range.front - fun popBack(this: @RetroRange) { _range.popFront } + fun back(this: RetroRange): RetType = _range.front + fun popBack(this: !RetroRange) { _range.popFront } [initCtor] datatype TakeRange(rangeType: Type) if Range(#$rangeType) @@ -285,22 +289,31 @@ datatype TakeRange(rangeType: Type) if Range(#$rangeType) using RetType = rangeType.RetType [protected] - fun isEmpty(this: @TakeRange) = _count == 0 || _range.isEmpty + fun isEmpty(this: TakeRange): Bool = _count == 0 || _range.isEmpty fun front(this: @TakeRange): RetType = _range.front - fun popFront(this: @TakeRange) { _range.popFront; --_count } + fun popFront(this: !TakeRange) { _range.popFront; --_count } -[initCtor] datatype TakeWhileRange(rangeType: Type, predType: Type) \ if Range(#$rangeType) && typeOf((#$predType)(#$rangeType front)) == Bool _range: rangeType _pred: predType + _isEmpty: Bool = false using RetType = rangeType.RetType + using _RangeType = rangeType + using _PredType = predType [protected] - fun isEmpty(this: @TakeWhileRange) = _range.isEmpty || !_pred(_range.front) - fun front(this: @TakeWhileRange): RetType = _range.front - fun popFront(this: @TakeWhileRange) { _range.popFront } + fun ctor(this: !TakeWhileRange, r: this._RangeType, p: this._PredType) + _range ctor r + _pred ctor p + _isEmpty = _range.isEmpty || !_pred(_range.front) + + fun isEmpty(this: TakeWhileRange): Bool = _isEmpty + fun front(this: !TakeWhileRange): RetType = _range.front + fun popFront(this: !TakeWhileRange) + _range.popFront + _isEmpty = _range.isEmpty || !_pred(_range.front) [initCtor] datatype TakeUntilRange(rangeType: Type, predType: Type) \ @@ -312,10 +325,10 @@ datatype TakeUntilRange(rangeType: Type, predType: Type) \ using RetType = rangeType.RetType [protected] - fun isEmpty(this: @TakeUntilRange) = _range.isEmpty || _shouldStop - fun front(this: @TakeUntilRange): RetType = _range.front - fun popFront(this: @TakeUntilRange) - var lastVal = _range.front + fun isEmpty(this: TakeUntilRange) = _range.isEmpty || _shouldStop + fun front(this: TakeUntilRange): RetType = _range.front + fun popFront(this: !TakeUntilRange) + let lastVal = _range.front _range.popFront _shouldStop = _pred(lastVal) @@ -329,18 +342,18 @@ datatype FilteredRange(rangeType, predType: Type) \ using _RangeType = rangeType using _PredType = predType -fun ctor(this: @FilteredRange, range: this._RangeType, pred: this._PredType) +fun ctor(this: !FilteredRange, range: this._RangeType, pred: this._PredType) this._range ctor range this._pred ctor pred this._lastVal ctor this._popUntilValid [protected] - fun isEmpty(this: @FilteredRange) = _range.isEmpty - fun front(this: @FilteredRange): RetType = _lastVal - fun popFront(this: @FilteredRange) { _range.popFront; this._popUntilValid } + fun isEmpty(this: FilteredRange) = _range.isEmpty + fun front(this: FilteredRange): RetType = _lastVal + fun popFront(this: !FilteredRange) { _range.popFront; this._popUntilValid } - fun _popUntilValid(this: @FilteredRange) + fun _popUntilValid(this: !FilteredRange) while !_range.isEmpty _lastVal = _range.front if _pred(_lastVal) @@ -358,13 +371,13 @@ datatype TransformedRange(rangeType, funType: Type) \ using RetType = -@typeOf((#$funType)(#$rangeType front)) [protected] - fun isEmpty(this: @TransformedRange) = _range.isEmpty - fun front(this: @TransformedRange): RetType + fun isEmpty(this: TransformedRange) = _range.isEmpty + fun front(this: !TransformedRange): RetType if !_hasValue _curVal = _function(_range.front) _hasValue = true return _curVal - fun popFront(this: @TransformedRange) { _range.popFront; _hasValue = false } + fun popFront(this: !TransformedRange) { _range.popFront; _hasValue = false } [initCtor] datatype RepeatRange(valueType: Type) @@ -373,9 +386,9 @@ datatype RepeatRange(valueType: Type) using RetType = valueType [protected] - fun isEmpty(this: @RepeatRange): Bool = false - fun front(this: @RepeatRange): RetType = _value - fun popFront(this: @RepeatRange) {} + fun isEmpty(this: RepeatRange): Bool = false + fun front(this: RepeatRange): RetType = _value + fun popFront(this: !RepeatRange) {} [initCtor] datatype ChainRange(rangeType1: Type, rangeType2: Type) \ @@ -386,9 +399,9 @@ datatype ChainRange(rangeType1: Type, rangeType2: Type) \ using RetType = commonType(rangeType1.RetType, rangeType2.RetType) [protected] - fun isEmpty(this: @ChainRange) = _range1.isEmpty && _range2.isEmpty - fun front(this: @ChainRange): RetType = ife(_range1.isEmpty, _range2.front, _range1.front) - fun popFront(this: @ChainRange) + fun isEmpty(this: ChainRange) = _range1.isEmpty && _range2.isEmpty + fun front(this: !ChainRange): RetType = ife(_range1.isEmpty, _range2.front, _range1.front) + fun popFront(this: !ChainRange) if _range1.isEmpty _range2.popFront else @@ -402,10 +415,10 @@ datatype StridedRange(rangeType: Type) if Range(#$rangeType) using RetType = rangeType.RetType [protected] - fun isEmpty(this: @StridedRange) = _range.isEmpty - fun front(this: @StridedRange): RetType = _range.front - fun popFront(this: @StridedRange) - var s = _strideStep + fun isEmpty(this: StridedRange) = _range.isEmpty + fun front(this: StridedRange): RetType = _range.front + fun popFront(this: !StridedRange) + let s = _strideStep while !_range.isEmpty && s > 0 s = s - 1 _range.popFront @@ -421,9 +434,9 @@ datatype RadialRange(rangeType: Type) if RandomAccessRange(#$rangeType) using RetType = rangeType.RetType [protected] - fun isEmpty(this: @RadialRange) = _range.isEmpty || _count == _range.size - fun front(this: @RadialRange): RetType = _range(_index) - fun popFront(this: @RadialRange) + fun isEmpty(this: RadialRange) = _range.isEmpty || _count == _range.size + fun front(this: RadialRange): RetType = _range(_index) + fun popFront(this: !RadialRange) _index = _index + _step * _sign _step = _step + 1 _sign = -_sign @@ -439,14 +452,14 @@ datatype CyclicRange(rangeType: Type) if Range(#$rangeType) using RetType = rangeType.RetType using _RangeType = rangeType -fun ctor(this: @CyclicRange, range: this._RangeType) +fun ctor(this: !CyclicRange, range: this._RangeType) this._range ctor range this._base ctor range [protected] - fun isEmpty(this: @CyclicRange): Bool = false - fun front(this: @CyclicRange): RetType = _range.front - fun popFront(this: @CyclicRange) + fun isEmpty(this: CyclicRange): Bool = false + fun front(this: CyclicRange): RetType = _range.front + fun popFront(this: !CyclicRange) _range.popFront if _range.isEmpty _range = _base @@ -458,15 +471,15 @@ datatype CyclicCountedRange(rangeType: Type) if Range(#$rangeType) using RetType = rangeType.RetType using _RangeType = rangeType -fun ctor(this: @CyclicCountedRange, range: this._RangeType, count: SizeType) +fun ctor(this: !CyclicCountedRange, range: this._RangeType, count: SizeType) this._range ctor range this._count ctor count this._base ctor range [protected] - fun isEmpty(this: @CyclicCountedRange) = _count == 0 - fun front(this: @CyclicCountedRange): RetType = _range.front - fun popFront(this: @CyclicCountedRange) + fun isEmpty(this: CyclicCountedRange) = _count == 0 + fun front(this: CyclicCountedRange): RetType = _range.front + fun popFront(this: !CyclicCountedRange) _range.popFront if _range.isEmpty if _count > 0 @@ -480,14 +493,14 @@ datatype GeneratedRange(functionType: Type) using RetType = typeOf((#$functionType)()) using _FunType = functionType -fun ctor(this: @GeneratedRange, function: this._FunType) +fun ctor(this: !GeneratedRange, function: this._FunType) this._function ctor function this._current ctor this._function() [protected] - fun isEmpty(this: @GeneratedRange): Bool = false - fun front(this: @GeneratedRange): RetType = _current - fun popFront(this: @GeneratedRange) { _current = _function() } + fun isEmpty(this: GeneratedRange): Bool = false + fun front(this: GeneratedRange): RetType = _current + fun popFront(this: !GeneratedRange) { _current = _function() } [initCtor] datatype Generated1Range(elType, functionType: Type) //if isValid(elType(#$functionType)(#$elType)) @@ -497,9 +510,9 @@ datatype Generated1Range(elType, functionType: Type) //if isValid(elType(#$funct using RetType = elType [protected] - fun isEmpty(this: @Generated1Range): Bool = false - fun front(this: @Generated1Range): RetType = _current - fun popFront(this: @Generated1Range) { _current = _function(_current) } + fun isEmpty(this: Generated1Range): Bool = false + fun front(this: Generated1Range): RetType = _current + fun popFront(this: !Generated1Range) { _current = _function(_current) } [initCtor] datatype ZippedRange(rangeType1, rangeType2: Type, functionType: Type) if Range(#$rangeType1) && Range(#$rangeType2) @@ -510,9 +523,9 @@ datatype ZippedRange(rangeType1, rangeType2: Type, functionType: Type) if Range( using RetType = typeOf((#$functionType)(#$rangeType1 front, #$rangeType2 front)) [protected] - fun isEmpty(this: @ZippedRange) = _range1.isEmpty || _range2.isEmpty - fun front(this: @ZippedRange): RetType = _function(_range1.front, _range2.front) - fun popFront(this: @ZippedRange) { _range1.popFront; _range2.popFront } + fun isEmpty(this: ZippedRange) = _range1.isEmpty || _range2.isEmpty + fun front(this: ZippedRange): RetType = _function(_range1.front, _range2.front) + fun popFront(this: !ZippedRange) { _range1.popFront; _range2.popFront } [initCtor] datatype ScanLeftRange(accType, rangeType: Type, functionType: Type) if Range(#$rangeType) @@ -524,8 +537,8 @@ datatype ScanLeftRange(accType, rangeType: Type, functionType: Type) if Range(#$ using RetType = accType [protected] - fun isEmpty(this: @ScanLeftRange) = _range.isEmpty - fun popFront(this: @ScanLeftRange) { _range.popFront; _valComputed=false } + fun isEmpty(this: ScanLeftRange) = _range.isEmpty + fun popFront(this: !ScanLeftRange) { _range.popFront; _valComputed=false } fun front(this: @ScanLeftRange): RetType if !_valComputed _acc = _function(_acc, _range.front) @@ -540,9 +553,9 @@ datatype ValuesRange(contType: Type) if isValid((#$contType)(1)) using RetType = contType.ValueType [protected] - fun isEmpty(this: @ValuesRange) = _idx >= _values.size - fun front(this: @ValuesRange): RetType = _values(_idx) - fun popFront(this: @ValuesRange) { ++_idx } + fun isEmpty(this: ValuesRange): Bool = _idx >= _values.size + fun front(this: ValuesRange): RetType = _values(_idx) + fun popFront(this: !ValuesRange) { ++_idx } fun mkValuesRange(cont: AnyType) = ValuesRange(typeOf(cont))(cont) diff --git a/SparrowImplicitLib/std/rawPtr.spr b/SparrowImplicitLib/std/rawPtr.spr index 45e2c6b2..10ab95d8 100644 --- a/SparrowImplicitLib/std/rawPtr.spr +++ b/SparrowImplicitLib/std/rawPtr.spr @@ -1,43 +1,44 @@ module std.rawPtr -[initCtor] +[initCtor, bitcopiable] datatype RawPtr(valueType: Type) using ValueType = valueType _ptr: @ValueType -fun ctor(this: @RawPtr, byteRef: @Byte) if this.ValueType != Byte - _ptr := reinterpretCast(@ValueType, byteRef) +fun ctor(this: !RawPtr, p: UntypedPtr) + _ptr := p asRefOf ValueType [protected] - fun < (this, other: RawPtr) = ptrDiff(this.bytePtr(), other.bytePtr()) < DiffType(0) + fun < (this, other: RawPtr) = (UntypedPtr(_ptr) ptrDiff UntypedPtr(other._ptr)) < DiffType(0) fun value(this: RawPtr): @ValueType = _ptr - fun advance(this: RawPtr): typeOf(this) = typeOf(this)(ptrAdd(this.bytePtr(), sizeOf(ValueType))) - fun advance(this: RawPtr, n: SizeType): typeOf(this) = typeOf(this)(ptrAdd(this.bytePtr(), n * sizeOf(ValueType))) - fun advance(this: RawPtr, n: DiffType): typeOf(this) = typeOf(this)(ptrAdd(this.bytePtr(), n * DiffType(sizeOf(ValueType)))) - fun diff(this: RawPtr, other: typeOf(this)): DiffType = DiffType(ptrDiff(this.bytePtr(), other.bytePtr()) / DiffType(sizeOf(ValueType))) + + fun advance(this: RawPtr): typeOf(this) = typeOf(this)( UntypedPtr(_ptr) ptrAdd sizeOf(ValueType) ) + fun advance(this: RawPtr, n: SizeType): typeOf(this) = typeOf(this)( UntypedPtr(_ptr) ptrAdd (n * sizeOf(ValueType)) ) + fun advance(this: RawPtr, n: DiffType): typeOf(this) = typeOf(this)( UntypedPtr(_ptr) ptrAdd (n * DiffType(sizeOf(ValueType))) ) + fun diff(this: RawPtr, other: typeOf(this)): DiffType = (UntypedPtr(_ptr) ptrDiff UntypedPtr(other._ptr)) / DiffType(sizeOf(ValueType)) fun isNull(this: RawPtr): Bool = _ptr === null fun isSet(this: RawPtr) = _ptr !== null - fun bytePtr(this: RawPtr): @Byte = reinterpretCast(@Byte, _ptr) + fun untypedPtr(this: RawPtr): UntypedPtr = UntypedPtr(_ptr) - fun reallocPtr(this: @RawPtr, n: SizeType) - _ptr := reinterpretCast(@ValueType, realloc(this.bytePtr(), n * sizeOf(ValueType))) + fun reallocPtr(this: !RawPtr, n: SizeType) + _ptr := realloc(UntypedPtr(_ptr), n * sizeOf(ValueType)).asRefOf(ValueType) fun freePtr(this: RawPtr) if ( this.isSet ) - free(this.bytePtr) + free(UntypedPtr(_ptr)) - fun swap(this: @RawPtr, other: typeOf(this)) - var t: @ValueType = _ptr + fun swap(this: !RawPtr, other: !typeOf(this)) + let t: @ValueType = _ptr _ptr := other._ptr other._ptr := t - fun >>(this: RawPtr, os: @OutStream) - os << "RawPtr(" << mkStreamRefWrapper(this.bytePtr) << ")" + fun >>(this: RawPtr, os: !OutStream) + os << "RawPtr(" << UntypedPtr(_ptr) << ")" -fun mkRawPtr(ref: @AnyType) = RawPtr(-@typeOf(ref))(ref) -fun allocRawPtr(t: Type, num: SizeType) = RawPtr(t)(reinterpretCast(@t, malloc(num * sizeOf(t)))) +fun mkRawPtr(ref: !AnyType) = RawPtr(-@typeOf(ref))(ref) +fun allocRawPtr(t: Type, num: SizeType) = RawPtr(t)(reinterpretCast(@t, malloc(num * sizeOf(t)).data)) diff --git a/SparrowImplicitLib/std/scopedPtr.spr b/SparrowImplicitLib/std/scopedPtr.spr index 8be7412f..c853f10e 100644 --- a/SparrowImplicitLib/std/scopedPtr.spr +++ b/SparrowImplicitLib/std/scopedPtr.spr @@ -9,18 +9,18 @@ datatype ScopedPtr(type: Type) _ref: @ValueType [protected] - fun dtor(this: @ScopedPtr) + fun dtor(this: !ScopedPtr) delete(_ref) fun get(this: ScopedPtr): @ValueType = _ref fun isNull(this: ScopedPtr) = _ref === null fun isSet(this: ScopedPtr) = _ref !== null - fun reset(this: @ScopedPtr) { delete(_ref); _ref := null } - fun reset(this: @ScopedPtr, ref: @this.ValueType) { delete(this._ref); this._ref := ref } + fun reset(this: !ScopedPtr) { delete(_ref); _ref := null } + fun reset(this: !ScopedPtr, ref: !this.ValueType) { delete(this._ref); this._ref := ref } - fun swap(this: @ScopedPtr, other: typeOf(this)) - var tmp: @ValueType = other._ref + fun swap(this: !ScopedPtr, other: !typeOf(this)) + let tmp: @ValueType = other._ref other._ref := _ref _ref := tmp diff --git a/SparrowImplicitLib/std/set.spr b/SparrowImplicitLib/std/set.spr index 5cacbb71..6230b50d 100644 --- a/SparrowImplicitLib/std/set.spr +++ b/SparrowImplicitLib/std/set.spr @@ -12,43 +12,42 @@ datatype Set(keyType: Type, traitsType: Type = DefaultTypeTraits) _hashTable: _ImplTable -fun ctor(this: @Set, n: SizeType) { _hashTable.ctor(n, TraitsType()) } -fun ctor(this: @Set, n: SizeType, traits: this.TraitsType) { _hashTable.ctor(n, traits) } -fun ctor(this: @Set, range: Range) { _hashTable.ctor(range, 0, TraitsType()) } -fun ctor(this: @Set, range: Range, n: SizeType) { _hashTable.ctor(range, n, HashType(), CompareType()) } -fun ctor(this: @Set, range: Range, n: SizeType, traits: this.TraitsType){ _hashTable.ctor(range, n, traits) } -//fun ctor(this, other: @Set) { this._hashTable ctor other._hashTable } +fun ctor(this: !Set, n: SizeType) { _hashTable.ctor(n, TraitsType()) } +fun ctor(this: !Set, n: SizeType, traits: this.TraitsType) { _hashTable.ctor(n, traits) } +fun ctor(this: !Set, range: Range) { _hashTable.ctor(range, 0, TraitsType()) } +fun ctor(this: !Set, range: Range, n: SizeType) { _hashTable.ctor(range, n, HashType(), CompareType()) } +fun ctor(this: !Set, range: Range, n: SizeType, traits: this.TraitsType){ _hashTable.ctor(range, n, traits) } [protected] - fun traits(this: @Set) = _hashTable.traits + fun traits(this: Set) = _hashTable.traits - fun size(this: @Set) = _hashTable.size - fun isEmpty(this: @Set) = (_hashTable.size == 0) - fun bucketCount(this: @Set) = _hashTable.bucketCount - fun reserve(this: @Set, n: SizeType) { _hashTable.reserve(n); } + fun size(this: Set) = _hashTable.size + fun isEmpty(this: Set) = (_hashTable.size == 0) + fun bucketCount(this: Set) = _hashTable.bucketCount + fun reserve(this: !Set, n: SizeType) { _hashTable.reserve(n); } - fun all(this: @Set) = _hashTable.all + fun all(this: Set) = _hashTable.all - fun insert(this: @Set, value: @this.ValueType) = _hashTable.insert(value) - fun insert(this: @Set, range: Range) { _hashTable.insert(range); } - fun remove(this: @Set, key: @this.KeyType) { _hashTable.remove(key); } - fun remove(this: @Set, range: this.RangeType) { _hashTable.remove(range); } + fun insert(this: !Set, value: this.ValueType) = _hashTable.insert(value) + fun insert(this: !Set, range: Range) { _hashTable.insert(range); } + fun remove(this: !Set, key: this.KeyType) { _hashTable.remove(key); } + fun remove(this: !Set, range: this.RangeType) { _hashTable.remove(range); } - fun +=(this: @Set, value: @this.ValueType) { _hashTable.insert(value) } - fun +=(this: @Set, range: Range) { _hashTable.insert(range) } - fun -=(this: @Set, key: @this.KeyType) { _hashTable.remove(key) } - fun -=(this: @Set, range: this.RangeType) { _hashTable.remove(range) } + fun +=(this: !Set, value: this.ValueType) { _hashTable.insert(value) } + fun +=(this: !Set, range: Range) { _hashTable.insert(range) } + fun -=(this: !Set, key: this.KeyType) { _hashTable.remove(key) } + fun -=(this: !Set, range: this.RangeType) { _hashTable.remove(range) } - fun contains(this: @Set, key: @this.KeyType) = _hashTable.contains(key) - fun count(this: @Set, key: @this.KeyType) = _hashTable.count(key) - fun equalRange(this: @Set, key: @this.KeyType) = _hashTable.equalRange(key) - fun find(this: @Set, key: @this.KeyType) = _hashTable.find(key) + fun contains(this: Set, key: this.KeyType) = _hashTable.contains(key) + fun count(this: Set, key: this.KeyType) = _hashTable.count(key) + fun equalRange(this: Set, key: this.KeyType) = _hashTable.equalRange(key) + fun find(this: Set, key: this.KeyType) = _hashTable.find(key) - fun clear(this: @Set) { _hashTable.clear } + fun clear(this: !Set) { _hashTable.clear } - fun swap(this: @Set, other: typeOf(this)) { this._hashTable swap other._hashTable } + fun swap(this: !Set, other: !typeOf(this)) { this._hashTable swap other._hashTable } - fun >>(this: @Set, os: @OutStream) { _hashTable.>>(os) } + fun >>(this: Set, os: !OutStream) { _hashTable.>>(os) } datatype _Identity(type: Type) using ValueType = type diff --git a/SparrowImplicitLib/std/sharedPtr.spr b/SparrowImplicitLib/std/sharedPtr.spr index 7683d43c..439639e4 100644 --- a/SparrowImplicitLib/std/sharedPtr.spr +++ b/SparrowImplicitLib/std/sharedPtr.spr @@ -11,60 +11,62 @@ datatype SharedPtr(type: Type) _count: @UInt [protected] - fun ctor(this: @SharedPtr) + fun ctor(this: !SharedPtr) _ref := null _count := null [convert] - fun ctor(this: @SharedPtr, value: @this.ValueType) + fun ctor(this: !SharedPtr, value: @this.ValueType) if ( value === null ) this._ref := null this._count := null else - var d: @_MyAllocData = new(_MyAllocData, value) + let d: @_MyAllocData = new(_MyAllocData, value) this._ref := d.data this._count := d._count - fun ctor(this, other: @SharedPtr) if typeOf(this) == typeOf(other) + fun ctor(this: !SharedPtr, other: typeOf(this)) _ref := other._ref _count := other._count if ( _count !== null ) ++_count - fun dtor(this: @SharedPtr) + fun dtor(this: !SharedPtr) if ( _count !== null && --_count == 0 ) _ref.dtor() delete(_count) - fun =(this, other: @SharedPtr) { other.swap(this) } - fun =(this: @SharedPtr, value: @this.ValueType) { this.reset(value) } - fun =(this: @SharedPtr, value: AnyType) if isValid(ValueType(value)) { this.reset(value) } + fun =(this: !SharedPtr, other: typeOf(this)) + var other2 = other + this swap other2 + fun =(this: !SharedPtr, value: @this.ValueType) { this.reset(value) } + fun =(this: !SharedPtr, value: @AnyType) if isValid(ValueType(value)) { this.reset(value) } - fun ==(this, other: @SharedPtr) = _ref === other._ref && _count === other._count + fun ==(this, other: SharedPtr) = _ref === other._ref && _count === other._count - fun .(this: @SharedPtr) = _ref - fun get(this: @SharedPtr): @ValueType = _ref + fun .(this: SharedPtr) = _ref + fun get(this: SharedPtr): @ValueType = _ref - fun isUnique(this: @SharedPtr) = _count !== null && _count == 1 - fun useCount(this: @SharedPtr): UInt = ife(_count !== null, UInt(_count), UInt(0)) + fun isUnique(this: SharedPtr) = _count !== null && _count == 1 + fun useCount(this: SharedPtr): UInt = ife(_count !== null, UInt(_count), UInt(0)) - fun isNull(this: @SharedPtr) = _ref === null - fun isSet(this: @SharedPtr) = _ref !== null + fun isNull(this: SharedPtr) = _ref === null + fun isSet(this: SharedPtr) = _ref !== null - fun reset(this: @SharedPtr) { this.dtor; this.ctor } - fun reset(this: @SharedPtr, value: @this.ValueType) { this.dtor; this ctor value } - fun release(this: @SharedPtr) { this.reset } + fun reset(this: !SharedPtr) { this.dtor; this.ctor } + fun reset(this: !SharedPtr, value: !this.ValueType) { this.dtor; this ctor value } + fun release(this: !SharedPtr) { this.reset } - fun swap(this: @SharedPtr, other: @SharedPtr) - var tmpr: @ValueType = other._ref + fun swap(this: !SharedPtr, other: !typeOf(this)) + let tmpr: @ValueType = other._ref other._ref := _ref _ref := tmpr - var tmpc: @UInt = other._count + let tmpc: @UInt = other._count other._count := _count _count := tmpc - fun >>(this: @SharedPtr, os: @OutStream) if isValid(os << #$ValueType) + fun >>(this: SharedPtr, os: !OutStream) if isValid(os << #$ValueType) if ( _count !== null ) os << "SharedPtr(" << _ref << ", " << _count << ")" else @@ -74,53 +76,53 @@ datatype _AllocData(type: Type) _count: UInt data: type -fun ctor(this: @_AllocData) +fun ctor(this: !_AllocData) _count ctor 1 data ctor -fun ctor(this: @_AllocData, arg1: @AnyType) +fun ctor(this: !_AllocData, arg1: AnyType) _count ctor 1 data ctor arg1 -fun ctor(this: @_AllocData, arg1, arg2: @AnyType) +fun ctor(this: !_AllocData, arg1, arg2: AnyType) _count ctor 1 data.ctor(arg1, arg2) -fun ctor(this: @_AllocData, arg1, arg2, arg3: @AnyType) +fun ctor(this: !_AllocData, arg1, arg2, arg3: AnyType) _count ctor 1 data.ctor(arg1, arg2, arg3) -fun ctor(this: @_AllocData, arg1, arg2, arg3, arg4: @AnyType) +fun ctor(this: !_AllocData, arg1, arg2, arg3, arg4: AnyType) _count ctor 1 data.ctor(arg1, arg2, arg3, arg4) fun mkShared(t: Type): SharedPtr(t) var res: SharedPtr(t) - var d: @_AllocData(t) = new(_AllocData(t)) + let d: @_AllocData(t) = new(_AllocData(t)) res._ref := d.data res._count := d._count return res -fun mkShared(t: Type, arg1: @AnyType): SharedPtr(t) if isValid((#$t).ctor(arg1)) +fun mkShared(t: Type, arg1: AnyType): SharedPtr(t) if isValid((#$t).ctor(arg1)) var res: SharedPtr(t) - var d: @_AllocData(t) = new(_AllocData(t), arg1) + let d: @_AllocData(t) = new(_AllocData(t), arg1) res._ref := d.data res._count := d._count return res -fun mkShared(t: Type, arg1, arg2: @AnyType): SharedPtr(t) if isValid((#$t).ctor(arg1, arg2)) +fun mkShared(t: Type, arg1, arg2: AnyType): SharedPtr(t) if isValid((#$t).ctor(arg1, arg2)) var res: SharedPtr(t) - var d: @_AllocData(t) = new(_AllocData(t), arg1, arg2) + let d: @_AllocData(t) = new(_AllocData(t), arg1, arg2) res._ref := d.data res._count := d._count return res -fun mkShared(t: Type, arg1, arg2, arg3: @AnyType): SharedPtr(t) if isValid((#$t).ctor(arg1, arg2, arg3)) +fun mkShared(t: Type, arg1, arg2, arg3: AnyType): SharedPtr(t) if isValid((#$t).ctor(arg1, arg2, arg3)) var res: SharedPtr(t) - var d: @_AllocData(t) = new(_AllocData(t), arg1, arg2, arg3) + let d: @_AllocData(t) = new(_AllocData(t), arg1, arg2, arg3) res._ref := d.data res._count := d._count return res -fun mkShared(t: Type, arg1, arg2, arg3, arg4: @AnyType): SharedPtr(t) if isValid((#$t).ctor(arg1, arg2, arg3, arg4)) +fun mkShared(t: Type, arg1, arg2, arg3, arg4: AnyType): SharedPtr(t) if isValid((#$t).ctor(arg1, arg2, arg3, arg4)) var res: SharedPtr(t) - var d: @_AllocData(t) = new(_AllocData(t), arg1, arg2, arg3, arg4) + let d: @_AllocData(t) = new(_AllocData(t), arg1, arg2, arg3, arg4) res._ref := d.data res._count := d._count return res diff --git a/SparrowImplicitLib/std/sortedMap.spr b/SparrowImplicitLib/std/sortedMap.spr index 30029cd8..8be375fd 100644 --- a/SparrowImplicitLib/std/sortedMap.spr +++ b/SparrowImplicitLib/std/sortedMap.spr @@ -1,4 +1,4 @@ -module std.sortedMap +module std.sortedPtr import sortedTable(SortedTable) import tuple(Tuple, PairFirst, PairSecond) @@ -17,47 +17,47 @@ datatype SortedMap(keyType, dataType, lessType, compareType: Type) _sortedTable: _ImplTable [protected] - fun ctor(this: @SortedMap, n: SizeType) { _sortedTable.ctor(n, LessType(), CompareType()); } - fun ctor(this: @SortedMap, n: SizeType, less: this.LessType) { _sortedTable.ctor(n, less, CompareType()); } - fun ctor(this: @SortedMap, n: SizeType, less: this.LessType, comp: this.CompareType) { _sortedTable.ctor(n, less, comp); } - fun ctor(this: @SortedMap, range: Range) { _sortedTable.ctor(range, 0, LessType(), CompareType()); } - fun ctor(this: @SortedMap, range: Range, n: SizeType) { _sortedTable.ctor(range, n, LessType(), CompareType()); } - fun ctor(this: @SortedMap, range: Range, n: SizeType, less: this.LessType) { _sortedTable.ctor(range, n, less, CompareType()); } - fun ctor(this: @SortedMap, range: Range, n: SizeType, less: this.LessType, comp: this.CompareType) { _sortedTable.ctor(range, n, less, comp); } - fun ctor(this, other: @SortedMap) { this._sortedTable ctor other._sortedTable; } - - fun lessFunction(this: @SortedMap) = _sortedTable.lessFunction - fun comparator(this: @SortedMap) = _sortedTable.comparator - - fun size(this: @SortedMap) = _sortedTable.size() - fun isEmpty(this: @SortedMap) = _sortedTable.isEmpty() - fun capacity(this: @SortedMap) = _sortedTable.capacity - fun reserve(this: @SortedMap, n: SizeType) { _sortedTable.reserve(n); } - - fun all(this: @SortedMap) = _sortedTable.all - fun keys(this: @SortedMap) = transform(_sortedTable.all, PairFirst(ValueType)()) - fun values(this: @SortedMap) = transform(_sortedTable.all, PairSecond(ValueType)()) - - fun insert(this: @SortedMap, key: @this.KeyType, data: @this.DataType) = _sortedTable.insert(ValueType(key, data)) - fun insert(this: @SortedMap, value: @this.ValueType) = _sortedTable.insert(value) - fun insert(this: @SortedMap, range: Range) { _sortedTable.insert(range); } - fun remove(this: @SortedMap, key: @this.KeyType) { _sortedTable.remove(key); } - fun remove(this: @SortedMap, range: this.RangeType) { _sortedTable.remove(range); } - - fun contains(this: @SortedMap, key: @this.KeyType) = _sortedTable.contains(key) - fun count(this: @SortedMap, key: @this.KeyType) = _sortedTable.count(key) - fun equalRange(this: @SortedMap, key: @this.KeyType) = _sortedTable.equalRange(key) - fun find(this: @SortedMap, key: @this.KeyType) = _sortedTable.find(key) - - fun ()(this: @SortedMap, key: @this.KeyType): @DataType = this.at(key) - fun at(this: @SortedMap, key: @this.KeyType): @DataType + fun ctor(this: !SortedMap, n: SizeType) { _sortedTable.ctor(n, LessType(), CompareType()); } + fun ctor(this: !SortedMap, n: SizeType, less: this.LessType) { _sortedTable.ctor(n, less, CompareType()); } + fun ctor(this: !SortedMap, n: SizeType, less: this.LessType, comp: this.CompareType) { _sortedTable.ctor(n, less, comp); } + fun ctor(this: !SortedMap, range: Range) { _sortedTable.ctor(range, 0, LessType(), CompareType()); } + fun ctor(this: !SortedMap, range: Range, n: SizeType) { _sortedTable.ctor(range, n, LessType(), CompareType()); } + fun ctor(this: !SortedMap, range: Range, n: SizeType, less: this.LessType) { _sortedTable.ctor(range, n, less, CompareType()); } + fun ctor(this: !SortedMap, range: Range, n: SizeType, less: this.LessType, comp: this.CompareType) { _sortedTable.ctor(range, n, less, comp); } + fun ctor(this: !SortedMap, other: typeOf(this)) { this._sortedTable ctor other._sortedTable; } + + fun lessFunction(this: SortedMap) = _sortedTable.lessFunction + fun comparator(this: SortedMap) = _sortedTable.comparator + + fun size(this: SortedMap) = _sortedTable.size() + fun isEmpty(this: SortedMap) = _sortedTable.isEmpty() + fun capacity(this: SortedMap) = _sortedTable.capacity + fun reserve(this: !SortedMap, n: SizeType) { _sortedTable.reserve(n); } + + fun all(this: SortedMap) = _sortedTable.all + fun keys(this: SortedMap) = transform(_sortedTable.all, PairFirst(ValueType)()) + fun values(this: SortedMap) = transform(_sortedTable.all, PairSecond(ValueType)()) + + fun insert(this: !SortedMap, key: this.KeyType, data: this.DataType) = _sortedTable.insert(ValueType(key, data)) + fun insert(this: !SortedMap, value: this.ValueType) = _sortedTable.insert(value) + fun insert(this: !SortedMap, range: Range) { _sortedTable.insert(range); } + fun remove(this: !SortedMap, key: this.KeyType) { _sortedTable.remove(key); } + fun remove(this: !SortedMap, range: this.RangeType) { _sortedTable.remove(range); } + + fun contains(this: SortedMap, key: this.KeyType) = _sortedTable.contains(key) + fun count(this: SortedMap, key: this.KeyType) = _sortedTable.count(key) + fun equalRange(this: SortedMap, key: this.KeyType) = _sortedTable.equalRange(key) + fun find(this: SortedMap, key: this.KeyType) = _sortedTable.find(key) + + fun ()(this: !SortedMap, key: this.KeyType): @DataType = this.at(key) + fun at(this: !SortedMap, key: this.KeyType): @DataType var r = _sortedTable.lowerBound(key) if ( r.isEmpty() || !_sortedTable.comparator()(key, r.front().v1) ) - var data: DataType + let data: DataType r = _sortedTable.insert(ValueType(key, data)) return r.front().v2; - fun clear(this: @SortedMap) { _sortedTable.clear(); } + fun clear(this: !SortedMap) { _sortedTable.clear(); } - fun swap(this: @SortedMap, other: typeOf(this)) { this._sortedTable swap other._sortedTable; } + fun swap(this: !SortedMap, other: !typeOf(this)) { this._sortedTable swap other._sortedTable; } diff --git a/SparrowImplicitLib/std/sortedSet.spr b/SparrowImplicitLib/std/sortedSet.spr index 943e633e..c8a5dcab 100644 --- a/SparrowImplicitLib/std/sortedSet.spr +++ b/SparrowImplicitLib/std/sortedSet.spr @@ -13,40 +13,40 @@ datatype SortedSet(keyType, lessType, compareType: Type) _sortedTable: _ImplTable [protected] - fun ctor(this: @SortedSet, n: SizeType) { _sortedTable.ctor(n, LessType(), CompareType()) } - fun ctor(this: @SortedSet, n: SizeType, less: this.LessType) { _sortedTable.ctor(n, less, CompareType()) } - fun ctor(this: @SortedSet, n: SizeType, less: this.LessType, comp: this.CompareType) { _sortedTable.ctor(n, less, comp) } - fun ctor(this: @SortedSet, range: Range) { _sortedTable.ctor(range, 0, LessType(), CompareType()) } - fun ctor(this: @SortedSet, range: Range, n: SizeType) { _sortedTable.ctor(range, n, LessType(), CompareType()) } - fun ctor(this: @SortedSet, range: Range, n: SizeType, less: this.LessType) { _sortedTable.ctor(range, n, less, CompareType()) } - fun ctor(this: @SortedSet, range: Range, n: SizeType, less: this.LessType, comp: this.CompareType) { _sortedTable.ctor(range, n, less, comp) } - fun ctor(this, other: @SortedSet) { this._sortedTable ctor other._sortedTable } - - fun lessFunction(this: @SortedSet) = _sortedTable.lessFunction - fun comparator(this: @SortedSet) = _sortedTable.comparator - - fun size(this: @SortedSet) = _sortedTable.size - fun isEmpty(this: @SortedSet) = _sortedTable.isEmpty - fun capacity(this: @SortedSet) = _sortedTable.capacity - fun reserve(this: @SortedSet, n: SizeType) { _sortedTable.reserve(n) } - - fun all(this: @SortedSet) = _sortedTable.all - - fun insert(this: @SortedSet, value: @this.ValueType) = _sortedTable.insert(value) - fun insert(this: @SortedSet, range: Range) { _sortedTable.insert(range) } - fun remove(this: @SortedSet, key: @this.KeyType) { _sortedTable.remove(key) } - fun remove(this: @SortedSet, range: this.RangeType) { _sortedTable.remove(range) } - - fun contains(this: @SortedSet, key: @this.KeyType) = _sortedTable.contains(key) - fun count(this: @SortedSet, key: @this.KeyType) = _sortedTable.count(key) - fun equalRange(this: @SortedSet, key: @this.KeyType) = _sortedTable.equalRange(key) - fun lowerBound(this: @SortedSet, key: @this.KeyType) = _sortedTable.lowerBound(key) - fun upperBound(this: @SortedSet, key: @this.KeyType) = _sortedTable.upperBound(key) - fun find(this: @SortedSet, key: @this.KeyType) = _sortedTable.find(key) - - fun clear(this: @SortedSet) { _sortedTable.clear } - - fun swap(this: @SortedSet, other: typeOf(this)) { this._sortedTable swap other._sortedTable } + fun ctor(this: !SortedSet, n: SizeType) { _sortedTable.ctor(n, LessType(), CompareType()) } + fun ctor(this: !SortedSet, n: SizeType, less: this.LessType) { _sortedTable.ctor(n, less, CompareType()) } + fun ctor(this: !SortedSet, n: SizeType, less: this.LessType, comp: this.CompareType) { _sortedTable.ctor(n, less, comp) } + fun ctor(this: !SortedSet, range: Range) { _sortedTable.ctor(range, 0, LessType(), CompareType()) } + fun ctor(this: !SortedSet, range: Range, n: SizeType) { _sortedTable.ctor(range, n, LessType(), CompareType()) } + fun ctor(this: !SortedSet, range: Range, n: SizeType, less: this.LessType) { _sortedTable.ctor(range, n, less, CompareType()) } + fun ctor(this: !SortedSet, range: Range, n: SizeType, less: this.LessType, comp: this.CompareType) { _sortedTable.ctor(range, n, less, comp) } + fun ctor(this: !SortedSet, other: SortedSet) { this._sortedTable ctor other._sortedTable } + + fun lessFunction(this: SortedSet) = _sortedTable.lessFunction + fun comparator(this: SortedSet) = _sortedTable.comparator + + fun size(this: SortedSet) = _sortedTable.size + fun isEmpty(this: SortedSet) = _sortedTable.isEmpty + fun capacity(this: SortedSet) = _sortedTable.capacity + fun reserve(this: !SortedSet, n: SizeType) { _sortedTable.reserve(n) } + + fun all(this: SortedSet) = _sortedTable.all + + fun insert(this: !SortedSet, value: this.ValueType) = _sortedTable.insert(value) + fun insert(this: !SortedSet, range: Range) { _sortedTable.insert(range) } + fun remove(this: !SortedSet, key: this.KeyType) { _sortedTable.remove(key) } + fun remove(this: !SortedSet, range: this.RangeType) { _sortedTable.remove(range) } + + fun contains(this: SortedSet, key: this.KeyType) = _sortedTable.contains(key) + fun count(this: SortedSet, key: this.KeyType) = _sortedTable.count(key) + fun equalRange(this: SortedSet, key: this.KeyType) = _sortedTable.equalRange(key) + fun lowerBound(this: SortedSet, key: this.KeyType) = _sortedTable.lowerBound(key) + fun upperBound(this: SortedSet, key: this.KeyType) = _sortedTable.upperBound(key) + fun find(this: SortedSet, key: this.KeyType) = _sortedTable.find(key) + + fun clear(this: !SortedSet) { _sortedTable.clear } + + fun swap(this: !SortedSet, other: !typeOf(this)) { this._sortedTable swap other._sortedTable } datatype _Identity(type: Type) using ValueType = type diff --git a/SparrowImplicitLib/std/sortedTable.spr b/SparrowImplicitLib/std/sortedTable.spr index 318e5a7d..805cb813 100644 --- a/SparrowImplicitLib/std/sortedTable.spr +++ b/SparrowImplicitLib/std/sortedTable.spr @@ -17,10 +17,10 @@ datatype SortedTable(keyType, valueType, valueToKeyType, lessType, compareType: _comp: CompareType [protected] - fun ctor(this: @SortedTable) + fun ctor(this: !SortedTable) this.ctor(0, LessType(), CompareType()) - fun ctor(this: @SortedTable, n: SizeType, less: this.LessType, comp: this.CompareType) + fun ctor(this: !SortedTable, n: SizeType, less: this.LessType, comp: this.CompareType) this._table ctor this._valToKey ctor this._less ctor less @@ -28,7 +28,7 @@ datatype SortedTable(keyType, valueType, valueToKeyType, lessType, compareType: if n > 0 this.reserve(n) - fun ctor(this: @SortedTable, range: Range, n: SizeType, less: this.LessType, comp: this.CompareType) + fun ctor(this: !SortedTable, range: Range, n: SizeType, less: this.LessType, comp: this.CompareType) this._table ctor if n > 0 _table.reserve(n) @@ -43,12 +43,12 @@ datatype SortedTable(keyType, valueType, valueToKeyType, lessType, compareType: for v = range this.insert(v) - fun ctor(this, other: @SortedTable) + fun ctor(this: !SortedTable, other: typeOf(this)) _table ctor other._table _less ctor other._less _comp ctor other._comp - fun =(this, other: @SortedTable): @typeOf(this) + fun =(this: !SortedTable, other: typeOf(this)): @typeOf(this) _table = other._table _valToKey = other._valToKey _comp = other._comp @@ -57,76 +57,76 @@ datatype SortedTable(keyType, valueType, valueToKeyType, lessType, compareType: return this - fun ==(this, other: @SortedTable): Bool + fun ==(this, other: SortedTable): Bool return _valToKey == other._valToKey && _less == other._less && _comp == other._comp && _table == other._table - fun !=(this, other: @SortedTable): Bool = !(this == other) + fun !=(this, other: SortedTable): Bool = !(this == other) - fun swap(this: @SortedTable, other: typeOf(this)) + fun swap(this: !SortedTable, other: !typeOf(this)) _table.swap(other._table) - var tmpv = _valToKey + let tmpv = _valToKey _valToKey = other._valToKey other._valToKey = tmpv - var tmpl = _less + let tmpl = _less _less = other._less other._less = tmpl - var tmpc = _comp + let tmpc = _comp _comp = other._comp other._comp = tmpc - fun lessFunction(this: @SortedTable) = _less - fun comparator(this: @SortedTable) = _comp + fun lessFunction(this: SortedTable) = _less + fun comparator(this: SortedTable) = _comp - fun isEmpty(this: @SortedTable) = _table.isEmpty - fun size(this: @SortedTable) = _table.size - fun capacity(this: @SortedTable) = _table.capacity + fun isEmpty(this: SortedTable) = _table.isEmpty + fun size(this: SortedTable) = _table.size + fun capacity(this: SortedTable) = _table.capacity - fun all(this: @SortedTable) = _table.all + fun all(this: SortedTable) = _table.all - fun reserve(this: @SortedTable, n: SizeType) + fun reserve(this: !SortedTable, n: SizeType) _table.reserve(n) - fun insert(this: @SortedTable, value: @this.ValueType): RangeType - var r = this.lowerBound(_valToKey(value)) - var idx = _table.size - r.size + fun insert(this: !SortedTable, value: this.ValueType): RangeType + let r = this.lowerBound(_valToKey(value)) + let idx = _table.size - r.size if r.isEmpty || !_comp(_valToKey(value), _valToKey(r.front)) _table.insertBefore(value, r) var res = _table.all res.popFront(idx) return res - fun insert(this: @SortedTable, range: Range) + fun insert(this: !SortedTable, range: Range) _table.reserve(_table.size + rangeSize(range)) for v = range - var r = this.lowerBound(_valToKey(v)) + let r = this.lowerBound(_valToKey(v)) if r.isEmpty || !_comp(_valToKey(v), _valToKey(r.front)) _table.insertBefore(v, r) - fun remove(this: @SortedTable, key: @this.KeyType) + fun remove(this: !SortedTable, key: this.KeyType) if this.isEmpty return - var r = this.find(key) + let r = this.find(key) if !r.isEmpty - var idx = r.frontPtr().diff(_table.all().frontPtr) + let idx = r.frontPtr().diff(_table.all().frontPtr) _table.remove(idx) - fun remove(this: @SortedTable, range: this.RangeType) + fun remove(this: !SortedTable, range: this.RangeType) if !range.isEmpty _table.remove(range) - fun contains(this: @SortedTable, key: @this.KeyType): Bool = !this.find(key).isEmpty - fun count(this: @SortedTable, key: @this.KeyType): SizeType = ife(this.find(key).isEmpty, 0, 1) + fun contains(this: SortedTable, key: this.KeyType): Bool = !this.find(key).isEmpty + fun count(this: SortedTable, key: this.KeyType): SizeType = ife(this.find(key).isEmpty, 0, 1) - fun lowerBound(this: @SortedTable, key: @this.KeyType): RangeType + fun lowerBound(this: SortedTable, key: this.KeyType): RangeType var first: SizeType = 0 var len = _table.size while len > 0 - var l2 = len / 2 - var el: @ValueType = _table(first + l2) + let l2 = len / 2 + let el: @ValueType = _table(first + l2) if _less(_valToKey(el), key) first += l2+1 len -= l2+1 @@ -136,12 +136,12 @@ datatype SortedTable(keyType, valueType, valueToKeyType, lessType, compareType: r.popFront(first) return r - fun upperBound(this: @SortedTable, key: @this.KeyType): RangeType + fun upperBound(this: SortedTable, key: this.KeyType): RangeType var first: SizeType = 0 var len = _table.size while len > 0 - var l2 = len / 2 - var el: @ValueType = _table(first + l2) + let l2 = len / 2 + let el: @ValueType = _table(first + l2) if _less(key, _valToKey(el)) len = l2 else @@ -151,25 +151,25 @@ datatype SortedTable(keyType, valueType, valueToKeyType, lessType, compareType: r.popFront(first) return r - fun equalRange(this: @SortedTable, key: @this.KeyType): RangeType - var r = this.find(key) + fun equalRange(this: SortedTable, key: this.KeyType): RangeType + let r = this.find(key) if !r.isEmpty return RangeType(r.frontPtr, r.frontPtr().advance(1)) else return RangeType() - fun find(this: @SortedTable, key: @this.KeyType): RangeType - var r = this.lowerBound(key) + fun find(this: SortedTable, key: this.KeyType): RangeType + let r = this.lowerBound(key) if !r.isEmpty && _comp(key, _valToKey(r.front)) return r else return RangeType() - fun clear(this: @SortedTable) + fun clear(this: !SortedTable) _table.clear datatype Less(type: Type) if isValid(#$type < #$type) using ValueType = type [protected] - fun ()(this: Less, l, r: @this.ValueType) = l < r + fun ()(this: Less, l, r: this.ValueType) = l < r diff --git a/SparrowImplicitLib/std/staticArray.spr b/SparrowImplicitLib/std/staticArray.spr index 3a13e06a..2c312fb0 100644 --- a/SparrowImplicitLib/std/staticArray.spr +++ b/SparrowImplicitLib/std/staticArray.spr @@ -13,51 +13,52 @@ datatype StaticArray(valueType: Type, arraySize: SizeType ct) _buf: static_buffer(arraySize * sizeOf(ValueType)) [protected] - fun ctor(this: @StaticArray) + fun ctor(this: !StaticArray) for v: @ValueType = this.all v ctor - fun ctor(this, other: @StaticArray) + fun ctor(this: !StaticArray, other: typeOf(this)) for i = 0.._arraySize this(i) ctor other(i) - fun ctor(this: @StaticArray, value: @this.ValueType) + fun ctor(this: !StaticArray, value: this.ValueType) for v: @ValueType = this.all v.ctor(value) - fun ctor(this: @StaticArray, range: Range) + fun ctor(this: !StaticArray, range: Range) + var rc = range for v: @ValueType = this.all - if !range.isEmpty - v.ctor(range.front) - range.popFront + if !rc.isEmpty + v.ctor(rc.front) + rc.popFront else v ctor - fun ctor(this: @StaticArray, v0,v1: @this.ValueType) if this._arraySize == 2 + fun ctor(this: !StaticArray, v0,v1: this.ValueType) if this._arraySize == 2 this(0) ctor v0 this(1) ctor v1 - fun ctor(this: @StaticArray, v0,v1,v2: @this.ValueType) if this._arraySize == 3 + fun ctor(this: !StaticArray, v0,v1,v2: this.ValueType) if this._arraySize == 3 this(0) ctor v0 this(1) ctor v1 this(2) ctor v2 - fun ctor(this: @StaticArray, v0,v1,v2,v3: @this.ValueType) if this._arraySize == 4 + fun ctor(this: !StaticArray, v0,v1,v2,v3: this.ValueType) if this._arraySize == 4 this(0) ctor v0 this(1) ctor v1 this(2) ctor v2 this(3) ctor v3 - fun ctor(this: @StaticArray, v0,v1,v2,v3,v4: @this.ValueType) if this._arraySize == 5 + fun ctor(this: !StaticArray, v0,v1,v2,v3,v4: this.ValueType) if this._arraySize == 5 this(0) ctor v0 this(1) ctor v1 this(2) ctor v2 this(3) ctor v3 this(4) ctor v4 - fun ctor(this: @StaticArray, v0,v1,v2,v3,v4,v5: @this.ValueType) if this._arraySize == 6 + fun ctor(this: !StaticArray, v0,v1,v2,v3,v4,v5: this.ValueType) if this._arraySize == 6 this(0) ctor v0 this(1) ctor v1 this(2) ctor v2 this(3) ctor v3 this(4) ctor v4 this(5) ctor v5 - fun ctor(this: @StaticArray, v0,v1,v2,v3,v4,v5,v6: @this.ValueType) if this._arraySize == 7 + fun ctor(this: !StaticArray, v0,v1,v2,v3,v4,v5,v6: this.ValueType) if this._arraySize == 7 this(0) ctor v0 this(1) ctor v1 this(2) ctor v2 @@ -65,7 +66,7 @@ datatype StaticArray(valueType: Type, arraySize: SizeType ct) this(4) ctor v4 this(5) ctor v5 this(6) ctor v6 - fun ctor(this: @StaticArray, v0,v1,v2,v3,v4,v5,v6,v7: @this.ValueType) if this._arraySize == 8 + fun ctor(this: !StaticArray, v0,v1,v2,v3,v4,v5,v6,v7: this.ValueType) if this._arraySize == 8 this(0) ctor v0 this(1) ctor v1 this(2) ctor v2 @@ -74,7 +75,7 @@ datatype StaticArray(valueType: Type, arraySize: SizeType ct) this(5) ctor v5 this(6) ctor v6 this(7) ctor v7 - fun ctor(this: @StaticArray, v0,v1,v2,v3,v4,v5,v6,v7,v8: @this.ValueType) if this._arraySize == 9 + fun ctor(this: !StaticArray, v0,v1,v2,v3,v4,v5,v6,v7,v8: this.ValueType) if this._arraySize == 9 this(0) ctor v0 this(1) ctor v1 this(2) ctor v2 @@ -84,7 +85,7 @@ datatype StaticArray(valueType: Type, arraySize: SizeType ct) this(6) ctor v6 this(7) ctor v7 this(8) ctor v8 - fun ctor(this: @StaticArray, v0,v1,v2,v3,v4,v5,v6,v7,v8,v9: @this.ValueType) if this._arraySize == 10 + fun ctor(this: !StaticArray, v0,v1,v2,v3,v4,v5,v6,v7,v8,v9: this.ValueType) if this._arraySize == 10 this(0) ctor v0 this(1) ctor v1 this(2) ctor v2 @@ -96,28 +97,28 @@ datatype StaticArray(valueType: Type, arraySize: SizeType ct) this(8) ctor v8 this(9) ctor v9 - fun dtor(this: @StaticArray) + fun dtor(this: !StaticArray) for v: @ValueType = this.all v dtor - fun =(this, other: @StaticArray): @typeOf(this) + fun =(this: !StaticArray, other: typeOf(this)): @typeOf(this) for i = 0.._arraySize this(i) = other(i) return this - fun ==(this, other: @StaticArray): Bool + fun ==(this, other: StaticArray): Bool for i = 0.._arraySize if this(i) != other(i) return false return true - fun size(this: @StaticArray): SizeType + fun size(this: StaticArray): SizeType return _arraySize - fun isEmpty(this: @StaticArray): Bool + fun isEmpty(this: StaticArray): Bool return _arraySize == 0 - fun assign(this: @StaticArray, range: this.RangeType) + fun assign(this: !StaticArray, range: this.RangeType) for v: @ValueType = this.all if !range.isEmpty v = range.front @@ -125,21 +126,21 @@ datatype StaticArray(valueType: Type, arraySize: SizeType ct) else return - fun swap(this: @StaticArray, other: typeOf(StaticArray)) + fun swap(this: !StaticArray, other: !typeOf(StaticArray)) for i = 0.._arraySize - var tmp = this(i) + let tmp = this(i) this(i) = other(i) other(i) = tmp - fun at(this: @StaticArray, index: SizeType): @ValueType = this._asPtr().advance(DiffType(index)).value - fun ()(this: @StaticArray, index: SizeType): @ValueType = this._asPtr().advance(DiffType(index)).value + fun at(this: StaticArray, index: SizeType): @ValueType = this._asPtr().advance(DiffType(index)).value + fun ()(this: StaticArray, index: SizeType): @ValueType = this._asPtr().advance(DiffType(index)).value - fun all(this: @StaticArray) = RangeType(this._asPtr, this._asPtr().advance(DiffType(_arraySize))) + fun all(this: StaticArray) = RangeType(this._asPtr, this._asPtr().advance(DiffType(_arraySize))) - fun subrange(this: @StaticArray, index: SizeType, num: SizeType) \ + fun subrange(this: StaticArray, index: SizeType, num: SizeType) \ = RangeType(this._asPtr().advance(DiffType(index)), this._asPtr().advance(DiffType(index + num))) - fun _asPtr(this: @StaticArray) = RawPtr(ValueType)(reinterpretCast(@Byte, _buf)) + fun _asPtr(this: StaticArray) = RawPtr(ValueType)(UntypedPtr(_buf)) fun mkValues(v0,v1: AnyType) = StaticArray(typeOf(v0), 2)(v0,v1) fun mkValues(v0,v1,v2: AnyType) = StaticArray(typeOf(v0), 3)(v0,v1,v2) diff --git a/SparrowImplicitLib/std/string.spr b/SparrowImplicitLib/std/string.spr index 99e0fb58..aafee197 100644 --- a/SparrowImplicitLib/std/string.spr +++ b/SparrowImplicitLib/std/string.spr @@ -21,82 +21,83 @@ datatype String _begin, _end, _endOfStore: _PtrType -fun ctor(this: @String) +fun ctor(this: !String) _begin ctor _end ctor _endOfStore ctor -fun ctor(this: @String, size: SizeType) +fun ctor(this: !String, size: SizeType) _begin ctor allocRawPtr(Char, size+1) _end ctor _begin.advance(DiffType(size)) _endOfStore ctor _end _end.value = Char(0) -fun ctor(this: @String, count: SizeType, ch: Char) +fun ctor(this: !String, count: SizeType, ch: Char) this.ctor(count) - memset(_begin.bytePtr, reinterpretCast(@Byte, ch), count) -fun ctor(this, other: @String) - var size = other size + memset(_begin.untypedPtr, Byte(ch), count) +fun ctor(this: !String, other: String) + let size = other size this.ctor(size) - memcpy(_begin.bytePtr, other._begin.bytePtr, size) -[convert] fun ctor(this: @String, other: @StringRef) - var size = other size + memcpy(_begin.untypedPtr, other._begin.untypedPtr, size) +[convert] +fun ctor(this: !String, other: StringRef) + let size = other size this.ctor(size) - memcpy(_begin.bytePtr, other.begin, size) -fun ctor(this: @String, _begin, _end: RawPtr(Char)) - var size = _end.diff(_begin) + memcpy(_begin.untypedPtr, UntypedPtr(other.begin), size) +fun ctor(this: !String, _begin, _end: RawPtr(Char)) + let size = _end.diff(_begin) this.ctor(size) - memcpy(this._begin.bytePtr, _begin.bytePtr, size) -fun ctor(this: @String, range: Range) if typeOf(range) != String + memcpy(this._begin.untypedPtr, _begin.untypedPtr, size) +fun ctor(this: !String, range: Range) if typeOf(range) != String this.ctor(rangeSize(range)) var i=0 for ch = range _begin.advance(DiffType(i++)).value = ch [protected] - fun ctorFromCt(this: @String, src: String ct) + fun ctorFromCt(this: !String, src: String ct) this ctor src.asStringRef - fun dtor(this: @String) + fun dtor(this: !String) _begin.freePtr - fun =(this, other: @String): @String - var tmp = other + fun =(this: !String, other: String): @String + let tmp = other tmp.swap(this) return this - fun ==(this, other: @String): Bool + fun ==(this, other: String): Bool if this.size != other.size return false var i: SizeType = 0 - var s = this.size + let s = this.size while i < s ; i++ if this(i) != other(i) return false return true - fun !=(this, other: @String): Bool = !(this == other) + fun !=(this, other: String): Bool = !(this == other) - fun swap(this: @String, other: @String) + fun swap(this, other: !String) this._begin swap other._begin this._end swap other._end this._endOfStore swap other._endOfStore - fun asStringRef(this: @String) = StringRef(_begin.bytePtr, _end.bytePtr) + fun asStringRef(this: String) = StringRef(_begin.untypedPtr, _end.untypedPtr) - fun size(this: @String): SizeType = _end.diff(_begin) - fun isEmpty(this: @String) = _begin == _end - fun capacity(this: @String): SizeType = _endOfStore.diff(_begin) + fun size(this: String): SizeType = _end.diff(_begin) + fun isEmpty(this: String) = _begin == _end + fun capacity(this: String): SizeType = _endOfStore.diff(_begin) - fun at(this: @String, index: SizeType) = _begin.advance(DiffType(index)).value - fun ()(this: @String, index: SizeType) = _begin.advance(DiffType(index)).value - fun front(this: @String) = _begin.value - fun back(this: @String) = _end.advance(-1).value - fun all(this: @String) = StringRef(_begin.bytePtr, _end.bytePtr) - fun subrange(this: @String, index: SizeType, num: SizeType): StringRef \ - = StringRef(_begin.advance(DiffType(index)).bytePtr, _begin.advance(DiffType(index + num)).bytePtr) + fun at(this: String, index: SizeType) = _begin.advance(DiffType(index)).value + fun ()(this: String, index: SizeType) = _begin.advance(DiffType(index)).value + fun front(this: String) = _begin.value + fun back(this: String) = _end.advance(-1).value + fun all(this: String) = StringRef(_begin.untypedPtr, _end.untypedPtr) + fun subrange(this: String, index: SizeType, num: SizeType): StringRef \ + = StringRef(_begin.advance(DiffType(index)).untypedPtr, _begin.advance(DiffType(index + num)).untypedPtr) - fun pushBack(this: @String, value: Char) + fun pushBack(this: !String, value: Char) if _end == _endOfStore var t = 2 * this.capacity @@ -105,21 +106,21 @@ fun ctor(this: @String, range: Range) if typeOf(range) != String this.reserve(t) _end.value ctor value _end = _end.advance - fun +=(this: @String, value: Char) + fun +=(this: !String, value: Char) this.pushBack(value) - fun popBack(this: @String) + fun popBack(this: !String) _end = _end advance -1 _end.value dtor - fun resize(this: @String, n: SizeType) - var oldSize = this.size + fun resize(this: !String, n: SizeType) + let oldSize = this.size if n == oldSize return if n < oldSize - var newEnd = _begin.advance(DiffType(n)) + let newEnd = _begin.advance(DiffType(n)) while _end != newEnd _end = _end.advance(-1) @@ -127,14 +128,14 @@ fun ctor(this: @String, range: Range) if typeOf(range) != String else this.reserve(n) - var newEnd = _begin.advance(DiffType(n)) + let newEnd = _begin.advance(DiffType(n)) while _end != newEnd _end.value ctor _end = _end.advance - fun reserve(this: @String, n: SizeType) - var curCapacity = this.capacity + fun reserve(this: !String, n: SizeType) + let curCapacity = this.capacity if n <= curCapacity return @@ -144,17 +145,17 @@ fun ctor(this: @String, range: Range) if typeOf(range) != String if n <_growthFactor*curCapacity n = SizeType(_growthFactor*curCapacity) - var curSize = this.size + let curSize = this.size _begin.reallocPtr(n) _end = _begin.advance(DiffType(curSize)) _endOfStore = _begin.advance(DiffType(n)) - fun clear(this: @String) - this.remove(StringRef(_begin.bytePtr, _end.bytePtr)) + fun clear(this: !String) + this.remove(StringRef(_begin.untypedPtr, _end.untypedPtr)) - fun insertBefore(this: @String, value: Char, pos: StringRef) - var posCount = _frontPtr(pos).diff(_begin) + fun insertBefore(this: !String, value: Char, pos: StringRef) + let posCount = _frontPtr(pos).diff(_begin) this.reserve(this.size + 1) @@ -167,40 +168,41 @@ fun ctor(this: @String, range: Range) if typeOf(range) != String p.advance().value ctor value _end = _end.advance - fun insertBefore(this: @String, range: Range, pos: StringRef) - var n = range.size - var index = _frontPtr(pos).diff(_begin) + fun insertBefore(this: !String, range: Range, pos: StringRef) + var rc = range + let n = range.size + let index = _frontPtr(pos).diff(_begin) this.reserve(this.size + n) var p = _end.advance(-1) - var q = _begin.advance(index - DiffType(1)) + let q = _begin.advance(index - DiffType(1)) while p != q ; p = p.advance(-1) p.advance(DiffType(n)).value ctor p.value p.value dtor p = p.advance - while !range.isEmpty - p.value ctor range.front + while !rc.isEmpty + p.value ctor rc.front p = p.advance - range.popFront + rc.popFront _end = _end.advance(DiffType(n)) - fun insertAfter(this: @String, value: Char, pos: StringRef) - this.insertBefore(value, StringRef(_backPtr(pos).bytePtr, _end.bytePtr)) + fun insertAfter(this: !String, value: Char, pos: StringRef) + this.insertBefore(value, StringRef(_backPtr(pos).untypedPtr, _end.untypedPtr)) - fun insertAfter(this: @String, range: Range, pos: StringRef) - this.insertBefore(range, StringRef(_backPtr(pos).bytePtr, _end.bytePtr)) + fun insertAfter(this: !String, range: Range, pos: StringRef) + this.insertBefore(range, StringRef(_backPtr(pos).untypedPtr, _end.untypedPtr)) - fun append(this: @String, range: Range) - this.insertBefore(range, StringRef(_end.bytePtr, _end.bytePtr)) - fun append(this: @String, value: Char) - this.insertBefore(value, StringRef(_end.bytePtr, _end.bytePtr)) + fun append(this: !String, range: Range) + this.insertBefore(range, StringRef(_end.untypedPtr, _end.untypedPtr)) + fun append(this: !String, value: Char) + this.insertBefore(value, StringRef(_end.untypedPtr, _end.untypedPtr)) - fun remove(this: @String, range: StringRef) - var rSize = range.size + fun remove(this: !String, range: StringRef) + let rSize = range.size var rBegin = _frontPtr(range) - var rEnd = rBegin.advance(DiffType(rSize)) + let rEnd = rBegin.advance(DiffType(rSize)) while rEnd != _end rBegin.value dtor @@ -209,53 +211,43 @@ fun ctor(this: @String, range: Range) if typeOf(range) != String rEnd = rEnd.advance _end = rBegin - fun remove(this: @String, index: SizeType) + fun remove(this: !String, index: SizeType) var r = this.all r.popFront(index) r.popBack(this.size - index - 1) this.remove(r) - fun assign(this: @String, range: Range) + fun assign(this: !String, range: Range) this.clear for v = range this.pushBack(v) - fun >>(this: @String, os: @OutStream) + fun >>(this: String, os: !OutStream) os << this.asStringRef - fun _frontPtr(s: StringRef) = RawPtr(Char)(s.begin) - fun _backPtr(s: StringRef) = RawPtr(Char)(s.end) + fun _frontPtr(s: StringRef) = RawPtr(Char)(UntypedPtr(s.begin)) + fun _backPtr(s: StringRef) = RawPtr(Char)(UntypedPtr(s.end)) // TODO [autoCt] fun + (x,y: String): String - var sz1 = x.size - var sz2 = y.size + let sz1 = x.size + let sz2 = y.size var res: String = sz1 + sz2 - memcpy(res._begin.bytePtr, x._begin.bytePtr, sz1) - memcpy(res._begin.advance(sz1).bytePtr, y._begin.bytePtr, sz2) + memcpy(res._begin.untypedPtr, x._begin.untypedPtr, sz1) + memcpy(res._begin.advance(sz1).untypedPtr, y._begin.untypedPtr, sz2) return res [autoCt] fun + (x: String, y: StringRef): String - var sz1 = x.size - var sz2 = y.size + let sz1 = x.size + let sz2 = y.size var res: String = sz1 + sz2 - memcpy(res._begin.bytePtr, x._begin.bytePtr, sz1) - memcpy(res._begin.advance(sz1).bytePtr, y.begin, sz2) + memcpy(res._begin.untypedPtr, x._begin.untypedPtr, sz1) + memcpy(res._begin.advance(sz1).untypedPtr, UntypedPtr(y.begin), sz2) return res -//[autoCt] -//fun + (x: String, y: Char): String -// var sz1 = x.size -// var sz2 = sizeOf(y) -// var res: String = sz1 + sz2 -// memcpy(res._begin, x._begin, sz1) -// memcpy(ptrAdd(res._begin, sz1), reinterpretCast(@Byte, y), sz2) - -// return res - fun intToString(x: Int): String var buf: static_buffer(12) _intToCString(x, reinterpretCast(@Char, buf)) @@ -271,12 +263,12 @@ datatype StringOutputStream result: String [protected] - fun <<<(this: @StringOutputStream, s: @String) { result.append(s.all) } - fun <<<(this: @StringOutputStream, s: StringRef) { result.append(s) } - fun <<<(this: @StringOutputStream, x: Char) { result.append(x) } - fun <<<(this: @StringOutputStream, x: Int) { result.append(intToString(x).all) } - fun <<<(this: @StringOutputStream, x: ULong) { result.append(ulongToString(x).all) } - fun <<<(this: @StringOutputStream, x: Double) { result.append(ulongToString(ULong(x)).all) } // Not properly supported + fun <<<(this: !StringOutputStream, s: String) { result.append(s.all) } + fun <<<(this: !StringOutputStream, s: StringRef) { result.append(s) } + fun <<<(this: !StringOutputStream, x: Char) { result.append(x) } + fun <<<(this: !StringOutputStream, x: Int) { result.append(intToString(x).all) } + fun <<<(this: !StringOutputStream, x: ULong) { result.append(ulongToString(x).all) } + fun <<<(this: !StringOutputStream, x: Double) { result.append(ulongToString(ULong(x)).all) } // Not properly supported fun toString = String() fun toString(a1: AnyType): String diff --git a/SparrowImplicitLib/std/tuple.spr b/SparrowImplicitLib/std/tuple.spr index ceaf4145..762cb490 100644 --- a/SparrowImplicitLib/std/tuple.spr +++ b/SparrowImplicitLib/std/tuple.spr @@ -100,22 +100,22 @@ using oper_precedence_~ = oper_precedence_* else if ( rhs.v1 < lhs.v1 ) return false return tail(lhs) < tail(rhs) - fun >>(t: @TupleType, os: @OutStream) + fun >>(t: TupleType, os: !OutStream) os << '(' << t.v1 _dumpTail(t, os) os << ')' -fun first(t: @TupleType) = t.v1 -fun second(t: @TupleType) = t.v2 +fun first(t: TupleType) = t.v1 +fun second(t: TupleType) = t.v2 -fun tail(t: @TupleType) = mkTuple(t.v2, t.v3) if t.arity == 3 -fun tail(t: @TupleType) = mkTuple(t.v2, t.v3, t.v4) if t.arity == 4 -fun tail(t: @TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5) if t.arity == 5 -fun tail(t: @TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5, t.v6) if t.arity == 6 -fun tail(t: @TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5, t.v6, t.v7) if t.arity == 7 -fun tail(t: @TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8) if t.arity == 8 -fun tail(t: @TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9) if t.arity == 9 -fun tail(t: @TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9, t.v10) if t.arity == 10 +fun tail(t: TupleType) = mkTuple(t.v2, t.v3) if t.arity == 3 +fun tail(t: TupleType) = mkTuple(t.v2, t.v3, t.v4) if t.arity == 4 +fun tail(t: TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5) if t.arity == 5 +fun tail(t: TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5, t.v6) if t.arity == 6 +fun tail(t: TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5, t.v6, t.v7) if t.arity == 7 +fun tail(t: TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8) if t.arity == 8 +fun tail(t: TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9) if t.arity == 9 +fun tail(t: TupleType) = mkTuple(t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9, t.v10) if t.arity == 10 fun mkTuple(v1,v2: AnyType) = Tuple(typeOf(v1), typeOf(v2))(v1,v2) fun mkTuple(v1,v2,v3: AnyType) = Tuple(typeOf(v1), typeOf(v2), typeOf(v3))(v1,v2,v3) @@ -152,18 +152,18 @@ datatype PairFirst(pairType: Type) using PairType = pairType [protected] - fun ()(this: PairFirst, pair: @this.PairType): @typeOf(pair.v1) + fun ()(this: PairFirst, pair: this.PairType): @typeOf(pair.v1) return pair.v1 datatype PairSecond(pairType: Type) using PairType = pairType [protected] - fun ()(this: PairSecond, pair: @this.PairType): @typeOf(pair.v2) + fun ()(this: PairSecond, pair: this.PairType): @typeOf(pair.v2) return pair.v2 -fun _dumpTail(t: @TupleType, os: @OutStream) if t.arity == 2 +fun _dumpTail(t: TupleType, os: !OutStream) if t.arity == 2 os << ',' << t.v2 -fun _dumpTail(t: @TupleType, os: @OutStream) if t.arity > 2 +fun _dumpTail(t: TupleType, os: !OutStream) if t.arity > 2 os << ',' << t.v2 _dumpTail(t tail, os) diff --git a/SparrowImplicitLib/std/typeTraits.spr b/SparrowImplicitLib/std/typeTraits.spr index cf23eaf9..e31e673a 100644 --- a/SparrowImplicitLib/std/typeTraits.spr +++ b/SparrowImplicitLib/std/typeTraits.spr @@ -6,9 +6,9 @@ datatype DefaultTypeTraits ; [protected] - fun equal(this: DefaultTypeTraits, l, r: @AnyType) = l == r - fun less(this: DefaultTypeTraits, l, r: @AnyType) = l < r - fun hash(this: DefaultTypeTraits, val: @AnyType): SizeType + fun equal(this: DefaultTypeTraits, l, r: AnyType) = l == r + fun less(this: DefaultTypeTraits, l, r: AnyType) = l < r + fun hash(this: DefaultTypeTraits, val: AnyType): SizeType [ct] if ( isValid(SizeType(val hash)) ) return val hash else [ct] if ( isValid(SizeType(val.get hash)) ) diff --git a/SparrowImplicitLib/std/union.spr b/SparrowImplicitLib/std/union.spr index d56f2495..b8c23d29 100644 --- a/SparrowImplicitLib/std/union.spr +++ b/SparrowImplicitLib/std/union.spr @@ -12,8 +12,8 @@ package _Impl1 datatype Union1(t1: Type) data: StaticArray(Char, sizeOf(t1)) using Type1 = t1 - - fun get1(this: @Union1) = reinterpretCast(@this.Type1, this.data) + + fun get1(this: Union1) = reinterpretCast(@this.Type1, this.data) package _Impl2 datatype Union2(t1, t2: Type) @@ -21,8 +21,8 @@ package _Impl2 using Type1 = t1 using Type2 = t2 - fun get1(this: @Union2) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union2) = reinterpretCast(@this.Type2, this.data) + fun get1(this: Union2) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union2) = reinterpretCast(@this.Type2, this.data) package _Impl3 datatype Union3(t1, t2, t3: Type) @@ -31,9 +31,9 @@ package _Impl3 using Type2 = t2 using Type3 = t3 - fun get1(this: @Union3) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union3) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union3) = reinterpretCast(@this.Type3, this.data) + fun get1(this: Union3) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union3) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union3) = reinterpretCast(@this.Type3, this.data) package _Impl4 datatype Union4(t1, t2, t3, t4: Type) @@ -43,10 +43,10 @@ package _Impl4 using Type3 = t3 using Type4 = t4 - fun get1(this: @Union4) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union4) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union4) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union4) = reinterpretCast(@this.Type4, this.data) + fun get1(this: Union4) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union4) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union4) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union4) = reinterpretCast(@this.Type4, this.data) package _Impl5 datatype Union5(t1, t2, t3, t4, t5: Type) @@ -58,11 +58,11 @@ package _Impl5 using Type4 = t4 using Type5 = t5 - fun get1(this: @Union5) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union5) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union5) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union5) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union5) = reinterpretCast(@this.Type5, this.data) + fun get1(this: Union5) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union5) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union5) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union5) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union5) = reinterpretCast(@this.Type5, this.data) package _Impl6 datatype Union6(t1, t2, t3, t4, t5, t6: Type) @@ -75,12 +75,12 @@ package _Impl6 using Type5 = t5 using Type6 = t6 - fun get1(this: @Union6) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union6) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union6) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union6) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union6) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union6) = reinterpretCast(@this.Type6, this.data) + fun get1(this: Union6) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union6) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union6) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union6) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union6) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union6) = reinterpretCast(@this.Type6, this.data) package _Impl7 datatype Union7(t1, t2, t3, t4, t5, t6, t7: Type) @@ -95,13 +95,13 @@ package _Impl7 using Type6 = t6 using Type7 = t7 - fun get1(this: @Union7) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union7) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union7) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union7) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union7) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union7) = reinterpretCast(@this.Type6, this.data) - fun get7(this: @Union7) = reinterpretCast(@this.Type7, this.data) + fun get1(this: Union7) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union7) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union7) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union7) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union7) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union7) = reinterpretCast(@this.Type6, this.data) + fun get7(this: Union7) = reinterpretCast(@this.Type7, this.data) package _Impl8 datatype Union8(t1, t2, t3, t4, t5, t6, t7, t8: Type) @@ -117,14 +117,14 @@ package _Impl8 using Type7 = t7 using Type8 = t8 - fun get1(this: @Union8) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union8) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union8) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union8) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union8) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union8) = reinterpretCast(@this.Type6, this.data) - fun get7(this: @Union8) = reinterpretCast(@this.Type7, this.data) - fun get8(this: @Union8) = reinterpretCast(@this.Type8, this.data) + fun get1(this: Union8) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union8) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union8) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union8) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union8) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union8) = reinterpretCast(@this.Type6, this.data) + fun get7(this: Union8) = reinterpretCast(@this.Type7, this.data) + fun get8(this: Union8) = reinterpretCast(@this.Type8, this.data) package _Impl9 datatype Union9(t1, t2, t3, t4, t5, t6, t7, t8, t9: Type) @@ -141,15 +141,15 @@ package _Impl9 using Type8 = t8 using Type9 = t9 - fun get1(this: @Union9) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union9) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union9) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union9) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union9) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union9) = reinterpretCast(@this.Type6, this.data) - fun get7(this: @Union9) = reinterpretCast(@this.Type7, this.data) - fun get8(this: @Union9) = reinterpretCast(@this.Type8, this.data) - fun get9(this: @Union9) = reinterpretCast(@this.Type9, this.data) + fun get1(this: Union9) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union9) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union9) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union9) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union9) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union9) = reinterpretCast(@this.Type6, this.data) + fun get7(this: Union9) = reinterpretCast(@this.Type7, this.data) + fun get8(this: Union9) = reinterpretCast(@this.Type8, this.data) + fun get9(this: Union9) = reinterpretCast(@this.Type9, this.data) package _Impl10 datatype Union10(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10: Type) @@ -168,16 +168,16 @@ package _Impl10 using Type9 = t9 using Type10 = t10 - fun get1(this: @Union10) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union10) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union10) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union10) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union10) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union10) = reinterpretCast(@this.Type6, this.data) - fun get7(this: @Union10) = reinterpretCast(@this.Type7, this.data) - fun get8(this: @Union10) = reinterpretCast(@this.Type8, this.data) - fun get9(this: @Union10) = reinterpretCast(@this.Type9, this.data) - fun get10(this: @Union10) = reinterpretCast(@this.Type10, this.data) + fun get1(this: Union10) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union10) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union10) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union10) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union10) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union10) = reinterpretCast(@this.Type6, this.data) + fun get7(this: Union10) = reinterpretCast(@this.Type7, this.data) + fun get8(this: Union10) = reinterpretCast(@this.Type8, this.data) + fun get9(this: Union10) = reinterpretCast(@this.Type9, this.data) + fun get10(this: Union10) = reinterpretCast(@this.Type10, this.data) package _Impl11 datatype Union11(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11: Type) @@ -197,17 +197,17 @@ package _Impl11 using Type10 = t10 using Type11 = t11 - fun get1(this: @Union11) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union11) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union11) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union11) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union11) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union11) = reinterpretCast(@this.Type6, this.data) - fun get7(this: @Union11) = reinterpretCast(@this.Type7, this.data) - fun get8(this: @Union11) = reinterpretCast(@this.Type8, this.data) - fun get9(this: @Union11) = reinterpretCast(@this.Type9, this.data) - fun get10(this: @Union11) = reinterpretCast(@this.Type10, this.data) - fun get11(this: @Union11) = reinterpretCast(@this.Type11, this.data) + fun get1(this: Union11) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union11) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union11) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union11) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union11) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union11) = reinterpretCast(@this.Type6, this.data) + fun get7(this: Union11) = reinterpretCast(@this.Type7, this.data) + fun get8(this: Union11) = reinterpretCast(@this.Type8, this.data) + fun get9(this: Union11) = reinterpretCast(@this.Type9, this.data) + fun get10(this: Union11) = reinterpretCast(@this.Type10, this.data) + fun get11(this: Union11) = reinterpretCast(@this.Type11, this.data) package _Impl12 datatype Union12(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12: Type) @@ -228,18 +228,18 @@ package _Impl12 using Type11 = t11 using Type12 = t12 - fun get1(this: @Union12) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union12) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union12) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union12) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union12) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union12) = reinterpretCast(@this.Type6, this.data) - fun get7(this: @Union12) = reinterpretCast(@this.Type7, this.data) - fun get8(this: @Union12) = reinterpretCast(@this.Type8, this.data) - fun get9(this: @Union12) = reinterpretCast(@this.Type9, this.data) - fun get10(this: @Union12) = reinterpretCast(@this.Type10, this.data) - fun get11(this: @Union12) = reinterpretCast(@this.Type11, this.data) - fun get12(this: @Union12) = reinterpretCast(@this.Type12, this.data) + fun get1(this: Union12) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union12) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union12) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union12) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union12) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union12) = reinterpretCast(@this.Type6, this.data) + fun get7(this: Union12) = reinterpretCast(@this.Type7, this.data) + fun get8(this: Union12) = reinterpretCast(@this.Type8, this.data) + fun get9(this: Union12) = reinterpretCast(@this.Type9, this.data) + fun get10(this: Union12) = reinterpretCast(@this.Type10, this.data) + fun get11(this: Union12) = reinterpretCast(@this.Type11, this.data) + fun get12(this: Union12) = reinterpretCast(@this.Type12, this.data) package _Impl13 datatype Union13(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13: Type) @@ -262,19 +262,19 @@ package _Impl13 using Type12 = t12 using Type13 = t13 - fun get1(this: @Union13) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union13) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union13) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union13) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union13) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union13) = reinterpretCast(@this.Type6, this.data) - fun get7(this: @Union13) = reinterpretCast(@this.Type7, this.data) - fun get8(this: @Union13) = reinterpretCast(@this.Type8, this.data) - fun get9(this: @Union13) = reinterpretCast(@this.Type9, this.data) - fun get10(this: @Union13) = reinterpretCast(@this.Type10, this.data) - fun get11(this: @Union13) = reinterpretCast(@this.Type11, this.data) - fun get12(this: @Union13) = reinterpretCast(@this.Type12, this.data) - fun get13(this: @Union13) = reinterpretCast(@this.Type13, this.data) + fun get1(this: Union13) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union13) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union13) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union13) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union13) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union13) = reinterpretCast(@this.Type6, this.data) + fun get7(this: Union13) = reinterpretCast(@this.Type7, this.data) + fun get8(this: Union13) = reinterpretCast(@this.Type8, this.data) + fun get9(this: Union13) = reinterpretCast(@this.Type9, this.data) + fun get10(this: Union13) = reinterpretCast(@this.Type10, this.data) + fun get11(this: Union13) = reinterpretCast(@this.Type11, this.data) + fun get12(this: Union13) = reinterpretCast(@this.Type12, this.data) + fun get13(this: Union13) = reinterpretCast(@this.Type13, this.data) package _Impl14 datatype Union14(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14: Type) @@ -298,20 +298,20 @@ package _Impl14 using Type13 = t13 using Type14 = t14 - fun get1(this: @Union14) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union14) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union14) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union14) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union14) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union14) = reinterpretCast(@this.Type6, this.data) - fun get7(this: @Union14) = reinterpretCast(@this.Type7, this.data) - fun get8(this: @Union14) = reinterpretCast(@this.Type8, this.data) - fun get9(this: @Union14) = reinterpretCast(@this.Type9, this.data) - fun get10(this: @Union14) = reinterpretCast(@this.Type10, this.data) - fun get11(this: @Union14) = reinterpretCast(@this.Type11, this.data) - fun get12(this: @Union14) = reinterpretCast(@this.Type12, this.data) - fun get13(this: @Union14) = reinterpretCast(@this.Type13, this.data) - fun get14(this: @Union14) = reinterpretCast(@this.Type14, this.data) + fun get1(this: Union14) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union14) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union14) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union14) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union14) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union14) = reinterpretCast(@this.Type6, this.data) + fun get7(this: Union14) = reinterpretCast(@this.Type7, this.data) + fun get8(this: Union14) = reinterpretCast(@this.Type8, this.data) + fun get9(this: Union14) = reinterpretCast(@this.Type9, this.data) + fun get10(this: Union14) = reinterpretCast(@this.Type10, this.data) + fun get11(this: Union14) = reinterpretCast(@this.Type11, this.data) + fun get12(this: Union14) = reinterpretCast(@this.Type12, this.data) + fun get13(this: Union14) = reinterpretCast(@this.Type13, this.data) + fun get14(this: Union14) = reinterpretCast(@this.Type14, this.data) package _Impl15 datatype Union15(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15: Type) @@ -336,21 +336,21 @@ package _Impl15 using Type14 = t14 using Type15 = t15 - fun get1(this: @Union15) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union15) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union15) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union15) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union15) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union15) = reinterpretCast(@this.Type6, this.data) - fun get7(this: @Union15) = reinterpretCast(@this.Type7, this.data) - fun get8(this: @Union15) = reinterpretCast(@this.Type8, this.data) - fun get9(this: @Union15) = reinterpretCast(@this.Type9, this.data) - fun get10(this: @Union15) = reinterpretCast(@this.Type10, this.data) - fun get11(this: @Union15) = reinterpretCast(@this.Type11, this.data) - fun get12(this: @Union15) = reinterpretCast(@this.Type12, this.data) - fun get13(this: @Union15) = reinterpretCast(@this.Type13, this.data) - fun get14(this: @Union15) = reinterpretCast(@this.Type14, this.data) - fun get15(this: @Union15) = reinterpretCast(@this.Type15, this.data) + fun get1(this: Union15) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union15) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union15) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union15) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union15) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union15) = reinterpretCast(@this.Type6, this.data) + fun get7(this: Union15) = reinterpretCast(@this.Type7, this.data) + fun get8(this: Union15) = reinterpretCast(@this.Type8, this.data) + fun get9(this: Union15) = reinterpretCast(@this.Type9, this.data) + fun get10(this: Union15) = reinterpretCast(@this.Type10, this.data) + fun get11(this: Union15) = reinterpretCast(@this.Type11, this.data) + fun get12(this: Union15) = reinterpretCast(@this.Type12, this.data) + fun get13(this: Union15) = reinterpretCast(@this.Type13, this.data) + fun get14(this: Union15) = reinterpretCast(@this.Type14, this.data) + fun get15(this: Union15) = reinterpretCast(@this.Type15, this.data) package _Impl16 datatype Union16(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16: Type) @@ -377,23 +377,22 @@ package _Impl16 using Type15 = t15 using Type16 = t16 - fun get1(this: @Union16) = reinterpretCast(@this.Type1, this.data) - fun get2(this: @Union16) = reinterpretCast(@this.Type2, this.data) - fun get3(this: @Union16) = reinterpretCast(@this.Type3, this.data) - fun get4(this: @Union16) = reinterpretCast(@this.Type4, this.data) - fun get5(this: @Union16) = reinterpretCast(@this.Type5, this.data) - fun get6(this: @Union16) = reinterpretCast(@this.Type6, this.data) - fun get7(this: @Union16) = reinterpretCast(@this.Type7, this.data) - fun get8(this: @Union16) = reinterpretCast(@this.Type8, this.data) - fun get9(this: @Union16) = reinterpretCast(@this.Type9, this.data) - fun get10(this: @Union16) = reinterpretCast(@this.Type10, this.data) - fun get11(this: @Union16) = reinterpretCast(@this.Type11, this.data) - fun get12(this: @Union16) = reinterpretCast(@this.Type12, this.data) - fun get13(this: @Union16) = reinterpretCast(@this.Type13, this.data) - fun get14(this: @Union16) = reinterpretCast(@this.Type14, this.data) - fun get15(this: @Union16) = reinterpretCast(@this.Type15, this.data) - fun get16(this: @Union16) = reinterpretCast(@this.Type16, this.data) - + fun get1(this: Union16) = reinterpretCast(@this.Type1, this.data) + fun get2(this: Union16) = reinterpretCast(@this.Type2, this.data) + fun get3(this: Union16) = reinterpretCast(@this.Type3, this.data) + fun get4(this: Union16) = reinterpretCast(@this.Type4, this.data) + fun get5(this: Union16) = reinterpretCast(@this.Type5, this.data) + fun get6(this: Union16) = reinterpretCast(@this.Type6, this.data) + fun get7(this: Union16) = reinterpretCast(@this.Type7, this.data) + fun get8(this: Union16) = reinterpretCast(@this.Type8, this.data) + fun get9(this: Union16) = reinterpretCast(@this.Type9, this.data) + fun get10(this: Union16) = reinterpretCast(@this.Type10, this.data) + fun get11(this: Union16) = reinterpretCast(@this.Type11, this.data) + fun get12(this: Union16) = reinterpretCast(@this.Type12, this.data) + fun get13(this: Union16) = reinterpretCast(@this.Type13, this.data) + fun get14(this: Union16) = reinterpretCast(@this.Type14, this.data) + fun get15(this: Union16) = reinterpretCast(@this.Type15, this.data) + fun get16(this: Union16) = reinterpretCast(@this.Type16, this.data) using Union = _Impl1.Union1 using Union = _Impl2.Union2 diff --git a/SparrowImplicitLib/std/utils.spr b/SparrowImplicitLib/std/utils.spr index a3d781ca..208022bc 100644 --- a/SparrowImplicitLib/std/utils.spr +++ b/SparrowImplicitLib/std/utils.spr @@ -5,4 +5,4 @@ concept Nullable(x) if ( && typeOf(x.isNull) == Bool ) -fun ! (obj: @Nullable): Bool = obj.isNull \ No newline at end of file +fun ! (obj: Nullable): Bool = obj.isNull \ No newline at end of file diff --git a/SparrowImplicitLib/std/vector.spr b/SparrowImplicitLib/std/vector.spr index bbd3d50b..bcbb4382 100644 --- a/SparrowImplicitLib/std/vector.spr +++ b/SparrowImplicitLib/std/vector.spr @@ -8,7 +8,6 @@ fun mkVector(range: Range) = Vector(-@ range.RetType)(range) datatype Vector(valueType: Type) using ValueType = valueType - using ValuePassType = !@valueType using RangeType = ContiguousMemoryRange(valueType) @@ -18,14 +17,14 @@ datatype Vector(valueType: Type) _begin, _end, _endOfStore: RawPtr(ValueType) [protected] - fun ctorFromCt(this: @Vector, src: Vector ct) + fun ctorFromCt(this: !Vector, src: Vector ct) this.ctor() this.reserve(ctEval(src.size())) [ct] for el: ValueType = src.all() this.pushBack(el) - fun ctor(this, other: @Vector) - var size = other.size() + fun ctor(this: !Vector, other: typeOf(this)) + let size = other.size() _begin = allocRawPtr(ValueType, size) _end = _begin.advance(size) @@ -35,14 +34,14 @@ datatype Vector(valueType: Type) var src = other._begin [ct] if TypeOp.isBitcopiable(ValueType) - memcpy(dst.bytePtr, src.bytePtr, size*sizeOf(ValueType)) + memcpy(dst.untypedPtr, src.untypedPtr, size*sizeOf(ValueType)) else while dst != _end dst.value().ctor(src.value()) dst = dst.advance() src = src.advance() - fun ctor(this: @Vector, size: SizeType) + fun ctor(this: !Vector, size: SizeType) // Allocate the buffer _begin = allocRawPtr(ValueType, size) _end = _begin.advance(size) @@ -53,14 +52,14 @@ datatype Vector(valueType: Type) while p != _end ; p = p.advance() p.value().ctor() - fun ctor(this: @Vector, range: Range) if !RandomAccessRange(range) + fun ctor(this: !Vector, range: Range) if !RandomAccessRange(range) _begin.ctor() _end.ctor() _endOfStore.ctor() for v = range this.pushBack(v) - fun ctor(this: @Vector, range: RandomAccessRange) + fun ctor(this: !Vector, range: RandomAccessRange) _begin.ctor() _end.ctor() _endOfStore.ctor() @@ -68,35 +67,35 @@ datatype Vector(valueType: Type) for v = range this.pushBack(v) - fun dtor(this: @Vector) + fun dtor(this: !Vector) var p = _begin while p != _end ; p = p.advance() p.value().dtor() _begin.freePtr() - fun =(this, other: @Vector): @typeOf(this) + fun =(this: !Vector, other: typeOf(this)): @typeOf(this) var tmp = other tmp.swap(this) return this - fun ==(this, other: @Vector): Bool + fun ==(this, other: Vector): Bool if this.size() != other.size() return false var i = 0 - var s = this.size() + let s = this.size() while i < s ; i++ if !(this.at(i) == other.at(i)) return false return true - fun !=(other: @Vector): Bool = !(this == other) + fun !=(other: Vector): Bool = !(this == other) - fun swap(this: @Vector, other: typeOf(this)) + fun swap(this: !Vector, other: !typeOf(this)) var tmp = _begin _begin = other._begin @@ -108,12 +107,12 @@ datatype Vector(valueType: Type) _endOfStore = other._endOfStore other._endOfStore = tmp - fun size(this: @Vector): SizeType = _end.diff(_begin) - fun isEmpty(this: @Vector) = _begin == _end - fun capacity(this: @Vector): SizeType = _endOfStore.diff(_begin) + fun size(this: Vector): SizeType = _end.diff(_begin) + fun isEmpty(this: Vector) = _begin == _end + fun capacity(this: Vector): SizeType = _endOfStore.diff(_begin) - fun reserve(this: @Vector, n: SizeType) - var curCapacity = this.capacity() + fun reserve(this: !Vector, n: SizeType) + let curCapacity = this.capacity() if n <= curCapacity return @@ -123,22 +122,22 @@ datatype Vector(valueType: Type) if n < _growthFactor*curCapacity n = SizeType(_growthFactor*curCapacity) - var curSize = this.size() + let curSize = this.size() _begin.reallocPtr(n) _end = _begin.advance(curSize) _endOfStore = _begin.advance(n) - fun at(this: @Vector, index: SizeType) = _begin.advance(index).value() - fun ()(this: @Vector, index: SizeType) = _begin.advance(index).value() - fun front(this: @Vector) = _begin.value() - fun back(this: @Vector) = _end.advance(-1).value() - fun all(this: @Vector) = RangeType(_begin, _end) - fun subrange(this: @Vector, index: SizeType, num: SizeType): RangeType = RangeType(_begin.advance(index), _begin.advance(index + num)) - fun subrange(this: @Vector, index: SizeType): RangeType = RangeType(_begin.advance(index), _end) + fun at(this: Vector, index: SizeType) = _begin.advance(index).value() + fun ()(this: Vector, index: SizeType) = _begin.advance(index).value() + fun front(this: Vector) = _begin.value() + fun back(this: Vector) = _end.advance(-1).value() + fun all(this: Vector) = RangeType(_begin, _end) + fun subrange(this: Vector, index: SizeType, num: SizeType): RangeType = RangeType(_begin.advance(index), _begin.advance(index + num)) + fun subrange(this: Vector, index: SizeType): RangeType = RangeType(_begin.advance(index), _end) - fun insertBefore(this: @Vector, value: this.ValuePassType, pos: this.RangeType) - var posCount = pos.frontPtr().diff(_begin) + fun insertBefore(this: !Vector, value: this.ValueType, pos: this.RangeType) + let posCount = pos.frontPtr().diff(_begin) this.reserve(this.size() + 1) @@ -151,9 +150,9 @@ datatype Vector(valueType: Type) p.advance().value().ctor(value) _end = _end.advance() - fun insertBefore(this: @Vector, range: Range, pos: this.RangeType) - var n = range.size() - var index = pos.frontPtr().diff(_begin) + fun insertBefore(this: !Vector, range: Range, pos: this.RangeType) + let n = range.size() + let index = pos.frontPtr().diff(_begin) this.reserve(this.size() + n) @@ -164,19 +163,20 @@ datatype Vector(valueType: Type) p.advance(n).value().ctor(p.value()) p.value().dtor() p = p.advance() - while !range.isEmpty() - p.value().ctor(range.front()) + var rc = range + while !rc.isEmpty() + p.value().ctor(rc.front()) p = p.advance() - range.popFront() + rc.popFront() _end = _end.advance(n) - fun insertAfter(this: @Vector, value: this.ValuePassType, pos: this.RangeType) + fun insertAfter(this: !Vector, value: this.ValueType, pos: this.RangeType) this.insertBefore(value, RangeType(pos.backPtr(), _end)) - fun insertAfter(this: @Vector, range: Range, pos: this.RangeType) + fun insertAfter(this: !Vector, range: Range, pos: this.RangeType) this.insertBefore(range, RangeType(pos.backPtr(), _end)) - fun pushBack(this: @Vector, value: this.ValuePassType) + fun pushBack(this: !Vector, value: this.ValueType) if _end == _endOfStore var t = 2 * this.capacity() @@ -186,14 +186,14 @@ datatype Vector(valueType: Type) _end.value().ctor(value) _end = _end.advance() - fun +=(this: @Vector, value: this.ValuePassType) + fun +=(this: !Vector, value: this.ValueType) this.pushBack(value) - fun popBack(this: @Vector) + fun popBack(this: !Vector) _end = _end.advance(-1) _end.value().dtor() - fun remove(this: @Vector, range: this.RangeType) + fun remove(this: !Vector, range: this.RangeType) var rBegin = range.frontPtr() var rEnd = range.backPtr() @@ -209,21 +209,21 @@ datatype Vector(valueType: Type) rEnd = rEnd.advance() _end = rBegin - fun remove(this: @Vector, index: SizeType) + fun remove(this: !Vector, index: SizeType) var r = this.all() r.popFront(index) r.popBack(this.size() - index - 1) this.remove(r) - fun resize(this: @Vector, n: SizeType) - var oldSize = this.size() + fun resize(this: !Vector, n: SizeType) + let oldSize = this.size() if n == oldSize return if n < oldSize - var newEnd = _begin.advance(n) + let newEnd = _begin.advance(n) while _end != newEnd _end = _end.advance(-1) @@ -231,21 +231,21 @@ datatype Vector(valueType: Type) else this.reserve(n) - var newEnd = _begin.advance(n) + let newEnd = _begin.advance(n) while _end != newEnd _end.value().ctor() _end = _end.advance() - fun clear(this: @Vector) + fun clear(this: !Vector) this.remove(RangeType(_begin, _end)) - fun assign(this: @Vector, range: Range) + fun assign(this: !Vector, range: Range) this.clear() for v = range this.pushBack(v) - fun >>(this: @Vector, os: @OutStream) if isValid(os << #$this.ValueType) + fun >>(this: Vector, os: !OutStream) if isValid(os << #$this.ValueType) os << "Vec(" for i = 0..this.size if i > 0 @@ -253,10 +253,10 @@ datatype Vector(valueType: Type) os << this.at(i) os << ')' - fun _dumpThis(this: @Vector, prefix: StringRef) - cout << prefix << "dumping " << TypeOp.description(Vector) << ": " << mkStreamRefWrapper(this) << endl + fun _dumpThis(this: !Vector, prefix: StringRef) + cout << prefix << "dumping " << TypeOp.description(Vector) << ": " << UntypedPtr(this) << endl cout << " size: " << Int(this.size()) << endl - cout << " _begin: " << mkStreamRefWrapper(_begin.bytePtr()) << endl - cout << " _end: " << mkStreamRefWrapper(_end.bytePtr()) << endl - cout << " _endOfStore: " << mkStreamRefWrapper(_endOfStore.bytePtr()) << endl + cout << " _begin: " << _begin.untypedPtr << endl + cout << " _end: " << _end.untypedPtr << endl + cout << " _endOfStore: " << _endOfStore.untypedPtr << endl diff --git a/SparrowImplicitLib/time.spr b/SparrowImplicitLib/time.spr index 1e1e30e1..ef8f3f45 100644 --- a/SparrowImplicitLib/time.spr +++ b/SparrowImplicitLib/time.spr @@ -5,7 +5,7 @@ module time datatype Timer _startTime: Int -fun ctor(this: @Timer) { _startTime = clock } +fun ctor(this: !Timer) { _startTime = clock } fun elapsed(this: Timer) = Double(clock - _startTime) / 1000.0 -fun restart(this: @Timer) { _startTime = clock } +fun restart(this: !Timer) { _startTime = clock } diff --git a/others/sublime/Sparrow.sublime-syntax b/others/sublime/Sparrow.sublime-syntax index ab7c62a0..46bd3a16 100644 --- a/others/sublime/Sparrow.sublime-syntax +++ b/others/sublime/Sparrow.sublime-syntax @@ -54,6 +54,18 @@ contexts: 3: entity.name.function.sparrow scope: meta.function.sparrow + # Let decl + - match: |- + (?x)^\s* + (\[.*\])?\s* # modifier + \b(let)\b\s* + (\w+) # identifier + captures: + 1: storage.modifier.sparrow + 2: storage.type.var.sparrow + 3: entity.name.variable.sparrow + scope: meta.var.sparrow + # Variable - match: |- (?x)^\s* diff --git a/src/Feather/Utils/cppif/FeatherNodes.hpp b/src/Feather/Utils/cppif/FeatherNodes.hpp index 0554924f..61e18402 100644 --- a/src/Feather/Utils/cppif/FeatherNodes.hpp +++ b/src/Feather/Utils/cppif/FeatherNodes.hpp @@ -418,7 +418,7 @@ struct FunctionDecl : DeclNode { void setBody(NodeHandle body); //! @copydoc Nest::NodeHandle::type() - FunctionType type() const { return FunctionType(DeclNode::type()); } + FunctionType type() const { return {DeclNode::type()}; } private: static void setContextForChildrenImpl(ThisNodeType node); @@ -452,7 +452,7 @@ struct StructDecl : DeclNode { NodeRange fields() const; //! @copydoc Nest::NodeHandle::type() - DataType type() const { return DataType(DeclNode::type()); } + DataType type() const { return {DeclNode::type()}; } private: static void setContextForChildrenImpl(ThisNodeType node); @@ -489,7 +489,7 @@ struct VarDecl : DeclNode { NodeHandle typeNode() const; //! @copydoc Nest::NodeHandle::type() - TypeWithStorage type() const { return TypeWithStorage(DeclNode::type()); } + TypeWithStorage type() const { return {DeclNode::type()}; } private: static void setContextForChildrenImpl(ThisNodeType node); diff --git a/src/Feather/Utils/cppif/FeatherTypes.hpp b/src/Feather/Utils/cppif/FeatherTypes.hpp index af5e2388..f5299743 100644 --- a/src/Feather/Utils/cppif/FeatherTypes.hpp +++ b/src/Feather/Utils/cppif/FeatherTypes.hpp @@ -54,7 +54,7 @@ struct DataType : TypeWithStorage { //! @copydoc Type::changeMode DataType changeMode(Nest::EvalMode mode, Nest::Location loc = Nest::Location{}) const { - return DataType(Type::changeMode(mode, loc)); + return {Type::changeMode(mode, loc)}; } }; @@ -75,20 +75,21 @@ struct ConstType : TypeWithStorage { * @brief Factory method to create a const type * * @param[in] base The base type on which we apply const-ness + * @param[in] loc Location used when reporting errors * * @return The corresponding const type */ - static ConstType get(TypeWithStorage base); + static ConstType get(TypeWithStorage base, Nest::Location loc = {}); //! Returns the base type of this type - TypeWithStorage base() const { return TypeWithStorage(type_->subTypes[0]); } + TypeWithStorage base() const { return {type_->subTypes[0]}; } //! Transform this type into a corresponding DataType with the same number of references. DataType toRef() const; //! @copydoc Type::changeMode ConstType changeMode(Nest::EvalMode mode, Nest::Location loc = Nest::Location{}) const { - return ConstType(Type::changeMode(mode, loc)); + return {Type::changeMode(mode, loc)}; } }; @@ -109,20 +110,21 @@ struct MutableType : TypeWithStorage { * @brief Factory method to create a mutable type * * @param[in] base The base type on which we apply mutable-ness + * @param[in] loc Location used when reporting errors * * @return The corresponding mutable type */ - static MutableType get(TypeWithStorage base); + static MutableType get(TypeWithStorage base, Nest::Location loc = {}); //! Returns the base type of this type - TypeWithStorage base() const { return TypeWithStorage(type_->subTypes[0]); } + TypeWithStorage base() const { return {type_->subTypes[0]}; } //! Transform this type into a corresponding DataType with the same number of references. DataType toRef() const; //! @copydoc Type::changeMode MutableType changeMode(Nest::EvalMode mode, Nest::Location loc = Nest::Location{}) const { - return MutableType(Type::changeMode(mode, loc)); + return {Type::changeMode(mode, loc)}; } }; @@ -143,20 +145,21 @@ struct TempType : TypeWithStorage { * @brief Factory method to create a temp type * * @param[in] base The base type on which we apply temp-ness + * @param[in] loc Location used when reporting errors * * @return The corresponding temp type */ - static TempType get(TypeWithStorage base); + static TempType get(TypeWithStorage base, Nest::Location loc = {}); //! Returns the base type of this type - TypeWithStorage base() const { return TypeWithStorage(type_->subTypes[0]); } + TypeWithStorage base() const { return {type_->subTypes[0]}; } //! Transform this type into a corresponding DataType with the same number of references. DataType toRef() const; //! @copydoc Type::changeMode TempType changeMode(Nest::EvalMode mode, Nest::Location loc = Nest::Location{}) const { - return TempType(Type::changeMode(mode, loc)); + return {Type::changeMode(mode, loc)}; } }; @@ -182,13 +185,13 @@ struct ArrayType : TypeWithStorage { static ArrayType get(TypeWithStorage unitType, int count); //! Returns the unit type of this array type - TypeWithStorage unitType() const { return TypeWithStorage(type_->subTypes[0]); } + TypeWithStorage unitType() const { return {type_->subTypes[0]}; } //! Returns the number of elements in the array int count() const { return type_->flags; } //! @copydoc Type::changeMode ArrayType changeMode(Nest::EvalMode mode, Nest::Location loc = Nest::Location{}) const { - return ArrayType(Type::changeMode(mode, loc)); + return {Type::changeMode(mode, loc)}; } }; @@ -223,11 +226,11 @@ struct FunctionType : TypeWithStorage { //! Returns the number of parameters that we have int numParams() const { return type_->numSubtypes - 1; } //! Access operators for the parameters - TypeWithStorage operator[](int idx) const { return TypeWithStorage(type_->subTypes[idx + 1]); } + TypeWithStorage operator[](int idx) const { return {type_->subTypes[idx + 1]}; } //! @copydoc Type::changeMode FunctionType changeMode(Nest::EvalMode mode, Nest::Location loc = Nest::Location{}) const { - return FunctionType(Type::changeMode(mode, loc)); + return {Type::changeMode(mode, loc)}; } }; diff --git a/src/Feather/src/Utils/cppif/FeatherNodes.cpp b/src/Feather/src/Utils/cppif/FeatherNodes.cpp index f9007c58..bb5594e1 100644 --- a/src/Feather/src/Utils/cppif/FeatherNodes.cpp +++ b/src/Feather/src/Utils/cppif/FeatherNodes.cpp @@ -596,9 +596,7 @@ CtValueExp CtValueExp::create(const Location& loc, TypeWithStorage type, StringR res.setProperty("valueData", data); return res; } -TypeWithStorage CtValueExp::valueType() const { - return TypeWithStorage(getCheckPropertyType("valueType")); -} +TypeWithStorage CtValueExp::valueType() const { return {getCheckPropertyType("valueType")}; } StringRef CtValueExp::valueData() const { return getCheckPropertyString("valueData"); } NodeHandle CtValueExp::semanticCheckImpl(CtValueExp node) { // Check the type @@ -701,7 +699,7 @@ VarRefExp VarRefExp::create(const Location& loc, VarDecl varDecl) { res.setReferredNodes(NodeRange{varDecl}); return res; } -VarDecl VarRefExp::varDecl() const { return VarDecl(referredNodes()[0]); } +VarDecl VarRefExp::varDecl() const { return {referredNodes()[0]}; } NodeHandle VarRefExp::semanticCheckImpl(VarRefExp node) { VarDecl var = node.varDecl(); ASSERT(var); @@ -737,7 +735,7 @@ FieldRefExp FieldRefExp::create(const Location& loc, NodeHandle obj, VarDecl fie return res; } NodeHandle FieldRefExp::object() const { return children()[0]; } -VarDecl FieldRefExp::fieldDecl() const { return VarDecl(referredNodes()[0]); } +VarDecl FieldRefExp::fieldDecl() const { return {referredNodes()[0]}; } NodeHandle FieldRefExp::semanticCheckImpl(FieldRefExp node) { NodeHandle obj = node.object(); VarDecl field = node.fieldDecl(); @@ -777,8 +775,15 @@ NodeHandle FieldRefExp::semanticCheckImpl(FieldRefExp node) { // Set the correct type for this node TypeWithStorage t = field.type(); ASSERT(t); - if (!Feather::isCategoryType(t)) - t = MutableType::get(t); + if (!Feather::isCategoryType(t)) { + auto baseTypeKind = obj.type().kind(); + if (baseTypeKind == typeKindConst) + t = ConstType::get(t); + else if (baseTypeKind == typeKindTemp) + t = TempType::get(t); + else + t = MutableType::get(t); + } node.setType(t); EvalMode mode = Feather_combineMode(obj.type().mode(), node.context()->evalMode); node.setType(node.type().changeMode(mode, node.location())); @@ -799,7 +804,7 @@ FunRefExp FunRefExp::create(const Location& loc, FunctionDecl funDecl, NodeHandl res.setReferredNodes(NodeRange{funDecl}); return res; } -FunctionDecl FunRefExp::funDecl() const { return FunctionDecl(referredNodes()[0]); } +FunctionDecl FunRefExp::funDecl() const { return {referredNodes()[0]}; } NodeHandle FunRefExp::resTypeNode() const { return children()[0]; } NodeHandle FunRefExp::semanticCheckImpl(FunRefExp node) { NodeHandle resType = node.resTypeNode(); @@ -826,7 +831,7 @@ FunCallExp FunCallExp::create(const Location& loc, FunctionDecl funDecl, NodeRan res.setReferredNodes(NodeRange{funDecl}); return res; } -FunctionDecl FunCallExp::funDecl() const { return FunctionDecl(referredNodes()[0]); } +FunctionDecl FunCallExp::funDecl() const { return {referredNodes()[0]}; } NodeRange FunCallExp::arguments() const { return children(); } NodeHandle FunCallExp::semanticCheckImpl(FunCallExp node) { FunctionDecl fun = node.funDecl(); @@ -1147,8 +1152,7 @@ NodeHandle IfStmt::semanticCheckImpl(IfStmt node) { // For ct ifs do a compute type beforehand // This is needed for top-level ct ifs - if (selectedBranch) - { + if (selectedBranch) { selectedBranch.setContext(node.context()); selectedBranch.computeType(); } diff --git a/src/Feather/src/Utils/cppif/FeatherTypes.cpp b/src/Feather/src/Utils/cppif/FeatherTypes.cpp index 5146e291..e1219586 100644 --- a/src/Feather/src/Utils/cppif/FeatherTypes.cpp +++ b/src/Feather/src/Utils/cppif/FeatherTypes.cpp @@ -25,7 +25,7 @@ DataType::DataType(Nest::TypeRef type) } DataType DataType::get(Nest::NodeHandle decl, int numReferences, Nest::EvalMode mode) { - return DataType(Feather_getDataType(decl, numReferences, mode)); + return {Feather_getDataType(decl, numReferences, mode)}; } ConstType::ConstType(Nest::TypeRef type) @@ -34,15 +34,15 @@ ConstType::ConstType(Nest::TypeRef type) REP_INTERNAL(NOLOC, "ConstType constructed with other type kind (%1%)") % type; } -ConstType ConstType::get(TypeWithStorage base) { +ConstType ConstType::get(TypeWithStorage base, Nest::Location loc) { if (!base) - REP_INTERNAL(NOLOC, "Null type given as base to const type"); + REP_INTERNAL(loc, "Null type given as base to const type"); int baseKind = base.kind(); if (baseKind == typeKindConst) - return ConstType(base); + return {base}; else if (baseKind == typeKindMutable || baseKind == typeKindTemp) - REP_INTERNAL(NOLOC, "Cannot construct a const type based on %1%") % base; - return ConstType(Feather_getConstType(base)); + REP_ERROR(loc, "Cannot construct a const type based on %1%") % base; + return {Feather_getConstType(base)}; } DataType ConstType::toRef() const { return DataType::get(referredNode(), numReferences(), mode()); } @@ -53,15 +53,15 @@ MutableType::MutableType(Nest::TypeRef type) REP_INTERNAL(NOLOC, "MutableType constructed with other type kind (%1%)") % type; } -MutableType MutableType::get(TypeWithStorage base) { +MutableType MutableType::get(TypeWithStorage base, Nest::Location loc) { if (!base) - REP_INTERNAL(NOLOC, "Null type given as base to const type"); + REP_INTERNAL(loc, "Null type given as base to const type"); int baseKind = base.kind(); if (baseKind == typeKindMutable) - return MutableType(base); + return {base}; else if (baseKind == typeKindConst || baseKind == typeKindTemp) - REP_INTERNAL(NOLOC, "Cannot construct a mutable type based on %1%") % base; - return MutableType(Feather_getMutableType(base)); + REP_ERROR(loc, "Cannot construct a mutable type based on %1%") % base; + return {Feather_getMutableType(base)}; } DataType MutableType::toRef() const { @@ -74,15 +74,15 @@ TempType::TempType(Nest::TypeRef type) REP_INTERNAL(NOLOC, "TempType constructed with other type kind (%1%)") % type; } -TempType TempType::get(TypeWithStorage base) { +TempType TempType::get(TypeWithStorage base, Nest::Location loc) { if (!base) - REP_INTERNAL(NOLOC, "Null type given as base to const type"); + REP_INTERNAL(loc, "Null type given as base to const type"); int baseKind = base.kind(); if (baseKind == typeKindTemp) - return TempType(base); + return {base}; else if (baseKind == typeKindConst || baseKind == typeKindMutable) - REP_INTERNAL(NOLOC, "Cannot construct a tmp type based on %1%") % base; - return TempType(Feather_getTempType(base)); + REP_ERROR(loc, "Cannot construct a tmp type based on %1%") % base; + return {Feather_getTempType(base)}; } DataType TempType::toRef() const { return DataType::get(referredNode(), numReferences(), mode()); } @@ -94,7 +94,7 @@ ArrayType::ArrayType(Nest::TypeRef type) } ArrayType ArrayType::get(TypeWithStorage unitType, int count) { - return ArrayType(Feather_getArrayType(unitType, count)); + return {Feather_getArrayType(unitType, count)}; } FunctionType::FunctionType(Nest::TypeRef type) @@ -105,7 +105,7 @@ FunctionType::FunctionType(Nest::TypeRef type) FunctionType FunctionType::get( Nest::TypeRef* resultTypeAndParams, int numTypes, Nest::EvalMode mode) { - return FunctionType(Feather_getFunctionType(resultTypeAndParams, numTypes, mode)); + return {Feather_getFunctionType(resultTypeAndParams, numTypes, mode)}; } bool isDataLikeType(Type type) { diff --git a/src/LLVMBackend/Generator.cpp b/src/LLVMBackend/Generator.cpp index 1d777735..e32c7525 100644 --- a/src/LLVMBackend/Generator.cpp +++ b/src/LLVMBackend/Generator.cpp @@ -72,7 +72,7 @@ void runCmd(const vector& args) { if (s.verbose_) cout << " " << arg; } - cstrArgs.push_back(nullptr); // Required until LLVM 7 + cstrArgs.push_back(nullptr); // Required until LLVM 7 #else // Transform the strings into a vector of llvm::StringRef, as required by ExecuteAndWait vector llvmArgs; @@ -114,7 +114,6 @@ void writeBitcodeFile(const Module& module, const string& outputFilename) { REP_INTERNAL(NOLOC, "Cannot generate bitcode file (%1%); reason: %2%") % outputFilename % errorInfo; - #if LLVM_VERSION_MAJOR < 7 llvm::WriteBitcodeToFile(&module, outFile->os()); #else diff --git a/src/LLVMBackend/Tr/DebugInfo.cpp b/src/LLVMBackend/Tr/DebugInfo.cpp index db8c0e59..f094e71d 100644 --- a/src/LLVMBackend/Tr/DebugInfo.cpp +++ b/src/LLVMBackend/Tr/DebugInfo.cpp @@ -110,7 +110,7 @@ void DebugInfo::emitFunctionEnd(LlvmBuilder& builder, const Location& loc) { } void DebugInfo::emitParamVar( - GlobalContext& ctx, Node* param, int idx, llvm::AllocaInst* llvmAlloca) { + GlobalContext& ctx, Node* param, int idx, llvm::Value* value, llvm::BasicBlock* where) { Location loc = param->location; ASSERT(!lexicalBlockStack_.empty()); @@ -121,8 +121,8 @@ void DebugInfo::emitParamVar( auto diVar = diBuilder_.createParameterVariable( scope, toLlvm(Feather_getName(param)), idx, file, loc.start.line, diType); - diBuilder_.insertDeclare(llvmAlloca, diVar, diBuilder_.createExpression(), - getDebugLoc(loc, scope), llvmAlloca->getParent()); + diBuilder_.insertDeclare( + value, diVar, diBuilder_.createExpression(), getDebugLoc(loc, scope), where); } void DebugInfo::emitLocalVar(GlobalContext& ctx, Node* var, llvm::AllocaInst* llvmAlloca) { @@ -220,6 +220,11 @@ llvm::DISubroutineType* DebugInfo::createDiFunType(GlobalContext& ctx, Type type } llvm::DIType* DebugInfo::createDiStructType(GlobalContext& ctx, Type type) { + // Check the cache first + auto it = typesMap_.find(type); + if (it != typesMap_.end()) + return it->second; + // First, check for primitive types llvm::Type* t = getLLVMType(type, ctx); if (!t) @@ -267,6 +272,10 @@ llvm::DIType* DebugInfo::createDiStructType(GlobalContext& ctx, Type type) { auto res = diBuilder_.createStructType(file, name, file, loc.start.line, sizeInBits, alignInBits, flags, nullptr, llvm::DINodeArray(), 0, nullptr, uniqueId); + // Add the result to the cache before we descend for the children + // This allows us to translate recursive structures + typesMap_[type] = res; + // Now create the members in the scope of the struct type ASSERT(t->isStructTy()); // NOLINTNEXTLINE @@ -296,6 +305,10 @@ llvm::DIType* DebugInfo::createDiStructType(GlobalContext& ctx, Type type) { } llvm::DIType* DebugInfo::createDiType(GlobalContext& ctx, Type type) { + // For datatypes, type caching is implemented in createDiStructType + if (type.numReferences() == 0 && type.kind() == Feather_getDataTypeKind()) + return createDiStructType(ctx, type); + // Check the cache first auto it = typesMap_.find(type); if (it != typesMap_.end()) @@ -310,8 +323,6 @@ llvm::DIType* DebugInfo::createDiType(GlobalContext& ctx, Type type) { int sizeInBits = dataLayout.getTypeAllocSizeInBits(t); auto baseType = createDiType(ctx, removeCatOrRef(TypeWithStorage(type))); res = diBuilder_.createPointerType(baseType, sizeInBits); - } else if (type.kind() == Feather_getDataTypeKind()) { - res = createDiStructType(ctx, type); } else if (type.kind() == Feather_getArrayTypeKind()) { auto baseType = createDiType(ctx, Feather_baseType(type)); auto numElements = (uint64_t)Feather_getArraySize(type); diff --git a/src/LLVMBackend/Tr/DebugInfo.h b/src/LLVMBackend/Tr/DebugInfo.h index 602a58db..3793c8af 100644 --- a/src/LLVMBackend/Tr/DebugInfo.h +++ b/src/LLVMBackend/Tr/DebugInfo.h @@ -40,7 +40,8 @@ class DebugInfo { void emitFunctionEnd(LlvmBuilder& builder, const Location& loc); //! Emit the debug info for a parameter variable - void emitParamVar(GlobalContext& ctx, Node* param, int idx, llvm::AllocaInst* llvmAlloca); + void emitParamVar( + GlobalContext& ctx, Node* param, int idx, llvm::Value* value, llvm::BasicBlock* where); //! Emit the debug info for a local variable void emitLocalVar(GlobalContext& ctx, Node* var, llvm::AllocaInst* llvmAlloca); diff --git a/src/LLVMBackend/Tr/TrFunction.cpp b/src/LLVMBackend/Tr/TrFunction.cpp index 9f8f62c4..c0bd2dbd 100644 --- a/src/LLVMBackend/Tr/TrFunction.cpp +++ b/src/LLVMBackend/Tr/TrFunction.cpp @@ -196,14 +196,23 @@ void createFunDefinition( if (!param) REP_INTERNAL(paramNode->location, "Expected Var node; found %1%") % paramNode; ASSERT(param); - llvm::AllocaInst* newVar = new llvm::AllocaInst(argIt->getType(), 0, - StringRef(Feather_getName(param)).toStd() + ".addr", bodyBlock); - newVar->setAlignment(Nest_getCheckPropertyInt(param, "alignment")); - new llvm::StoreInst(argIt, newVar, bodyBlock); // Copy the value of the parameter into it - Tr::setValue(localCtx, *param, newVar); // We point now to the new temp variable + + llvm::Value* paramVal = nullptr; + if (Feather::isCategoryType(param->type)) { + paramVal = argIt; + } else { + // Create a new var on the stack, to be able to take the address of our param + llvm::AllocaInst* newVar = new llvm::AllocaInst(argIt->getType(), 0, + StringRef(Feather_getName(param)).toStd() + ".addr", bodyBlock); + newVar->setAlignment(Nest_getCheckPropertyInt(param, "alignment")); + new llvm::StoreInst( + argIt, newVar, bodyBlock); // Copy the value of the parameter into it + paramVal = newVar; // We point now to the new temp variable + } + Tr::setValue(localCtx, *param, paramVal); if (dbgInfo) - dbgInfo->emitParamVar(ctx, param, idx + 1, newVar); + dbgInfo->emitParamVar(ctx, param, idx + 1, paramVal, bodyBlock); } // Translate the body diff --git a/src/LLVMBackend/Tr/TrLocal.cpp b/src/LLVMBackend/Tr/TrLocal.cpp index 759c5952..91fe36de 100644 --- a/src/LLVMBackend/Tr/TrLocal.cpp +++ b/src/LLVMBackend/Tr/TrLocal.cpp @@ -538,6 +538,10 @@ llvm::Value* translateStringRefConstant( llvm::Value* beginAddr = context.builder().CreateInBoundsGEP(tmpVar, indices, ""); indices[1] = constInt1; llvm::Value* endAddr = context.builder().CreateInBoundsGEP(tmpVar, indices, ""); + auto i8ptrptr = llvm::PointerType::getUnqual( + llvm::PointerType::getUnqual(llvm::IntegerType::get(context.llvmContext(), 8))); + beginAddr = context.builder().CreateBitCast(beginAddr, i8ptrptr); + endAddr = context.builder().CreateBitCast(endAddr, i8ptrptr); context.builder().CreateStore(globalStr, beginAddr); context.builder().CreateStore(globalStrEnd, endAddr); @@ -1183,8 +1187,11 @@ llvm::Value* translateContinue(Node* node, TrContext& context) { llvm::Value* translateVar(Node* node, TrContext& context) { ASSERT(context.parentFun()); + // Ignore category type here + auto varType = Feather::removeCategoryIfPresent(Type(node->type)); + // Create an 'alloca' instruction for the local variable - llvm::Type* t = Tr::getLLVMType(node->type, context.globalContext()); + llvm::Type* t = Tr::getLLVMType(varType, context.globalContext()); llvm::AllocaInst* val = context.addVariable(t, Feather_getName(node).begin); int alignment = Nest_getCheckPropertyInt(node, "alignment"); if (alignment > 0) diff --git a/src/LLVMBackend/Tr/TrTopLevel.cpp b/src/LLVMBackend/Tr/TrTopLevel.cpp index 32843e84..2ab30f36 100644 --- a/src/LLVMBackend/Tr/TrTopLevel.cpp +++ b/src/LLVMBackend/Tr/TrTopLevel.cpp @@ -17,6 +17,7 @@ #include "Feather/Api/Feather.h" #include "Feather/Utils/FeatherUtils.hpp" +#include "Feather/Utils/cppif/FeatherTypes.hpp" #include #include @@ -232,7 +233,10 @@ llvm::Value* Tr::translateGlobalVar(Node* node, GlobalContext& ctx) { REP_ERROR_RET(nullptr, node->location, "Invalid global variable %1%") % Feather_getName(node); - llvm::Type* t = getLLVMType(node->type, ctx); + // Ignore category type here + auto varType = Feather::removeCategoryIfPresent(Type(node->type)); + + llvm::Type* t = getLLVMType(varType, ctx); // Get the name of the variable const Nest_StringRef* nativeName = Nest_getPropertyString(node, propNativeName); diff --git a/src/Nest/Utils/Profiling.h b/src/Nest/Utils/Profiling.h index 84d89444..1831ff2c 100644 --- a/src/Nest/Utils/Profiling.h +++ b/src/Nest/Utils/Profiling.h @@ -54,7 +54,7 @@ inline void _Nest_Profiling_message(Nest_StringRef text) { typedef TracyCZoneCtx Nest_Profiling_ZoneCtx; #define PROFILING_C_ZONE_BEGIN_NAME(ctx, staticName, active) \ - static const Nest_Profiling_LocType TracyConcat(__tracy_source_location, __LINE__) = { \ + static const Nest_Profiling_LocType TracyConcat(__tracy_source_location, __LINE__) = { \ staticName, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0}; \ Nest_Profiling_ZoneCtx ctx = \ ___tracy_emit_zone_begin(&TracyConcat(__tracy_source_location, __LINE__), active); diff --git a/src/Nest/Utils/cppif/NodeHandle.hpp b/src/Nest/Utils/cppif/NodeHandle.hpp index 16602c28..0cfcc6a4 100644 --- a/src/Nest/Utils/cppif/NodeHandle.hpp +++ b/src/Nest/Utils/cppif/NodeHandle.hpp @@ -20,9 +20,8 @@ struct NodeRangeM; */ struct NodeHandle { //! The actual handle to the node - Nest_Node* handle; - NodeHandle() - : handle(nullptr){}; + Nest_Node* handle{nullptr}; + NodeHandle(){}; //! Construct a node handle from an actual C-style Nest_Node pointer NodeHandle(Nest_Node* h) : handle(h) {} diff --git a/src/Nest/Utils/cppif/StringRef.hpp b/src/Nest/Utils/cppif/StringRef.hpp index fe9eb6f3..0c325837 100644 --- a/src/Nest/Utils/cppif/StringRef.hpp +++ b/src/Nest/Utils/cppif/StringRef.hpp @@ -45,12 +45,10 @@ struct StringRef : Nest_StringRef { //! The mutable version of StringRef -- we can modify its content struct StringRefM { - char* begin; ///< The beginning of the string - char* end; ///< One past the last character of the string + char* begin{nullptr}; ///< The beginning of the string + char* end{nullptr}; ///< One past the last character of the string - StringRefM() - : begin(nullptr) - , end(nullptr) {} + StringRefM() {} StringRefM(int size); operator StringRef() { return {begin, end}; } diff --git a/src/Nest/Utils/cppif/Type.hpp b/src/Nest/Utils/cppif/Type.hpp index 95a585c6..5729580c 100644 --- a/src/Nest/Utils/cppif/Type.hpp +++ b/src/Nest/Utils/cppif/Type.hpp @@ -20,7 +20,7 @@ struct NodeHandle; */ struct Type { //! The actual type we are wrapping - Nest::TypeRef type_{}; + Nest::TypeRef type_{nullptr}; //! Constructor that initializes this with a null type Type() = default; diff --git a/src/Nest/Utils/cppif/TypeWithStorage.hpp b/src/Nest/Utils/cppif/TypeWithStorage.hpp index 9fc303d2..7af5bd58 100644 --- a/src/Nest/Utils/cppif/TypeWithStorage.hpp +++ b/src/Nest/Utils/cppif/TypeWithStorage.hpp @@ -23,7 +23,7 @@ struct TypeWithStorage : Type { //! @copydoc Type::changeMode TypeWithStorage changeMode(Nest::EvalMode mode, Nest::Location loc = Nest::Location{}) const { - return TypeWithStorage(Type::changeMode(mode, loc)); + return {Type::changeMode(mode, loc)}; } //!@} diff --git a/src/Nest/src/Api/Node.c b/src/Nest/src/Api/Node.c index 83ac4c8b..61f93295 100644 --- a/src/Nest/src/Api/Node.c +++ b/src/Nest/src/Api/Node.c @@ -93,7 +93,6 @@ void _setProfilingText(Nest_Profiling_ZoneCtx ctx, Nest_Node* node) { #define PROFILING_C_ZONE_SETNODETEXT(ctx, node) /*nothing*/ #endif - Nest_Node* Nest_createNode(int nodeKind) { ASSERT(nodeKind >= 0); @@ -136,7 +135,7 @@ void Nest_setContext(Nest_Node* node, Nest_CompilationContext* context) { return; int changingContext = node->context && node->context != context; - (void) changingContext; + (void)changingContext; PROFILING_C_ZONE_BEGIN_LOC(ctx, Nest_Profiling_getSetContextLoc(node->nodeKind)); diff --git a/src/Nest/src/Api/NodeKindRegistrar.c b/src/Nest/src/Api/NodeKindRegistrar.c index 860be8c9..0b021514 100644 --- a/src/Nest/src/Api/NodeKindRegistrar.c +++ b/src/Nest/src/Api/NodeKindRegistrar.c @@ -47,12 +47,10 @@ int Nest_registerNodeKind(const char* name, FSemanticCheck funSemanticCheck, funToString = Nest_defaultFunToString; #if SPARROW_PROFILING - const Nest_Profiling_LocType* setContextLoc = - Nest_Profiling_createLoc(strconcat("setCtx ", name), "Nest_setContext", "Node.c", - 1, 0x4f94cd); // SteelBlue3 - const Nest_Profiling_LocType* computeTypeLoc = - Nest_Profiling_createLoc(strconcat("compType ", name), "Nest_computeType", "Node.c", - 1, 0x36648b); // SteelBlue4 + const Nest_Profiling_LocType* setContextLoc = Nest_Profiling_createLoc( + strconcat("setCtx ", name), "Nest_setContext", "Node.c", 1, 0x4f94cd); // SteelBlue3 + const Nest_Profiling_LocType* computeTypeLoc = Nest_Profiling_createLoc( + strconcat("compType ", name), "Nest_computeType", "Node.c", 1, 0x36648b); // SteelBlue4 const Nest_Profiling_LocType* semanticCheckLoc = Nest_Profiling_createLoc(strconcat("semCheck ", name), "Nest_semanticCheck", "Node.c", 1, 0x27408b); // RoyalBlue4 diff --git a/src/SparrowCompiler/SparrowCompiler.cpp b/src/SparrowCompiler/SparrowCompiler.cpp index 91db4f5d..ea2f396e 100644 --- a/src/SparrowCompiler/SparrowCompiler.cpp +++ b/src/SparrowCompiler/SparrowCompiler.cpp @@ -196,6 +196,7 @@ vector gatherModules() { return res; } +// NOLINTNEXTLINE(bugprone-exception-escape) int main(int argc, char* argv[]) { CompilerStats& stats = CompilerStats::instance(); auto startTime = chrono::steady_clock::now(); diff --git a/src/SparrowFrontend/CtApiFunctions.cpp b/src/SparrowFrontend/CtApiFunctions.cpp index fc10eae5..642580fd 100644 --- a/src/SparrowFrontend/CtApiFunctions.cpp +++ b/src/SparrowFrontend/CtApiFunctions.cpp @@ -5,6 +5,7 @@ #include #include +#include "Nodes/Decl.hpp" #include "Nest/Api/Backend.h" #include "Nest/Api/SourceCode.h" @@ -31,7 +32,7 @@ Node* ctApi_Sparrow_mkSprPackage(Location* loc, StringRef name, Node* children) return mkSprPackage(*loc, name, children); } Node* ctApi_Sparrow_mkSprVariable(Location* loc, StringRef name, Node* typeNode, Node* init) { - return mkSprVariable(*loc, name, typeNode, init); + return VariableDecl::createMut(*loc, name, typeNode, init); } Node* ctApi_Sparrow_mkSprDatatype(Location* loc, StringRef name, Node* parameters, Node* baseClasses, Node* ifClause, Node* children) { diff --git a/src/SparrowFrontend/Grammar/Parser.cpp b/src/SparrowFrontend/Grammar/Parser.cpp index a8093490..79e20a75 100644 --- a/src/SparrowFrontend/Grammar/Parser.cpp +++ b/src/SparrowFrontend/Grammar/Parser.cpp @@ -3,6 +3,7 @@ #include "Nodes/Builder.h" #include "Helpers/DeclsHelpers.h" #include "Nest/Api/SourceCode.h" +#include "SparrowFrontend/Nodes/Decl.hpp" using namespace SprFrontend; @@ -42,6 +43,7 @@ struct AstBuilder { Node* (*mkDatatypeFn)(AstBuilder*, const Location*, StringRef, Node*, Node*, Node*, Node*); Node* (*mkFieldFn)(AstBuilder*, const Location*, StringRef, Node*, Node*); Node* (*mkConceptFn)(AstBuilder*, const Location*, StringRef, StringRef, Node*, Node*); + Node* (*mkLetFn)(AstBuilder*, const Location*, StringRef, Node*, Node*); Node* (*mkVarFn)(AstBuilder*, const Location*, StringRef, Node*, Node*); Node* (*mkParameterFn)(AstBuilder*, const Location*, StringRef, Node*, Node*); Node* (*mkFunFn)(AstBuilder*, const Location*, StringRef, Node*, Node*, Node*, Node*, Node*); @@ -78,7 +80,8 @@ struct AstBuilder { //! Compiler implementation or error reporter struct CompilerErrorReporter : ErrorReporter { - CompilerErrorReporter() { + CompilerErrorReporter() + : ErrorReporter() { self = this; reportErrorFn = &CompilerErrorReporter::reportError; } @@ -90,7 +93,8 @@ struct CompilerErrorReporter : ErrorReporter { //! Compiler implementation or error reporter struct CompilerAstBuilder : AstBuilder { - CompilerAstBuilder() { + CompilerAstBuilder() + : AstBuilder() { self = this; addToNodeListFn = &CompilerAstBuilder::addToNodeList_Impl; @@ -102,6 +106,7 @@ struct CompilerAstBuilder : AstBuilder { mkDatatypeFn = &CompilerAstBuilder::mkDatatype_Impl; mkFieldFn = &CompilerAstBuilder::mkField_Impl; mkConceptFn = &CompilerAstBuilder::mkConcept_Impl; + mkLetFn = &CompilerAstBuilder::mkLet_Impl; mkVarFn = &CompilerAstBuilder::mkVar_Impl; mkParameterFn = &CompilerAstBuilder::mkParameter_Impl; mkFunFn = &CompilerAstBuilder::mkFun_Impl; @@ -169,9 +174,13 @@ struct CompilerAstBuilder : AstBuilder { StringRef paramName, Node* baseConcept, Node* ifClause) { return mkSprConcept(*loc, name, paramName, baseConcept, ifClause); } + static Node* mkLet_Impl( + AstBuilder*, const Location* loc, StringRef name, Node* typeNode, Node* init) { + return VariableDecl::createConst(*loc, name, typeNode, init); + } static Node* mkVar_Impl( AstBuilder*, const Location* loc, StringRef name, Node* typeNode, Node* init) { - return mkSprVariable(*loc, name, typeNode, init); + return VariableDecl::createMut(*loc, name, typeNode, init); } static Node* mkParameter_Impl( AstBuilder*, const Location* loc, StringRef name, Node* typeNode, Node* init) { diff --git a/src/SparrowFrontend/Grammar/bufferedCharSource.spr b/src/SparrowFrontend/Grammar/bufferedCharSource.spr index 47c4b3a6..c0c8e4ec 100644 --- a/src/SparrowFrontend/Grammar/bufferedCharSource.spr +++ b/src/SparrowFrontend/Grammar/bufferedCharSource.spr @@ -11,7 +11,7 @@ datatype BufferedCharSource _buffer: String //!< Buffer in which we read characters; striving to keeping it with data _curPos: Int //!< The current position in _buffer from which we read the current char -fun ctor(this: @BufferedCharSource, src: CharSource) +fun ctor(this: !BufferedCharSource, src: CharSource) _src ctor src _buffer ctor _buffer reserve _bufferSize @@ -20,7 +20,7 @@ fun ctor(this: @BufferedCharSource, src: CharSource) fun all(this: @BufferedCharSource) = BufferedCharSourceRange(this) -fun _ensureBufferHasData(this: @BufferedCharSource) +fun _ensureBufferHasData(this: !BufferedCharSource) if _curPos >= (_buffer size) _buffer clear _curPos = 0 @@ -32,8 +32,8 @@ datatype BufferedCharSourceRange using RetType = Char _data: @BufferedCharSource -fun isEmpty(this: @BufferedCharSourceRange): Bool = _data._buffer.isEmpty -fun front(this: @BufferedCharSourceRange): Char = _data._buffer(_data._curPos) -fun popFront(this: @BufferedCharSourceRange) +fun isEmpty(this: BufferedCharSourceRange): Bool = _data._buffer.isEmpty +fun front(this: BufferedCharSourceRange): Char = _data._buffer(_data._curPos) +fun popFront(this: !BufferedCharSourceRange) _data._curPos++ _data._ensureBufferHasData diff --git a/src/SparrowFrontend/Grammar/ext.spr b/src/SparrowFrontend/Grammar/ext.spr index 06cc76ef..6f10cae5 100644 --- a/src/SparrowFrontend/Grammar/ext.spr +++ b/src/SparrowFrontend/Grammar/ext.spr @@ -9,27 +9,27 @@ import std.string fun _returnsVoid {} using VoidType = typeOf(_returnsVoid()) -fun _reinterpretAssign(dest: @AnyType, src: AnyType) +fun _reinterpretAssign(dest: !AnyType, src: AnyType) reinterpretCast(@typeOf(src), dest) = src -fun _eraseType(obj: @AnyType): UntypedPtr - return UntypedPtr(reinterpretCast(@Byte, obj)) +fun _eraseType(obj: AnyType): UntypedPtr + return UntypedPtr(obj) //! Interface that models a source of characters. //! It allows the caller to read multiple characters at once datatype CharSource userData: UntypedPtr - readCharsFn: FunctionPtr(VoidType, UntypedPtr, @String, Int) + readCharsFn: FunctionPtr(VoidType, UntypedPtr, !String, Int) concept CharSourceType(x) \ if isValid(x.readChars(StringRef(), 0)) -fun mkCharSource(obj: @CharSourceType): CharSource +fun mkCharSource(obj: !CharSourceType): CharSource var res: CharSource res.userData = _eraseType(obj) res.readCharsFn _reinterpretAssign \(obj.readChars) return res -fun readChars(obj: CharSource, dest: @String, numChars: Int) +fun readChars(obj: CharSource, dest: !String, numChars: Int) obj.readCharsFn(obj.userData, dest, numChars) @@ -37,21 +37,21 @@ fun readChars(obj: CharSource, dest: @String, numChars: Int) //! Interface for the object used to report errors datatype ErrorReporter userData: UntypedPtr - reportErrorFn: FunctionPtr(VoidType, UntypedPtr, @Location, StringRef) + reportErrorFn: FunctionPtr(VoidType, UntypedPtr, Location const, StringRef) concept ErrorReporterType(x) \ if isValid(x.reportError(Location(), StringRef())) -fun mkErrorReporter(obj: @ErrorReporterType): ErrorReporter +fun mkErrorReporter(obj: ErrorReporterType): ErrorReporter var res: ErrorReporter res.userData = _eraseType(obj) res.reportErrorFn _reinterpretAssign \(obj.reportError) return res -fun reportError(obj: ErrorReporter, loc: @Location, msg: StringRef) +fun reportError(obj: ErrorReporter, loc: Location, msg: StringRef) obj.reportErrorFn(obj.userData, loc, msg) -fun reportError(obj: ErrorReporter, loc: @Location, msg: @String) +fun reportError(obj: ErrorReporter, loc: Location, msg: String) obj.reportErrorFn(obj.userData, loc, msg.asStringRef) @@ -61,48 +61,49 @@ datatype AstBuilder addToNodeListFn: FunctionPtr(Node, UntypedPtr, Node, Node) - mkModifiersFn: FunctionPtr(Node, UntypedPtr, @Location, Node, Node) - mkModuleFn: FunctionPtr(Node, UntypedPtr, @Location, Node, Node) - mkImportNameFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, Node, Node) - mkUsingFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, Node) - mkPackageFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, Node, Node, Node) - mkDatatypeFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node) - mkFieldFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, Node, Node) - mkConceptFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node) - mkVarFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, Node, Node) - mkParameterFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, Node, Node) - mkFunFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node) + mkModifiersFn: FunctionPtr(Node, UntypedPtr, Location const, Node, Node) + mkModuleFn: FunctionPtr(Node, UntypedPtr, Location const, Node, Node) + mkImportNameFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node, Node) + mkUsingFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node) + mkPackageFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node, Node, Node) + mkDatatypeFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node) + mkFieldFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node, Node) + mkConceptFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node) + mkLetFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node, Node) + mkVarFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node, Node) + mkParameterFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node, Node) + mkFunFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node) mkParenthesisExprFn:FunctionPtr(Node, UntypedPtr, Node) - mkPostfixOpFn: FunctionPtr(Node, UntypedPtr, @Location, Node, StringRef) - mkInfixOpFn: FunctionPtr(Node, UntypedPtr, @Location, Node, StringRef, Node) - mkPrefixOpFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, Node) - mkIdentifierFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef) - mkCompoundExprFn: FunctionPtr(Node, UntypedPtr, @Location, Node, StringRef) - mkStarExprFn: FunctionPtr(Node, UntypedPtr, @Location, Node, StringRef) - mkDotExprFn: FunctionPtr(Node, UntypedPtr, @Location, Node, StringRef) - mkFunAppExprFn: FunctionPtr(Node, UntypedPtr, @Location, Node, Node) - mkLambdaExprFn: FunctionPtr(Node, UntypedPtr, @Location, Node, Node, Node, Node, Node) - mkNullLiteralFn: FunctionPtr(Node, UntypedPtr, @Location) - mkBoolLiteralFn: FunctionPtr(Node, UntypedPtr, @Location, Bool) - mkIntLiteralFn: FunctionPtr(Node, UntypedPtr, @Location, Int) - mkUIntLiteralFn: FunctionPtr(Node, UntypedPtr, @Location, UInt) - mkLongLiteralFn: FunctionPtr(Node, UntypedPtr, @Location, Long) - mkULongLiteralFn: FunctionPtr(Node, UntypedPtr, @Location, ULong) - mkFloatLiteralFn: FunctionPtr(Node, UntypedPtr, @Location, Float) - mkDoubleLiteralFn: FunctionPtr(Node, UntypedPtr, @Location, Double) - mkCharLiteralFn: FunctionPtr(Node, UntypedPtr, @Location, Char) - mkStringLiteralFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef) - - mkBlockStmtFn: FunctionPtr(Node, UntypedPtr, @Location, Node) - mkIfStmtFn: FunctionPtr(Node, UntypedPtr, @Location, Node, Node, Node) - mkForStmtFn: FunctionPtr(Node, UntypedPtr, @Location, StringRef, Node, Node, Node) - mkWhileStmtFn: FunctionPtr(Node, UntypedPtr, @Location, Node, Node, Node) - mkBreakStmtFn: FunctionPtr(Node, UntypedPtr, @Location) - mkContinueStmtFn: FunctionPtr(Node, UntypedPtr, @Location) - mkReturnStmtFn: FunctionPtr(Node, UntypedPtr, @Location, Node) - -fun mkAstBuilder(obj: @AnyType): AstBuilder + mkPostfixOpFn: FunctionPtr(Node, UntypedPtr, Location const, Node, StringRef) + mkInfixOpFn: FunctionPtr(Node, UntypedPtr, Location const, Node, StringRef, Node) + mkPrefixOpFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node) + mkIdentifierFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef) + mkCompoundExprFn: FunctionPtr(Node, UntypedPtr, Location const, Node, StringRef) + mkStarExprFn: FunctionPtr(Node, UntypedPtr, Location const, Node, StringRef) + mkDotExprFn: FunctionPtr(Node, UntypedPtr, Location const, Node, StringRef) + mkFunAppExprFn: FunctionPtr(Node, UntypedPtr, Location const, Node, Node) + mkLambdaExprFn: FunctionPtr(Node, UntypedPtr, Location const, Node, Node, Node, Node, Node) + mkNullLiteralFn: FunctionPtr(Node, UntypedPtr, Location const) + mkBoolLiteralFn: FunctionPtr(Node, UntypedPtr, Location const, Bool) + mkIntLiteralFn: FunctionPtr(Node, UntypedPtr, Location const, Int) + mkUIntLiteralFn: FunctionPtr(Node, UntypedPtr, Location const, UInt) + mkLongLiteralFn: FunctionPtr(Node, UntypedPtr, Location const, Long) + mkULongLiteralFn: FunctionPtr(Node, UntypedPtr, Location const, ULong) + mkFloatLiteralFn: FunctionPtr(Node, UntypedPtr, Location const, Float) + mkDoubleLiteralFn: FunctionPtr(Node, UntypedPtr, Location const, Double) + mkCharLiteralFn: FunctionPtr(Node, UntypedPtr, Location const, Char) + mkStringLiteralFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef) + + mkBlockStmtFn: FunctionPtr(Node, UntypedPtr, Location const, Node) + mkIfStmtFn: FunctionPtr(Node, UntypedPtr, Location const, Node, Node, Node) + mkForStmtFn: FunctionPtr(Node, UntypedPtr, Location const, StringRef, Node, Node, Node) + mkWhileStmtFn: FunctionPtr(Node, UntypedPtr, Location const, Node, Node, Node) + mkBreakStmtFn: FunctionPtr(Node, UntypedPtr, Location const) + mkContinueStmtFn: FunctionPtr(Node, UntypedPtr, Location const) + mkReturnStmtFn: FunctionPtr(Node, UntypedPtr, Location const, Node) + +fun mkAstBuilder(obj: !AnyType): AstBuilder var res: AstBuilder res.userData = _eraseType(obj) res.addToNodeListFn _reinterpretAssign \(obj.addToNodeList) @@ -115,6 +116,7 @@ fun mkAstBuilder(obj: @AnyType): AstBuilder res.mkDatatypeFn _reinterpretAssign \(obj.mkDatatype) res.mkFieldFn _reinterpretAssign \(obj.mkField) res.mkConceptFn _reinterpretAssign \(obj.mkConcept) + res.mkLetFn _reinterpretAssign \(obj.mkLet) res.mkVarFn _reinterpretAssign \(obj.mkVar) res.mkParameterFn _reinterpretAssign \(obj.mkParameter) res.mkFunFn _reinterpretAssign \(obj.mkFun) @@ -151,84 +153,86 @@ fun mkAstBuilder(obj: @AnyType): AstBuilder -fun addToNodeList(obj: @AstBuilder, nl, newNode: Node): Node +fun addToNodeList(obj: !AstBuilder, nl, newNode: Node): Node return obj.addToNodeListFn(obj.userData, nl, newNode) -fun mkModifiers(obj: @AstBuilder, loc: @Location, main, mods: Node): Node +fun mkModifiers(obj: !AstBuilder, loc: Location, main, mods: Node): Node return obj.mkModifiersFn(obj.userData, loc, main, mods) -fun mkModule(obj: @AstBuilder, loc: @Location, moduleName, decls: Node): Node +fun mkModule(obj: !AstBuilder, loc: Location, moduleName, decls: Node): Node return obj.mkModuleFn(obj.userData, loc, moduleName, decls) -fun mkImportName(obj: @AstBuilder, loc: @Location, alias: StringRef, toImport, decls: Node): Node +fun mkImportName(obj: !AstBuilder, loc: Location, alias: StringRef, toImport, decls: Node): Node return obj.mkImportNameFn(obj.userData, loc, alias, toImport, decls) -fun mkUsing(obj: @AstBuilder, loc: @Location, alias: StringRef, usingNode: Node): Node +fun mkUsing(obj: !AstBuilder, loc: Location, alias: StringRef, usingNode: Node): Node return obj.mkUsingFn(obj.userData, loc, alias, usingNode) -fun mkPackage(obj: @AstBuilder, loc: @Location, name: StringRef, children, params, ifClause: Node): Node +fun mkPackage(obj: !AstBuilder, loc: Location, name: StringRef, children, params, ifClause: Node): Node return obj.mkPackageFn(obj.userData, loc, name, children, params, ifClause) -fun mkDatatype(obj: @AstBuilder, loc: @Location, name: StringRef, params, underlyingData, ifClause, children: Node): Node +fun mkDatatype(obj: !AstBuilder, loc: Location, name: StringRef, params, underlyingData, ifClause, children: Node): Node return obj.mkDatatypeFn(obj.userData, loc, name, params, underlyingData, ifClause, children) -fun mkField(obj: @AstBuilder, loc: @Location, name: StringRef, typeNode, init: Node): Node +fun mkField(obj: !AstBuilder, loc: Location, name: StringRef, typeNode, init: Node): Node return obj.mkFieldFn(obj.userData, loc, name, typeNode, init) -fun mkConcept(obj: @AstBuilder, loc: @Location, name, paramName: StringRef, baseConcept, ifClause: Node): Node +fun mkConcept(obj: !AstBuilder, loc: Location, name, paramName: StringRef, baseConcept, ifClause: Node): Node return obj.mkConceptFn(obj.userData, loc, name, paramName, baseConcept, ifClause) -fun mkVar(obj: @AstBuilder, loc: @Location, name: StringRef, typeNode, init: Node): Node +fun mkLet(obj: !AstBuilder, loc: Location, name: StringRef, typeNode, init: Node): Node + return obj.mkLetFn(obj.userData, loc, name, typeNode, init) +fun mkVar(obj: !AstBuilder, loc: Location, name: StringRef, typeNode, init: Node): Node return obj.mkVarFn(obj.userData, loc, name, typeNode, init) -fun mkParameter(obj: @AstBuilder, loc: @Location, name: StringRef, typeNode, init: Node): Node +fun mkParameter(obj: !AstBuilder, loc: Location, name: StringRef, typeNode, init: Node): Node return obj.mkParameterFn(obj.userData, loc, name, typeNode, init) -fun mkFun(obj: @AstBuilder, loc: @Location, name: StringRef, formals, retType, body, bodyExp, ifClause: Node): Node +fun mkFun(obj: !AstBuilder, loc: Location, name: StringRef, formals, retType, body, bodyExp, ifClause: Node): Node return obj.mkFunFn(obj.userData, loc, name, formals, retType, body, bodyExp, ifClause) -fun mkParenthesisExpr(obj: @AstBuilder, expr: Node): Node +fun mkParenthesisExpr(obj: !AstBuilder, expr: Node): Node return obj.mkParenthesisExprFn(obj.userData, expr) -fun mkPostfixOp(obj: @AstBuilder, loc: @Location, base: Node, op: StringRef): Node +fun mkPostfixOp(obj: !AstBuilder, loc: Location, base: Node, op: StringRef): Node return obj.mkPostfixOpFn(obj.userData, loc, base, op) -fun mkInfixOp(obj: @AstBuilder, loc: @Location, lhs: Node, op: StringRef, rhs: Node): Node +fun mkInfixOp(obj: !AstBuilder, loc: Location, lhs: Node, op: StringRef, rhs: Node): Node return obj.mkInfixOpFn(obj.userData, loc, lhs, op, rhs) -fun mkPrefixOp(obj: @AstBuilder, loc: @Location, op: StringRef, base: Node): Node +fun mkPrefixOp(obj: !AstBuilder, loc: Location, op: StringRef, base: Node): Node return obj.mkPrefixOpFn(obj.userData, loc, op, base) -fun mkIdentifier(obj: @AstBuilder, loc: @Location, id: StringRef): Node +fun mkIdentifier(obj: !AstBuilder, loc: Location, id: StringRef): Node return obj.mkIdentifierFn(obj.userData, loc, id) -fun mkCompoundExpr(obj: @AstBuilder, loc: @Location, base: Node, id: StringRef): Node +fun mkCompoundExpr(obj: !AstBuilder, loc: Location, base: Node, id: StringRef): Node return obj.mkCompoundExprFn(obj.userData, loc, base, id) -fun mkStarExpr(obj: @AstBuilder, loc: @Location, base: Node, id: StringRef): Node +fun mkStarExpr(obj: !AstBuilder, loc: Location, base: Node, id: StringRef): Node return obj.mkStarExprFn(obj.userData, loc, base, id) -fun mkDotExpr(obj: @AstBuilder, loc: @Location, base: Node, id: StringRef): Node +fun mkDotExpr(obj: !AstBuilder, loc: Location, base: Node, id: StringRef): Node return obj.mkDotExprFn(obj.userData, loc, base, id) -fun mkFunAppExpr(obj: @AstBuilder, loc: @Location, base, args: Node): Node +fun mkFunAppExpr(obj: !AstBuilder, loc: Location, base, args: Node): Node return obj.mkFunAppExprFn(obj.userData, loc, base, args) -fun mkLambdaExpr(obj: @AstBuilder, loc: @Location, closureParams, formals, retType, body, bodyExpr: Node): Node +fun mkLambdaExpr(obj: !AstBuilder, loc: Location, closureParams, formals, retType, body, bodyExpr: Node): Node return obj.mkLambdaExprFn(obj.userData, loc, closureParams, formals, retType, body, bodyExpr) -fun mkNullLiteral(obj: @AstBuilder, loc: @Location): Node +fun mkNullLiteral(obj: !AstBuilder, loc: Location): Node return obj.mkNullLiteralFn(obj.userData, loc) -fun mkBoolLiteral(obj: @AstBuilder, loc: @Location, val: Bool): Node +fun mkBoolLiteral(obj: !AstBuilder, loc: Location, val: Bool): Node return obj.mkBoolLiteralFn(obj.userData, loc, val) -fun mkIntLiteral(obj: @AstBuilder, loc: @Location, val: Int): Node +fun mkIntLiteral(obj: !AstBuilder, loc: Location, val: Int): Node return obj.mkIntLiteralFn(obj.userData, loc, val) -fun mkUIntLiteral(obj: @AstBuilder, loc: @Location, val: UInt): Node +fun mkUIntLiteral(obj: !AstBuilder, loc: Location, val: UInt): Node return obj.mkUIntLiteralFn(obj.userData, loc, val) -fun mkLongLiteral(obj: @AstBuilder, loc: @Location, val: Long): Node +fun mkLongLiteral(obj: !AstBuilder, loc: Location, val: Long): Node return obj.mkLongLiteralFn(obj.userData, loc, val) -fun mkULongLiteral(obj: @AstBuilder, loc: @Location, val: ULong): Node +fun mkULongLiteral(obj: !AstBuilder, loc: Location, val: ULong): Node return obj.mkULongLiteralFn(obj.userData, loc, val) -fun mkFloatLiteral(obj: @AstBuilder, loc: @Location, val: Float): Node +fun mkFloatLiteral(obj: !AstBuilder, loc: Location, val: Float): Node return obj.mkFloatLiteralFn(obj.userData, loc, val) -fun mkDoubleLiteral(obj: @AstBuilder, loc: @Location, val: Double): Node +fun mkDoubleLiteral(obj: !AstBuilder, loc: Location, val: Double): Node return obj.mkDoubleLiteralFn(obj.userData, loc, val) -fun mkCharLiteral(obj: @AstBuilder, loc: @Location, val: Char): Node +fun mkCharLiteral(obj: !AstBuilder, loc: Location, val: Char): Node return obj.mkCharLiteralFn(obj.userData, loc, val) -fun mkStringLiteral(obj: @AstBuilder, loc: @Location, data: StringRef): Node +fun mkStringLiteral(obj: !AstBuilder, loc: Location, data: StringRef): Node return obj.mkStringLiteralFn(obj.userData, loc, data) -fun mkBlockStmt(obj: @AstBuilder, loc: @Location, stmts: Node): Node +fun mkBlockStmt(obj: !AstBuilder, loc: Location, stmts: Node): Node return obj.mkBlockStmtFn(obj.userData, loc, stmts) -fun mkIfStmt(obj: @AstBuilder, loc: @Location, expr, thenClause, elseClause: Node): Node +fun mkIfStmt(obj: !AstBuilder, loc: Location, expr, thenClause, elseClause: Node): Node return obj.mkIfStmtFn(obj.userData, loc, expr, thenClause, elseClause) -fun mkForStmt(obj: @AstBuilder, loc: @Location, id: StringRef, typeNode, range, action: Node): Node +fun mkForStmt(obj: !AstBuilder, loc: Location, id: StringRef, typeNode, range, action: Node): Node return obj.mkForStmtFn(obj.userData, loc, id, typeNode, range, action) -fun mkWhileStmt(obj: @AstBuilder, loc: @Location, expr, stepAction, body: Node): Node +fun mkWhileStmt(obj: !AstBuilder, loc: Location, expr, stepAction, body: Node): Node return obj.mkWhileStmtFn(obj.userData, loc, expr, stepAction, body) -fun mkBreakStmt(obj: @AstBuilder, loc: @Location): Node +fun mkBreakStmt(obj: !AstBuilder, loc: Location): Node return obj.mkBreakStmtFn(obj.userData, loc) -fun mkContinueStmt(obj: @AstBuilder, loc: @Location): Node +fun mkContinueStmt(obj: !AstBuilder, loc: Location): Node return obj.mkContinueStmtFn(obj.userData, loc) -fun mkReturnStmt(obj: @AstBuilder, loc: @Location, expr: Node): Node +fun mkReturnStmt(obj: !AstBuilder, loc: Location, expr: Node): Node return obj.mkReturnStmtFn(obj.userData, loc, expr) diff --git a/src/SparrowFrontend/Grammar/fileCharSource.spr b/src/SparrowFrontend/Grammar/fileCharSource.spr index 3b3cf5ec..d8372809 100644 --- a/src/SparrowFrontend/Grammar/fileCharSource.spr +++ b/src/SparrowFrontend/Grammar/fileCharSource.spr @@ -5,12 +5,12 @@ import os, std.ranges, std.string datatype FileCharSource _file: File -fun ctor(this: @FileCharSource, filename: StringRef) +fun ctor(this: !FileCharSource, filename: StringRef) _file ctor filename -fun isValid(this: @FileCharSource) = _file.isOpen +fun isValid(this: !FileCharSource) = _file.isOpen -fun readChars(this: @FileCharSource, dest: @String, numChars: Int) +fun readChars(this: !FileCharSource, dest: !String, numChars: Int) for i = 0..numChars var ch = _file.readChar if _file.isEof diff --git a/src/SparrowFrontend/Grammar/layoutDecoder.spr b/src/SparrowFrontend/Grammar/layoutDecoder.spr index 7b092001..c8e6ce94 100644 --- a/src/SparrowFrontend/Grammar/layoutDecoder.spr +++ b/src/SparrowFrontend/Grammar/layoutDecoder.spr @@ -38,7 +38,7 @@ datatype SparrowLayoutDecoder(tokensRangeType: Type) \ /// If the number of tokens is greater than 1, we change the type to '}' _toInjectCnt: Int -fun ctor(this: @SparrowLayoutDecoder, tokens: this._TokensRangeType, errorReporter: ErrorReporter) +fun ctor(this: !SparrowLayoutDecoder, tokens: this._TokensRangeType, errorReporter: ErrorReporter) this._src ctor tokens this._errorReporter ctor errorReporter this._indents += 1 // Start at column 1 @@ -49,13 +49,13 @@ fun ctor(this: @SparrowLayoutDecoder, tokens: this._TokensRangeType, errorReport if !_src.isEmpty && (_src.front).type == tkEOL this.popFront -fun isEmpty(this: @SparrowLayoutDecoder): Bool = _toInjectCnt == 0 && _src.isEmpty -fun front(this: @SparrowLayoutDecoder): Token +fun isEmpty(this: SparrowLayoutDecoder): Bool = _toInjectCnt == 0 && _src.isEmpty +fun front(this: SparrowLayoutDecoder): Token var tk = _src.front if _toInjectCnt > 0 tk.type = _toInject return tk -fun popFront(this: @SparrowLayoutDecoder) +fun popFront(this: !SparrowLayoutDecoder) // Are we moving past the injected tokens? if _toInjectCnt > 0 _toInjectCnt-- // Consume one injected token diff --git a/src/SparrowFrontend/Grammar/parser.spr b/src/SparrowFrontend/Grammar/parser.spr index 8e90ac2f..5bc13ac3 100644 --- a/src/SparrowFrontend/Grammar/parser.spr +++ b/src/SparrowFrontend/Grammar/parser.spr @@ -24,7 +24,7 @@ datatype SparrowParser(tokensRangeType: Type) if TokenRange(#$tokensRangeType) /// Object used to report errors _errorReporter: ErrorReporter -fun ctor(this: @SparrowParser, tokens: this._TokensRangeType, astBuilder: @AstBuilder, errorReporter: ErrorReporter) +fun ctor(this: !SparrowParser, tokens: this._TokensRangeType, astBuilder: AstBuilder, errorReporter: ErrorReporter) this._tokens ctor tokens this._hasErrors ctor false this._astBuilder ctor astBuilder @@ -34,7 +34,7 @@ using parseModule = _Impl.parseModule using parseExpression = _Impl.parseExpression package _Impl - fun reportError(this: @SparrowParser, msg: @String) + fun reportError(this: !SparrowParser, msg: String) // Report the error _errorReporter.reportError((*_tokens).loc, msg) // Consume all the tokens until the end of the file @@ -42,20 +42,20 @@ package _Impl _lastToken = (_tokens++) _hasErrors = true - fun curLoc(this: @SparrowParser) = (*_tokens).loc - fun lastLoc(this: @SparrowParser) = _lastToken.loc + fun curLoc(this: SparrowParser) = (*_tokens).loc + fun lastLoc(this: SparrowParser) = _lastToken.loc - fun nextIs(this: @SparrowParser, t: TokenType): Bool = (*_tokens).type == t - fun next2Is(this: @SparrowParser, t: TokenType): Bool = (_tokens peek 1).type == t + fun nextIs(this: SparrowParser, t: TokenType): Bool = (*_tokens).type == t + fun next2Is(this: !SparrowParser, t: TokenType): Bool = (_tokens peek 1).type == t - fun accept(this: @SparrowParser, t: TokenType): Bool + fun accept(this: !SparrowParser, t: TokenType): Bool if (*_tokens).type == t _lastToken = (_tokens++) // cout << "Accepted " << _lastToken.type << endl return true return false - fun expect(this: @SparrowParser, t: TokenType): Bool + fun expect(this: !SparrowParser, t: TokenType): Bool // Everything is ok if this is the token we are expecting if this accept t return true @@ -69,7 +69,7 @@ package _Impl // Top level parsing // - fun parseModule(this: @SparrowParser): Node + fun parseModule(this: !SparrowParser): Node var loc = this curLoc var moduleName = parseModuleName(this) var decls: Node @@ -77,7 +77,7 @@ package _Impl this expect tkEND return _astBuilder.mkModule(loc span (this lastLoc), moduleName, decls) - fun parseExpression(this: @SparrowParser): Node + fun parseExpression(this: !SparrowParser): Node var res = parseExpr(this) this accept tkSEMICOLON this expect tkEND @@ -87,10 +87,10 @@ package _Impl // Common rules // - fun consumeSemis(this: @SparrowParser) + fun consumeSemis(this: !SparrowParser) while this accept tkSEMICOLON {} - fun parseIdOrOper(this: @SparrowParser, withEqual: Bool = true): String + fun parseIdOrOper(this: !SparrowParser, withEqual: Bool = true): String if this accept tkIDENTIFIER return _lastToken.data else if this accept tkOPERATOR @@ -99,7 +99,7 @@ package _Impl return "=" this reportError toString("Syntax error, unexpected ", (*_tokens).type, ", expecting identifier or operator") - fun parseIdOrOperOpt(this: @SparrowParser, withEqual: Bool = true): String + fun parseIdOrOperOpt(this: !SparrowParser, withEqual: Bool = true): String if this accept tkIDENTIFIER return _lastToken.data else if this accept tkOPERATOR @@ -109,7 +109,7 @@ package _Impl else return String() - fun parseOperOpt(this: @SparrowParser, withEqual: Bool = true): String + fun parseOperOpt(this: !SparrowParser, withEqual: Bool = true): String if this accept tkOPERATOR return _lastToken.data else if withEqual && (this accept tkEQUAL) @@ -117,13 +117,13 @@ package _Impl else return String() - fun parseId(this: @SparrowParser): String + fun parseId(this: !SparrowParser): String this expect tkIDENTIFIER return _lastToken.data // Parses a structure of the form 'id =', with lookahead // Can appear in the context of other non-equal expressions - fun parseIdEqualOpt(this: @SparrowParser): String + fun parseIdEqualOpt(this: !SparrowParser): String var id: String if (this nextIs tkIDENTIFIER) && (this next2Is tkEQUAL) this expect tkIDENTIFIER @@ -131,7 +131,7 @@ package _Impl this expect tkEQUAL return id - fun parseQualifiedName(this: @SparrowParser, allowStar: Bool = false): Node + fun parseQualifiedName(this: !SparrowParser, allowStar: Bool = false): Node var loc = this curLoc this expect tkIDENTIFIER var base = _astBuilder.mkIdentifier(loc, _lastToken.data.asStringRef) @@ -145,7 +145,7 @@ package _Impl base = _astBuilder.mkCompoundExpr(loc span (this lastLoc), base, _lastToken.data.asStringRef) return base - fun parseIdList(this: @SparrowParser): LocStringVec + fun parseIdList(this: !SparrowParser): LocStringVec var res: LocStringVec var id = parseId(this) res += LocString(_lastToken.loc ~ id) @@ -153,7 +153,7 @@ package _Impl id = parseId(this) res += LocString(_lastToken.loc ~ id) return res - fun parseIdListNode(this: @SparrowParser): Node + fun parseIdListNode(this: !SparrowParser): Node var res: Node var id = parseId(this) res = _astBuilder.addToNodeList(res, _astBuilder.mkIdentifier(_lastToken.loc, id.asStringRef)) @@ -162,7 +162,7 @@ package _Impl res = _astBuilder.addToNodeList(res, _astBuilder.mkIdentifier(_lastToken.loc, id.asStringRef)) return res - fun parseIdOrOperListNode(this: @SparrowParser): Node + fun parseIdOrOperListNode(this: !SparrowParser): Node var res: Node var id = parseIdOrOper(this) res = _astBuilder.addToNodeList(res, _astBuilder.mkIdentifier(_lastToken.loc, id.asStringRef)) @@ -175,7 +175,7 @@ package _Impl // Top level // - fun parseModuleName(this: @SparrowParser): Node + fun parseModuleName(this: !SparrowParser): Node while this accept tkSEMICOLON ; if this accept tkMODULE @@ -184,7 +184,7 @@ package _Impl return qid return Node() - fun parseModifiers(this: @SparrowParser): Node + fun parseModifiers(this: !SparrowParser): Node var res: Node if this accept tkLBRACKET var e: Node @@ -199,7 +199,7 @@ package _Impl this consumeSemis return res - fun parseStmts(this: @SparrowParser, topLevel: Bool, res: @Node) + fun parseStmts(this: !SparrowParser, topLevel: Bool, res: !Node) while true var child = parseStmt(this, topLevel) if child isSet @@ -208,7 +208,7 @@ package _Impl // No more top level decls found break - fun parseStmt(this: @SparrowParser, topLevel: Bool): Node + fun parseStmt(this: !SparrowParser, topLevel: Bool): Node var res: Node // Ignore empty statements @@ -222,7 +222,7 @@ package _Impl || parsePackageDecl(this, res) || parseDatatypeDecl(this, res) || parseConceptDecl(this, res) - || parseVarDecl(this, res) + || parseVarLikeDecl(this, res) || parseFunDecl(this, res) || parseExprStmt(this, res) || parseBlockStmt(this, res, topLevel) @@ -242,36 +242,36 @@ package _Impl return res - fun parseImportLineOpt(this: @SparrowParser, res: @Node): Bool + fun parseImportLineOpt(this: !SparrowParser, res: !Node): Bool if this accept tkIMPORT res = parseImportNames(this) this expect tkSEMICOLON return true return false - fun parseImportNames(this: @SparrowParser): Node + fun parseImportNames(this: !SparrowParser): Node var res: Node res = _astBuilder.addToNodeList(res, parseImportName(this)) while this accept tkCOMMA res = _astBuilder.addToNodeList(res, parseImportName(this)) return res - fun parseImportName(this: @SparrowParser): Node + fun parseImportName(this: !SparrowParser): Node var loc = this curLoc var id = parseIdEqualOpt(this) var toImport = parseQidOrString(this) var declNames = parseImportDeclNamesOpt(this) return _astBuilder.mkImportName(loc span (this lastLoc), id.asStringRef, toImport, declNames) - fun parseQidOrString(this: @SparrowParser): Node + fun parseQidOrString(this: !SparrowParser): Node if this accept tkSTRING_LITERAL return _astBuilder.mkStringLiteral(_lastToken.loc, _lastToken.data.asStringRef) return parseQualifiedName(this) - fun parseImportDeclNamesOpt(this: @SparrowParser): Node + fun parseImportDeclNamesOpt(this: !SparrowParser): Node var res: Node if this accept tkLPAREN res = parseIdOrOperListNode(this) this expect tkRPAREN return res - fun parseUsingDecl(this: @SparrowParser, res: @Node): Bool + fun parseUsingDecl(this: !SparrowParser, res: !Node): Bool if !(this accept tkUSING) return false var loc = _lastToken.loc @@ -285,7 +285,7 @@ package _Impl this expect tkSEMICOLON res = _astBuilder.mkUsing(loc, id.asStringRef, usingNode) return true - fun parsePackageDecl(this: @SparrowParser, res: @Node): Bool + fun parsePackageDecl(this: !SparrowParser, res: !Node): Bool if !(this accept tkPACKAGE) return false var loc = _lastToken.loc @@ -299,7 +299,7 @@ package _Impl loc copyEnd _lastToken.loc res = _astBuilder.mkPackage(loc, id.asStringRef, children, formals, ifClause) return true - fun parseDatatypeDecl(this: @SparrowParser, res: @Node): Bool + fun parseDatatypeDecl(this: !SparrowParser, res: !Node): Bool if !(this accept tkDATATYPE) return false var loc = _lastToken.loc @@ -331,7 +331,7 @@ package _Impl loc copyEnd _lastToken.loc res = _astBuilder.mkDatatype(loc, id.asStringRef, formals, Node(), ifClause, children) return true - fun parseConceptDecl(this: @SparrowParser, res: @Node): Bool + fun parseConceptDecl(this: !SparrowParser, res: !Node): Bool if !(this accept tkCONCEPT) return false var loc = _lastToken.loc @@ -345,8 +345,13 @@ package _Impl loc copyEnd _lastToken.loc res = _astBuilder.mkConcept(loc, id.asStringRef, paramName.asStringRef, baseConcept, ifClause) return true - fun parseVarDecl(this: @SparrowParser, res: @Node): Bool - if !(this accept tkVAR) + fun parseVarLikeDecl(this: !SparrowParser, res: !Node): Bool + var kind = 0 + if this accept tkLET + kind = 0 + else if this accept tkVAR + kind = 1 + else return false var ids = parseIdList(this) var typeNode, init: Node @@ -359,9 +364,9 @@ package _Impl init = parseExpr(this) this expect tkSEMICOLON - createFormals(_astBuilder, ids, typeNode, init, true, res) + createFormals(_astBuilder, ids, typeNode, init, kind, res) return true - fun parseFunDecl(this: @SparrowParser, res: @Node): Bool + fun parseFunDecl(this: !SparrowParser, res: !Node): Bool if !(this accept tkFUN) return false var loc = _lastToken.loc @@ -380,65 +385,70 @@ package _Impl res = _astBuilder.mkFun(loc, id.asStringRef, formals, retType, body, bodyExp, ifClause) return true - fun parseFunNameString(this: @SparrowParser): String + fun parseFunNameString(this: !SparrowParser): String if this accept tkDOT return '.' if this accept tkLPAREN this expect tkRPAREN return "()" return parseIdOrOper(this) - fun parseFormalsOpt(this: @SparrowParser, varFormals: Bool = false): Node + fun parseFormalsOpt(this: !SparrowParser): Node var res: Node if this accept tkLPAREN // Traditional case: formals in parenthesis if this accept tkRPAREN return res // no formal - parseFormal(this, varFormals, res) + parseFormal(this, res) while this accept tkCOMMA - parseFormal(this, varFormals, res) + parseFormal(this, res) this expect tkRPAREN else if this nextIs tkIDENTIFIER // Simplified versions: just names, without parenthesis var loc = this curLoc var ids = parseIdList(this) - createFormals(_astBuilder, ids, _astBuilder.mkIdentifier(loc span (this lastLoc), "AnyType"), Node(), varFormals, res) + createFormals(_astBuilder, ids, _astBuilder.mkIdentifier(loc span (this lastLoc), "AnyType"), Node(), 2, res) return res - fun parseFormal(this: @SparrowParser, varFormals: Bool, res: @Node) + fun parseFormal(this: !SparrowParser, res: !Node) var ids = parseIdList(this) this expect tkCOLON var typeNode = parseExpr(this, false) var init: Node if this accept tkEQUAL init = parseExpr(this) - createFormals(_astBuilder, ids, typeNode, init, varFormals, res) - fun createFormals(astBuilder: @AstBuilder, ids: @LocStringVec, typeNode, init: Node, varFormals: Bool, res: @Node) - if varFormals - for id: @LocString = ids.all + createFormals(_astBuilder, ids, typeNode, init, 2, res) + fun createFormals(astBuilder: !AstBuilder, ids: LocStringVec, typeNode, init: Node, kind: Int, res: !Node) + if kind == 0 // let statement + for id: LocString const = ids.all + var v = astBuilder.mkLet(id.data.v1, id.data.v2.asStringRef, typeNode, init) + res = astBuilder.addToNodeList(res, v) + + else if kind == 1 // var statement + for id: LocString const = ids.all var v = astBuilder.mkVar(id.data.v1, id.data.v2.asStringRef, typeNode, init) res = astBuilder.addToNodeList(res, v) - else - for id: @LocString = ids.all + else // parameter + for id: LocString const = ids.all var p = astBuilder.mkParameter(id.data.v1, id.data.v2.asStringRef, typeNode, init) res = astBuilder.addToNodeList(res, p) - fun parseFieldsLine(this: @SparrowParser, res: @Node) + fun parseFieldsLine(this: !SparrowParser, res: !Node) var ids = parseIdList(this) this expect tkCOLON var typeNode = parseExpr(this, false) var init: Node if this accept tkEQUAL init = parseExpr(this) - for id: @LocString = ids.all + for id: LocString const = ids.all var v = _astBuilder.mkField(id.data.v1, id.data.v2.asStringRef, typeNode, init) res = _astBuilder.addToNodeList(res, v) - fun parseTypeNode(this: @SparrowParser): Node + fun parseTypeNode(this: !SparrowParser): Node if this accept tkCOLON return parseExpr(this, false) return Node() - fun parseIfClauseOpt(this: @SparrowParser): Node + fun parseIfClauseOpt(this: !SparrowParser): Node if this accept tkIF return parseExpr(this) return Node() - fun parseFunBody(this: @SparrowParser): Node + fun parseFunBody(this: !SparrowParser): Node if this accept tkSEMICOLON return Node() var res: Node @@ -446,7 +456,7 @@ package _Impl this reportError toString("Syntax error, unexpected ", (*_tokens).type, ", expecting block statement") return res - fun parseIfTopLevel(this: @SparrowParser, res: @Node): Bool + fun parseIfTopLevel(this: !SparrowParser, res: !Node): Bool if !(this accept tkIF) return false var loc = this lastLoc @@ -466,7 +476,7 @@ package _Impl // - fun nextIsExpr(this: @SparrowParser, withEqual: Bool = true): Bool + fun nextIsExpr(this: !SparrowParser, withEqual: Bool = true): Bool var t = (*_tokens).type if t == tkEQUAL return withEqual @@ -487,7 +497,7 @@ package _Impl || t == tkFLOAT_LITERAL || t == tkDOUBLE_LITERAL ) - fun parseExprOpt(this: @SparrowParser, res: @Node, allowSemicolons: Bool = false): Bool + fun parseExprOpt(this: !SparrowParser, res: !Node, allowSemicolons: Bool = false): Bool if this nextIsExpr res = parseExpr(this) // We may have some semicolons after @@ -497,7 +507,7 @@ package _Impl return false // Zero, one, or more expressions separated by comma - fun parseExprListOpt(this: @SparrowParser): Node + fun parseExprListOpt(this: !SparrowParser): Node var res: Node var expr: Node if !parseExprOpt(this, expr) @@ -509,7 +519,7 @@ package _Impl return res // Logic for parsing infix & postfix expressions - fun parseExpr(this: @SparrowParser, withEqual: Bool = true): Node + fun parseExpr(this: !SparrowParser, withEqual: Bool = true): Node var loc = this curLoc var baseExpr = parsePrefixExpr(this, withEqual) var op: String @@ -527,7 +537,7 @@ package _Impl break return baseExpr - fun parsePrefixExpr(this: @SparrowParser, withEqual: Bool = true): Node + fun parsePrefixExpr(this: !SparrowParser, withEqual: Bool = true): Node var loc = this curLoc var op: String if this accept tkBACKSQUOTE @@ -542,7 +552,7 @@ package _Impl var baseExpr = parsePrefixExpr(this) return _astBuilder.mkPrefixOp(loc span (this lastLoc), op.asStringRef, baseExpr) - fun parseSimpleExpr(this: @SparrowParser, withEqual: Bool = true): Node + fun parseSimpleExpr(this: !SparrowParser, withEqual: Bool = true): Node var res: Node var loc = this curLoc if (this nextIs tkLPAREN) && (this next2Is tkFUN) @@ -596,7 +606,7 @@ package _Impl break return res - fun parseLambdaExpr(this: @SparrowParser): Node + fun parseLambdaExpr(this: !SparrowParser): Node var loc = this curLoc this expect tkLPAREN this expect tkFUN @@ -610,7 +620,7 @@ package _Impl body = parseFunBody(this) this expect tkRPAREN return _astBuilder.mkLambdaExpr(loc span (this lastLoc), closureParams, formals, retType, body, bodyExp) - fun parseClosureParams(this: @SparrowParser): Node + fun parseClosureParams(this: !SparrowParser): Node var res: Node if this accept tkDOT this expect tkLCURLY @@ -623,10 +633,10 @@ package _Impl // Statements // - fun parseExprStmt(this: @SparrowParser, res: @Node): Bool + fun parseExprStmt(this: !SparrowParser, res: !Node): Bool return parseExprOpt(this, res, true) - fun parseBlockStmt(this: @SparrowParser, res: @Node, topLevel: Bool): Bool + fun parseBlockStmt(this: !SparrowParser, res: !Node, topLevel: Bool): Bool var loc = this curLoc if this accept tkLCURLY res = Node() @@ -641,7 +651,7 @@ package _Impl res = _astBuilder.mkBlockStmt(loc span (this lastLoc), res) return true return false - fun parseIfStmt(this: @SparrowParser, res: @Node, topLevel: Bool): Bool + fun parseIfStmt(this: !SparrowParser, res: !Node, topLevel: Bool): Bool var loc = this curLoc if this accept tkIF var expr = parseExpr(this) @@ -653,7 +663,7 @@ package _Impl res = _astBuilder.mkIfStmt(loc, expr, thenClause, elseClause) return true return false - fun parseForStmt(this: @SparrowParser, res: @Node, topLevel: Bool): Bool + fun parseForStmt(this: !SparrowParser, res: !Node, topLevel: Bool): Bool var loc = this curLoc if this accept tkFOR var id = parseId(this) @@ -667,7 +677,7 @@ package _Impl res = _astBuilder.mkForStmt(loc, id.asStringRef, typeNode, range, action) return true return false - fun parseWhileStmt(this: @SparrowParser, res: @Node, topLevel: Bool): Bool + fun parseWhileStmt(this: !SparrowParser, res: !Node, topLevel: Bool): Bool var loc = this curLoc if this accept tkWHILE var expr = parseExpr(this) @@ -682,14 +692,14 @@ package _Impl res = _astBuilder.mkWhileStmt(loc, expr, stepAction, body) return true return false - fun parseBreakStmt(this: @SparrowParser, res: @Node): Bool + fun parseBreakStmt(this: !SparrowParser, res: !Node): Bool if this accept tkBREAK var loc = _lastToken.loc this expect tkSEMICOLON res = _astBuilder.mkBreakStmt(loc) return true return false - fun parseContinueStmt(this: @SparrowParser, res: @Node): Bool + fun parseContinueStmt(this: !SparrowParser, res: !Node): Bool if this accept tkCONTINUE var loc = _lastToken.loc this expect tkSEMICOLON @@ -697,7 +707,7 @@ package _Impl return true return false - fun parseReturnStmt(this: @SparrowParser, res: @Node): Bool + fun parseReturnStmt(this: !SparrowParser, res: !Node): Bool if this accept tkRETURN var loc = _lastToken.loc var expr: Node diff --git a/src/SparrowFrontend/Grammar/parserIf.ll b/src/SparrowFrontend/Grammar/parserIf.ll index e2b6e572..dd795850 100644 --- a/src/SparrowFrontend/Grammar/parserIf.ll +++ b/src/SparrowFrontend/Grammar/parserIf.ll @@ -11,17 +11,16 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" %struct._IO_FILE = type opaque %Uninitialized = type {} %Null = type {} -%StringRef = type { i8*, i8* } -%StreamRefWrapperHelperClass = type { i8* } +%StringRef = type { %UntypedPtr, %UntypedPtr } +%UntypedPtr = type { i8* } %ParserContext = type { %SparrowScanner, %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]" } %SparrowScanner = type { %Location, %BufferedCharSource, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %Token, i1, %ErrorReporter, i1 } %Location = type { %SourceCode, %LineCol, %LineCol } -%SourceCode = type { i8* } +%SourceCode = type { %UntypedPtr } %LineCol = type { i32, i32 } %BufferedCharSource = type { %CharSource, %String, i32 } -%CharSource = type { %UntypedPtr, %"FunctionPtr3[Void, UntypedPtr, @String, Int]" } -%UntypedPtr = type { i8* } -%"FunctionPtr3[Void, UntypedPtr, @String, Int]" = type { i8* } +%CharSource = type { %UntypedPtr, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]" } +%"FunctionPtr3[Void, UntypedPtr, String mut, Int]" = type { %UntypedPtr } %String = type { %"RawPtr[Char]", %"RawPtr[Char]", %"RawPtr[Char]" } %"RawPtr[Char]" = type { i8* } %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]" = type { %"RangeWithLookahead[BufferedCharSourceRange]", %Location* } @@ -30,8 +29,8 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" %"Vector[Char]" = type { %"RawPtr[Char]", %"RawPtr[Char]", %"RawPtr[Char]" } %Token = type { %Location, %TokenType, %String, i64, double } %TokenType = type { i32 } -%ErrorReporter = type { %UntypedPtr, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]" } -%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]" = type { i8* } +%ErrorReporter = type { %UntypedPtr, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]" } +%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]" = type { %UntypedPtr } %"SparrowLayoutDecoder[SparrowScanner]" = type { %"RangeWithLookahead[SparrowScanner]", %ErrorReporter, %"Vector[UInt]", %"Vector[Char]", %TokenType, i32 } %"RangeWithLookahead[SparrowScanner]" = type { %SparrowScanner, %"Vector[Token]" } %"Vector[Token]" = type { %"RawPtr[Token]", %"RawPtr[Token]", %"RawPtr[Token]" } @@ -40,45 +39,45 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" %"RawPtr[UInt]" = type { i32* } %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]" = type { %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %Token, i1, %AstBuilder, %ErrorReporter } %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]" = type { %"SparrowLayoutDecoder[SparrowScanner]", %"Vector[Token]" } -%AstBuilder = type { %UntypedPtr, %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]", %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]", %"FunctionPtr2[Node, UntypedPtr, @Location]", %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]", %"FunctionPtr3[Node, UntypedPtr, @Location, Int]", %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]", %"FunctionPtr3[Node, UntypedPtr, @Location, Long]", %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]", %"FunctionPtr3[Node, UntypedPtr, @Location, Float]", %"FunctionPtr3[Node, UntypedPtr, @Location, Double]", %"FunctionPtr3[Node, UntypedPtr, @Location, Char]", %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Node, UntypedPtr, @Location, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]", %"FunctionPtr2[Node, UntypedPtr, @Location]", %"FunctionPtr2[Node, UntypedPtr, @Location]", %"FunctionPtr3[Node, UntypedPtr, @Location, Node]" } -%"FunctionPtr3[Node, UntypedPtr, Node, Node]" = type { i8* } -%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]" = type { i8* } -%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]" = type { i8* } -%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]" = type { i8* } -%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]" = type { i8* } -%"FunctionPtr2[Node, UntypedPtr, Node]" = type { i8* } -%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]" = type { i8* } -%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]" = type { i8* } -%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]" = type { i8* } -%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]" = type { i8* } -%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]" = type { i8* } -%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]" = type { i8* } -%"FunctionPtr3[Node, UntypedPtr, @Location, Int]" = type { i8* } -%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]" = type { i8* } -%"FunctionPtr3[Node, UntypedPtr, @Location, Long]" = type { i8* } -%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]" = type { i8* } -%"FunctionPtr3[Node, UntypedPtr, @Location, Float]" = type { i8* } -%"FunctionPtr3[Node, UntypedPtr, @Location, Double]" = type { i8* } -%"FunctionPtr3[Node, UntypedPtr, @Location, Char]" = type { i8* } -%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]" = type { i8* } -%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]" = type { i8* } -%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]" = type { i8* } -%"FunctionPtr2[Node, UntypedPtr, @Location]" = type { i8* } -%"FunctionPtr3[Node, UntypedPtr, @Location, Node]" = type { i8* } +%AstBuilder = type { %UntypedPtr, %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]", %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]", %"FunctionPtr2[Node, UntypedPtr, Location const]", %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]", %"FunctionPtr3[Node, UntypedPtr, Location const, Int]", %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]", %"FunctionPtr3[Node, UntypedPtr, Location const, Long]", %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]", %"FunctionPtr3[Node, UntypedPtr, Location const, Float]", %"FunctionPtr3[Node, UntypedPtr, Location const, Double]", %"FunctionPtr3[Node, UntypedPtr, Location const, Char]", %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Node, UntypedPtr, Location const, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]", %"FunctionPtr2[Node, UntypedPtr, Location const]", %"FunctionPtr2[Node, UntypedPtr, Location const]", %"FunctionPtr3[Node, UntypedPtr, Location const, Node]" } +%"FunctionPtr3[Node, UntypedPtr, Node, Node]" = type { %UntypedPtr } +%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]" = type { %UntypedPtr } +%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]" = type { %UntypedPtr } +%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]" = type { %UntypedPtr } +%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]" = type { %UntypedPtr } +%"FunctionPtr2[Node, UntypedPtr, Node]" = type { %UntypedPtr } +%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]" = type { %UntypedPtr } +%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]" = type { %UntypedPtr } +%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]" = type { %UntypedPtr } +%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]" = type { %UntypedPtr } +%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]" = type { %UntypedPtr } +%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]" = type { %UntypedPtr } +%"FunctionPtr3[Node, UntypedPtr, Location const, Int]" = type { %UntypedPtr } +%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]" = type { %UntypedPtr } +%"FunctionPtr3[Node, UntypedPtr, Location const, Long]" = type { %UntypedPtr } +%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]" = type { %UntypedPtr } +%"FunctionPtr3[Node, UntypedPtr, Location const, Float]" = type { %UntypedPtr } +%"FunctionPtr3[Node, UntypedPtr, Location const, Double]" = type { %UntypedPtr } +%"FunctionPtr3[Node, UntypedPtr, Location const, Char]" = type { %UntypedPtr } +%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]" = type { %UntypedPtr } +%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]" = type { %UntypedPtr } +%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]" = type { %UntypedPtr } +%"FunctionPtr2[Node, UntypedPtr, Location const]" = type { %UntypedPtr } +%"FunctionPtr3[Node, UntypedPtr, Location const, Node]" = type { %UntypedPtr } %"$lambdaEnclosureData" = type {} %"$lambdaEnclosureData.0" = type {} %"$lambdaEnclosureData.1" = type {} %"$lambdaEnclosureData.2" = type {} %"ContiguousMemoryRange[Char]" = type { %"RawPtr[Char]", %"RawPtr[Char]" } %StringOutputStream = type { %String } -%"FunctionPtr1[Bool, Char]" = type { i8* } +%"FunctionPtr1[Bool, Char]" = type { %UntypedPtr } %"ContiguousMemoryRange[Token]" = type { %"RawPtr[Token]", %"RawPtr[Token]" } %FileCharSource = type { %File } -%File = type { i8* } -%"FunctionPtr3[Void, @FileCharSource, @String, Int]" = type { i8* } +%File = type { %UntypedPtr } +%"FunctionPtr3[Void, FileCharSource mut, String mut, Int]" = type { %UntypedPtr } %"NumericRangeInc[Int]" = type { i32, i32, i1 } %StringCharSource = type { %StringRef } -%"FunctionPtr3[Void, @StringCharSource, @String, Int]" = type { i8* } +%"FunctionPtr3[Void, StringCharSource mut, String mut, Int]" = type { %UntypedPtr } %Node = type { %UntypedPtr } %"Vector[LocString]" = type { %"RawPtr[LocString]", %"RawPtr[LocString]", %"RawPtr[LocString]" } %"RawPtr[LocString]" = type { %LocString* } @@ -119,89 +118,91 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" @str.23 = private unnamed_addr constant [8 x i8] c"finally\00" @str.24 = private unnamed_addr constant [4 x i8] c"for\00" @str.25 = private unnamed_addr constant [7 x i8] c"import\00" -@str.26 = private unnamed_addr constant [7 x i8] c"module\00" -@str.27 = private unnamed_addr constant [5 x i8] c"null\00" -@str.28 = private unnamed_addr constant [8 x i8] c"package\00" -@str.29 = private unnamed_addr constant [7 x i8] c"return\00" -@str.30 = private unnamed_addr constant [6 x i8] c"throw\00" -@str.31 = private unnamed_addr constant [5 x i8] c"true\00" -@str.32 = private unnamed_addr constant [4 x i8] c"try\00" -@str.33 = private unnamed_addr constant [6 x i8] c"using\00" -@str.34 = private unnamed_addr constant [4 x i8] c"var\00" -@str.35 = private unnamed_addr constant [6 x i8] c"while\00" -@str.36 = private unnamed_addr constant [24 x i8] c"Invalid numeric literal\00" -@str.37 = private unnamed_addr constant [27 x i8] c"Invalid character found: '\00" -@str.38 = private unnamed_addr constant [4 x i8] c"' (\00" -@str.39 = private unnamed_addr constant [32 x i8] c"Invalid indentation, expecting \00" -@str.40 = private unnamed_addr constant [7 x i8] c", got \00" -@str.41 = private unnamed_addr constant [2 x i8] c"r\00" -@str.42 = private unnamed_addr constant [12 x i8] c"end-of-file\00" -@str.43 = private unnamed_addr constant [9 x i8] c"new-line\00" -@str.44 = private unnamed_addr constant [9 x i8] c"'module'\00" -@str.45 = private unnamed_addr constant [9 x i8] c"'import'\00" -@str.46 = private unnamed_addr constant [10 x i8] c"'concept'\00" -@str.47 = private unnamed_addr constant [11 x i8] c"'datatype'\00" -@str.48 = private unnamed_addr constant [6 x i8] c"'fun'\00" -@str.49 = private unnamed_addr constant [10 x i8] c"'package'\00" -@str.50 = private unnamed_addr constant [8 x i8] c"'using'\00" -@str.51 = private unnamed_addr constant [6 x i8] c"'var'\00" -@str.52 = private unnamed_addr constant [8 x i8] c"'break'\00" -@str.53 = private unnamed_addr constant [8 x i8] c"'catch'\00" -@str.54 = private unnamed_addr constant [11 x i8] c"'continue'\00" -@str.55 = private unnamed_addr constant [10 x i8] c"'finally'\00" -@str.56 = private unnamed_addr constant [6 x i8] c"'for'\00" -@str.57 = private unnamed_addr constant [5 x i8] c"'if'\00" -@str.58 = private unnamed_addr constant [9 x i8] c"'return'\00" -@str.59 = private unnamed_addr constant [8 x i8] c"'throw'\00" -@str.60 = private unnamed_addr constant [6 x i8] c"'try'\00" -@str.61 = private unnamed_addr constant [8 x i8] c"'while'\00" -@str.62 = private unnamed_addr constant [8 x i8] c"'false'\00" -@str.63 = private unnamed_addr constant [7 x i8] c"'null'\00" -@str.64 = private unnamed_addr constant [7 x i8] c"'true'\00" -@str.65 = private unnamed_addr constant [7 x i8] c"'else'\00" -@str.66 = private unnamed_addr constant [16 x i8] c"'{' (or indent)\00" -@str.67 = private unnamed_addr constant [16 x i8] c"'}' (or dedent)\00" -@str.68 = private unnamed_addr constant [4 x i8] c"'['\00" -@str.69 = private unnamed_addr constant [4 x i8] c"']'\00" -@str.70 = private unnamed_addr constant [4 x i8] c"'('\00" -@str.71 = private unnamed_addr constant [4 x i8] c"')'\00" -@str.72 = private unnamed_addr constant [4 x i8] c"':'\00" -@str.73 = private unnamed_addr constant [17 x i8] c"';' (or newline)\00" -@str.74 = private unnamed_addr constant [4 x i8] c"','\00" -@str.75 = private unnamed_addr constant [4 x i8] c"'.'\00" -@str.76 = private unnamed_addr constant [4 x i8] c"'`'\00" -@str.77 = private unnamed_addr constant [4 x i8] c"'='\00" -@str.78 = private unnamed_addr constant [11 x i8] c"identifier\00" -@str.79 = private unnamed_addr constant [9 x i8] c"operator\00" -@str.80 = private unnamed_addr constant [13 x i8] c"char literal\00" -@str.81 = private unnamed_addr constant [15 x i8] c"string literal\00" -@str.82 = private unnamed_addr constant [12 x i8] c"int literal\00" -@str.83 = private unnamed_addr constant [13 x i8] c"long literal\00" -@str.84 = private unnamed_addr constant [13 x i8] c"uint literal\00" -@str.85 = private unnamed_addr constant [14 x i8] c"ulong literal\00" -@str.86 = private unnamed_addr constant [14 x i8] c"float literal\00" -@str.87 = private unnamed_addr constant [15 x i8] c"double literal\00" -@str.88 = private unnamed_addr constant [14 x i8] c"line continue\00" -@str.89 = private unnamed_addr constant [8 x i8] c"comment\00" -@str.90 = private unnamed_addr constant [11 x i8] c"whitespace\00" -@str.91 = private unnamed_addr constant [26 x i8] c"Syntax error, unexpected \00" -@str.92 = private unnamed_addr constant [13 x i8] c", expecting \00" -@str.93 = private unnamed_addr constant [8 x i8] c"AnyType\00" -@str.94 = private unnamed_addr constant [26 x i8] c"Syntax error, unexpected \00" -@str.95 = private unnamed_addr constant [28 x i8] c", expecting block statement\00" +@str.26 = private unnamed_addr constant [4 x i8] c"let\00" +@str.27 = private unnamed_addr constant [7 x i8] c"module\00" +@str.28 = private unnamed_addr constant [5 x i8] c"null\00" +@str.29 = private unnamed_addr constant [8 x i8] c"package\00" +@str.30 = private unnamed_addr constant [7 x i8] c"return\00" +@str.31 = private unnamed_addr constant [6 x i8] c"throw\00" +@str.32 = private unnamed_addr constant [5 x i8] c"true\00" +@str.33 = private unnamed_addr constant [4 x i8] c"try\00" +@str.34 = private unnamed_addr constant [6 x i8] c"using\00" +@str.35 = private unnamed_addr constant [4 x i8] c"var\00" +@str.36 = private unnamed_addr constant [6 x i8] c"while\00" +@str.37 = private unnamed_addr constant [24 x i8] c"Invalid numeric literal\00" +@str.38 = private unnamed_addr constant [27 x i8] c"Invalid character found: '\00" +@str.39 = private unnamed_addr constant [4 x i8] c"' (\00" +@str.40 = private unnamed_addr constant [32 x i8] c"Invalid indentation, expecting \00" +@str.41 = private unnamed_addr constant [7 x i8] c", got \00" +@str.42 = private unnamed_addr constant [2 x i8] c"r\00" +@str.43 = private unnamed_addr constant [12 x i8] c"end-of-file\00" +@str.44 = private unnamed_addr constant [9 x i8] c"new-line\00" +@str.45 = private unnamed_addr constant [9 x i8] c"'module'\00" +@str.46 = private unnamed_addr constant [9 x i8] c"'import'\00" +@str.47 = private unnamed_addr constant [10 x i8] c"'concept'\00" +@str.48 = private unnamed_addr constant [11 x i8] c"'datatype'\00" +@str.49 = private unnamed_addr constant [6 x i8] c"'fun'\00" +@str.50 = private unnamed_addr constant [10 x i8] c"'package'\00" +@str.51 = private unnamed_addr constant [8 x i8] c"'using'\00" +@str.52 = private unnamed_addr constant [6 x i8] c"'let'\00" +@str.53 = private unnamed_addr constant [6 x i8] c"'var'\00" +@str.54 = private unnamed_addr constant [8 x i8] c"'break'\00" +@str.55 = private unnamed_addr constant [8 x i8] c"'catch'\00" +@str.56 = private unnamed_addr constant [11 x i8] c"'continue'\00" +@str.57 = private unnamed_addr constant [10 x i8] c"'finally'\00" +@str.58 = private unnamed_addr constant [6 x i8] c"'for'\00" +@str.59 = private unnamed_addr constant [5 x i8] c"'if'\00" +@str.60 = private unnamed_addr constant [9 x i8] c"'return'\00" +@str.61 = private unnamed_addr constant [8 x i8] c"'throw'\00" +@str.62 = private unnamed_addr constant [6 x i8] c"'try'\00" +@str.63 = private unnamed_addr constant [8 x i8] c"'while'\00" +@str.64 = private unnamed_addr constant [8 x i8] c"'false'\00" +@str.65 = private unnamed_addr constant [7 x i8] c"'null'\00" +@str.66 = private unnamed_addr constant [7 x i8] c"'true'\00" +@str.67 = private unnamed_addr constant [7 x i8] c"'else'\00" +@str.68 = private unnamed_addr constant [16 x i8] c"'{' (or indent)\00" +@str.69 = private unnamed_addr constant [16 x i8] c"'}' (or dedent)\00" +@str.70 = private unnamed_addr constant [4 x i8] c"'['\00" +@str.71 = private unnamed_addr constant [4 x i8] c"']'\00" +@str.72 = private unnamed_addr constant [4 x i8] c"'('\00" +@str.73 = private unnamed_addr constant [4 x i8] c"')'\00" +@str.74 = private unnamed_addr constant [4 x i8] c"':'\00" +@str.75 = private unnamed_addr constant [17 x i8] c"';' (or newline)\00" +@str.76 = private unnamed_addr constant [4 x i8] c"','\00" +@str.77 = private unnamed_addr constant [4 x i8] c"'.'\00" +@str.78 = private unnamed_addr constant [4 x i8] c"'`'\00" +@str.79 = private unnamed_addr constant [4 x i8] c"'='\00" +@str.80 = private unnamed_addr constant [11 x i8] c"identifier\00" +@str.81 = private unnamed_addr constant [9 x i8] c"operator\00" +@str.82 = private unnamed_addr constant [13 x i8] c"char literal\00" +@str.83 = private unnamed_addr constant [15 x i8] c"string literal\00" +@str.84 = private unnamed_addr constant [12 x i8] c"int literal\00" +@str.85 = private unnamed_addr constant [13 x i8] c"long literal\00" +@str.86 = private unnamed_addr constant [13 x i8] c"uint literal\00" +@str.87 = private unnamed_addr constant [14 x i8] c"ulong literal\00" +@str.88 = private unnamed_addr constant [14 x i8] c"float literal\00" +@str.89 = private unnamed_addr constant [15 x i8] c"double literal\00" +@str.90 = private unnamed_addr constant [14 x i8] c"line continue\00" +@str.91 = private unnamed_addr constant [8 x i8] c"comment\00" +@str.92 = private unnamed_addr constant [11 x i8] c"whitespace\00" +@str.93 = private unnamed_addr constant [26 x i8] c"Syntax error, unexpected \00" +@str.94 = private unnamed_addr constant [13 x i8] c", expecting \00" +@str.95 = private unnamed_addr constant [8 x i8] c"AnyType\00" @str.96 = private unnamed_addr constant [26 x i8] c"Syntax error, unexpected \00" -@str.97 = private unnamed_addr constant [23 x i8] c", expecting expression\00" -@str.98 = private unnamed_addr constant [3 x i8] c"()\00" -@str.99 = private unnamed_addr constant [2 x i8] c"=\00" -@str.100 = private unnamed_addr constant [26 x i8] c"Syntax error, unexpected \00" -@str.101 = private unnamed_addr constant [35 x i8] c", expecting identifier or operator\00" -@str.102 = private unnamed_addr constant [2 x i8] c"=\00" -@str.103 = private unnamed_addr constant [2 x i8] c".\00" -@str.104 = private unnamed_addr constant [3 x i8] c"()\00" -@str.105 = private unnamed_addr constant [26 x i8] c"Syntax error, unexpected \00" -@str.106 = private unnamed_addr constant [42 x i8] c", expecting expression or block statement\00" +@str.97 = private unnamed_addr constant [28 x i8] c", expecting block statement\00" +@str.98 = private unnamed_addr constant [26 x i8] c"Syntax error, unexpected \00" +@str.99 = private unnamed_addr constant [23 x i8] c", expecting expression\00" +@str.100 = private unnamed_addr constant [3 x i8] c"()\00" +@str.101 = private unnamed_addr constant [2 x i8] c"=\00" +@str.102 = private unnamed_addr constant [26 x i8] c"Syntax error, unexpected \00" +@str.103 = private unnamed_addr constant [35 x i8] c", expecting identifier or operator\00" +@str.104 = private unnamed_addr constant [2 x i8] c"=\00" +@str.105 = private unnamed_addr constant [2 x i8] c".\00" +@str.106 = private unnamed_addr constant [3 x i8] c"()\00" @str.107 = private unnamed_addr constant [26 x i8] c"Syntax error, unexpected \00" -@str.108 = private unnamed_addr constant [22 x i8] c", expecting statement\00" +@str.108 = private unnamed_addr constant [42 x i8] c", expecting expression or block statement\00" +@str.109 = private unnamed_addr constant [26 x i8] c"Syntax error, unexpected \00" +@str.110 = private unnamed_addr constant [22 x i8] c", expecting statement\00" @llvm.global_ctors = appending global [4 x { i32, void ()* }] [{ i32, void ()* } { i32 0, void ()* @__global_ctor }, { i32, void ()* } { i32 1, void ()* @__global_ctor.1 }, { i32, void ()* } { i32 2, void ()* @__global_ctor.3 }, { i32, void ()* } { i32 3, void ()* @__global_ctor.6 }] @llvm.global_dtors = appending global [4 x { i32, void ()* }] [{ i32, void ()* } { i32 0, void ()* @__global_dtor }, { i32, void ()* } { i32 1, void ()* @__global_dtor.2 }, { i32, void ()* } { i32 2, void ()* @__global_dtor.4 }, { i32, void ()* } { i32 3, void ()* @__global_dtor.7 }] @@ -2136,9 +2137,9 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.4(i1* %this) #3 { - %this.addr = alloca i1* - store i1* %this, i1** %this.addr +define internal void @dtor.4(i1 %this) #3 { + %this.addr = alloca i1 + store i1 %this, i1* %this.addr br label %code code: ; preds = %0 @@ -2216,9 +2217,9 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.12(i64* %this) #3 { - %this.addr = alloca i64* - store i64* %this, i64** %this.addr +define internal void @dtor.12(i64 %this) #3 { + %this.addr = alloca i64 + store i64 %this, i64* %this.addr br label %code code: ; preds = %0 @@ -2285,978 +2286,700 @@ declare double @_Double_opMod(double, double) ; Function Attrs: alwaysinline nounwind define internal i8 @"pre_++"(i8* %n) #3 { - %n.addr = alloca i8* - store i8* %n, i8** %n.addr %tmp.this = alloca i8 br label %code code: ; preds = %0 - %1 = load i8*, i8** %n.addr - %2 = load i8, i8* %1 + %1 = load i8, i8* %n store i8 1, i8* %tmp.this - %3 = load i8, i8* %tmp.this - %4 = add i8 %2, %3 - %5 = load i8*, i8** %n.addr - store i8 %4, i8* %5 - %6 = load i8*, i8** %n.addr - %7 = load i8, i8* %6 - ret i8 %7 + %2 = load i8, i8* %tmp.this + %3 = add i8 %1, %2 + store i8 %3, i8* %n + %4 = load i8, i8* %n + ret i8 %4 } ; Function Attrs: alwaysinline nounwind define internal i8 @"pre_++.18"(i8* %n) #3 { - %n.addr = alloca i8* - store i8* %n, i8** %n.addr %tmp.this = alloca i8 br label %code code: ; preds = %0 - %1 = load i8*, i8** %n.addr - %2 = load i8, i8* %1 + %1 = load i8, i8* %n store i8 1, i8* %tmp.this - %3 = load i8, i8* %tmp.this - %4 = add i8 %2, %3 - %5 = load i8*, i8** %n.addr - store i8 %4, i8* %5 - %6 = load i8*, i8** %n.addr - %7 = load i8, i8* %6 - ret i8 %7 + %2 = load i8, i8* %tmp.this + %3 = add i8 %1, %2 + store i8 %3, i8* %n + %4 = load i8, i8* %n + ret i8 %4 } ; Function Attrs: alwaysinline nounwind define internal i16 @"pre_++.19"(i16* %n) #3 { - %n.addr = alloca i16* - store i16* %n, i16** %n.addr %tmp.this = alloca i16 br label %code code: ; preds = %0 - %1 = load i16*, i16** %n.addr - %2 = load i16, i16* %1 + %1 = load i16, i16* %n store i16 1, i16* %tmp.this - %3 = load i16, i16* %tmp.this - %4 = add i16 %2, %3 - %5 = load i16*, i16** %n.addr - store i16 %4, i16* %5 - %6 = load i16*, i16** %n.addr - %7 = load i16, i16* %6 - ret i16 %7 + %2 = load i16, i16* %tmp.this + %3 = add i16 %1, %2 + store i16 %3, i16* %n + %4 = load i16, i16* %n + ret i16 %4 } ; Function Attrs: alwaysinline nounwind define internal i16 @"pre_++.20"(i16* %n) #3 { - %n.addr = alloca i16* - store i16* %n, i16** %n.addr %tmp.this = alloca i16 br label %code code: ; preds = %0 - %1 = load i16*, i16** %n.addr - %2 = load i16, i16* %1 + %1 = load i16, i16* %n store i16 1, i16* %tmp.this - %3 = load i16, i16* %tmp.this - %4 = add i16 %2, %3 - %5 = load i16*, i16** %n.addr - store i16 %4, i16* %5 - %6 = load i16*, i16** %n.addr - %7 = load i16, i16* %6 - ret i16 %7 + %2 = load i16, i16* %tmp.this + %3 = add i16 %1, %2 + store i16 %3, i16* %n + %4 = load i16, i16* %n + ret i16 %4 } ; Function Attrs: alwaysinline nounwind define internal i32 @"pre_++.21"(i32* %n) #3 { - %n.addr = alloca i32* - store i32* %n, i32** %n.addr br label %code code: ; preds = %0 - %1 = load i32*, i32** %n.addr - %2 = load i32, i32* %1 - %3 = add i32 %2, 1 - %4 = load i32*, i32** %n.addr - store i32 %3, i32* %4 - %5 = load i32*, i32** %n.addr - %6 = load i32, i32* %5 - ret i32 %6 + %1 = load i32, i32* %n + %2 = add i32 %1, 1 + store i32 %2, i32* %n + %3 = load i32, i32* %n + ret i32 %3 } ; Function Attrs: alwaysinline nounwind define internal i32 @"pre_++.22"(i32* %n) #3 { - %n.addr = alloca i32* - store i32* %n, i32** %n.addr %tmp.this = alloca i32 br label %code code: ; preds = %0 - %1 = load i32*, i32** %n.addr - %2 = load i32, i32* %1 + %1 = load i32, i32* %n store i32 1, i32* %tmp.this - %3 = load i32, i32* %tmp.this - %4 = add i32 %2, %3 - %5 = load i32*, i32** %n.addr - store i32 %4, i32* %5 - %6 = load i32*, i32** %n.addr - %7 = load i32, i32* %6 - ret i32 %7 + %2 = load i32, i32* %tmp.this + %3 = add i32 %1, %2 + store i32 %3, i32* %n + %4 = load i32, i32* %n + ret i32 %4 } ; Function Attrs: alwaysinline nounwind define internal i64 @"pre_++.23"(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 + %1 = load i64, i64* %n store i64 1, i64* %tmp.this - %3 = load i64, i64* %tmp.this - %4 = add i64 %2, %3 - %5 = load i64*, i64** %n.addr - store i64 %4, i64* %5 - %6 = load i64*, i64** %n.addr - %7 = load i64, i64* %6 - ret i64 %7 + %2 = load i64, i64* %tmp.this + %3 = add i64 %1, %2 + store i64 %3, i64* %n + %4 = load i64, i64* %n + ret i64 %4 } ; Function Attrs: alwaysinline nounwind define internal i64 @"pre_++.24"(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 + %1 = load i64, i64* %n store i64 1, i64* %tmp.this - %3 = load i64, i64* %tmp.this - %4 = add i64 %2, %3 - %5 = load i64*, i64** %n.addr - store i64 %4, i64* %5 - %6 = load i64*, i64** %n.addr - %7 = load i64, i64* %6 - ret i64 %7 + %2 = load i64, i64* %tmp.this + %3 = add i64 %1, %2 + store i64 %3, i64* %n + %4 = load i64, i64* %n + ret i64 %4 } ; Function Attrs: alwaysinline nounwind define internal i64 @"pre_++.25"(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 + %1 = load i64, i64* %n store i64 1, i64* %tmp.this - %3 = load i64, i64* %tmp.this - %4 = add i64 %2, %3 - %5 = load i64*, i64** %n.addr - store i64 %4, i64* %5 - %6 = load i64*, i64** %n.addr - %7 = load i64, i64* %6 - ret i64 %7 + %2 = load i64, i64* %tmp.this + %3 = add i64 %1, %2 + store i64 %3, i64* %n + %4 = load i64, i64* %n + ret i64 %4 } ; Function Attrs: alwaysinline nounwind define internal i64 @"pre_++.26"(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 + %1 = load i64, i64* %n store i64 1, i64* %tmp.this - %3 = load i64, i64* %tmp.this - %4 = add i64 %2, %3 - %5 = load i64*, i64** %n.addr - store i64 %4, i64* %5 - %6 = load i64*, i64** %n.addr - %7 = load i64, i64* %6 - ret i64 %7 + %2 = load i64, i64* %tmp.this + %3 = add i64 %1, %2 + store i64 %3, i64* %n + %4 = load i64, i64* %n + ret i64 %4 } ; Function Attrs: alwaysinline nounwind define internal i8 @pre_--(i8* %n) #3 { - %n.addr = alloca i8* - store i8* %n, i8** %n.addr %tmp.this = alloca i8 br label %code code: ; preds = %0 - %1 = load i8*, i8** %n.addr - %2 = load i8, i8* %1 + %1 = load i8, i8* %n store i8 1, i8* %tmp.this - %3 = load i8, i8* %tmp.this - %4 = sub i8 %2, %3 - %5 = load i8*, i8** %n.addr - store i8 %4, i8* %5 - %6 = load i8*, i8** %n.addr - %7 = load i8, i8* %6 - ret i8 %7 + %2 = load i8, i8* %tmp.this + %3 = sub i8 %1, %2 + store i8 %3, i8* %n + %4 = load i8, i8* %n + ret i8 %4 } ; Function Attrs: alwaysinline nounwind define internal i8 @pre_--.27(i8* %n) #3 { - %n.addr = alloca i8* - store i8* %n, i8** %n.addr %tmp.this = alloca i8 br label %code code: ; preds = %0 - %1 = load i8*, i8** %n.addr - %2 = load i8, i8* %1 + %1 = load i8, i8* %n store i8 1, i8* %tmp.this - %3 = load i8, i8* %tmp.this - %4 = sub i8 %2, %3 - %5 = load i8*, i8** %n.addr - store i8 %4, i8* %5 - %6 = load i8*, i8** %n.addr - %7 = load i8, i8* %6 - ret i8 %7 + %2 = load i8, i8* %tmp.this + %3 = sub i8 %1, %2 + store i8 %3, i8* %n + %4 = load i8, i8* %n + ret i8 %4 } ; Function Attrs: alwaysinline nounwind define internal i16 @pre_--.28(i16* %n) #3 { - %n.addr = alloca i16* - store i16* %n, i16** %n.addr %tmp.this = alloca i16 br label %code code: ; preds = %0 - %1 = load i16*, i16** %n.addr - %2 = load i16, i16* %1 + %1 = load i16, i16* %n store i16 1, i16* %tmp.this - %3 = load i16, i16* %tmp.this - %4 = sub i16 %2, %3 - %5 = load i16*, i16** %n.addr - store i16 %4, i16* %5 - %6 = load i16*, i16** %n.addr - %7 = load i16, i16* %6 - ret i16 %7 + %2 = load i16, i16* %tmp.this + %3 = sub i16 %1, %2 + store i16 %3, i16* %n + %4 = load i16, i16* %n + ret i16 %4 } ; Function Attrs: alwaysinline nounwind define internal i16 @pre_--.29(i16* %n) #3 { - %n.addr = alloca i16* - store i16* %n, i16** %n.addr %tmp.this = alloca i16 br label %code code: ; preds = %0 - %1 = load i16*, i16** %n.addr - %2 = load i16, i16* %1 + %1 = load i16, i16* %n store i16 1, i16* %tmp.this - %3 = load i16, i16* %tmp.this - %4 = sub i16 %2, %3 - %5 = load i16*, i16** %n.addr - store i16 %4, i16* %5 - %6 = load i16*, i16** %n.addr - %7 = load i16, i16* %6 - ret i16 %7 + %2 = load i16, i16* %tmp.this + %3 = sub i16 %1, %2 + store i16 %3, i16* %n + %4 = load i16, i16* %n + ret i16 %4 } ; Function Attrs: alwaysinline nounwind define internal i32 @pre_--.30(i32* %n) #3 { - %n.addr = alloca i32* - store i32* %n, i32** %n.addr br label %code code: ; preds = %0 - %1 = load i32*, i32** %n.addr - %2 = load i32, i32* %1 - %3 = sub i32 %2, 1 - %4 = load i32*, i32** %n.addr - store i32 %3, i32* %4 - %5 = load i32*, i32** %n.addr - %6 = load i32, i32* %5 - ret i32 %6 + %1 = load i32, i32* %n + %2 = sub i32 %1, 1 + store i32 %2, i32* %n + %3 = load i32, i32* %n + ret i32 %3 } ; Function Attrs: alwaysinline nounwind define internal i32 @pre_--.31(i32* %n) #3 { - %n.addr = alloca i32* - store i32* %n, i32** %n.addr %tmp.this = alloca i32 br label %code code: ; preds = %0 - %1 = load i32*, i32** %n.addr - %2 = load i32, i32* %1 + %1 = load i32, i32* %n store i32 1, i32* %tmp.this - %3 = load i32, i32* %tmp.this - %4 = sub i32 %2, %3 - %5 = load i32*, i32** %n.addr - store i32 %4, i32* %5 - %6 = load i32*, i32** %n.addr - %7 = load i32, i32* %6 - ret i32 %7 + %2 = load i32, i32* %tmp.this + %3 = sub i32 %1, %2 + store i32 %3, i32* %n + %4 = load i32, i32* %n + ret i32 %4 } ; Function Attrs: alwaysinline nounwind define internal i64 @pre_--.32(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 + %1 = load i64, i64* %n store i64 1, i64* %tmp.this - %3 = load i64, i64* %tmp.this - %4 = sub i64 %2, %3 - %5 = load i64*, i64** %n.addr - store i64 %4, i64* %5 - %6 = load i64*, i64** %n.addr - %7 = load i64, i64* %6 - ret i64 %7 + %2 = load i64, i64* %tmp.this + %3 = sub i64 %1, %2 + store i64 %3, i64* %n + %4 = load i64, i64* %n + ret i64 %4 } ; Function Attrs: alwaysinline nounwind define internal i64 @pre_--.33(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 + %1 = load i64, i64* %n store i64 1, i64* %tmp.this - %3 = load i64, i64* %tmp.this - %4 = sub i64 %2, %3 - %5 = load i64*, i64** %n.addr - store i64 %4, i64* %5 - %6 = load i64*, i64** %n.addr - %7 = load i64, i64* %6 - ret i64 %7 + %2 = load i64, i64* %tmp.this + %3 = sub i64 %1, %2 + store i64 %3, i64* %n + %4 = load i64, i64* %n + ret i64 %4 } ; Function Attrs: alwaysinline nounwind define internal i64 @pre_--.34(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 + %1 = load i64, i64* %n store i64 1, i64* %tmp.this - %3 = load i64, i64* %tmp.this - %4 = call i64 @_SizeType_opMinus(i64 %2, i64 %3) - %5 = load i64*, i64** %n.addr - store i64 %4, i64* %5 - %6 = load i64*, i64** %n.addr - %7 = load i64, i64* %6 - ret i64 %7 + %2 = load i64, i64* %tmp.this + %3 = call i64 @_SizeType_opMinus(i64 %1, i64 %2) + store i64 %3, i64* %n + %4 = load i64, i64* %n + ret i64 %4 } ; Function Attrs: alwaysinline nounwind define internal i64 @pre_--.35(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 + %1 = load i64, i64* %n store i64 1, i64* %tmp.this - %3 = load i64, i64* %tmp.this - %4 = call i64 @_DiffType_opMinus(i64 %2, i64 %3) - %5 = load i64*, i64** %n.addr - store i64 %4, i64* %5 - %6 = load i64*, i64** %n.addr - %7 = load i64, i64* %6 - ret i64 %7 + %2 = load i64, i64* %tmp.this + %3 = call i64 @_DiffType_opMinus(i64 %1, i64 %2) + store i64 %3, i64* %n + %4 = load i64, i64* %n + ret i64 %4 } ; Function Attrs: alwaysinline nounwind define internal i8 @"post_++"(i8* %n) #3 { - %n.addr = alloca i8* - store i8* %n, i8** %n.addr %old = alloca i8 %tmp.this = alloca i8 br label %code code: ; preds = %0 - %1 = load i8*, i8** %n.addr - %2 = load i8, i8* %1 - store i8 %2, i8* %old - %3 = load i8*, i8** %n.addr - %4 = load i8, i8* %3 + %1 = load i8, i8* %n + store i8 %1, i8* %old + %2 = load i8, i8* %n store i8 1, i8* %tmp.this - %5 = load i8, i8* %tmp.this - %6 = add i8 %4, %5 - %7 = load i8*, i8** %n.addr - store i8 %6, i8* %7 - %8 = load i8, i8* %old - ret i8 %8 + %3 = load i8, i8* %tmp.this + %4 = add i8 %2, %3 + store i8 %4, i8* %n + %5 = load i8, i8* %old + ret i8 %5 } ; Function Attrs: alwaysinline nounwind define internal i8 @"post_++.36"(i8* %n) #3 { - %n.addr = alloca i8* - store i8* %n, i8** %n.addr %old = alloca i8 %tmp.this = alloca i8 br label %code code: ; preds = %0 - %1 = load i8*, i8** %n.addr - %2 = load i8, i8* %1 - store i8 %2, i8* %old - %3 = load i8*, i8** %n.addr - %4 = load i8, i8* %3 + %1 = load i8, i8* %n + store i8 %1, i8* %old + %2 = load i8, i8* %n store i8 1, i8* %tmp.this - %5 = load i8, i8* %tmp.this - %6 = add i8 %4, %5 - %7 = load i8*, i8** %n.addr - store i8 %6, i8* %7 - %8 = load i8, i8* %old - ret i8 %8 + %3 = load i8, i8* %tmp.this + %4 = add i8 %2, %3 + store i8 %4, i8* %n + %5 = load i8, i8* %old + ret i8 %5 } ; Function Attrs: alwaysinline nounwind define internal i16 @"post_++.37"(i16* %n) #3 { - %n.addr = alloca i16* - store i16* %n, i16** %n.addr %old = alloca i16 %tmp.this = alloca i16 br label %code code: ; preds = %0 - %1 = load i16*, i16** %n.addr - %2 = load i16, i16* %1 - store i16 %2, i16* %old - %3 = load i16*, i16** %n.addr - %4 = load i16, i16* %3 + %1 = load i16, i16* %n + store i16 %1, i16* %old + %2 = load i16, i16* %n store i16 1, i16* %tmp.this - %5 = load i16, i16* %tmp.this - %6 = add i16 %4, %5 - %7 = load i16*, i16** %n.addr - store i16 %6, i16* %7 - %8 = load i16, i16* %old - ret i16 %8 + %3 = load i16, i16* %tmp.this + %4 = add i16 %2, %3 + store i16 %4, i16* %n + %5 = load i16, i16* %old + ret i16 %5 } ; Function Attrs: alwaysinline nounwind define internal i16 @"post_++.38"(i16* %n) #3 { - %n.addr = alloca i16* - store i16* %n, i16** %n.addr %old = alloca i16 %tmp.this = alloca i16 br label %code code: ; preds = %0 - %1 = load i16*, i16** %n.addr - %2 = load i16, i16* %1 - store i16 %2, i16* %old - %3 = load i16*, i16** %n.addr - %4 = load i16, i16* %3 + %1 = load i16, i16* %n + store i16 %1, i16* %old + %2 = load i16, i16* %n store i16 1, i16* %tmp.this - %5 = load i16, i16* %tmp.this - %6 = add i16 %4, %5 - %7 = load i16*, i16** %n.addr - store i16 %6, i16* %7 - %8 = load i16, i16* %old - ret i16 %8 + %3 = load i16, i16* %tmp.this + %4 = add i16 %2, %3 + store i16 %4, i16* %n + %5 = load i16, i16* %old + ret i16 %5 } ; Function Attrs: alwaysinline nounwind define internal i32 @"post_++.39"(i32* %n) #3 { - %n.addr = alloca i32* - store i32* %n, i32** %n.addr %old = alloca i32 br label %code code: ; preds = %0 - %1 = load i32*, i32** %n.addr - %2 = load i32, i32* %1 - store i32 %2, i32* %old - %3 = load i32*, i32** %n.addr - %4 = load i32, i32* %3 - %5 = add i32 %4, 1 - %6 = load i32*, i32** %n.addr - store i32 %5, i32* %6 - %7 = load i32, i32* %old - ret i32 %7 + %1 = load i32, i32* %n + store i32 %1, i32* %old + %2 = load i32, i32* %n + %3 = add i32 %2, 1 + store i32 %3, i32* %n + %4 = load i32, i32* %old + ret i32 %4 } ; Function Attrs: alwaysinline nounwind define internal i32 @"post_++.40"(i32* %n) #3 { - %n.addr = alloca i32* - store i32* %n, i32** %n.addr %old = alloca i32 %tmp.this = alloca i32 br label %code code: ; preds = %0 - %1 = load i32*, i32** %n.addr - %2 = load i32, i32* %1 - store i32 %2, i32* %old - %3 = load i32*, i32** %n.addr - %4 = load i32, i32* %3 + %1 = load i32, i32* %n + store i32 %1, i32* %old + %2 = load i32, i32* %n store i32 1, i32* %tmp.this - %5 = load i32, i32* %tmp.this - %6 = add i32 %4, %5 - %7 = load i32*, i32** %n.addr - store i32 %6, i32* %7 - %8 = load i32, i32* %old - ret i32 %8 + %3 = load i32, i32* %tmp.this + %4 = add i32 %2, %3 + store i32 %4, i32* %n + %5 = load i32, i32* %old + ret i32 %5 } ; Function Attrs: alwaysinline nounwind define internal i64 @"post_++.41"(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %old = alloca i64 %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 - store i64 %2, i64* %old - %3 = load i64*, i64** %n.addr - %4 = load i64, i64* %3 + %1 = load i64, i64* %n + store i64 %1, i64* %old + %2 = load i64, i64* %n store i64 1, i64* %tmp.this - %5 = load i64, i64* %tmp.this - %6 = add i64 %4, %5 - %7 = load i64*, i64** %n.addr - store i64 %6, i64* %7 - %8 = load i64, i64* %old - ret i64 %8 + %3 = load i64, i64* %tmp.this + %4 = add i64 %2, %3 + store i64 %4, i64* %n + %5 = load i64, i64* %old + ret i64 %5 } ; Function Attrs: alwaysinline nounwind define internal i64 @"post_++.42"(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %old = alloca i64 %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 - store i64 %2, i64* %old - %3 = load i64*, i64** %n.addr - %4 = load i64, i64* %3 + %1 = load i64, i64* %n + store i64 %1, i64* %old + %2 = load i64, i64* %n store i64 1, i64* %tmp.this - %5 = load i64, i64* %tmp.this - %6 = add i64 %4, %5 - %7 = load i64*, i64** %n.addr - store i64 %6, i64* %7 - %8 = load i64, i64* %old - ret i64 %8 + %3 = load i64, i64* %tmp.this + %4 = add i64 %2, %3 + store i64 %4, i64* %n + %5 = load i64, i64* %old + ret i64 %5 } ; Function Attrs: alwaysinline nounwind define internal i64 @"post_++.43"(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %old = alloca i64 %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 - store i64 %2, i64* %old - %3 = load i64*, i64** %n.addr - %4 = load i64, i64* %3 + %1 = load i64, i64* %n + store i64 %1, i64* %old + %2 = load i64, i64* %n store i64 1, i64* %tmp.this - %5 = load i64, i64* %tmp.this - %6 = add i64 %4, %5 - %7 = load i64*, i64** %n.addr - store i64 %6, i64* %7 - %8 = load i64, i64* %old - ret i64 %8 + %3 = load i64, i64* %tmp.this + %4 = add i64 %2, %3 + store i64 %4, i64* %n + %5 = load i64, i64* %old + ret i64 %5 } ; Function Attrs: alwaysinline nounwind define internal i64 @"post_++.44"(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %old = alloca i64 %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 - store i64 %2, i64* %old - %3 = load i64*, i64** %n.addr - %4 = load i64, i64* %3 + %1 = load i64, i64* %n + store i64 %1, i64* %old + %2 = load i64, i64* %n store i64 1, i64* %tmp.this - %5 = load i64, i64* %tmp.this - %6 = add i64 %4, %5 - %7 = load i64*, i64** %n.addr - store i64 %6, i64* %7 - %8 = load i64, i64* %old - ret i64 %8 + %3 = load i64, i64* %tmp.this + %4 = add i64 %2, %3 + store i64 %4, i64* %n + %5 = load i64, i64* %old + ret i64 %5 } ; Function Attrs: alwaysinline nounwind define internal i8 @post_--(i8* %n) #3 { - %n.addr = alloca i8* - store i8* %n, i8** %n.addr %old = alloca i8 %tmp.this = alloca i8 br label %code code: ; preds = %0 - %1 = load i8*, i8** %n.addr - %2 = load i8, i8* %1 - store i8 %2, i8* %old - %3 = load i8*, i8** %n.addr - %4 = load i8, i8* %3 + %1 = load i8, i8* %n + store i8 %1, i8* %old + %2 = load i8, i8* %n store i8 1, i8* %tmp.this - %5 = load i8, i8* %tmp.this - %6 = sub i8 %4, %5 - %7 = load i8*, i8** %n.addr - store i8 %6, i8* %7 - %8 = load i8, i8* %old - ret i8 %8 + %3 = load i8, i8* %tmp.this + %4 = sub i8 %2, %3 + store i8 %4, i8* %n + %5 = load i8, i8* %old + ret i8 %5 } ; Function Attrs: alwaysinline nounwind define internal i8 @post_--.45(i8* %n) #3 { - %n.addr = alloca i8* - store i8* %n, i8** %n.addr %old = alloca i8 %tmp.this = alloca i8 br label %code code: ; preds = %0 - %1 = load i8*, i8** %n.addr - %2 = load i8, i8* %1 - store i8 %2, i8* %old - %3 = load i8*, i8** %n.addr - %4 = load i8, i8* %3 + %1 = load i8, i8* %n + store i8 %1, i8* %old + %2 = load i8, i8* %n store i8 1, i8* %tmp.this - %5 = load i8, i8* %tmp.this - %6 = sub i8 %4, %5 - %7 = load i8*, i8** %n.addr - store i8 %6, i8* %7 - %8 = load i8, i8* %old - ret i8 %8 + %3 = load i8, i8* %tmp.this + %4 = sub i8 %2, %3 + store i8 %4, i8* %n + %5 = load i8, i8* %old + ret i8 %5 } ; Function Attrs: alwaysinline nounwind define internal i16 @post_--.46(i16* %n) #3 { - %n.addr = alloca i16* - store i16* %n, i16** %n.addr %old = alloca i16 %tmp.this = alloca i16 br label %code code: ; preds = %0 - %1 = load i16*, i16** %n.addr - %2 = load i16, i16* %1 - store i16 %2, i16* %old - %3 = load i16*, i16** %n.addr - %4 = load i16, i16* %3 + %1 = load i16, i16* %n + store i16 %1, i16* %old + %2 = load i16, i16* %n store i16 1, i16* %tmp.this - %5 = load i16, i16* %tmp.this - %6 = sub i16 %4, %5 - %7 = load i16*, i16** %n.addr - store i16 %6, i16* %7 - %8 = load i16, i16* %old - ret i16 %8 + %3 = load i16, i16* %tmp.this + %4 = sub i16 %2, %3 + store i16 %4, i16* %n + %5 = load i16, i16* %old + ret i16 %5 } ; Function Attrs: alwaysinline nounwind define internal i16 @post_--.47(i16* %n) #3 { - %n.addr = alloca i16* - store i16* %n, i16** %n.addr %old = alloca i16 %tmp.this = alloca i16 br label %code code: ; preds = %0 - %1 = load i16*, i16** %n.addr - %2 = load i16, i16* %1 - store i16 %2, i16* %old - %3 = load i16*, i16** %n.addr - %4 = load i16, i16* %3 + %1 = load i16, i16* %n + store i16 %1, i16* %old + %2 = load i16, i16* %n store i16 1, i16* %tmp.this - %5 = load i16, i16* %tmp.this - %6 = sub i16 %4, %5 - %7 = load i16*, i16** %n.addr - store i16 %6, i16* %7 - %8 = load i16, i16* %old - ret i16 %8 + %3 = load i16, i16* %tmp.this + %4 = sub i16 %2, %3 + store i16 %4, i16* %n + %5 = load i16, i16* %old + ret i16 %5 } ; Function Attrs: alwaysinline nounwind define internal i32 @post_--.48(i32* %n) #3 { - %n.addr = alloca i32* - store i32* %n, i32** %n.addr %old = alloca i32 br label %code code: ; preds = %0 - %1 = load i32*, i32** %n.addr - %2 = load i32, i32* %1 - store i32 %2, i32* %old - %3 = load i32*, i32** %n.addr - %4 = load i32, i32* %3 - %5 = sub i32 %4, 1 - %6 = load i32*, i32** %n.addr - store i32 %5, i32* %6 - %7 = load i32, i32* %old - ret i32 %7 + %1 = load i32, i32* %n + store i32 %1, i32* %old + %2 = load i32, i32* %n + %3 = sub i32 %2, 1 + store i32 %3, i32* %n + %4 = load i32, i32* %old + ret i32 %4 } ; Function Attrs: alwaysinline nounwind define internal i32 @post_--.49(i32* %n) #3 { - %n.addr = alloca i32* - store i32* %n, i32** %n.addr %old = alloca i32 %tmp.this = alloca i32 br label %code code: ; preds = %0 - %1 = load i32*, i32** %n.addr - %2 = load i32, i32* %1 - store i32 %2, i32* %old - %3 = load i32*, i32** %n.addr - %4 = load i32, i32* %3 + %1 = load i32, i32* %n + store i32 %1, i32* %old + %2 = load i32, i32* %n store i32 1, i32* %tmp.this - %5 = load i32, i32* %tmp.this - %6 = sub i32 %4, %5 - %7 = load i32*, i32** %n.addr - store i32 %6, i32* %7 - %8 = load i32, i32* %old - ret i32 %8 + %3 = load i32, i32* %tmp.this + %4 = sub i32 %2, %3 + store i32 %4, i32* %n + %5 = load i32, i32* %old + ret i32 %5 } ; Function Attrs: alwaysinline nounwind define internal i64 @post_--.50(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %old = alloca i64 %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 - store i64 %2, i64* %old - %3 = load i64*, i64** %n.addr - %4 = load i64, i64* %3 + %1 = load i64, i64* %n + store i64 %1, i64* %old + %2 = load i64, i64* %n store i64 1, i64* %tmp.this - %5 = load i64, i64* %tmp.this - %6 = sub i64 %4, %5 - %7 = load i64*, i64** %n.addr - store i64 %6, i64* %7 - %8 = load i64, i64* %old - ret i64 %8 + %3 = load i64, i64* %tmp.this + %4 = sub i64 %2, %3 + store i64 %4, i64* %n + %5 = load i64, i64* %old + ret i64 %5 } ; Function Attrs: alwaysinline nounwind define internal i64 @post_--.51(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %old = alloca i64 %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 - store i64 %2, i64* %old - %3 = load i64*, i64** %n.addr - %4 = load i64, i64* %3 + %1 = load i64, i64* %n + store i64 %1, i64* %old + %2 = load i64, i64* %n store i64 1, i64* %tmp.this - %5 = load i64, i64* %tmp.this - %6 = sub i64 %4, %5 - %7 = load i64*, i64** %n.addr - store i64 %6, i64* %7 - %8 = load i64, i64* %old - ret i64 %8 + %3 = load i64, i64* %tmp.this + %4 = sub i64 %2, %3 + store i64 %4, i64* %n + %5 = load i64, i64* %old + ret i64 %5 } ; Function Attrs: alwaysinline nounwind define internal i64 @post_--.52(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %old = alloca i64 %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 - store i64 %2, i64* %old - %3 = load i64*, i64** %n.addr - %4 = load i64, i64* %3 + %1 = load i64, i64* %n + store i64 %1, i64* %old + %2 = load i64, i64* %n store i64 1, i64* %tmp.this - %5 = load i64, i64* %tmp.this - %6 = call i64 @_SizeType_opMinus(i64 %4, i64 %5) - %7 = load i64*, i64** %n.addr - store i64 %6, i64* %7 - %8 = load i64, i64* %old - ret i64 %8 + %3 = load i64, i64* %tmp.this + %4 = call i64 @_SizeType_opMinus(i64 %2, i64 %3) + store i64 %4, i64* %n + %5 = load i64, i64* %old + ret i64 %5 } ; Function Attrs: alwaysinline nounwind define internal i64 @post_--.53(i64* %n) #3 { - %n.addr = alloca i64* - store i64* %n, i64** %n.addr %old = alloca i64 %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load i64*, i64** %n.addr - %2 = load i64, i64* %1 - store i64 %2, i64* %old - %3 = load i64*, i64** %n.addr - %4 = load i64, i64* %3 + %1 = load i64, i64* %n + store i64 %1, i64* %old + %2 = load i64, i64* %n store i64 1, i64* %tmp.this - %5 = load i64, i64* %tmp.this - %6 = call i64 @_DiffType_opMinus(i64 %4, i64 %5) - %7 = load i64*, i64** %n.addr - store i64 %6, i64* %7 - %8 = load i64, i64* %old - ret i64 %8 + %3 = load i64, i64* %tmp.this + %4 = call i64 @_DiffType_opMinus(i64 %2, i64 %3) + store i64 %4, i64* %n + %5 = load i64, i64* %old + ret i64 %5 } ; Function Attrs: inlinehint nounwind define internal void @ctor.54(%StringRef* %this) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr + %tmp.this = alloca %UntypedPtr + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 - store i8* null, i8** %2 - %3 = load %StringRef*, %StringRef** %this.addr - %4 = getelementptr inbounds %StringRef, %StringRef* %3, i32 0, i32 1 - store i8* null, i8** %4 - %5 = load %StringRef*, %StringRef** %this.addr - %6 = getelementptr inbounds %StringRef, %StringRef* %5, i32 0, i32 0 - store i8* null, i8** %6 - %7 = load %StringRef*, %StringRef** %this.addr - %8 = getelementptr inbounds %StringRef, %StringRef* %7, i32 0, i32 1 - store i8* null, i8** %8 + %1 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %tmp.this) + %2 = load %UntypedPtr, %UntypedPtr* %tmp.this + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %2) + %3 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + call void @ctor.56(%UntypedPtr* %tmp.this1) + %4 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + call void @ctor.55(%UntypedPtr* %3, %UntypedPtr %4) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.55(%StringRef* %this, i64 %size) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr - %size.addr = alloca i64 - store i64 %size, i64* %size.addr - %tmp.this = alloca i64 - %tmp.this1 = alloca i8 - br label %code - -code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 - store i8* null, i8** %2 - %3 = load %StringRef*, %StringRef** %this.addr - %4 = getelementptr inbounds %StringRef, %StringRef* %3, i32 0, i32 1 - store i8* null, i8** %4 - %5 = load i64, i64* %size.addr - store i64 1, i64* %tmp.this - %6 = load i64, i64* %tmp.this - %7 = add i64 %5, %6 - %8 = call i8* @malloc(i64 %7) - %9 = load %StringRef*, %StringRef** %this.addr - %10 = getelementptr inbounds %StringRef, %StringRef* %9, i32 0, i32 0 - store i8* %8, i8** %10 - %11 = load %StringRef*, %StringRef** %this.addr - %12 = getelementptr inbounds %StringRef, %StringRef* %11, i32 0, i32 0 - %13 = load i8*, i8** %12 - %14 = load i64, i64* %size.addr - %15 = call i8* @ptrAdd(i8* %13, i64 %14) - %16 = load %StringRef*, %StringRef** %this.addr - %17 = getelementptr inbounds %StringRef, %StringRef* %16, i32 0, i32 1 - store i8* %15, i8** %17 - store i8 0, i8* %tmp.this1 - %18 = load i8, i8* %tmp.this1 - %19 = load %StringRef*, %StringRef** %this.addr - %20 = getelementptr inbounds %StringRef, %StringRef* %19, i32 0, i32 1 - %21 = load i8*, i8** %20 - store i8 %18, i8* %21 - ret void -} - -declare i8* @malloc(i64) - -; Function Attrs: inlinehint nounwind -define internal void @ctor.56(%StringRef* %this, %StringRef %other) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr - %other.addr = alloca %StringRef - store %StringRef %other, %StringRef* %other.addr +define internal void @ctor.55(%UntypedPtr* %this, %UntypedPtr %other) #4 { + %other.addr = alloca %UntypedPtr + store %UntypedPtr %other, %UntypedPtr* %other.addr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 - store i8* null, i8** %2 - %3 = load %StringRef*, %StringRef** %this.addr - %4 = getelementptr inbounds %StringRef, %StringRef* %3, i32 0, i32 1 - store i8* null, i8** %4 - %5 = getelementptr inbounds %StringRef, %StringRef* %other.addr, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = load %StringRef*, %StringRef** %this.addr - %8 = getelementptr inbounds %StringRef, %StringRef* %7, i32 0, i32 0 - store i8* %6, i8** %8 - %9 = getelementptr inbounds %StringRef, %StringRef* %other.addr, i32 0, i32 1 - %10 = load i8*, i8** %9 - %11 = load %StringRef*, %StringRef** %this.addr - %12 = getelementptr inbounds %StringRef, %StringRef* %11, i32 0, i32 1 - store i8* %10, i8** %12 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %other.addr, i32 0, i32 0 + %3 = load i8*, i8** %2 + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* %3, i8** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.57(%StringRef* %this, i8* %begin, i8* %end) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr - %begin.addr = alloca i8* - store i8* %begin, i8** %begin.addr - %end.addr = alloca i8* - store i8* %end, i8** %end.addr +define internal void @ctor.56(%UntypedPtr* %this) #4 { br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 store i8* null, i8** %2 - %3 = load %StringRef*, %StringRef** %this.addr - %4 = getelementptr inbounds %StringRef, %StringRef* %3, i32 0, i32 1 - store i8* null, i8** %4 - %5 = load i8*, i8** %begin.addr - %6 = load %StringRef*, %StringRef** %this.addr - %7 = getelementptr inbounds %StringRef, %StringRef* %6, i32 0, i32 0 - store i8* %5, i8** %7 - %8 = load i8*, i8** %end.addr - %9 = load %StringRef*, %StringRef** %this.addr - %10 = getelementptr inbounds %StringRef, %StringRef* %9, i32 0, i32 1 - store i8* %8, i8** %10 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.58(%StringRef* %this) #3 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr +define internal void @dtor.57(%UntypedPtr* %this) #3 { br label %code code: ; preds = %0 @@ -3264,249 +2987,389 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty(%StringRef* %this) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr +define internal void @ctor.58(%StringRef* %this, i64 %size) #4 { + %size.addr = alloca i64 + store i64 %size, i64* %size.addr + %"$tmpForRef" = alloca %UntypedPtr %tmp.this = alloca i64 + %"$tmpForRef1" = alloca %UntypedPtr + %tmp.this2 = alloca i8 br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 1 - %3 = load i8*, i8** %2 - %4 = load %StringRef*, %StringRef** %this.addr - %5 = getelementptr inbounds %StringRef, %StringRef* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i64 @ptrDiff(i8* %3, i8* %6) - store i64 0, i64* %tmp.this - %8 = load i64, i64* %tmp.this - %9 = icmp eq i64 %7, %8 - %10 = load i64, i64* %tmp.this - ret i1 %9 - -dumy_block: ; No predecessors! - %11 = load i64, i64* %tmp.this - unreachable + %1 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) + %2 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + call void @ctor.56(%UntypedPtr* %2) + %3 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + %4 = load i64, i64* %size.addr + store i64 1, i64* %tmp.this + %5 = load i64, i64* %tmp.this + %6 = add i64 %4, %5 + %7 = call %UntypedPtr @malloc(i64 %6) + store %UntypedPtr %7, %UntypedPtr* %"$tmpForRef" + call void @"="(%UntypedPtr* %3, %UntypedPtr* %"$tmpForRef") + %8 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + %9 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + %10 = load %UntypedPtr, %UntypedPtr* %9 + %11 = load i64, i64* %size.addr + %12 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %10, i64 %11) + store %UntypedPtr %12, %UntypedPtr* %"$tmpForRef1" + call void @"="(%UntypedPtr* %8, %UntypedPtr* %"$tmpForRef1") + store i8 0, i8* %tmp.this2 + %13 = load i8, i8* %tmp.this2 + %14 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + %15 = load %UntypedPtr, %UntypedPtr* %14 + %16 = call i8* @asRefOf(%UntypedPtr %15) + store i8 %13, i8* %16 + ret void } -; Function Attrs: inlinehint nounwind -define internal i64 @size(%StringRef* %this) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr - %tmp.this = alloca i64 +; Function Attrs: alwaysinline nounwind +define internal void @"="(%UntypedPtr* %this, %UntypedPtr* %other) #3 { + %other.addr = alloca %UntypedPtr* + store %UntypedPtr* %other, %UntypedPtr** %other.addr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 1 + %1 = load %UntypedPtr*, %UntypedPtr** %other.addr + %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %1, i32 0, i32 0 %3 = load i8*, i8** %2 - %4 = load %StringRef*, %StringRef** %this.addr - %5 = getelementptr inbounds %StringRef, %StringRef* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i64 @ptrDiff(i8* %3, i8* %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* %3, i8** %4 + ret void } +declare %UntypedPtr @malloc(i64) + ; Function Attrs: inlinehint nounwind -define internal i8* @front(%StringRef* %this) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr +define internal i8* @asRefOf(%UntypedPtr %this) #4 { + %this.addr = alloca %UntypedPtr + store %UntypedPtr %this, %UntypedPtr* %this.addr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - ret i8* %3 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this.addr, i32 0, i32 0 + %2 = load i8*, i8** %1 + ret i8* %2 } ; Function Attrs: inlinehint nounwind -define internal i8* @back(%StringRef* %this) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr - %tmp.this = alloca i64 +define internal void @ctor.59(%StringRef* %this, %StringRef %other) #4 { + %other.addr = alloca %StringRef + store %StringRef %other, %StringRef* %other.addr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 1 - %3 = load i8*, i8** %2 - store i64 4294967295, i64* %tmp.this - %4 = load i64, i64* %tmp.this - %5 = call i8* @ptrAdd(i8* %3, i64 %4) - ret i8* %5 + %1 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) + %2 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + call void @ctor.56(%UntypedPtr* %2) + %3 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + %4 = getelementptr inbounds %StringRef, %StringRef* %other.addr, i32 0, i32 0 + call void @"="(%UntypedPtr* %3, %UntypedPtr* %4) + %5 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + %6 = getelementptr inbounds %StringRef, %StringRef* %other.addr, i32 0, i32 1 + call void @"="(%UntypedPtr* %5, %UntypedPtr* %6) + ret void } ; Function Attrs: inlinehint nounwind -define internal i8* @"()"(%StringRef* %this) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr +define internal void @ctor.60(%StringRef* %this, %UntypedPtr %begin, %UntypedPtr %end) #4 { + %begin.addr = alloca %UntypedPtr + store %UntypedPtr %begin, %UntypedPtr* %begin.addr + %end.addr = alloca %UntypedPtr + store %UntypedPtr %end, %UntypedPtr* %end.addr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - ret i8* %3 + %1 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) + %2 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + call void @ctor.56(%UntypedPtr* %2) + %3 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + call void @"="(%UntypedPtr* %3, %UntypedPtr* %begin.addr) + %4 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + call void @"="(%UntypedPtr* %4, %UntypedPtr* %end.addr) + ret void } -; Function Attrs: inlinehint nounwind -define internal i8* @"().59"(%StringRef* %this, i64 %index) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr - %index.addr = alloca i64 - store i64 %index, i64* %index.addr +; Function Attrs: alwaysinline nounwind +define internal void @dtor.61(%StringRef %this) #3 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load i64, i64* %index.addr - %5 = call i8* @ptrAdd(i8* %3, i64 %4) + %1 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 1 + %2 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 0 + ret void +} + +; Function Attrs: inlinehint nounwind +define internal i1 @isEmpty(%StringRef %this) #4 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr + %tmp.this = alloca i64 + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 1 + %2 = load %UntypedPtr, %UntypedPtr* %1 + %3 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + %5 = call i64 bitcast (i64 (i8*, i8*)* @ptrDiff to i64 (%UntypedPtr, %UntypedPtr)*)(%UntypedPtr %2, %UntypedPtr %4) + store i64 0, i64* %tmp.this + %6 = load i64, i64* %tmp.this + %7 = icmp eq i64 %5, %6 + %8 = load i64, i64* %tmp.this + ret i1 %7 + +dumy_block: ; No predecessors! + %9 = load i64, i64* %tmp.this + unreachable +} + +; Function Attrs: inlinehint nounwind +define internal i64 @size(%StringRef %this) #4 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr + %tmp.this = alloca i64 + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 1 + %2 = load %UntypedPtr, %UntypedPtr* %1 + %3 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + %5 = call i64 bitcast (i64 (i8*, i8*)* @ptrDiff to i64 (%UntypedPtr, %UntypedPtr)*)(%UntypedPtr %2, %UntypedPtr %4) + store i64 %5, i64* %tmp.this + %6 = load i64, i64* %tmp.this + ret i64 %6 +} + +; Function Attrs: inlinehint nounwind +define internal i8* @front(%StringRef %this) #4 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 0 + %2 = load %UntypedPtr, %UntypedPtr* %1 + %3 = call i8* @asRefOf.62(%UntypedPtr %2) + ret i8* %3 +} + +; Function Attrs: inlinehint nounwind +define internal i8* @asRefOf.62(%UntypedPtr %this) #4 { + %this.addr = alloca %UntypedPtr + store %UntypedPtr %this, %UntypedPtr* %this.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this.addr, i32 0, i32 0 + %2 = load i8*, i8** %1 + ret i8* %2 +} + +; Function Attrs: inlinehint nounwind +define internal i8* @back(%StringRef %this) #4 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr + %tmp.this = alloca i64 + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 1 + %2 = load %UntypedPtr, %UntypedPtr* %1 + store i64 1, i64* %tmp.this + %3 = load i64, i64* %tmp.this + %4 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrSub to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %2, i64 %3) + %5 = call i8* @asRefOf.62(%UntypedPtr %4) + ret i8* %5 +} + +; Function Attrs: inlinehint nounwind +define internal i8* @"()"(%StringRef %this) #4 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 0 + %2 = load %UntypedPtr, %UntypedPtr* %1 + %3 = call i8* @asRefOf.62(%UntypedPtr %2) + ret i8* %3 +} + +; Function Attrs: inlinehint nounwind +define internal i8* @"().63"(%StringRef %this, i64 %index) #4 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr + %index.addr = alloca i64 + store i64 %index, i64* %index.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 0 + %2 = load %UntypedPtr, %UntypedPtr* %1 + %3 = load i64, i64* %index.addr + %4 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %2, i64 %3) + %5 = call i8* @asRefOf.62(%UntypedPtr %4) ret i8* %5 } ; Function Attrs: inlinehint nounwind -define internal i8* @at(%StringRef* %this, i64 %index) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr +define internal i8* @at(%StringRef %this, i64 %index) #4 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr %index.addr = alloca i64 store i64 %index, i64* %index.addr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load i64, i64* %index.addr - %5 = call i8* @ptrAdd(i8* %3, i64 %4) + %1 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 0 + %2 = load %UntypedPtr, %UntypedPtr* %1 + %3 = load i64, i64* %index.addr + %4 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %2, i64 %3) + %5 = call i8* @asRefOf.62(%UntypedPtr %4) ret i8* %5 } ; Function Attrs: alwaysinline nounwind define internal void @popFront(%StringRef* %this) #3 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr + %"$tmpForRef" = alloca %UntypedPtr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 + %1 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + %2 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 store i64 1, i64* %tmp.this %4 = load i64, i64* %tmp.this - %5 = call i8* @ptrAdd(i8* %3, i64 %4) - %6 = load %StringRef*, %StringRef** %this.addr - %7 = getelementptr inbounds %StringRef, %StringRef* %6, i32 0, i32 0 - store i8* %5, i8** %7 + %5 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %4) + store %UntypedPtr %5, %UntypedPtr* %"$tmpForRef" + call void @"="(%UntypedPtr* %1, %UntypedPtr* %"$tmpForRef") ret void } ; Function Attrs: alwaysinline nounwind define internal void @popBack(%StringRef* %this) #3 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr + %"$tmpForRef" = alloca %UntypedPtr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 1 - %3 = load i8*, i8** %2 - store i64 4294967295, i64* %tmp.this + %1 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + %2 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + store i64 1, i64* %tmp.this %4 = load i64, i64* %tmp.this - %5 = call i8* @ptrAdd(i8* %3, i64 %4) - %6 = load %StringRef*, %StringRef** %this.addr - %7 = getelementptr inbounds %StringRef, %StringRef* %6, i32 0, i32 1 - store i8* %5, i8** %7 + %5 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrSub to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %4) + store %UntypedPtr %5, %UntypedPtr* %"$tmpForRef" + call void @"="(%UntypedPtr* %1, %UntypedPtr* %"$tmpForRef") ret void } ; Function Attrs: alwaysinline nounwind -define internal void @popFront.60(%StringRef* %this, i64 %n) #3 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr +define internal void @popFront.64(%StringRef* %this, i64 %n) #3 { %n.addr = alloca i64 store i64 %n, i64* %n.addr + %"$tmpForRef" = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 + %1 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + %2 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 %4 = load i64, i64* %n.addr - %5 = call i8* @ptrAdd(i8* %3, i64 %4) - %6 = load %StringRef*, %StringRef** %this.addr - %7 = getelementptr inbounds %StringRef, %StringRef* %6, i32 0, i32 0 - store i8* %5, i8** %7 + %5 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %4) + store %UntypedPtr %5, %UntypedPtr* %"$tmpForRef" + call void @"="(%UntypedPtr* %1, %UntypedPtr* %"$tmpForRef") ret void } ; Function Attrs: alwaysinline nounwind -define internal void @popBack.61(%StringRef* %this, i64 %n) #3 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr +define internal void @popBack.65(%StringRef* %this, i64 %n) #3 { %n.addr = alloca i64 store i64 %n, i64* %n.addr - %tmp.this = alloca i64 - %tmp.this1 = alloca i64 + %"$tmpForRef" = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 1 - %3 = load i8*, i8** %2 + %1 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + %2 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 %4 = load i64, i64* %n.addr - store i64 %4, i64* %tmp.this1 - %5 = load i64, i64* %tmp.this1 - %6 = sub i64 0, %5 - store i64 %6, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = call i8* @ptrAdd(i8* %3, i64 %7) - %9 = load %StringRef*, %StringRef** %this.addr - %10 = getelementptr inbounds %StringRef, %StringRef* %9, i32 0, i32 1 - store i8* %8, i8** %10 + %5 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %4) + store %UntypedPtr %5, %UntypedPtr* %"$tmpForRef" + call void @"="(%UntypedPtr* %1, %UntypedPtr* %"$tmpForRef") ret void } ; Function Attrs: inlinehint nounwind -define internal i8* @cStr(%StringRef* %this) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr +define internal %StringRef @subrange(%StringRef %this, i64 %index, i64 %num) #4 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr + %index.addr = alloca i64 + store i64 %index, i64* %index.addr + %num.addr = alloca i64 + store i64 %num, i64* %num.addr + %tmp.this = alloca %StringRef + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 0 + %2 = load %UntypedPtr, %UntypedPtr* %1 + %3 = load i64, i64* %index.addr + %4 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %2, i64 %3) + %5 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 0 + %6 = load %UntypedPtr, %UntypedPtr* %5 + %7 = load i64, i64* %index.addr + %8 = load i64, i64* %num.addr + %9 = add i64 %7, %8 + %10 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %6, i64 %9) + call void @ctor.60(%StringRef* %tmp.this, %UntypedPtr %4, %UntypedPtr %10) + %11 = load %StringRef, %StringRef* %tmp.this + %12 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %12) + ret %StringRef %11 + +dumy_block: ; No predecessors! + %13 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %13) + unreachable +} + +; Function Attrs: inlinehint nounwind +define internal i8* @cStr(%StringRef %this) #4 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %this.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 + %1 = getelementptr inbounds %StringRef, %StringRef* %this.addr, i32 0, i32 0 + %2 = load %UntypedPtr, %UntypedPtr* %1 + %3 = call i8* @asRefOf.62(%UntypedPtr %2) ret i8* %3 } ; Function Attrs: inlinehint nounwind -define internal %StringRef* @"="(%StringRef* %this, %StringRef %src) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr +define internal %StringRef* @"=.66"(%StringRef* %this, %StringRef %src) #4 { %src.addr = alloca %StringRef store %StringRef %src, %StringRef* %src.addr br label %code code: ; preds = %0 - %1 = getelementptr inbounds %StringRef, %StringRef* %src.addr, i32 0, i32 0 - %2 = load i8*, i8** %1 - %3 = load %StringRef*, %StringRef** %this.addr - %4 = getelementptr inbounds %StringRef, %StringRef* %3, i32 0, i32 0 - store i8* %2, i8** %4 - %5 = getelementptr inbounds %StringRef, %StringRef* %src.addr, i32 0, i32 1 - %6 = load i8*, i8** %5 - %7 = load %StringRef*, %StringRef** %this.addr - %8 = getelementptr inbounds %StringRef, %StringRef* %7, i32 0, i32 1 - store i8* %6, i8** %8 - %9 = load %StringRef*, %StringRef** %this.addr - ret %StringRef* %9 + %1 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 0 + %2 = getelementptr inbounds %StringRef, %StringRef* %src.addr, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %2) + %3 = getelementptr inbounds %StringRef, %StringRef* %this, i32 0, i32 1 + %4 = getelementptr inbounds %StringRef, %StringRef* %src.addr, i32 0, i32 1 + call void @"="(%UntypedPtr* %3, %UntypedPtr* %4) + ret %StringRef* %this } ; Function Attrs: inlinehint nounwind @@ -3521,15 +3384,17 @@ define internal i1 @"=="(%StringRef %this, %StringRef %other) #4 { br label %code code: ; preds = %0 - %1 = call i64 @size(%StringRef* %this.addr) - store i64 %1, i64* %s + %1 = load %StringRef, %StringRef* %this.addr + %2 = call i64 @size(%StringRef %1) + store i64 %2, i64* %s br label %if_block if_block: ; preds = %code - %2 = load i64, i64* %s - %3 = call i64 @size(%StringRef* %other.addr) - %4 = icmp ne i64 %2, %3 - br i1 %4, label %if_then, label %if_end + %3 = load i64, i64* %s + %4 = load %StringRef, %StringRef* %other.addr + %5 = call i64 @size(%StringRef %4) + %6 = icmp ne i64 %3, %5 + br i1 %6, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 false @@ -3542,34 +3407,36 @@ dumy_block: ; No predecessors! br label %if_end while_block: ; preds = %while_step, %if_end - %5 = load i64, i64* %i - %6 = load i64, i64* %s - %7 = icmp slt i64 %5, %6 - br i1 %7, label %while_body, label %while_end + %7 = load i64, i64* %i + %8 = load i64, i64* %s + %9 = icmp slt i64 %7, %8 + br i1 %9, label %while_body, label %while_end while_body: ; preds = %while_block br label %if_block1 while_step: ; preds = %if_end3 - %8 = load i64, i64* %i + %10 = load i64, i64* %i store i64 1, i64* %tmp.this - %9 = load i64, i64* %tmp.this - %10 = add i64 %8, %9 - store i64 %10, i64* %i + %11 = load i64, i64* %tmp.this + %12 = add i64 %10, %11 + store i64 %12, i64* %i br label %while_block while_end: ; preds = %while_block ret i1 true if_block1: ; preds = %while_body - %11 = load i64, i64* %i - %12 = call i8* @at(%StringRef* %this.addr, i64 %11) - %13 = load i8, i8* %12 + %13 = load %StringRef, %StringRef* %this.addr %14 = load i64, i64* %i - %15 = call i8* @at(%StringRef* %other.addr, i64 %14) + %15 = call i8* @at(%StringRef %13, i64 %14) %16 = load i8, i8* %15 - %17 = icmp ne i8 %13, %16 - br i1 %17, label %if_then2, label %if_end3 + %17 = load %StringRef, %StringRef* %other.addr + %18 = load i64, i64* %i + %19 = call i8* @at(%StringRef %17, i64 %18) + %20 = load i8, i8* %19 + %21 = icmp ne i8 %16, %20 + br i1 %21, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 ret i1 false @@ -3587,6 +3454,8 @@ define internal %StringRef @_String_fromCString(i8* %s) #4 { store i8* %s, i8** %s.addr %len = alloca i64 %res = alloca %StringRef + %tmp.this = alloca %UntypedPtr + %"$tmpForRef" = alloca %UntypedPtr br label %code code: ; preds = %0 @@ -3594,69 +3463,91 @@ code: ; preds = %0 %2 = call i64 @cStringLen(i8* %1) store i64 %2, i64* %len call void @ctor.54(%StringRef* %res) - %3 = load i8*, i8** %s.addr - %4 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 - store i8* %3, i8** %4 - %5 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = load i64, i64* %len - %8 = call i8* @ptrAdd(i8* %6, i64 %7) - %9 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 1 - store i8* %8, i8** %9 + %3 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 + %4 = load i8*, i8** %s.addr + call void @ctor.67(%UntypedPtr* %tmp.this, i8* %4) + call void @"="(%UntypedPtr* %3, %UntypedPtr* %tmp.this) + %5 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 1 + %6 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 + %7 = load %UntypedPtr, %UntypedPtr* %6 + %8 = load i64, i64* %len + %9 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %7, i64 %8) + store %UntypedPtr %9, %UntypedPtr* %"$tmpForRef" + call void @"="(%UntypedPtr* %5, %UntypedPtr* %"$tmpForRef") %10 = load %StringRef, %StringRef* %res + %11 = load %StringRef, %StringRef* %res + call void @dtor.61(%StringRef %11) ret %StringRef %10 + +dumy_block: ; No predecessors! + %12 = load %StringRef, %StringRef* %res + call void @dtor.61(%StringRef %12) + unreachable } ; Function Attrs: inlinehint nounwind define internal i64 @cStringLen(i8* %s) #4 { %s.addr = alloca i8* store i8* %s, i8** %s.addr - %p = alloca i8* %len = alloca i64 + %p = alloca %UntypedPtr %tmp.this = alloca i8 + %"$tmpForRef" = alloca %UntypedPtr %tmp.this1 = alloca i64 - %tmp.this2 = alloca i64 br label %code code: ; preds = %0 - %1 = load i8*, i8** %s.addr - store i8* %1, i8** %p store i64 0, i64* %len + %1 = load i8*, i8** %s.addr + call void @ctor.67(%UntypedPtr* %p, i8* %1) br label %while_block while_block: ; preds = %while_step, %code - %2 = load i8*, i8** %p - %3 = load i8, i8* %2 + %2 = load %UntypedPtr, %UntypedPtr* %p + %3 = call i8* @asRefOf(%UntypedPtr %2) + %4 = load i8, i8* %3 store i8 0, i8* %tmp.this - %4 = load i8, i8* %tmp.this - %5 = icmp ne i8 %3, %4 - br i1 %5, label %while_body, label %while_end + %5 = load i8, i8* %tmp.this + %6 = icmp ne i8 %4, %5 + br i1 %6, label %while_body, label %while_end while_body: ; preds = %while_block - %6 = load i64, i64* %len - store i64 1, i64* %tmp.this1 - %7 = load i64, i64* %tmp.this1 - %8 = add i64 %6, %7 - store i64 %8, i64* %len + %7 = call i64 @"post_++.43"(i64* %len) br label %while_step while_step: ; preds = %while_body - %9 = load i8*, i8** %p - store i64 1, i64* %tmp.this2 - %10 = load i64, i64* %tmp.this2 - %11 = call i8* @ptrAdd(i8* %9, i64 %10) - store i8* %11, i8** %p + %8 = load %UntypedPtr, %UntypedPtr* %p + store i64 1, i64* %tmp.this1 + %9 = load i64, i64* %tmp.this1 + %10 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %8, i64 %9) + store %UntypedPtr %10, %UntypedPtr* %"$tmpForRef" + call void @"="(%UntypedPtr* %p, %UntypedPtr* %"$tmpForRef") br label %while_block while_end: ; preds = %while_block - %12 = load i64, i64* %len - ret i64 %12 + %11 = load i64, i64* %len + ret i64 %11 +} + +; Function Attrs: inlinehint nounwind +define internal void @ctor.67(%UntypedPtr* %this, i8* %val) #4 { + %val.addr = alloca i8* + store i8* %val, i8** %val.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = load i8*, i8** %val.addr + %3 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* %2, i8** %3 + ret void } ; Function Attrs: inlinehint nounwind -define internal i8 @char(%StringRef* %this) #4 { - %this.addr = alloca %StringRef* - store %StringRef* %this, %StringRef** %this.addr +define internal i8 @char(%StringRef %this) #4 { + %this.addr = alloca %StringRef + store %StringRef %this, %StringRef* %this.addr %tmp.this = alloca i8 %tmp.this1 = alloca i64 br label %code @@ -3665,8 +3556,8 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %StringRef*, %StringRef** %this.addr - %2 = call i1 @isEmpty(%StringRef* %1) + %1 = load %StringRef, %StringRef* %this.addr + %2 = call i1 @isEmpty(%StringRef %1) br i1 %2, label %if_then, label %if_else if_then: ; preds = %if_block @@ -3675,10 +3566,10 @@ if_then: ; preds = %if_block ret i8 %3 if_else: ; preds = %if_block - %4 = load %StringRef*, %StringRef** %this.addr + %4 = load %StringRef, %StringRef* %this.addr store i64 0, i64* %tmp.this1 %5 = load i64, i64* %tmp.this1 - %6 = call i8* @at(%StringRef* %4, i64 %5) + %6 = call i8* @at(%StringRef %4, i64 %5) %7 = load i8, i8* %6 ret i8 %7 @@ -3704,34 +3595,43 @@ define internal %StringRef @"+"(%StringRef %x, %StringRef %y) #4 { br label %code code: ; preds = %0 - %1 = call i64 @size(%StringRef* %x.addr) - store i64 %1, i64* %sz1 - %2 = call i64 @size(%StringRef* %y.addr) - store i64 %2, i64* %sz2 - %3 = load i64, i64* %sz1 - %4 = load i64, i64* %sz2 - %5 = add i64 %3, %4 - call void @ctor.55(%StringRef* %res, i64 %5) - %6 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 - %7 = load i8*, i8** %6 - %8 = getelementptr inbounds %StringRef, %StringRef* %x.addr, i32 0, i32 0 - %9 = load i8*, i8** %8 - %10 = load i64, i64* %sz1 - call void @_spr_memcpy(i8* %7, i8* %9, i64 %10) - %11 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 - %12 = load i8*, i8** %11 - %13 = load i64, i64* %sz1 - %14 = call i8* @ptrAdd(i8* %12, i64 %13) - %15 = getelementptr inbounds %StringRef, %StringRef* %y.addr, i32 0, i32 0 - %16 = load i8*, i8** %15 - %17 = load i64, i64* %sz2 - call void @_spr_memcpy(i8* %14, i8* %16, i64 %17) - %18 = load %StringRef, %StringRef* %res - ret %StringRef %18 + %1 = load %StringRef, %StringRef* %x.addr + %2 = call i64 @size(%StringRef %1) + store i64 %2, i64* %sz1 + %3 = load %StringRef, %StringRef* %y.addr + %4 = call i64 @size(%StringRef %3) + store i64 %4, i64* %sz2 + %5 = load i64, i64* %sz1 + %6 = load i64, i64* %sz2 + %7 = add i64 %5, %6 + call void @ctor.58(%StringRef* %res, i64 %7) + %8 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 + %9 = load %UntypedPtr, %UntypedPtr* %8 + %10 = getelementptr inbounds %StringRef, %StringRef* %x.addr, i32 0, i32 0 + %11 = load %UntypedPtr, %UntypedPtr* %10 + %12 = load i64, i64* %sz1 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %9, %UntypedPtr %11, i64 %12) + %13 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 + %14 = load %UntypedPtr, %UntypedPtr* %13 + %15 = load i64, i64* %sz1 + %16 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %14, i64 %15) + %17 = getelementptr inbounds %StringRef, %StringRef* %y.addr, i32 0, i32 0 + %18 = load %UntypedPtr, %UntypedPtr* %17 + %19 = load i64, i64* %sz2 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %16, %UntypedPtr %18, i64 %19) + %20 = load %StringRef, %StringRef* %res + %21 = load %StringRef, %StringRef* %res + call void @dtor.61(%StringRef %21) + ret %StringRef %20 + +dumy_block: ; No predecessors! + %22 = load %StringRef, %StringRef* %res + call void @dtor.61(%StringRef %22) + unreachable } ; Function Attrs: inlinehint nounwind -define internal %StringRef @"+.62"(%StringRef %x, i8 %y) #4 { +define internal %StringRef @"+.68"(%StringRef %x, i8 %y) #4 { %x.addr = alloca %StringRef store %StringRef %x, %StringRef* %x.addr %y.addr = alloca i8 @@ -3740,37 +3640,48 @@ define internal %StringRef @"+.62"(%StringRef %x, i8 %y) #4 { %sz2 = alloca i32 %res = alloca %StringRef %tmp.this = alloca i64 - %tmp.this1 = alloca i64 + %tmp.this1 = alloca %UntypedPtr + %tmp.this2 = alloca i64 br label %code code: ; preds = %0 - %1 = call i64 @size(%StringRef* %x.addr) - store i64 %1, i64* %sz1 + %1 = load %StringRef, %StringRef* %x.addr + %2 = call i64 @size(%StringRef %1) + store i64 %2, i64* %sz1 store i32 1, i32* %sz2 - %2 = load i64, i64* %sz1 - %3 = load i32, i32* %sz2 - %4 = zext i32 %3 to i64 - store i64 %4, i64* %tmp.this - %5 = load i64, i64* %tmp.this - %6 = add i64 %2, %5 - call void @ctor.55(%StringRef* %res, i64 %6) - %7 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 - %8 = load i8*, i8** %7 - %9 = getelementptr inbounds %StringRef, %StringRef* %x.addr, i32 0, i32 0 - %10 = load i8*, i8** %9 - %11 = load i64, i64* %sz1 - call void @_spr_memcpy(i8* %8, i8* %10, i64 %11) - %12 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 - %13 = load i8*, i8** %12 - %14 = load i64, i64* %sz1 - %15 = call i8* @ptrAdd(i8* %13, i64 %14) - %16 = load i32, i32* %sz2 - %17 = zext i32 %16 to i64 - store i64 %17, i64* %tmp.this1 - %18 = load i64, i64* %tmp.this1 - call void @_spr_memcpy(i8* %15, i8* %y.addr, i64 %18) - %19 = load %StringRef, %StringRef* %res - ret %StringRef %19 + %3 = load i64, i64* %sz1 + %4 = load i32, i32* %sz2 + %5 = zext i32 %4 to i64 + store i64 %5, i64* %tmp.this + %6 = load i64, i64* %tmp.this + %7 = add i64 %3, %6 + call void @ctor.58(%StringRef* %res, i64 %7) + %8 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 + %9 = load %UntypedPtr, %UntypedPtr* %8 + %10 = getelementptr inbounds %StringRef, %StringRef* %x.addr, i32 0, i32 0 + %11 = load %UntypedPtr, %UntypedPtr* %10 + %12 = load i64, i64* %sz1 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %9, %UntypedPtr %11, i64 %12) + %13 = getelementptr inbounds %StringRef, %StringRef* %res, i32 0, i32 0 + %14 = load %UntypedPtr, %UntypedPtr* %13 + %15 = load i64, i64* %sz1 + %16 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %14, i64 %15) + call void @ctor.67(%UntypedPtr* %tmp.this1, i8* %y.addr) + %17 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + %18 = load i32, i32* %sz2 + %19 = zext i32 %18 to i64 + store i64 %19, i64* %tmp.this2 + %20 = load i64, i64* %tmp.this2 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %16, %UntypedPtr %17, i64 %20) + %21 = load %StringRef, %StringRef* %res + %22 = load %StringRef, %StringRef* %res + call void @dtor.61(%StringRef %22) + ret %StringRef %21 + +dumy_block: ; No predecessors! + %23 = load %StringRef, %StringRef* %res + call void @dtor.61(%StringRef %23) + unreachable } ; Function Attrs: nounwind @@ -3782,13 +3693,25 @@ declare void @reinterpretCast() #2 ; Function Attrs: nounwind declare void @construct() #2 -declare i8* @calloc(i64, i64) +; Function Attrs: inlinehint nounwind +define internal void @ctor.69(%UntypedPtr* %this, %Null %nullptr) #4 { + %nullptr.addr = alloca %Null + store %Null %nullptr, %Null* %nullptr.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %2 + ret void +} -declare i8* @realloc(i8*, i64) +declare %UntypedPtr @calloc(i64, i64) -declare void @free(i8*) +declare %UntypedPtr @realloc(%UntypedPtr, i64) -declare i32 @strcmp(i8*, i8*) +declare void @free(%UntypedPtr) declare void @system(i8*) @@ -3802,9 +3725,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.63(%EndLineHelperClass* %this) #3 { - %this.addr = alloca %EndLineHelperClass* - store %EndLineHelperClass* %this, %EndLineHelperClass** %this.addr +define internal void @ctor.70(%EndLineHelperClass* %this) #3 { br label %code code: ; preds = %0 @@ -3819,9 +3740,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.64(%EndLineHelperClass* %this) #3 { - %this.addr = alloca %EndLineHelperClass* - store %EndLineHelperClass* %this, %EndLineHelperClass** %this.addr +define internal void @dtor.71(%EndLineHelperClass* %this) #3 { br label %code code: ; preds = %0 @@ -3836,9 +3755,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.65(%FlushHelperClass* %this) #3 { - %this.addr = alloca %FlushHelperClass* - store %FlushHelperClass* %this, %FlushHelperClass** %this.addr +define internal void @ctor.72(%FlushHelperClass* %this) #3 { br label %code code: ; preds = %0 @@ -3853,9 +3770,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.66(%FlushHelperClass* %this) #3 { - %this.addr = alloca %FlushHelperClass* - store %FlushHelperClass* %this, %FlushHelperClass** %this.addr +define internal void @dtor.73(%FlushHelperClass* %this) #3 { br label %code code: ; preds = %0 @@ -3863,9 +3778,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.67(%EndLineHelperClass* %this, %EndLineHelperClass* %other) #3 { - %this.addr = alloca %EndLineHelperClass* - store %EndLineHelperClass* %this, %EndLineHelperClass** %this.addr +define internal void @ctor.74(%EndLineHelperClass* %this, %EndLineHelperClass* %other) #3 { %other.addr = alloca %EndLineHelperClass* store %EndLineHelperClass* %other, %EndLineHelperClass** %other.addr br label %code @@ -3875,9 +3788,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.68"(%EndLineHelperClass* %this, %EndLineHelperClass* %other) #3 { - %this.addr = alloca %EndLineHelperClass* - store %EndLineHelperClass* %this, %EndLineHelperClass** %this.addr +define internal void @"=.75"(%EndLineHelperClass* %this, %EndLineHelperClass* %other) #3 { %other.addr = alloca %EndLineHelperClass* store %EndLineHelperClass* %other, %EndLineHelperClass** %other.addr br label %code @@ -3887,7 +3798,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.69"(%EndLineHelperClass* %this, %EndLineHelperClass* %other) #3 { +define internal i1 @"==.76"(%EndLineHelperClass* %this, %EndLineHelperClass* %other) #3 { %this.addr = alloca %EndLineHelperClass* store %EndLineHelperClass* %this, %EndLineHelperClass** %this.addr %other.addr = alloca %EndLineHelperClass* @@ -3899,9 +3810,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.70(%FlushHelperClass* %this, %FlushHelperClass* %other) #3 { - %this.addr = alloca %FlushHelperClass* - store %FlushHelperClass* %this, %FlushHelperClass** %this.addr +define internal void @ctor.77(%FlushHelperClass* %this, %FlushHelperClass* %other) #3 { %other.addr = alloca %FlushHelperClass* store %FlushHelperClass* %other, %FlushHelperClass** %other.addr br label %code @@ -3911,9 +3820,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.71"(%FlushHelperClass* %this, %FlushHelperClass* %other) #3 { - %this.addr = alloca %FlushHelperClass* - store %FlushHelperClass* %this, %FlushHelperClass** %this.addr +define internal void @"=.78"(%FlushHelperClass* %this, %FlushHelperClass* %other) #3 { %other.addr = alloca %FlushHelperClass* store %FlushHelperClass* %other, %FlushHelperClass** %other.addr br label %code @@ -3923,7 +3830,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.72"(%FlushHelperClass* %this, %FlushHelperClass* %other) #3 { +define internal i1 @"==.79"(%FlushHelperClass* %this, %FlushHelperClass* %other) #3 { %this.addr = alloca %FlushHelperClass* store %FlushHelperClass* %this, %FlushHelperClass** %this.addr %other.addr = alloca %FlushHelperClass* @@ -3934,41 +3841,22 @@ code: ; preds = %0 ret i1 true } -; Function Attrs: alwaysinline nounwind -define internal void @ctor.73(%StreamRefWrapperHelperClass* %this) #3 { - %this.addr = alloca %StreamRefWrapperHelperClass* - store %StreamRefWrapperHelperClass* %this, %StreamRefWrapperHelperClass** %this.addr +define internal void @__global_ctor.3() { br label %code code: ; preds = %0 - %1 = load %StreamRefWrapperHelperClass*, %StreamRefWrapperHelperClass** %this.addr - %2 = getelementptr inbounds %StreamRefWrapperHelperClass, %StreamRefWrapperHelperClass* %1, i32 0, i32 0 - store i8* null, i8** %2 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.74(%StreamRefWrapperHelperClass* %this, %StreamRefWrapperHelperClass* %other) #3 { - %this.addr = alloca %StreamRefWrapperHelperClass* - store %StreamRefWrapperHelperClass* %this, %StreamRefWrapperHelperClass** %this.addr - %other.addr = alloca %StreamRefWrapperHelperClass* - store %StreamRefWrapperHelperClass* %other, %StreamRefWrapperHelperClass** %other.addr +define internal void @ctor.80(%ConsoleOutputStream* %this) #3 { br label %code code: ; preds = %0 - %1 = load %StreamRefWrapperHelperClass*, %StreamRefWrapperHelperClass** %other.addr - %2 = getelementptr inbounds %StreamRefWrapperHelperClass, %StreamRefWrapperHelperClass* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %StreamRefWrapperHelperClass*, %StreamRefWrapperHelperClass** %this.addr - %5 = getelementptr inbounds %StreamRefWrapperHelperClass, %StreamRefWrapperHelperClass* %4, i32 0, i32 0 - store i8* %3, i8** %5 ret void } -; Function Attrs: alwaysinline nounwind -define internal void @dtor.75(%StreamRefWrapperHelperClass* %this) #3 { - %this.addr = alloca %StreamRefWrapperHelperClass* - store %StreamRefWrapperHelperClass* %this, %StreamRefWrapperHelperClass** %this.addr +define internal void @__global_dtor.4() { br label %code code: ; preds = %0 @@ -3976,43 +3864,27 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.76"(%StreamRefWrapperHelperClass* %this, %StreamRefWrapperHelperClass* %other) #3 { - %this.addr = alloca %StreamRefWrapperHelperClass* - store %StreamRefWrapperHelperClass* %this, %StreamRefWrapperHelperClass** %this.addr - %other.addr = alloca %StreamRefWrapperHelperClass* - store %StreamRefWrapperHelperClass* %other, %StreamRefWrapperHelperClass** %other.addr +define internal void @dtor.81(%ConsoleOutputStream* %this) #3 { br label %code code: ; preds = %0 - %1 = load %StreamRefWrapperHelperClass*, %StreamRefWrapperHelperClass** %other.addr - %2 = getelementptr inbounds %StreamRefWrapperHelperClass, %StreamRefWrapperHelperClass* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %StreamRefWrapperHelperClass*, %StreamRefWrapperHelperClass** %this.addr - %5 = getelementptr inbounds %StreamRefWrapperHelperClass, %StreamRefWrapperHelperClass* %4, i32 0, i32 0 - store i8* %3, i8** %5 ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.77"(%StreamRefWrapperHelperClass* %this, %StreamRefWrapperHelperClass* %other) #3 { - %this.addr = alloca %StreamRefWrapperHelperClass* - store %StreamRefWrapperHelperClass* %this, %StreamRefWrapperHelperClass** %this.addr - %other.addr = alloca %StreamRefWrapperHelperClass* - store %StreamRefWrapperHelperClass* %other, %StreamRefWrapperHelperClass** %other.addr +define internal void @ctor.82(%ConsoleOutputStream* %this, %ConsoleOutputStream* %other) #3 { + %other.addr = alloca %ConsoleOutputStream* + store %ConsoleOutputStream* %other, %ConsoleOutputStream** %other.addr br label %code code: ; preds = %0 - %1 = load %StreamRefWrapperHelperClass*, %StreamRefWrapperHelperClass** %this.addr - %2 = getelementptr inbounds %StreamRefWrapperHelperClass, %StreamRefWrapperHelperClass* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %StreamRefWrapperHelperClass*, %StreamRefWrapperHelperClass** %other.addr - %5 = getelementptr inbounds %StreamRefWrapperHelperClass, %StreamRefWrapperHelperClass* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + ret void } -define internal void @__global_ctor.3() { +; Function Attrs: alwaysinline nounwind +define internal void @"=.83"(%ConsoleOutputStream* %this, %ConsoleOutputStream* %other) #3 { + %other.addr = alloca %ConsoleOutputStream* + store %ConsoleOutputStream* %other, %ConsoleOutputStream** %other.addr br label %code code: ; preds = %0 @@ -4020,86 +3892,31 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.78(%ConsoleOutputStream* %this) #3 { +define internal i1 @"==.84"(%ConsoleOutputStream* %this, %ConsoleOutputStream* %other) #3 { %this.addr = alloca %ConsoleOutputStream* store %ConsoleOutputStream* %this, %ConsoleOutputStream** %this.addr + %other.addr = alloca %ConsoleOutputStream* + store %ConsoleOutputStream* %other, %ConsoleOutputStream** %other.addr br label %code code: ; preds = %0 - ret void + ret i1 true } -define internal void @__global_dtor.4() { +; Function Attrs: alwaysinline nounwind +define internal void @"<<<"(%ConsoleOutputStream* %this, i8 %x) #3 { + %x.addr = alloca i8 + store i8 %x, i8* %x.addr br label %code code: ; preds = %0 + %1 = load i8, i8* %x.addr + call void @writeChar(i8 %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.79(%ConsoleOutputStream* %this) #3 { - %this.addr = alloca %ConsoleOutputStream* - store %ConsoleOutputStream* %this, %ConsoleOutputStream** %this.addr - br label %code - -code: ; preds = %0 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.80(%ConsoleOutputStream* %this, %ConsoleOutputStream* %other) #3 { - %this.addr = alloca %ConsoleOutputStream* - store %ConsoleOutputStream* %this, %ConsoleOutputStream** %this.addr - %other.addr = alloca %ConsoleOutputStream* - store %ConsoleOutputStream* %other, %ConsoleOutputStream** %other.addr - br label %code - -code: ; preds = %0 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @"=.81"(%ConsoleOutputStream* %this, %ConsoleOutputStream* %other) #3 { - %this.addr = alloca %ConsoleOutputStream* - store %ConsoleOutputStream* %this, %ConsoleOutputStream** %this.addr - %other.addr = alloca %ConsoleOutputStream* - store %ConsoleOutputStream* %other, %ConsoleOutputStream** %other.addr - br label %code - -code: ; preds = %0 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal i1 @"==.82"(%ConsoleOutputStream* %this, %ConsoleOutputStream* %other) #3 { - %this.addr = alloca %ConsoleOutputStream* - store %ConsoleOutputStream* %this, %ConsoleOutputStream** %this.addr - %other.addr = alloca %ConsoleOutputStream* - store %ConsoleOutputStream* %other, %ConsoleOutputStream** %other.addr - br label %code - -code: ; preds = %0 - ret i1 true -} - -; Function Attrs: alwaysinline nounwind -define internal void @"<<<"(%ConsoleOutputStream %this, i8 %x) #3 { - %this.addr = alloca %ConsoleOutputStream - store %ConsoleOutputStream %this, %ConsoleOutputStream* %this.addr - %x.addr = alloca i8 - store i8 %x, i8* %x.addr - br label %code - -code: ; preds = %0 - %1 = load i8, i8* %x.addr - call void @writeChar(i8 %1) - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @"<<<.83"(%ConsoleOutputStream %this, i1 %x) #3 { - %this.addr = alloca %ConsoleOutputStream - store %ConsoleOutputStream %this, %ConsoleOutputStream* %this.addr +define internal void @"<<<.85"(%ConsoleOutputStream* %this, i1 %x) #3 { %x.addr = alloca i1 store i1 %x, i1* %x.addr %tmp.StringRef = alloca %StringRef @@ -4114,23 +3931,25 @@ if_block: ; preds = %code br i1 %1, label %if_then, label %if_else if_then: ; preds = %if_block - %2 = load %ConsoleOutputStream, %ConsoleOutputStream* %this.addr - %3 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %4 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str, i32 0, i32 0), i8** %3 - store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str, i32 0, i32 4), i8** %4 - %5 = load %StringRef, %StringRef* %tmp.StringRef - call void @"<<<.84"(%ConsoleOutputStream %2, %StringRef %5) + %2 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %3 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %4 = bitcast %UntypedPtr* %2 to i8** + %5 = bitcast %UntypedPtr* %3 to i8** + store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str, i32 0, i32 0), i8** %4 + store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str, i32 0, i32 4), i8** %5 + %6 = load %StringRef, %StringRef* %tmp.StringRef + call void @"<<<.86"(%ConsoleOutputStream* %this, %StringRef %6) br label %if_end if_else: ; preds = %if_block - %6 = load %ConsoleOutputStream, %ConsoleOutputStream* %this.addr %7 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef1, i32 0, i32 0 %8 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef1, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i32 0, i32 0), i8** %7 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i32 0, i32 5), i8** %8 - %9 = load %StringRef, %StringRef* %tmp.StringRef1 - call void @"<<<.84"(%ConsoleOutputStream %6, %StringRef %9) + %9 = bitcast %UntypedPtr* %7 to i8** + %10 = bitcast %UntypedPtr* %8 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i32 0, i32 0), i8** %9 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i32 0, i32 5), i8** %10 + %11 = load %StringRef, %StringRef* %tmp.StringRef1 + call void @"<<<.86"(%ConsoleOutputStream* %this, %StringRef %11) br label %if_end if_end: ; preds = %if_else, %if_then @@ -4138,9 +3957,7 @@ if_end: ; preds = %if_else, %if_then } ; Function Attrs: alwaysinline nounwind -define internal void @"<<<.84"(%ConsoleOutputStream %this, %StringRef %x) #3 { - %this.addr = alloca %ConsoleOutputStream - store %ConsoleOutputStream %this, %ConsoleOutputStream* %this.addr +define internal void @"<<<.86"(%ConsoleOutputStream* %this, %StringRef %x) #3 { %x.addr = alloca %StringRef store %StringRef %x, %StringRef* %x.addr %"$rangeVar" = alloca %StringRef @@ -4149,20 +3966,22 @@ define internal void @"<<<.84"(%ConsoleOutputStream %this, %StringRef %x) #3 { code: ; preds = %0 %1 = load %StringRef, %StringRef* %x.addr - call void @ctor.56(%StringRef* %"$rangeVar", %StringRef %1) + call void @ctor.59(%StringRef* %"$rangeVar", %StringRef %1) br label %while_block while_block: ; preds = %while_step, %code - %2 = call i1 @isEmpty(%StringRef* %"$rangeVar") - %3 = xor i1 true, %2 - br i1 %3, label %while_body, label %while_end + %2 = load %StringRef, %StringRef* %"$rangeVar" + %3 = call i1 @isEmpty(%StringRef %2) + %4 = xor i1 true, %3 + br i1 %4, label %while_body, label %while_end while_body: ; preds = %while_block - %4 = call i8* @front(%StringRef* %"$rangeVar") - store i8* %4, i8** %c - %5 = load i8*, i8** %c - %6 = load i8, i8* %5 - call void @writeChar(i8 %6) + %5 = load %StringRef, %StringRef* %"$rangeVar" + %6 = call i8* @front(%StringRef %5) + store i8* %6, i8** %c + %7 = load i8*, i8** %c + %8 = load i8, i8* %7 + call void @writeChar(i8 %8) br label %while_step while_step: ; preds = %while_body @@ -4170,15 +3989,13 @@ while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block + %9 = load %StringRef, %StringRef* %"$rangeVar" + call void @dtor.61(%StringRef %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @flush(%ConsoleOutputStream %this, %FlushHelperClass %x) #3 { - %this.addr = alloca %ConsoleOutputStream - store %ConsoleOutputStream %this, %ConsoleOutputStream* %this.addr - %x.addr = alloca %FlushHelperClass - store %FlushHelperClass %x, %FlushHelperClass* %x.addr +define internal void @flush(%ConsoleOutputStream* %this, %FlushHelperClass* %x) #3 { br label %code code: ; preds = %0 @@ -4187,60 +4004,47 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.85(%MainParameters* %this) #3 { - %this.addr = alloca %MainParameters* - store %MainParameters* %this, %MainParameters** %this.addr +define internal void @ctor.87(%MainParameters* %this) #3 { br label %code code: ; preds = %0 - %1 = load %MainParameters*, %MainParameters** %this.addr - %2 = getelementptr inbounds %MainParameters, %MainParameters* %1, i32 0, i32 0 - call void @ctor.86(%CStrPtr* %2) - %3 = load %MainParameters*, %MainParameters** %this.addr - %4 = getelementptr inbounds %MainParameters, %MainParameters* %3, i32 0, i32 1 - call void @ctor.86(%CStrPtr* %4) + %1 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 0 + call void @ctor.88(%CStrPtr* %1) + %2 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 1 + call void @ctor.88(%CStrPtr* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.86(%CStrPtr* %this) #3 { - %this.addr = alloca %CStrPtr* - store %CStrPtr* %this, %CStrPtr** %this.addr +define internal void @ctor.88(%CStrPtr* %this) #3 { br label %code code: ; preds = %0 - %1 = load %CStrPtr*, %CStrPtr** %this.addr - %2 = getelementptr inbounds %CStrPtr, %CStrPtr* %1, i32 0, i32 0 - store %CStr* null, %CStr** %2 + %1 = getelementptr inbounds %CStrPtr, %CStrPtr* %this, i32 0, i32 0 + store %CStr* null, %CStr** %1 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.87(%MainParameters* %this, %MainParameters* %other) #3 { - %this.addr = alloca %MainParameters* - store %MainParameters* %this, %MainParameters** %this.addr +define internal void @ctor.89(%MainParameters* %this, %MainParameters* %other) #3 { %other.addr = alloca %MainParameters* store %MainParameters* %other, %MainParameters** %other.addr br label %code code: ; preds = %0 - %1 = load %MainParameters*, %MainParameters** %this.addr - %2 = getelementptr inbounds %MainParameters, %MainParameters* %1, i32 0, i32 0 - %3 = load %MainParameters*, %MainParameters** %other.addr - %4 = getelementptr inbounds %MainParameters, %MainParameters* %3, i32 0, i32 0 - call void @ctor.88(%CStrPtr* %2, %CStrPtr* %4) - %5 = load %MainParameters*, %MainParameters** %this.addr + %1 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 0 + %2 = load %MainParameters*, %MainParameters** %other.addr + %3 = getelementptr inbounds %MainParameters, %MainParameters* %2, i32 0, i32 0 + call void @ctor.90(%CStrPtr* %1, %CStrPtr* %3) + %4 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 1 + %5 = load %MainParameters*, %MainParameters** %other.addr %6 = getelementptr inbounds %MainParameters, %MainParameters* %5, i32 0, i32 1 - %7 = load %MainParameters*, %MainParameters** %other.addr - %8 = getelementptr inbounds %MainParameters, %MainParameters* %7, i32 0, i32 1 - call void @ctor.88(%CStrPtr* %6, %CStrPtr* %8) + call void @ctor.90(%CStrPtr* %4, %CStrPtr* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.88(%CStrPtr* %this, %CStrPtr* %other) #3 { - %this.addr = alloca %CStrPtr* - store %CStrPtr* %this, %CStrPtr** %this.addr +define internal void @ctor.90(%CStrPtr* %this, %CStrPtr* %other) #3 { %other.addr = alloca %CStrPtr* store %CStrPtr* %other, %CStrPtr** %other.addr br label %code @@ -4249,16 +4053,13 @@ code: ; preds = %0 %1 = load %CStrPtr*, %CStrPtr** %other.addr %2 = getelementptr inbounds %CStrPtr, %CStrPtr* %1, i32 0, i32 0 %3 = load %CStr*, %CStr** %2 - %4 = load %CStrPtr*, %CStrPtr** %this.addr - %5 = getelementptr inbounds %CStrPtr, %CStrPtr* %4, i32 0, i32 0 - store %CStr* %3, %CStr** %5 + %4 = getelementptr inbounds %CStrPtr, %CStrPtr* %this, i32 0, i32 0 + store %CStr* %3, %CStr** %4 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.89(%MainParameters* %this) #3 { - %this.addr = alloca %MainParameters* - store %MainParameters* %this, %MainParameters** %this.addr +define internal void @dtor.91(%MainParameters* %this) #3 { br label %code code: ; preds = %0 @@ -4266,31 +4067,25 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.90"(%MainParameters* %this, %MainParameters* %other) #3 { - %this.addr = alloca %MainParameters* - store %MainParameters* %this, %MainParameters** %this.addr +define internal void @"=.92"(%MainParameters* %this, %MainParameters* %other) #3 { %other.addr = alloca %MainParameters* store %MainParameters* %other, %MainParameters** %other.addr br label %code code: ; preds = %0 - %1 = load %MainParameters*, %MainParameters** %this.addr - %2 = getelementptr inbounds %MainParameters, %MainParameters* %1, i32 0, i32 0 - %3 = load %MainParameters*, %MainParameters** %other.addr - %4 = getelementptr inbounds %MainParameters, %MainParameters* %3, i32 0, i32 0 - call void @"=.91"(%CStrPtr* %2, %CStrPtr* %4) - %5 = load %MainParameters*, %MainParameters** %this.addr + %1 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 0 + %2 = load %MainParameters*, %MainParameters** %other.addr + %3 = getelementptr inbounds %MainParameters, %MainParameters* %2, i32 0, i32 0 + call void @"=.93"(%CStrPtr* %1, %CStrPtr* %3) + %4 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 1 + %5 = load %MainParameters*, %MainParameters** %other.addr %6 = getelementptr inbounds %MainParameters, %MainParameters* %5, i32 0, i32 1 - %7 = load %MainParameters*, %MainParameters** %other.addr - %8 = getelementptr inbounds %MainParameters, %MainParameters* %7, i32 0, i32 1 - call void @"=.91"(%CStrPtr* %6, %CStrPtr* %8) + call void @"=.93"(%CStrPtr* %4, %CStrPtr* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.91"(%CStrPtr* %this, %CStrPtr* %other) #3 { - %this.addr = alloca %CStrPtr* - store %CStrPtr* %this, %CStrPtr** %this.addr +define internal void @"=.93"(%CStrPtr* %this, %CStrPtr* %other) #3 { %other.addr = alloca %CStrPtr* store %CStrPtr* %other, %CStrPtr** %other.addr br label %code @@ -4299,14 +4094,13 @@ code: ; preds = %0 %1 = load %CStrPtr*, %CStrPtr** %other.addr %2 = getelementptr inbounds %CStrPtr, %CStrPtr* %1, i32 0, i32 0 %3 = load %CStr*, %CStr** %2 - %4 = load %CStrPtr*, %CStrPtr** %this.addr - %5 = getelementptr inbounds %CStrPtr, %CStrPtr* %4, i32 0, i32 0 - store %CStr* %3, %CStr** %5 + %4 = getelementptr inbounds %CStrPtr, %CStrPtr* %this, i32 0, i32 0 + store %CStr* %3, %CStr** %4 ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.92"(%MainParameters* %this, %MainParameters* %other) #3 { +define internal i1 @"==.94"(%MainParameters* %this, %MainParameters* %other) #3 { %this.addr = alloca %MainParameters* store %MainParameters* %this, %MainParameters** %this.addr %other.addr = alloca %MainParameters* @@ -4318,7 +4112,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %MainParameters, %MainParameters* %1, i32 0, i32 0 %3 = load %MainParameters*, %MainParameters** %other.addr %4 = getelementptr inbounds %MainParameters, %MainParameters* %3, i32 0, i32 0 - %5 = call i1 @"==.93"(%CStrPtr* %2, %CStrPtr* %4) + %5 = call i1 @"==.95"(%CStrPtr* %2, %CStrPtr* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -4326,7 +4120,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %MainParameters, %MainParameters* %6, i32 0, i32 1 %8 = load %MainParameters*, %MainParameters** %other.addr %9 = getelementptr inbounds %MainParameters, %MainParameters* %8, i32 0, i32 1 - %10 = call i1 @"==.93"(%CStrPtr* %7, %CStrPtr* %9) + %10 = call i1 @"==.95"(%CStrPtr* %7, %CStrPtr* %9) br label %cond.end cond.false: ; preds = %code @@ -4338,7 +4132,7 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.93"(%CStrPtr* %this, %CStrPtr* %other) #3 { +define internal i1 @"==.95"(%CStrPtr* %this, %CStrPtr* %other) #3 { %this.addr = alloca %CStrPtr* store %CStrPtr* %this, %CStrPtr** %this.addr %other.addr = alloca %CStrPtr* @@ -4359,62 +4153,63 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.94(%MainParameters* %this, i32 %argc, i8** %argv) #4 { +define internal void @ctor.96(%MainParameters* %this, i32 %argc, i8** %argv) #4 { %this.addr = alloca %MainParameters* store %MainParameters* %this, %MainParameters** %this.addr %argc.addr = alloca i32 store i32 %argc, i32* %argc.addr %argv.addr = alloca i8** store i8** %argv, i8*** %argv.addr - %"$tmpC" = alloca %CStrPtr - %"$tmpC1" = alloca %CStrPtr + %"$tmpForRef" = alloca %CStrPtr + %"$tmpForRef1" = alloca %CStrPtr %tmp.this = alloca i64 br label %code code: ; preds = %0 %1 = load %MainParameters*, %MainParameters** %this.addr %2 = getelementptr inbounds %MainParameters, %MainParameters* %1, i32 0, i32 0 - call void @ctor.86(%CStrPtr* %2) + call void @ctor.88(%CStrPtr* %2) %3 = load %MainParameters*, %MainParameters** %this.addr %4 = getelementptr inbounds %MainParameters, %MainParameters* %3, i32 0, i32 1 - call void @ctor.86(%CStrPtr* %4) + call void @ctor.88(%CStrPtr* %4) %5 = load %MainParameters*, %MainParameters** %this.addr %6 = getelementptr inbounds %MainParameters, %MainParameters* %5, i32 0, i32 0 %7 = load i8**, i8*** %argv.addr - call void @fromArgvPtr(%CStrPtr* %"$tmpC", i8** %7) - call void @"=.91"(%CStrPtr* %6, %CStrPtr* %"$tmpC") - %8 = load %MainParameters*, %MainParameters** %this.addr - %9 = getelementptr inbounds %MainParameters, %MainParameters* %8, i32 0, i32 1 - %10 = load %MainParameters*, %MainParameters** %this.addr - %11 = getelementptr inbounds %MainParameters, %MainParameters* %10, i32 0, i32 0 - %12 = load %CStrPtr, %CStrPtr* %11 - %13 = load i32, i32* %argc.addr - %14 = zext i32 %13 to i64 - store i64 %14, i64* %tmp.this - %15 = load i64, i64* %tmp.this - call void @"+.97"(%CStrPtr* %"$tmpC1", %CStrPtr %12, i64 %15) - call void @"=.91"(%CStrPtr* %9, %CStrPtr* %"$tmpC1") + %8 = call %CStrPtr @fromArgvPtr(i8** %7) + store %CStrPtr %8, %CStrPtr* %"$tmpForRef" + call void @"=.93"(%CStrPtr* %6, %CStrPtr* %"$tmpForRef") + %9 = load %MainParameters*, %MainParameters** %this.addr + %10 = getelementptr inbounds %MainParameters, %MainParameters* %9, i32 0, i32 1 + %11 = load %MainParameters*, %MainParameters** %this.addr + %12 = getelementptr inbounds %MainParameters, %MainParameters* %11, i32 0, i32 0 + %13 = load %CStrPtr, %CStrPtr* %12 + %14 = load i32, i32* %argc.addr + %15 = zext i32 %14 to i64 + store i64 %15, i64* %tmp.this + %16 = load i64, i64* %tmp.this + %17 = call %CStrPtr @"+.99"(%CStrPtr %13, i64 %16) + store %CStrPtr %17, %CStrPtr* %"$tmpForRef1" + call void @"=.93"(%CStrPtr* %10, %CStrPtr* %"$tmpForRef1") ret void } ; Function Attrs: inlinehint nounwind -define internal void @fromArgvPtr(%CStrPtr* sret %_result, i8** %argv) #4 { - %_result.addr = alloca %CStrPtr* - store %CStrPtr* %_result, %CStrPtr** %_result.addr +define internal %CStrPtr @fromArgvPtr(i8** %argv) #4 { %argv.addr = alloca i8** store i8** %argv, i8*** %argv.addr + %tmp.this = alloca %CStrPtr br label %code code: ; preds = %0 - %1 = load %CStrPtr*, %CStrPtr** %_result.addr - %2 = load i8**, i8*** %argv.addr - %3 = bitcast i8** %2 to %CStr* - call void @ctor.95(%CStrPtr* %1, %CStr* %3) - ret void + %1 = load i8**, i8*** %argv.addr + %2 = bitcast i8** %1 to %CStr* + call void @ctor.97(%CStrPtr* %tmp.this, %CStr* %2) + %3 = load %CStrPtr, %CStrPtr* %tmp.this + ret %CStrPtr %3 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.95(%CStrPtr* %this, %CStr* %fptr) #3 { +define internal void @ctor.97(%CStrPtr* %this, %CStr* %fptr) #3 { %this.addr = alloca %CStrPtr* store %CStrPtr* %this, %CStrPtr** %this.addr %fptr.addr = alloca %CStr* @@ -4430,9 +4225,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.96(%CStrPtr* %this) #3 { - %this.addr = alloca %CStrPtr* - store %CStrPtr* %this, %CStrPtr** %this.addr +define internal void @dtor.98(%CStrPtr* %this) #3 { br label %code code: ; preds = %0 @@ -4440,9 +4233,7 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @"+.97"(%CStrPtr* sret %_result, %CStrPtr %p, i64 %n) #4 { - %_result.addr = alloca %CStrPtr* - store %CStrPtr* %_result, %CStrPtr** %_result.addr +define internal %CStrPtr @"+.99"(%CStrPtr %p, i64 %n) #4 { %p.addr = alloca %CStrPtr store %CStrPtr %p, %CStrPtr* %p.addr %n.addr = alloca i64 @@ -4450,71 +4241,95 @@ define internal void @"+.97"(%CStrPtr* sret %_result, %CStrPtr %p, i64 %n) #4 { br label %code code: ; preds = %0 - %1 = load %CStrPtr*, %CStrPtr** %_result.addr - %2 = load %CStrPtr, %CStrPtr* %p.addr - %3 = call i8* @toBytePtr(%CStrPtr %2) - %4 = load i64, i64* %n.addr - %5 = mul i64 %4, 8 - %6 = call i8* @ptrAdd(i8* %3, i64 %5) - call void @fromBytePtr(%CStrPtr* %1, i8* %6) - ret void + %1 = load %CStrPtr, %CStrPtr* %p.addr + %2 = call %UntypedPtr @toUntypedPtr(%CStrPtr %1) + %3 = load i64, i64* %n.addr + %4 = mul i64 %3, 8 + %5 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %2, i64 %4) + %6 = call %CStrPtr @toCStrPtr(%UntypedPtr %5) + ret %CStrPtr %6 +} + +; Function Attrs: inlinehint nounwind +define internal %CStrPtr @toCStrPtr(%UntypedPtr %p) #4 { + %p.addr = alloca %UntypedPtr + store %UntypedPtr %p, %UntypedPtr* %p.addr + %tmp.this = alloca %CStrPtr + br label %code + +code: ; preds = %0 + %1 = load %UntypedPtr, %UntypedPtr* %p.addr + %2 = call %CStr* @asRefOf.100(%UntypedPtr %1) + call void @ctor.97(%CStrPtr* %tmp.this, %CStr* %2) + %3 = load %CStrPtr, %CStrPtr* %tmp.this + ret %CStrPtr %3 } ; Function Attrs: inlinehint nounwind -define internal void @fromBytePtr(%CStrPtr* sret %_result, i8* %p) #4 { - %_result.addr = alloca %CStrPtr* - store %CStrPtr* %_result, %CStrPtr** %_result.addr - %p.addr = alloca i8* - store i8* %p, i8** %p.addr +define internal %CStr* @asRefOf.100(%UntypedPtr %this) #4 { + %this.addr = alloca %UntypedPtr + store %UntypedPtr %this, %UntypedPtr* %this.addr br label %code code: ; preds = %0 - %1 = load %CStrPtr*, %CStrPtr** %_result.addr - %2 = load i8*, i8** %p.addr + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this.addr, i32 0, i32 0 + %2 = load i8*, i8** %1 %3 = bitcast i8* %2 to %CStr* - call void @ctor.95(%CStrPtr* %1, %CStr* %3) - ret void + ret %CStr* %3 } ; Function Attrs: inlinehint nounwind -define internal i8* @toBytePtr(%CStrPtr %p) #4 { +define internal %UntypedPtr @toUntypedPtr(%CStrPtr %p) #4 { %p.addr = alloca %CStrPtr store %CStrPtr %p, %CStrPtr* %p.addr + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 %1 = getelementptr inbounds %CStrPtr, %CStrPtr* %p.addr, i32 0, i32 0 %2 = load %CStr*, %CStr** %1 + call void @ctor.101(%UntypedPtr* %tmp.this, %CStr* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this + ret %UntypedPtr %3 +} + +; Function Attrs: inlinehint nounwind +define internal void @ctor.101(%UntypedPtr* %this, %CStr* %val) #4 { + %val.addr = alloca %CStr* + store %CStr* %val, %CStr** %val.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = load %CStr*, %CStr** %val.addr %3 = bitcast %CStr* %2 to i8* - ret i8* %3 + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* %3, i8** %4 + ret void } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.98(%MainParameters %this) #4 { - %this.addr = alloca %MainParameters - store %MainParameters %this, %MainParameters* %this.addr +define internal i1 @isEmpty.102(%MainParameters* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %MainParameters, %MainParameters* %this.addr - %2 = call i64 @size.99(%MainParameters %1) + %1 = call i64 @size.103(%MainParameters* %this) store i64 0, i64* %tmp.this - %3 = load i64, i64* %tmp.this - %4 = icmp eq i64 %2, %3 - ret i1 %4 + %2 = load i64, i64* %tmp.this + %3 = icmp eq i64 %1, %2 + ret i1 %3 } ; Function Attrs: inlinehint nounwind -define internal i64 @size.99(%MainParameters %this) #4 { - %this.addr = alloca %MainParameters - store %MainParameters %this, %MainParameters* %this.addr +define internal i64 @size.103(%MainParameters* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %MainParameters, %MainParameters* %this.addr, i32 0, i32 1 + %1 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 1 %2 = load %CStrPtr, %CStrPtr* %1 - %3 = getelementptr inbounds %MainParameters, %MainParameters* %this.addr, i32 0, i32 0 + %3 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 0 %4 = load %CStrPtr, %CStrPtr* %3 %5 = call i64 @-(%CStrPtr %2, %CStrPtr %4) ret i64 %5 @@ -4531,10 +4346,10 @@ define internal i64 @-(%CStrPtr %p, %CStrPtr %q) #4 { code: ; preds = %0 %1 = load %CStrPtr, %CStrPtr* %p.addr - %2 = call i8* @toBytePtr(%CStrPtr %1) + %2 = call %UntypedPtr @toUntypedPtr(%CStrPtr %1) %3 = load %CStrPtr, %CStrPtr* %q.addr - %4 = call i8* @toBytePtr(%CStrPtr %3) - %5 = call i64 @ptrDiff(i8* %2, i8* %4) + %4 = call %UntypedPtr @toUntypedPtr(%CStrPtr %3) + %5 = call i64 bitcast (i64 (i8*, i8*)* @ptrDiff to i64 (%UntypedPtr, %UntypedPtr)*)(%UntypedPtr %2, %UntypedPtr %4) store i64 %5, i64* %tmp.this %6 = load i64, i64* %tmp.this %7 = call i64 @_SizeType_opDiv(i64 %6, i64 8) @@ -4542,13 +4357,11 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal %StringRef @front.100(%MainParameters %this) #4 { - %this.addr = alloca %MainParameters - store %MainParameters %this, %MainParameters* %this.addr +define internal %StringRef @front.104(%MainParameters* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %MainParameters, %MainParameters* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 0 %2 = load %CStrPtr, %CStrPtr* %1 %3 = call %StringRef @toStringRef(%CStrPtr %2) ret %StringRef %3 @@ -4570,28 +4383,22 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal %StringRef @back.101(%MainParameters %this) #4 { - %this.addr = alloca %MainParameters - store %MainParameters %this, %MainParameters* %this.addr - %"$tmpC" = alloca %CStrPtr +define internal %StringRef @back.105(%MainParameters* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = getelementptr inbounds %MainParameters, %MainParameters* %this.addr, i32 0, i32 1 + %1 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 1 %2 = load %CStrPtr, %CStrPtr* %1 store i64 1, i64* %tmp.this %3 = load i64, i64* %tmp.this - call void @-.102(%CStrPtr* %"$tmpC", %CStrPtr %2, i64 %3) - %4 = load %CStrPtr, %CStrPtr* %"$tmpC" + %4 = call %CStrPtr @-.106(%CStrPtr %2, i64 %3) %5 = call %StringRef @toStringRef(%CStrPtr %4) ret %StringRef %5 } ; Function Attrs: inlinehint nounwind -define internal void @-.102(%CStrPtr* sret %_result, %CStrPtr %p, i64 %n) #4 { - %_result.addr = alloca %CStrPtr* - store %CStrPtr* %_result, %CStrPtr** %_result.addr +define internal %CStrPtr @-.106(%CStrPtr %p, i64 %n) #4 { %p.addr = alloca %CStrPtr store %CStrPtr %p, %CStrPtr* %p.addr %n.addr = alloca i64 @@ -4599,53 +4406,46 @@ define internal void @-.102(%CStrPtr* sret %_result, %CStrPtr %p, i64 %n) #4 { br label %code code: ; preds = %0 - %1 = load %CStrPtr*, %CStrPtr** %_result.addr - %2 = load %CStrPtr, %CStrPtr* %p.addr - %3 = call i8* @toBytePtr(%CStrPtr %2) - %4 = load i64, i64* %n.addr - %5 = mul i64 %4, 8 - %6 = call i8* @ptrSub(i8* %3, i64 %5) - call void @fromBytePtr(%CStrPtr* %1, i8* %6) - ret void + %1 = load %CStrPtr, %CStrPtr* %p.addr + %2 = call %UntypedPtr @toUntypedPtr(%CStrPtr %1) + %3 = load i64, i64* %n.addr + %4 = mul i64 %3, 8 + %5 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrSub to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %2, i64 %4) + %6 = call %CStrPtr @toCStrPtr(%UntypedPtr %5) + ret %CStrPtr %6 } ; Function Attrs: inlinehint nounwind -define internal %StringRef @"().103"(%MainParameters %this) #4 { - %this.addr = alloca %MainParameters - store %MainParameters %this, %MainParameters* %this.addr +define internal %StringRef @"().107"(%MainParameters* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %MainParameters, %MainParameters* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 0 %2 = load %CStrPtr, %CStrPtr* %1 %3 = call %StringRef @toStringRef(%CStrPtr %2) ret %StringRef %3 } ; Function Attrs: inlinehint nounwind -define internal %StringRef @"().104"(%MainParameters %this, i64 %n) #4 { - %this.addr = alloca %MainParameters - store %MainParameters %this, %MainParameters* %this.addr +define internal %StringRef @"().108"(%MainParameters* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr - %"$tmpC" = alloca %CStrPtr br label %code code: ; preds = %0 - %1 = getelementptr inbounds %MainParameters, %MainParameters* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %MainParameters, %MainParameters* %this, i32 0, i32 0 %2 = load %CStrPtr, %CStrPtr* %1 %3 = load i64, i64* %n.addr - call void @"+.97"(%CStrPtr* %"$tmpC", %CStrPtr %2, i64 %3) - %4 = load %CStrPtr, %CStrPtr* %"$tmpC" + %4 = call %CStrPtr @"+.99"(%CStrPtr %2, i64 %3) %5 = call %StringRef @toStringRef(%CStrPtr %4) ret %StringRef %5 } ; Function Attrs: alwaysinline nounwind -define internal void @popFront.105(%MainParameters* %this) #3 { +define internal void @popFront.109(%MainParameters* %this) #3 { %this.addr = alloca %MainParameters* store %MainParameters* %this, %MainParameters** %this.addr - %"$tmpC" = alloca %CStrPtr + %"$tmpForRef" = alloca %CStrPtr %tmp.this = alloca i64 br label %code @@ -4657,16 +4457,17 @@ code: ; preds = %0 %5 = load %CStrPtr, %CStrPtr* %4 store i64 1, i64* %tmp.this %6 = load i64, i64* %tmp.this - call void @"+.97"(%CStrPtr* %"$tmpC", %CStrPtr %5, i64 %6) - call void @"=.91"(%CStrPtr* %2, %CStrPtr* %"$tmpC") + %7 = call %CStrPtr @"+.99"(%CStrPtr %5, i64 %6) + store %CStrPtr %7, %CStrPtr* %"$tmpForRef" + call void @"=.93"(%CStrPtr* %2, %CStrPtr* %"$tmpForRef") ret void } ; Function Attrs: alwaysinline nounwind -define internal void @popBack.106(%MainParameters* %this) #3 { +define internal void @popBack.110(%MainParameters* %this) #3 { %this.addr = alloca %MainParameters* store %MainParameters* %this, %MainParameters** %this.addr - %"$tmpC" = alloca %CStrPtr + %"$tmpForRef" = alloca %CStrPtr %tmp.this = alloca i64 br label %code @@ -4678,18 +4479,19 @@ code: ; preds = %0 %5 = load %CStrPtr, %CStrPtr* %4 store i64 1, i64* %tmp.this %6 = load i64, i64* %tmp.this - call void @-.102(%CStrPtr* %"$tmpC", %CStrPtr %5, i64 %6) - call void @"=.91"(%CStrPtr* %2, %CStrPtr* %"$tmpC") + %7 = call %CStrPtr @-.106(%CStrPtr %5, i64 %6) + store %CStrPtr %7, %CStrPtr* %"$tmpForRef" + call void @"=.93"(%CStrPtr* %2, %CStrPtr* %"$tmpForRef") ret void } ; Function Attrs: alwaysinline nounwind -define internal void @popFront.107(%MainParameters* %this, i64 %n) #3 { +define internal void @popFront.111(%MainParameters* %this, i64 %n) #3 { %this.addr = alloca %MainParameters* store %MainParameters* %this, %MainParameters** %this.addr %n.addr = alloca i64 store i64 %n, i64* %n.addr - %"$tmpC" = alloca %CStrPtr + %"$tmpForRef" = alloca %CStrPtr br label %code code: ; preds = %0 @@ -4699,18 +4501,19 @@ code: ; preds = %0 %4 = getelementptr inbounds %MainParameters, %MainParameters* %3, i32 0, i32 0 %5 = load %CStrPtr, %CStrPtr* %4 %6 = load i64, i64* %n.addr - call void @"+.97"(%CStrPtr* %"$tmpC", %CStrPtr %5, i64 %6) - call void @"=.91"(%CStrPtr* %2, %CStrPtr* %"$tmpC") + %7 = call %CStrPtr @"+.99"(%CStrPtr %5, i64 %6) + store %CStrPtr %7, %CStrPtr* %"$tmpForRef" + call void @"=.93"(%CStrPtr* %2, %CStrPtr* %"$tmpForRef") ret void } ; Function Attrs: alwaysinline nounwind -define internal void @popBack.108(%MainParameters* %this, i64 %n) #3 { +define internal void @popBack.112(%MainParameters* %this, i64 %n) #3 { %this.addr = alloca %MainParameters* store %MainParameters* %this, %MainParameters** %this.addr %n.addr = alloca i64 store i64 %n, i64* %n.addr - %"$tmpC" = alloca %CStrPtr + %"$tmpForRef" = alloca %CStrPtr br label %code code: ; preds = %0 @@ -4720,94 +4523,17 @@ code: ; preds = %0 %4 = getelementptr inbounds %MainParameters, %MainParameters* %3, i32 0, i32 1 %5 = load %CStrPtr, %CStrPtr* %4 %6 = load i64, i64* %n.addr - call void @-.102(%CStrPtr* %"$tmpC", %CStrPtr %5, i64 %6) - call void @"=.91"(%CStrPtr* %2, %CStrPtr* %"$tmpC") - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.109(%CStr* %this) #3 { - %this.addr = alloca %CStr* - store %CStr* %this, %CStr** %this.addr - br label %code - -code: ; preds = %0 - %1 = load %CStr*, %CStr** %this.addr - %2 = getelementptr inbounds %CStr, %CStr* %1, i32 0, i32 0 - store i8* null, i8** %2 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.110(%CStr* %this, %CStr* %other) #3 { - %this.addr = alloca %CStr* - store %CStr* %this, %CStr** %this.addr - %other.addr = alloca %CStr* - store %CStr* %other, %CStr** %other.addr - br label %code - -code: ; preds = %0 - %1 = load %CStr*, %CStr** %other.addr - %2 = getelementptr inbounds %CStr, %CStr* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %CStr*, %CStr** %this.addr - %5 = getelementptr inbounds %CStr, %CStr* %4, i32 0, i32 0 - store i8* %3, i8** %5 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @dtor.111(%CStr* %this) #3 { - %this.addr = alloca %CStr* - store %CStr* %this, %CStr** %this.addr - br label %code - -code: ; preds = %0 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @"=.112"(%CStr* %this, %CStr* %other) #3 { - %this.addr = alloca %CStr* - store %CStr* %this, %CStr** %this.addr - %other.addr = alloca %CStr* - store %CStr* %other, %CStr** %other.addr - br label %code - -code: ; preds = %0 - %1 = load %CStr*, %CStr** %other.addr - %2 = getelementptr inbounds %CStr, %CStr* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %CStr*, %CStr** %this.addr - %5 = getelementptr inbounds %CStr, %CStr* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %7 = call %CStrPtr @-.106(%CStrPtr %5, i64 %6) + store %CStrPtr %7, %CStrPtr* %"$tmpForRef" + call void @"=.93"(%CStrPtr* %2, %CStrPtr* %"$tmpForRef") ret void } -; Function Attrs: alwaysinline nounwind -define internal i1 @"==.113"(%CStr* %this, %CStr* %other) #3 { - %this.addr = alloca %CStr* - store %CStr* %this, %CStr** %this.addr - %other.addr = alloca %CStr* - store %CStr* %other, %CStr** %other.addr - br label %code - -code: ; preds = %0 - %1 = load %CStr*, %CStr** %this.addr - %2 = getelementptr inbounds %CStr, %CStr* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %CStr*, %CStr** %other.addr - %5 = getelementptr inbounds %CStr, %CStr* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 -} - define internal void @__global_ctor.6() { br label %code code: ; preds = %0 - call void @ctor.85(%MainParameters* @programArgs.3) + call void @ctor.87(%MainParameters* @programArgs.3) ret void } @@ -4828,9 +4554,10 @@ define internal i32 @asInt(%StringRef %src) #4 { br label %code code: ; preds = %0 - %1 = call i8* @cStr(%StringRef* %src.addr) - %2 = call i32 @atoi(i8* %1) - ret i32 %2 + %1 = load %StringRef, %StringRef* %src.addr + %2 = call i8* @cStr(%StringRef %1) + %3 = call i32 @atoi(i8* %2) + ret i32 %3 } declare i32 @atoi(i8*) @@ -4842,9 +4569,10 @@ define internal i64 @asLong(%StringRef %src) #4 { br label %code code: ; preds = %0 - %1 = call i8* @cStr(%StringRef* %src.addr) - %2 = call i64 @atoll(i8* %1) - ret i64 %2 + %1 = load %StringRef, %StringRef* %src.addr + %2 = call i8* @cStr(%StringRef %1) + %3 = call i64 @atoll(i8* %2) + ret i64 %3 } declare i64 @atoll(i8*) @@ -4856,1051 +4584,785 @@ define internal double @asDouble(%StringRef %src) #4 { br label %code code: ; preds = %0 - %1 = call i8* @cStr(%StringRef* %src.addr) - %2 = call double @atof(i8* %1) - ret double %2 + %1 = load %StringRef, %StringRef* %src.addr + %2 = call i8* @cStr(%StringRef %1) + %3 = call double @atof(i8* %2) + ret double %3 } declare double @atof(i8*) ; Function Attrs: alwaysinline nounwind -define internal void @ctor.128(%ParserContext* %this) #3 { - %this.addr = alloca %ParserContext* - store %ParserContext* %this, %ParserContext** %this.addr +define internal void @ctor.116(%ParserContext* %this) #3 { br label %code code: ; preds = %0 - %1 = load %ParserContext*, %ParserContext** %this.addr - %2 = getelementptr inbounds %ParserContext, %ParserContext* %1, i32 0, i32 0 - call void @ctor.129(%SparrowScanner* %2) - %3 = load %ParserContext*, %ParserContext** %this.addr - %4 = getelementptr inbounds %ParserContext, %ParserContext* %3, i32 0, i32 1 - call void @ctor.147(%"SparrowLayoutDecoder[SparrowScanner]"* %4) - %5 = load %ParserContext*, %ParserContext** %this.addr - %6 = getelementptr inbounds %ParserContext, %ParserContext* %5, i32 0, i32 2 - call void @ctor.153(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %6) + %1 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 0 + call void @ctor.117(%SparrowScanner* %1) + %2 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 1 + call void @ctor.134(%"SparrowLayoutDecoder[SparrowScanner]"* %2) + %3 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 2 + call void @ctor.140(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.129(%SparrowScanner* %this) #3 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr +define internal void @ctor.117(%SparrowScanner* %this) #3 { br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 0 - call void @ctor.130(%Location* %2) - %3 = load %SparrowScanner*, %SparrowScanner** %this.addr - %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %3, i32 0, i32 1 - call void @ctor.133(%BufferedCharSource* %4) - %5 = load %SparrowScanner*, %SparrowScanner** %this.addr - %6 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %5, i32 0, i32 2 - call void @ctor.139(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %6) - %7 = load %SparrowScanner*, %SparrowScanner** %this.addr - %8 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %7, i32 0, i32 3 - call void @ctor.143(%Token* %8) - %9 = load %SparrowScanner*, %SparrowScanner** %this.addr - %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %9, i32 0, i32 4 - store i1 false, i1* %10 - %11 = load %SparrowScanner*, %SparrowScanner** %this.addr - %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %11, i32 0, i32 5 - call void @ctor.145(%ErrorReporter* %12) - %13 = load %SparrowScanner*, %SparrowScanner** %this.addr - %14 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %13, i32 0, i32 6 - store i1 false, i1* %14 + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 0 + call void @ctor.118(%Location* %1) + %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 1 + call void @ctor.121(%BufferedCharSource* %2) + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @ctor.126(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %3) + %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + call void @ctor.130(%Token* %4) + %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 4 + store i1 false, i1* %5 + %6 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 5 + call void @ctor.132(%ErrorReporter* %6) + %7 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 6 + store i1 false, i1* %7 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.130(%Location* %this) #3 { - %this.addr = alloca %Location* - store %Location* %this, %Location** %this.addr +define internal void @ctor.118(%Location* %this) #3 { br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %this.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 0 - call void @ctor.131(%SourceCode* %2) - %3 = load %Location*, %Location** %this.addr - %4 = getelementptr inbounds %Location, %Location* %3, i32 0, i32 1 - call void @ctor.132(%LineCol* %4) - %5 = load %Location*, %Location** %this.addr - %6 = getelementptr inbounds %Location, %Location* %5, i32 0, i32 2 - call void @ctor.132(%LineCol* %6) + %1 = getelementptr inbounds %Location, %Location* %this, i32 0, i32 0 + call void @ctor.119(%SourceCode* %1) + %2 = getelementptr inbounds %Location, %Location* %this, i32 0, i32 1 + call void @ctor.120(%LineCol* %2) + %3 = getelementptr inbounds %Location, %Location* %this, i32 0, i32 2 + call void @ctor.120(%LineCol* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.131(%SourceCode* %this) #3 { - %this.addr = alloca %SourceCode* - store %SourceCode* %this, %SourceCode** %this.addr +define internal void @ctor.119(%SourceCode* %this) #3 { br label %code code: ; preds = %0 - %1 = load %SourceCode*, %SourceCode** %this.addr - %2 = getelementptr inbounds %SourceCode, %SourceCode* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %SourceCode, %SourceCode* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.132(%LineCol* %this) #3 { - %this.addr = alloca %LineCol* - store %LineCol* %this, %LineCol** %this.addr +define internal void @ctor.120(%LineCol* %this) #3 { br label %code code: ; preds = %0 - %1 = load %LineCol*, %LineCol** %this.addr - %2 = getelementptr inbounds %LineCol, %LineCol* %1, i32 0, i32 0 + %1 = getelementptr inbounds %LineCol, %LineCol* %this, i32 0, i32 0 + store i32 0, i32* %1 + %2 = getelementptr inbounds %LineCol, %LineCol* %this, i32 0, i32 1 store i32 0, i32* %2 - %3 = load %LineCol*, %LineCol** %this.addr - %4 = getelementptr inbounds %LineCol, %LineCol* %3, i32 0, i32 1 - store i32 0, i32* %4 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.133(%BufferedCharSource* %this) #3 { - %this.addr = alloca %BufferedCharSource* - store %BufferedCharSource* %this, %BufferedCharSource** %this.addr +define internal void @ctor.121(%BufferedCharSource* %this) #3 { br label %code code: ; preds = %0 - %1 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %2 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %1, i32 0, i32 0 - call void @ctor.134(%CharSource* %2) - %3 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %4 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %3, i32 0, i32 1 - call void @ctor.137(%String* %4) - %5 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %6 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %5, i32 0, i32 2 - store i32 0, i32* %6 + %1 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 0 + call void @ctor.122(%CharSource* %1) + %2 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 1 + call void @ctor.124(%String* %2) + %3 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 2 + store i32 0, i32* %3 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.134(%CharSource* %this) #3 { - %this.addr = alloca %CharSource* - store %CharSource* %this, %CharSource** %this.addr +define internal void @ctor.122(%CharSource* %this) #3 { br label %code code: ; preds = %0 - %1 = load %CharSource*, %CharSource** %this.addr - %2 = getelementptr inbounds %CharSource, %CharSource* %1, i32 0, i32 0 - call void @ctor.135(%UntypedPtr* %2) - %3 = load %CharSource*, %CharSource** %this.addr - %4 = getelementptr inbounds %CharSource, %CharSource* %3, i32 0, i32 1 - call void @ctor.136(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %4) + %1 = getelementptr inbounds %CharSource, %CharSource* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) + %2 = getelementptr inbounds %CharSource, %CharSource* %this, i32 0, i32 1 + call void @ctor.123(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.135(%UntypedPtr* %this) #3 { - %this.addr = alloca %UntypedPtr* - store %UntypedPtr* %this, %UntypedPtr** %this.addr +define internal void @ctor.123(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %UntypedPtr*, %UntypedPtr** %this.addr - %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, String mut, Int]", %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } -; Function Attrs: alwaysinline nounwind -define internal void @ctor.136(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* - store %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %this.addr +; Function Attrs: inlinehint nounwind +define internal void @ctor.124(%String* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @String, Int]"*, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @String, Int]", %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + call void @ctor.125(%"RawPtr[Char]"* %1) + %2 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + call void @ctor.125(%"RawPtr[Char]"* %2) + %3 = getelementptr inbounds %String, %String* %this, i32 0, i32 2 + call void @ctor.125(%"RawPtr[Char]"* %3) ret void } -; Function Attrs: inlinehint nounwind -define internal void @ctor.137(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +; Function Attrs: alwaysinline nounwind +define internal void @ctor.125(%"RawPtr[Char]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - call void @ctor.138(%"RawPtr[Char]"* %2) - %3 = load %String*, %String** %this.addr - %4 = getelementptr inbounds %String, %String* %3, i32 0, i32 1 - call void @ctor.138(%"RawPtr[Char]"* %4) - %5 = load %String*, %String** %this.addr - %6 = getelementptr inbounds %String, %String* %5, i32 0, i32 2 - call void @ctor.138(%"RawPtr[Char]"* %6) + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + store i8* null, i8** %1 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.138(%"RawPtr[Char]"* %this) #3 { - %this.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %this, %"RawPtr[Char]"** %this.addr +define internal void @ctor.126(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %this.addr - %2 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 0 + call void @ctor.127(%"RangeWithLookahead[BufferedCharSourceRange]"* %1) + %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 1 + store %Location* null, %Location** %2 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.139(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this) #3 { - %this.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr +define internal void @ctor.127(%"RangeWithLookahead[BufferedCharSourceRange]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 - call void @ctor.140(%"RangeWithLookahead[BufferedCharSourceRange]"* %2) - %3 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %4 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %3, i32 0, i32 1 - store %Location* null, %Location** %4 + %1 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + call void @ctor.128(%BufferedCharSourceRange* %1) + %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + call void @ctor.129(%"Vector[Char]"* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.140(%"RangeWithLookahead[BufferedCharSourceRange]"* %this) #3 { - %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr +define internal void @ctor.128(%BufferedCharSourceRange* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %1, i32 0, i32 0 - call void @ctor.141(%BufferedCharSourceRange* %2) - %3 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %4 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %3, i32 0, i32 1 - call void @ctor.142(%"Vector[Char]"* %4) + %1 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %this, i32 0, i32 0 + store %BufferedCharSource* null, %BufferedCharSource** %1 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.141(%BufferedCharSourceRange* %this) #3 { - %this.addr = alloca %BufferedCharSourceRange* - store %BufferedCharSourceRange* %this, %BufferedCharSourceRange** %this.addr +define internal void @ctor.129(%"Vector[Char]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %this.addr - %2 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %1, i32 0, i32 0 - store %BufferedCharSource* null, %BufferedCharSource** %2 + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + call void @ctor.125(%"RawPtr[Char]"* %1) + %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + call void @ctor.125(%"RawPtr[Char]"* %2) + %3 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 2 + call void @ctor.125(%"RawPtr[Char]"* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.142(%"Vector[Char]"* %this) #3 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal void @ctor.130(%Token* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 - call void @ctor.138(%"RawPtr[Char]"* %2) - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %3, i32 0, i32 1 - call void @ctor.138(%"RawPtr[Char]"* %4) - %5 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %6 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %5, i32 0, i32 2 - call void @ctor.138(%"RawPtr[Char]"* %6) + %1 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 0 + call void @ctor.118(%Location* %1) + %2 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 1 + call void @ctor.131(%TokenType* %2) + %3 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 2 + call void @ctor.124(%String* %3) + %4 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 3 + store i64 0, i64* %4 + %5 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 4 + store double 0.000000e+00, double* %5 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.143(%Token* %this) #3 { - %this.addr = alloca %Token* - store %Token* %this, %Token** %this.addr +define internal void @ctor.131(%TokenType* %this) #3 { br label %code code: ; preds = %0 - %1 = load %Token*, %Token** %this.addr - %2 = getelementptr inbounds %Token, %Token* %1, i32 0, i32 0 - call void @ctor.130(%Location* %2) - %3 = load %Token*, %Token** %this.addr - %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 1 - call void @ctor.144(%TokenType* %4) - %5 = load %Token*, %Token** %this.addr - %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 2 - call void @ctor.137(%String* %6) - %7 = load %Token*, %Token** %this.addr - %8 = getelementptr inbounds %Token, %Token* %7, i32 0, i32 3 - store i64 0, i64* %8 - %9 = load %Token*, %Token** %this.addr - %10 = getelementptr inbounds %Token, %Token* %9, i32 0, i32 4 - store double 0.000000e+00, double* %10 + %1 = getelementptr inbounds %TokenType, %TokenType* %this, i32 0, i32 0 + store i32 0, i32* %1 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.144(%TokenType* %this) #3 { - %this.addr = alloca %TokenType* - store %TokenType* %this, %TokenType** %this.addr +define internal void @ctor.132(%ErrorReporter* %this) #3 { br label %code code: ; preds = %0 - %1 = load %TokenType*, %TokenType** %this.addr - %2 = getelementptr inbounds %TokenType, %TokenType* %1, i32 0, i32 0 - store i32 0, i32* %2 + %1 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) + %2 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %this, i32 0, i32 1 + call void @ctor.133(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.145(%ErrorReporter* %this) #3 { - %this.addr = alloca %ErrorReporter* - store %ErrorReporter* %this, %ErrorReporter** %this.addr +define internal void @ctor.133(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %ErrorReporter*, %ErrorReporter** %this.addr - %2 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %1, i32 0, i32 0 - call void @ctor.135(%UntypedPtr* %2) - %3 = load %ErrorReporter*, %ErrorReporter** %this.addr - %4 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %3, i32 0, i32 1 - call void @ctor.146(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %4) + %1 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.146(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %this.addr +define internal void @ctor.134(%"SparrowLayoutDecoder[SparrowScanner]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @ctor.135(%"RangeWithLookahead[SparrowScanner]"* %1) + %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 1 + call void @ctor.132(%ErrorReporter* %2) + %3 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + call void @ctor.138(%"Vector[UInt]"* %3) + %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + call void @ctor.129(%"Vector[Char]"* %4) + %5 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 4 + call void @ctor.131(%TokenType* %5) + %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + store i32 0, i32* %6 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.147(%"SparrowLayoutDecoder[SparrowScanner]"* %this) #3 { - %this.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* - store %"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - br label %code - -code: ; preds = %0 - %1 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %1, i32 0, i32 0 - call void @ctor.148(%"RangeWithLookahead[SparrowScanner]"* %2) - %3 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %3, i32 0, i32 1 - call void @ctor.145(%ErrorReporter* %4) - %5 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %5, i32 0, i32 2 - call void @ctor.151(%"Vector[UInt]"* %6) - %7 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %8 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %7, i32 0, i32 3 - call void @ctor.142(%"Vector[Char]"* %8) - %9 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %10 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %9, i32 0, i32 4 - call void @ctor.144(%TokenType* %10) - %11 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %12 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %11, i32 0, i32 5 - store i32 0, i32* %12 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.148(%"RangeWithLookahead[SparrowScanner]"* %this) #3 { - %this.addr = alloca %"RangeWithLookahead[SparrowScanner]"* - store %"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"** %this.addr +define internal void @ctor.135(%"RangeWithLookahead[SparrowScanner]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %1, i32 0, i32 0 - call void @ctor.129(%SparrowScanner* %2) - %3 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %4 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %3, i32 0, i32 1 - call void @ctor.149(%"Vector[Token]"* %4) + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 0 + call void @ctor.117(%SparrowScanner* %1) + %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 + call void @ctor.136(%"Vector[Token]"* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.149(%"Vector[Token]"* %this) #3 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal void @ctor.136(%"Vector[Token]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 - call void @ctor.150(%"RawPtr[Token]"* %2) - %3 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %3, i32 0, i32 1 - call void @ctor.150(%"RawPtr[Token]"* %4) - %5 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %6 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %5, i32 0, i32 2 - call void @ctor.150(%"RawPtr[Token]"* %6) + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + call void @ctor.137(%"RawPtr[Token]"* %1) + %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + call void @ctor.137(%"RawPtr[Token]"* %2) + %3 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 2 + call void @ctor.137(%"RawPtr[Token]"* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.150(%"RawPtr[Token]"* %this) #3 { - %this.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %this, %"RawPtr[Token]"** %this.addr +define internal void @ctor.137(%"RawPtr[Token]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %this.addr - %2 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %1, i32 0, i32 0 - store %Token* null, %Token** %2 + %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + store %Token* null, %Token** %1 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.151(%"Vector[UInt]"* %this) #3 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr +define internal void @ctor.138(%"Vector[UInt]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 0 - call void @ctor.152(%"RawPtr[UInt]"* %2) - %3 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %3, i32 0, i32 1 - call void @ctor.152(%"RawPtr[UInt]"* %4) - %5 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %6 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %5, i32 0, i32 2 - call void @ctor.152(%"RawPtr[UInt]"* %6) + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + call void @ctor.139(%"RawPtr[UInt]"* %1) + %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + call void @ctor.139(%"RawPtr[UInt]"* %2) + %3 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 2 + call void @ctor.139(%"RawPtr[UInt]"* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.152(%"RawPtr[UInt]"* %this) #3 { - %this.addr = alloca %"RawPtr[UInt]"* - store %"RawPtr[UInt]"* %this, %"RawPtr[UInt]"** %this.addr +define internal void @ctor.139(%"RawPtr[UInt]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %this.addr - %2 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %1, i32 0, i32 0 - store i32* null, i32** %2 + %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + store i32* null, i32** %1 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.153(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #3 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal void @ctor.140(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 - call void @ctor.154(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2) - %3 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 1 - call void @ctor.143(%Token* %4) - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 2 - store i1 false, i1* %6 - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 3 - call void @ctor.155(%AstBuilder* %8) - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, i32 0, i32 4 - call void @ctor.145(%ErrorReporter* %10) + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @ctor.141(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1) + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + call void @ctor.130(%Token* %2) + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 2 + store i1 false, i1* %3 + %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + call void @ctor.142(%AstBuilder* %4) + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 4 + call void @ctor.132(%ErrorReporter* %5) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.154(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this) #3 { - %this.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* - store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal void @ctor.141(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 - call void @ctor.147(%"SparrowLayoutDecoder[SparrowScanner]"* %2) - %3 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %4 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 1 - call void @ctor.149(%"Vector[Token]"* %4) + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @ctor.134(%"SparrowLayoutDecoder[SparrowScanner]"* %1) + %2 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + call void @ctor.136(%"Vector[Token]"* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.155(%AstBuilder* %this) #3 { - %this.addr = alloca %AstBuilder* - store %AstBuilder* %this, %AstBuilder** %this.addr +define internal void @ctor.142(%AstBuilder* %this) #3 { br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %this.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 0 - call void @ctor.135(%UntypedPtr* %2) - %3 = load %AstBuilder*, %AstBuilder** %this.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 1 - call void @ctor.156(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %4) - %5 = load %AstBuilder*, %AstBuilder** %this.addr - %6 = getelementptr inbounds %AstBuilder, %AstBuilder* %5, i32 0, i32 2 - call void @ctor.157(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %6) - %7 = load %AstBuilder*, %AstBuilder** %this.addr - %8 = getelementptr inbounds %AstBuilder, %AstBuilder* %7, i32 0, i32 3 - call void @ctor.157(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %8) - %9 = load %AstBuilder*, %AstBuilder** %this.addr - %10 = getelementptr inbounds %AstBuilder, %AstBuilder* %9, i32 0, i32 4 - call void @ctor.158(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %10) - %11 = load %AstBuilder*, %AstBuilder** %this.addr - %12 = getelementptr inbounds %AstBuilder, %AstBuilder* %11, i32 0, i32 5 - call void @ctor.159(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %12) - %13 = load %AstBuilder*, %AstBuilder** %this.addr - %14 = getelementptr inbounds %AstBuilder, %AstBuilder* %13, i32 0, i32 6 - call void @ctor.160(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %14) - %15 = load %AstBuilder*, %AstBuilder** %this.addr - %16 = getelementptr inbounds %AstBuilder, %AstBuilder* %15, i32 0, i32 7 - call void @ctor.161(%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %16) - %17 = load %AstBuilder*, %AstBuilder** %this.addr - %18 = getelementptr inbounds %AstBuilder, %AstBuilder* %17, i32 0, i32 8 - call void @ctor.158(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %18) - %19 = load %AstBuilder*, %AstBuilder** %this.addr - %20 = getelementptr inbounds %AstBuilder, %AstBuilder* %19, i32 0, i32 9 - call void @ctor.162(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %20) - %21 = load %AstBuilder*, %AstBuilder** %this.addr - %22 = getelementptr inbounds %AstBuilder, %AstBuilder* %21, i32 0, i32 10 - call void @ctor.158(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %22) - %23 = load %AstBuilder*, %AstBuilder** %this.addr - %24 = getelementptr inbounds %AstBuilder, %AstBuilder* %23, i32 0, i32 11 - call void @ctor.158(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %24) - %25 = load %AstBuilder*, %AstBuilder** %this.addr - %26 = getelementptr inbounds %AstBuilder, %AstBuilder* %25, i32 0, i32 12 - call void @ctor.163(%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %26) - %27 = load %AstBuilder*, %AstBuilder** %this.addr - %28 = getelementptr inbounds %AstBuilder, %AstBuilder* %27, i32 0, i32 13 - call void @ctor.164(%"FunctionPtr2[Node, UntypedPtr, Node]"* %28) - %29 = load %AstBuilder*, %AstBuilder** %this.addr - %30 = getelementptr inbounds %AstBuilder, %AstBuilder* %29, i32 0, i32 14 - call void @ctor.165(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %30) - %31 = load %AstBuilder*, %AstBuilder** %this.addr - %32 = getelementptr inbounds %AstBuilder, %AstBuilder* %31, i32 0, i32 15 - call void @ctor.166(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %32) - %33 = load %AstBuilder*, %AstBuilder** %this.addr - %34 = getelementptr inbounds %AstBuilder, %AstBuilder* %33, i32 0, i32 16 - call void @ctor.159(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %34) - %35 = load %AstBuilder*, %AstBuilder** %this.addr - %36 = getelementptr inbounds %AstBuilder, %AstBuilder* %35, i32 0, i32 17 - call void @ctor.167(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %36) - %37 = load %AstBuilder*, %AstBuilder** %this.addr - %38 = getelementptr inbounds %AstBuilder, %AstBuilder* %37, i32 0, i32 18 - call void @ctor.165(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %38) - %39 = load %AstBuilder*, %AstBuilder** %this.addr - %40 = getelementptr inbounds %AstBuilder, %AstBuilder* %39, i32 0, i32 19 - call void @ctor.165(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %40) - %41 = load %AstBuilder*, %AstBuilder** %this.addr - %42 = getelementptr inbounds %AstBuilder, %AstBuilder* %41, i32 0, i32 20 - call void @ctor.165(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %42) - %43 = load %AstBuilder*, %AstBuilder** %this.addr - %44 = getelementptr inbounds %AstBuilder, %AstBuilder* %43, i32 0, i32 21 - call void @ctor.157(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %44) - %45 = load %AstBuilder*, %AstBuilder** %this.addr - %46 = getelementptr inbounds %AstBuilder, %AstBuilder* %45, i32 0, i32 22 - call void @ctor.168(%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %46) - %47 = load %AstBuilder*, %AstBuilder** %this.addr - %48 = getelementptr inbounds %AstBuilder, %AstBuilder* %47, i32 0, i32 23 - call void @ctor.169(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %48) - %49 = load %AstBuilder*, %AstBuilder** %this.addr - %50 = getelementptr inbounds %AstBuilder, %AstBuilder* %49, i32 0, i32 24 - call void @ctor.170(%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %50) - %51 = load %AstBuilder*, %AstBuilder** %this.addr - %52 = getelementptr inbounds %AstBuilder, %AstBuilder* %51, i32 0, i32 25 - call void @ctor.171(%"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %52) - %53 = load %AstBuilder*, %AstBuilder** %this.addr - %54 = getelementptr inbounds %AstBuilder, %AstBuilder* %53, i32 0, i32 26 - call void @ctor.172(%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %54) - %55 = load %AstBuilder*, %AstBuilder** %this.addr - %56 = getelementptr inbounds %AstBuilder, %AstBuilder* %55, i32 0, i32 27 - call void @ctor.173(%"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %56) - %57 = load %AstBuilder*, %AstBuilder** %this.addr - %58 = getelementptr inbounds %AstBuilder, %AstBuilder* %57, i32 0, i32 28 - call void @ctor.174(%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %58) - %59 = load %AstBuilder*, %AstBuilder** %this.addr - %60 = getelementptr inbounds %AstBuilder, %AstBuilder* %59, i32 0, i32 29 - call void @ctor.175(%"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %60) - %61 = load %AstBuilder*, %AstBuilder** %this.addr - %62 = getelementptr inbounds %AstBuilder, %AstBuilder* %61, i32 0, i32 30 - call void @ctor.176(%"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %62) - %63 = load %AstBuilder*, %AstBuilder** %this.addr - %64 = getelementptr inbounds %AstBuilder, %AstBuilder* %63, i32 0, i32 31 - call void @ctor.177(%"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %64) - %65 = load %AstBuilder*, %AstBuilder** %this.addr - %66 = getelementptr inbounds %AstBuilder, %AstBuilder* %65, i32 0, i32 32 - call void @ctor.167(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %66) - %67 = load %AstBuilder*, %AstBuilder** %this.addr - %68 = getelementptr inbounds %AstBuilder, %AstBuilder* %67, i32 0, i32 33 - call void @ctor.178(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %68) - %69 = load %AstBuilder*, %AstBuilder** %this.addr - %70 = getelementptr inbounds %AstBuilder, %AstBuilder* %69, i32 0, i32 34 - call void @ctor.179(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %70) - %71 = load %AstBuilder*, %AstBuilder** %this.addr - %72 = getelementptr inbounds %AstBuilder, %AstBuilder* %71, i32 0, i32 35 - call void @ctor.160(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %72) - %73 = load %AstBuilder*, %AstBuilder** %this.addr - %74 = getelementptr inbounds %AstBuilder, %AstBuilder* %73, i32 0, i32 36 - call void @ctor.179(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %74) - %75 = load %AstBuilder*, %AstBuilder** %this.addr - %76 = getelementptr inbounds %AstBuilder, %AstBuilder* %75, i32 0, i32 37 - call void @ctor.169(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %76) - %77 = load %AstBuilder*, %AstBuilder** %this.addr - %78 = getelementptr inbounds %AstBuilder, %AstBuilder* %77, i32 0, i32 38 - call void @ctor.169(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %78) - %79 = load %AstBuilder*, %AstBuilder** %this.addr - %80 = getelementptr inbounds %AstBuilder, %AstBuilder* %79, i32 0, i32 39 - call void @ctor.178(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %80) + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 1 + call void @ctor.143(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %2) + %3 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 2 + call void @ctor.144(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %3) + %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 3 + call void @ctor.144(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %4) + %5 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 4 + call void @ctor.145(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %5) + %6 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 5 + call void @ctor.146(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %6) + %7 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 6 + call void @ctor.147(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %7) + %8 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 7 + call void @ctor.148(%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %8) + %9 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 8 + call void @ctor.145(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %9) + %10 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 9 + call void @ctor.149(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %10) + %11 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 10 + call void @ctor.145(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %11) + %12 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 11 + call void @ctor.145(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %12) + %13 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 12 + call void @ctor.145(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %13) + %14 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 13 + call void @ctor.150(%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %14) + %15 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 14 + call void @ctor.151(%"FunctionPtr2[Node, UntypedPtr, Node]"* %15) + %16 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 15 + call void @ctor.152(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %16) + %17 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 16 + call void @ctor.153(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %17) + %18 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 17 + call void @ctor.146(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %18) + %19 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 18 + call void @ctor.154(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %19) + %20 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 19 + call void @ctor.152(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %20) + %21 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 20 + call void @ctor.152(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %21) + %22 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 21 + call void @ctor.152(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %22) + %23 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 22 + call void @ctor.144(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %23) + %24 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 23 + call void @ctor.155(%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %24) + %25 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 24 + call void @ctor.156(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %25) + %26 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 25 + call void @ctor.157(%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %26) + %27 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 26 + call void @ctor.158(%"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %27) + %28 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 27 + call void @ctor.159(%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %28) + %29 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 28 + call void @ctor.160(%"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %29) + %30 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 29 + call void @ctor.161(%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %30) + %31 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 30 + call void @ctor.162(%"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %31) + %32 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 31 + call void @ctor.163(%"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %32) + %33 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 32 + call void @ctor.164(%"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %33) + %34 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 33 + call void @ctor.154(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %34) + %35 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 34 + call void @ctor.165(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %35) + %36 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 35 + call void @ctor.166(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %36) + %37 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 36 + call void @ctor.147(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %37) + %38 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 37 + call void @ctor.166(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %38) + %39 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 38 + call void @ctor.156(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %39) + %40 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 39 + call void @ctor.156(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %40) + %41 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 40 + call void @ctor.165(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %41) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.156(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %this.addr +define internal void @ctor.143(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.157(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %this.addr +define internal void @ctor.144(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.158(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %this.addr +define internal void @ctor.145(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.159(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %this.addr +define internal void @ctor.146(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.160(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %this.addr +define internal void @ctor.147(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.161(%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %this.addr +define internal void @ctor.148(%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.162(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %this.addr +define internal void @ctor.149(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.163(%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* - store %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %this.addr +define internal void @ctor.150(%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.164(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Node]"* - store %"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"** %this.addr +define internal void @ctor.151(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.165(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %this) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %this.addr +define internal void @ctor.152(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.166(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %this.addr +define internal void @ctor.153(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.167(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %this.addr +define internal void @ctor.154(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.168(%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %this.addr +define internal void @ctor.155(%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.169(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %this) #3 { - %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, @Location]"* - store %"FunctionPtr2[Node, UntypedPtr, @Location]"* %this, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %this.addr +define internal void @ctor.156(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr2[Node, UntypedPtr, @Location]"*, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, @Location]", %"FunctionPtr2[Node, UntypedPtr, @Location]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Location const]", %"FunctionPtr2[Node, UntypedPtr, Location const]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.170(%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %this.addr +define internal void @ctor.157(%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]", %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]", %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.171(%"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %this.addr +define internal void @ctor.158(%"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Int]", %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Int]", %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.172(%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %this.addr +define internal void @ctor.159(%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]", %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]", %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.173(%"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %this.addr +define internal void @ctor.160(%"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Long]", %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Long]", %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.174(%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %this.addr +define internal void @ctor.161(%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]", %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]", %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.175(%"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %this.addr +define internal void @ctor.162(%"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Float]", %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Float]", %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.176(%"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %this.addr +define internal void @ctor.163(%"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Double]", %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Double]", %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.177(%"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %this.addr +define internal void @ctor.164(%"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Char]", %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Char]", %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.178(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %this.addr +define internal void @ctor.165(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Node]", %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Node]", %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.179(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %this) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %this.addr +define internal void @ctor.166(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %1, i32 0, i32 0 - store i8* null, i8** %2 + %1 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.180(%ParserContext* %this, %ParserContext* %other) #3 { - %this.addr = alloca %ParserContext* - store %ParserContext* %this, %ParserContext** %this.addr +define internal void @ctor.167(%ParserContext* %this, %ParserContext* %other) #3 { %other.addr = alloca %ParserContext* store %ParserContext* %other, %ParserContext** %other.addr br label %code code: ; preds = %0 - %1 = load %ParserContext*, %ParserContext** %this.addr - %2 = getelementptr inbounds %ParserContext, %ParserContext* %1, i32 0, i32 0 - %3 = load %ParserContext*, %ParserContext** %other.addr - %4 = getelementptr inbounds %ParserContext, %ParserContext* %3, i32 0, i32 0 - call void @ctor.181(%SparrowScanner* %2, %SparrowScanner* %4) - %5 = load %ParserContext*, %ParserContext** %this.addr + %1 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 0 + %2 = load %ParserContext*, %ParserContext** %other.addr + %3 = getelementptr inbounds %ParserContext, %ParserContext* %2, i32 0, i32 0 + call void @ctor.168(%SparrowScanner* %1, %SparrowScanner* %3) + %4 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 1 + %5 = load %ParserContext*, %ParserContext** %other.addr %6 = getelementptr inbounds %ParserContext, %ParserContext* %5, i32 0, i32 1 - %7 = load %ParserContext*, %ParserContext** %other.addr - %8 = getelementptr inbounds %ParserContext, %ParserContext* %7, i32 0, i32 1 - call void @ctor.206(%"SparrowLayoutDecoder[SparrowScanner]"* %6, %"SparrowLayoutDecoder[SparrowScanner]"* %8) - %9 = load %ParserContext*, %ParserContext** %this.addr - %10 = getelementptr inbounds %ParserContext, %ParserContext* %9, i32 0, i32 2 - %11 = load %ParserContext*, %ParserContext** %other.addr - %12 = getelementptr inbounds %ParserContext, %ParserContext* %11, i32 0, i32 2 - call void @ctor.231(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12) + call void @ctor.192(%"SparrowLayoutDecoder[SparrowScanner]"* %4, %"SparrowLayoutDecoder[SparrowScanner]"* %6) + %7 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 2 + %8 = load %ParserContext*, %ParserContext** %other.addr + %9 = getelementptr inbounds %ParserContext, %ParserContext* %8, i32 0, i32 2 + call void @ctor.220(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.181(%SparrowScanner* %this, %SparrowScanner* %other) #3 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr +define internal void @ctor.168(%SparrowScanner* %this, %SparrowScanner* %other) #3 { %other.addr = alloca %SparrowScanner* store %SparrowScanner* %other, %SparrowScanner** %other.addr br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 0 - %3 = load %SparrowScanner*, %SparrowScanner** %other.addr - %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %3, i32 0, i32 0 - call void @ctor.182(%Location* %2, %Location* %4) - %5 = load %SparrowScanner*, %SparrowScanner** %this.addr + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 0 + %2 = load %SparrowScanner*, %SparrowScanner** %other.addr + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %2, i32 0, i32 0 + call void @ctor.169(%Location* %1, %Location* %3) + %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 1 + %5 = load %SparrowScanner*, %SparrowScanner** %other.addr %6 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %5, i32 0, i32 1 - %7 = load %SparrowScanner*, %SparrowScanner** %other.addr - %8 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %7, i32 0, i32 1 - call void @ctor.185(%BufferedCharSource* %6, %BufferedCharSource* %8) - %9 = load %SparrowScanner*, %SparrowScanner** %this.addr - %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %9, i32 0, i32 2 + call void @ctor.172(%BufferedCharSource* %4, %BufferedCharSource* %6) + %7 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %8 = load %SparrowScanner*, %SparrowScanner** %other.addr + %9 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %8, i32 0, i32 2 + call void @ctor.181(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %7, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %9) + %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 %11 = load %SparrowScanner*, %SparrowScanner** %other.addr - %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %11, i32 0, i32 2 - call void @ctor.195(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %10, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %12) - %13 = load %SparrowScanner*, %SparrowScanner** %this.addr - %14 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %13, i32 0, i32 3 - %15 = load %SparrowScanner*, %SparrowScanner** %other.addr - %16 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %15, i32 0, i32 3 - call void @ctor.202(%Token* %14, %Token* %16) - %17 = load %SparrowScanner*, %SparrowScanner** %other.addr - %18 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %17, i32 0, i32 4 - %19 = load i1, i1* %18 - %20 = load %SparrowScanner*, %SparrowScanner** %this.addr - %21 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %20, i32 0, i32 4 - store i1 %19, i1* %21 - %22 = load %SparrowScanner*, %SparrowScanner** %this.addr - %23 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %22, i32 0, i32 5 - %24 = load %SparrowScanner*, %SparrowScanner** %other.addr - %25 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %24, i32 0, i32 5 - call void @ctor.204(%ErrorReporter* %23, %ErrorReporter* %25) - %26 = load %SparrowScanner*, %SparrowScanner** %other.addr - %27 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %26, i32 0, i32 6 - %28 = load i1, i1* %27 - %29 = load %SparrowScanner*, %SparrowScanner** %this.addr - %30 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %29, i32 0, i32 6 - store i1 %28, i1* %30 + %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %11, i32 0, i32 3 + call void @ctor.188(%Token* %10, %Token* %12) + %13 = load %SparrowScanner*, %SparrowScanner** %other.addr + %14 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %13, i32 0, i32 4 + %15 = load i1, i1* %14 + %16 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 4 + store i1 %15, i1* %16 + %17 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 5 + %18 = load %SparrowScanner*, %SparrowScanner** %other.addr + %19 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %18, i32 0, i32 5 + call void @ctor.190(%ErrorReporter* %17, %ErrorReporter* %19) + %20 = load %SparrowScanner*, %SparrowScanner** %other.addr + %21 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %20, i32 0, i32 6 + %22 = load i1, i1* %21 + %23 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 6 + store i1 %22, i1* %23 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.182(%Location* %this, %Location* %other) #3 { - %this.addr = alloca %Location* - store %Location* %this, %Location** %this.addr +define internal void @ctor.169(%Location* %this, %Location* %other) #3 { %other.addr = alloca %Location* store %Location* %other, %Location** %other.addr br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %this.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 0 - %3 = load %Location*, %Location** %other.addr - %4 = getelementptr inbounds %Location, %Location* %3, i32 0, i32 0 - call void @ctor.183(%SourceCode* %2, %SourceCode* %4) - %5 = load %Location*, %Location** %this.addr + %1 = getelementptr inbounds %Location, %Location* %this, i32 0, i32 0 + %2 = load %Location*, %Location** %other.addr + %3 = getelementptr inbounds %Location, %Location* %2, i32 0, i32 0 + call void @ctor.170(%SourceCode* %1, %SourceCode* %3) + %4 = getelementptr inbounds %Location, %Location* %this, i32 0, i32 1 + %5 = load %Location*, %Location** %other.addr %6 = getelementptr inbounds %Location, %Location* %5, i32 0, i32 1 - %7 = load %Location*, %Location** %other.addr - %8 = getelementptr inbounds %Location, %Location* %7, i32 0, i32 1 - call void @ctor.184(%LineCol* %6, %LineCol* %8) - %9 = load %Location*, %Location** %this.addr - %10 = getelementptr inbounds %Location, %Location* %9, i32 0, i32 2 - %11 = load %Location*, %Location** %other.addr - %12 = getelementptr inbounds %Location, %Location* %11, i32 0, i32 2 - call void @ctor.184(%LineCol* %10, %LineCol* %12) + call void @ctor.171(%LineCol* %4, %LineCol* %6) + %7 = getelementptr inbounds %Location, %Location* %this, i32 0, i32 2 + %8 = load %Location*, %Location** %other.addr + %9 = getelementptr inbounds %Location, %Location* %8, i32 0, i32 2 + call void @ctor.171(%LineCol* %7, %LineCol* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.183(%SourceCode* %this, %SourceCode* %other) #3 { - %this.addr = alloca %SourceCode* - store %SourceCode* %this, %SourceCode** %this.addr +define internal void @ctor.170(%SourceCode* %this, %SourceCode* %other) #3 { %other.addr = alloca %SourceCode* store %SourceCode* %other, %SourceCode** %other.addr br label %code code: ; preds = %0 - %1 = load %SourceCode*, %SourceCode** %other.addr - %2 = getelementptr inbounds %SourceCode, %SourceCode* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %SourceCode*, %SourceCode** %this.addr - %5 = getelementptr inbounds %SourceCode, %SourceCode* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %SourceCode, %SourceCode* %this, i32 0, i32 0 + %2 = load %SourceCode*, %SourceCode** %other.addr + %3 = getelementptr inbounds %SourceCode, %SourceCode* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.184(%LineCol* %this, %LineCol* %other) #3 { - %this.addr = alloca %LineCol* - store %LineCol* %this, %LineCol** %this.addr +define internal void @ctor.171(%LineCol* %this, %LineCol* %other) #3 { %other.addr = alloca %LineCol* store %LineCol* %other, %LineCol** %other.addr br label %code @@ -5909,240 +5371,173 @@ code: ; preds = %0 %1 = load %LineCol*, %LineCol** %other.addr %2 = getelementptr inbounds %LineCol, %LineCol* %1, i32 0, i32 0 %3 = load i32, i32* %2 - %4 = load %LineCol*, %LineCol** %this.addr - %5 = getelementptr inbounds %LineCol, %LineCol* %4, i32 0, i32 0 - store i32 %3, i32* %5 - %6 = load %LineCol*, %LineCol** %other.addr - %7 = getelementptr inbounds %LineCol, %LineCol* %6, i32 0, i32 1 - %8 = load i32, i32* %7 - %9 = load %LineCol*, %LineCol** %this.addr - %10 = getelementptr inbounds %LineCol, %LineCol* %9, i32 0, i32 1 - store i32 %8, i32* %10 + %4 = getelementptr inbounds %LineCol, %LineCol* %this, i32 0, i32 0 + store i32 %3, i32* %4 + %5 = load %LineCol*, %LineCol** %other.addr + %6 = getelementptr inbounds %LineCol, %LineCol* %5, i32 0, i32 1 + %7 = load i32, i32* %6 + %8 = getelementptr inbounds %LineCol, %LineCol* %this, i32 0, i32 1 + store i32 %7, i32* %8 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.185(%BufferedCharSource* %this, %BufferedCharSource* %other) #3 { - %this.addr = alloca %BufferedCharSource* - store %BufferedCharSource* %this, %BufferedCharSource** %this.addr +define internal void @ctor.172(%BufferedCharSource* %this, %BufferedCharSource* %other) #3 { %other.addr = alloca %BufferedCharSource* store %BufferedCharSource* %other, %BufferedCharSource** %other.addr br label %code code: ; preds = %0 - %1 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %2 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %1, i32 0, i32 0 - %3 = load %BufferedCharSource*, %BufferedCharSource** %other.addr - %4 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %3, i32 0, i32 0 - call void @ctor.186(%CharSource* %2, %CharSource* %4) - %5 = load %BufferedCharSource*, %BufferedCharSource** %this.addr + %1 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 0 + %2 = load %BufferedCharSource*, %BufferedCharSource** %other.addr + %3 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %2, i32 0, i32 0 + call void @ctor.173(%CharSource* %1, %CharSource* %3) + %4 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 1 + %5 = load %BufferedCharSource*, %BufferedCharSource** %other.addr %6 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %5, i32 0, i32 1 + call void @ctor.175(%String* %4, %String* %6) %7 = load %BufferedCharSource*, %BufferedCharSource** %other.addr - %8 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %7, i32 0, i32 1 - call void @ctor.189(%String* %6, %String* %8) - %9 = load %BufferedCharSource*, %BufferedCharSource** %other.addr - %10 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %9, i32 0, i32 2 - %11 = load i32, i32* %10 - %12 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %13 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %12, i32 0, i32 2 - store i32 %11, i32* %13 + %8 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %7, i32 0, i32 2 + %9 = load i32, i32* %8 + %10 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 2 + store i32 %9, i32* %10 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.186(%CharSource* %this, %CharSource* %other) #3 { - %this.addr = alloca %CharSource* - store %CharSource* %this, %CharSource** %this.addr +define internal void @ctor.173(%CharSource* %this, %CharSource* %other) #3 { %other.addr = alloca %CharSource* store %CharSource* %other, %CharSource** %other.addr br label %code code: ; preds = %0 - %1 = load %CharSource*, %CharSource** %this.addr - %2 = getelementptr inbounds %CharSource, %CharSource* %1, i32 0, i32 0 - %3 = load %CharSource*, %CharSource** %other.addr - %4 = getelementptr inbounds %CharSource, %CharSource* %3, i32 0, i32 0 - call void @ctor.187(%UntypedPtr* %2, %UntypedPtr* %4) - %5 = load %CharSource*, %CharSource** %this.addr - %6 = getelementptr inbounds %CharSource, %CharSource* %5, i32 0, i32 1 - %7 = load %CharSource*, %CharSource** %other.addr - %8 = getelementptr inbounds %CharSource, %CharSource* %7, i32 0, i32 1 - call void @ctor.188(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %6, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %8) - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.187(%UntypedPtr* %this, %UntypedPtr* %other) #3 { - %this.addr = alloca %UntypedPtr* - store %UntypedPtr* %this, %UntypedPtr** %this.addr - %other.addr = alloca %UntypedPtr* - store %UntypedPtr* %other, %UntypedPtr** %other.addr - br label %code - -code: ; preds = %0 - %1 = load %UntypedPtr*, %UntypedPtr** %other.addr - %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %UntypedPtr*, %UntypedPtr** %this.addr - %5 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %CharSource, %CharSource* %this, i32 0, i32 0 + %2 = load %CharSource*, %CharSource** %other.addr + %3 = getelementptr inbounds %CharSource, %CharSource* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) + %5 = getelementptr inbounds %CharSource, %CharSource* %this, i32 0, i32 1 + %6 = load %CharSource*, %CharSource** %other.addr + %7 = getelementptr inbounds %CharSource, %CharSource* %6, i32 0, i32 1 + call void @ctor.174(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %5, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %7) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.188(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* - store %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* - store %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %other, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %other.addr +define internal void @ctor.174(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* + store %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %other, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @String, Int]"*, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @String, Int]", %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Void, UntypedPtr, @String, Int]"*, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @String, Int]", %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, String mut, Int]", %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"*, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, String mut, Int]", %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.189(%String* %this, %String* %other) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %other.addr = alloca %String* - store %String* %other, %String** %other.addr +define internal void @ctor.175(%String* %this, %String* %other) #4 { %size = alloca i64 br label %code code: ; preds = %0 - %1 = load %String*, %String** %other.addr - %2 = call i64 @size.190(%String* %1) - store i64 %2, i64* %size - %3 = load %String*, %String** %this.addr - %4 = load i64, i64* %size - call void @ctor.191(%String* %3, i64 %4) - %5 = load %String*, %String** %this.addr - %6 = getelementptr inbounds %String, %String* %5, i32 0, i32 0 - %7 = load %"RawPtr[Char]", %"RawPtr[Char]"* %6 - %8 = call i8* @bytePtr(%"RawPtr[Char]" %7) - %9 = load %String*, %String** %other.addr - %10 = getelementptr inbounds %String, %String* %9, i32 0, i32 0 - %11 = load %"RawPtr[Char]", %"RawPtr[Char]"* %10 - %12 = call i8* @bytePtr(%"RawPtr[Char]" %11) - %13 = load i64, i64* %size - call void @_spr_memcpy(i8* %8, i8* %12, i64 %13) + %1 = call i64 @size.176(%String* %other) + store i64 %1, i64* %size + %2 = load i64, i64* %size + call void @ctor.177(%String* %this, i64 %2) + %3 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %4 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %3) + %5 = getelementptr inbounds %String, %String* %other, i32 0, i32 0 + %6 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %5) + %7 = load i64, i64* %size + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %4, %UntypedPtr %6, i64 %7) ret void } ; Function Attrs: inlinehint nounwind -define internal i64 @size.190(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal i64 @size.176(%String* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 1 + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %2 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = load %String*, %String** %this.addr - %5 = getelementptr inbounds %String, %String* %4, i32 0, i32 0 - %6 = load %"RawPtr[Char]", %"RawPtr[Char]"* %5 - %7 = call i64 @diff(%"RawPtr[Char]" %3, %"RawPtr[Char]" %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = call i64 @diff(%"RawPtr[Char]"* %1, %"RawPtr[Char]" %3) + store i64 %4, i64* %tmp.this + %5 = load i64, i64* %tmp.this + ret i64 %5 } ; Function Attrs: inlinehint nounwind -define internal i64 @diff(%"RawPtr[Char]" %this, %"RawPtr[Char]" %other) #4 { - %this.addr = alloca %"RawPtr[Char]" - store %"RawPtr[Char]" %this, %"RawPtr[Char]"* %this.addr +define internal i64 @diff(%"RawPtr[Char]"* %this, %"RawPtr[Char]" %other) #4 { %other.addr = alloca %"RawPtr[Char]" store %"RawPtr[Char]" %other, %"RawPtr[Char]"* %other.addr - %tmp.this = alloca i64 - %tmp.this1 = alloca i64 - br label %code - -code: ; preds = %0 - %1 = load %"RawPtr[Char]", %"RawPtr[Char]"* %this.addr - %2 = call i8* @bytePtr(%"RawPtr[Char]" %1) - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %other.addr - %4 = call i8* @bytePtr(%"RawPtr[Char]" %3) - %5 = call i64 @ptrDiff(i8* %2, i8* %4) - store i64 1, i64* %tmp.this1 - %6 = load i64, i64* %tmp.this1 - %7 = sdiv i64 %5, %6 - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 -} - -; Function Attrs: inlinehint nounwind -define internal i8* @bytePtr(%"RawPtr[Char]" %this) #4 { - %this.addr = alloca %"RawPtr[Char]" - store %"RawPtr[Char]" %this, %"RawPtr[Char]"* %this.addr + %tmp.this = alloca %UntypedPtr + %tmp.this1 = alloca %UntypedPtr + %tmp.this2 = alloca i64 br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 %2 = load i8*, i8** %1 - ret i8* %2 + call void @ctor.67(%UntypedPtr* %tmp.this, i8* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this + %4 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %other.addr, i32 0, i32 0 + %5 = load i8*, i8** %4 + call void @ctor.67(%UntypedPtr* %tmp.this1, i8* %5) + %6 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + %7 = call i64 bitcast (i64 (i8*, i8*)* @ptrDiff to i64 (%UntypedPtr, %UntypedPtr)*)(%UntypedPtr %3, %UntypedPtr %6) + store i64 1, i64* %tmp.this2 + %8 = load i64, i64* %tmp.this2 + %9 = sdiv i64 %7, %8 + ret i64 %9 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.191(%String* %this, i64 %size) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal void @ctor.177(%String* %this, i64 %size) #4 { %size.addr = alloca i64 store i64 %size, i64* %size.addr - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 - %"$tmpC1" = alloca %"RawPtr[Char]" + %"$tmpForRef1" = alloca %"RawPtr[Char]" %tmp.this2 = alloca i64 %tmp.this3 = alloca i8 br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - %3 = load i64, i64* %size.addr + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %2 = load i64, i64* %size.addr store i64 1, i64* %tmp.this - %4 = load i64, i64* %tmp.this - %5 = add i64 %3, %4 - call void @allocRawPtr(%"RawPtr[Char]"* %"$tmpC", i64 %5) - call void @ctor.192(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %"$tmpC") - %6 = load %String*, %String** %this.addr - %7 = getelementptr inbounds %String, %String* %6, i32 0, i32 1 - %8 = load %String*, %String** %this.addr - %9 = getelementptr inbounds %String, %String* %8, i32 0, i32 0 - %10 = load %"RawPtr[Char]", %"RawPtr[Char]"* %9 - %11 = load i64, i64* %size.addr - store i64 %11, i64* %tmp.this2 - %12 = load i64, i64* %tmp.this2 - call void @advance(%"RawPtr[Char]"* %"$tmpC1", %"RawPtr[Char]" %10, i64 %12) - call void @ctor.192(%"RawPtr[Char]"* %7, %"RawPtr[Char]"* %"$tmpC1") - %13 = load %String*, %String** %this.addr - %14 = getelementptr inbounds %String, %String* %13, i32 0, i32 2 - %15 = load %String*, %String** %this.addr - %16 = getelementptr inbounds %String, %String* %15, i32 0, i32 1 - call void @ctor.192(%"RawPtr[Char]"* %14, %"RawPtr[Char]"* %16) + %3 = load i64, i64* %tmp.this + %4 = add i64 %2, %3 + %5 = call %"RawPtr[Char]" @allocRawPtr(i64 %4) + store %"RawPtr[Char]" %5, %"RawPtr[Char]"* %"$tmpForRef" + call void @ctor.178(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %"$tmpForRef") + %6 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %7 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %8 = load i64, i64* %size.addr + store i64 %8, i64* %tmp.this2 + %9 = load i64, i64* %tmp.this2 + %10 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %7, i64 %9) + store %"RawPtr[Char]" %10, %"RawPtr[Char]"* %"$tmpForRef1" + call void @ctor.178(%"RawPtr[Char]"* %6, %"RawPtr[Char]"* %"$tmpForRef1") + %11 = getelementptr inbounds %String, %String* %this, i32 0, i32 2 + %12 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + call void @ctor.178(%"RawPtr[Char]"* %11, %"RawPtr[Char]"* %12) store i8 0, i8* %tmp.this3 - %17 = load i8, i8* %tmp.this3 - %18 = load %String*, %String** %this.addr - %19 = getelementptr inbounds %String, %String* %18, i32 0, i32 1 - %20 = load %"RawPtr[Char]", %"RawPtr[Char]"* %19 - %21 = call i8* @value(%"RawPtr[Char]" %20) - store i8 %17, i8* %21 + %13 = load i8, i8* %tmp.this3 + %14 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %15 = call i8* @value(%"RawPtr[Char]"* %14) + store i8 %13, i8* %15 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.192(%"RawPtr[Char]"* %this, %"RawPtr[Char]"* %other) #3 { - %this.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %this, %"RawPtr[Char]"** %this.addr +define internal void @ctor.178(%"RawPtr[Char]"* %this, %"RawPtr[Char]"* %other) #3 { %other.addr = alloca %"RawPtr[Char]"* store %"RawPtr[Char]"* %other, %"RawPtr[Char]"** %other.addr br label %code @@ -6151,31 +5546,33 @@ code: ; preds = %0 %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %other.addr %2 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %1, i32 0, i32 0 %3 = load i8*, i8** %2 - %4 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %this.addr - %5 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %4 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + store i8* %3, i8** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal void @allocRawPtr(%"RawPtr[Char]"* sret %_result, i64 %num) #4 { - %_result.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %_result, %"RawPtr[Char]"** %_result.addr +define internal %"RawPtr[Char]" @allocRawPtr(i64 %num) #4 { %num.addr = alloca i64 store i64 %num, i64* %num.addr + %tmp.this = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %_result.addr - %2 = load i64, i64* %num.addr - %3 = mul i64 %2, 1 - %4 = call i8* @malloc(i64 %3) - call void @ctor.193(%"RawPtr[Char]"* %1, i8* %4) - ret void + %1 = load i64, i64* %num.addr + %2 = mul i64 %1, 1 + %3 = call %UntypedPtr @malloc(i64 %2) + store %UntypedPtr %3, %UntypedPtr* %"$tmpForRef" + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %"$tmpForRef", i32 0, i32 0 + %5 = load i8*, i8** %4 + call void @ctor.179(%"RawPtr[Char]"* %tmp.this, i8* %5) + %6 = load %"RawPtr[Char]", %"RawPtr[Char]"* %tmp.this + ret %"RawPtr[Char]" %6 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.193(%"RawPtr[Char]"* %this, i8* %f_ptr) #3 { +define internal void @ctor.179(%"RawPtr[Char]"* %this, i8* %f_ptr) #3 { %this.addr = alloca %"RawPtr[Char]"* store %"RawPtr[Char]"* %this, %"RawPtr[Char]"** %this.addr %f_ptr.addr = alloca i8* @@ -6191,112 +5588,110 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @advance(%"RawPtr[Char]"* sret %_result, %"RawPtr[Char]" %this, i64 %n) #4 { - %_result.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %_result, %"RawPtr[Char]"** %_result.addr - %this.addr = alloca %"RawPtr[Char]" - store %"RawPtr[Char]" %this, %"RawPtr[Char]"* %this.addr +define internal %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr - %tmp.this = alloca i64 - %tmp.this1 = alloca i64 + %tmp.this = alloca %"RawPtr[Char]" + %tmp.this1 = alloca %UntypedPtr + %tmp.this2 = alloca i64 + %tmp.this3 = alloca i64 br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %_result.addr - %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %this.addr - %3 = call i8* @bytePtr(%"RawPtr[Char]" %2) + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + %2 = load i8*, i8** %1 + call void @ctor.67(%UntypedPtr* %tmp.this1, i8* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 %4 = load i64, i64* %n.addr - store i64 1, i64* %tmp.this1 - %5 = load i64, i64* %tmp.this1 + store i64 1, i64* %tmp.this3 + %5 = load i64, i64* %tmp.this3 %6 = mul i64 %4, %5 - store i64 %6, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = call i8* @ptrAdd(i8* %3, i64 %7) - call void @ctor.194(%"RawPtr[Char]"* %1, i8* %8) - ret void + store i64 %6, i64* %tmp.this2 + %7 = load i64, i64* %tmp.this2 + %8 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %7) + call void @ctor.180(%"RawPtr[Char]"* %tmp.this, %UntypedPtr %8) + %9 = load %"RawPtr[Char]", %"RawPtr[Char]"* %tmp.this + ret %"RawPtr[Char]" %9 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.194(%"RawPtr[Char]"* %this, i8* %byteRef) #4 { - %this.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %this, %"RawPtr[Char]"** %this.addr - %byteRef.addr = alloca i8* - store i8* %byteRef, i8** %byteRef.addr +define internal void @ctor.180(%"RawPtr[Char]"* %this, %UntypedPtr %p) #4 { + %p.addr = alloca %UntypedPtr + store %UntypedPtr %p, %UntypedPtr* %p.addr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %this.addr - %2 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %1, i32 0, i32 0 - store i8* null, i8** %2 - %3 = load i8*, i8** %byteRef.addr - %4 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %this.addr - %5 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = load %UntypedPtr, %UntypedPtr* %p.addr + %3 = call i8* @asRefOf.62(%UntypedPtr %2) + %4 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + store i8* %3, i8** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal i8* @value(%"RawPtr[Char]" %this) #4 { - %this.addr = alloca %"RawPtr[Char]" - store %"RawPtr[Char]" %this, %"RawPtr[Char]"* %this.addr +define internal i8* @value(%"RawPtr[Char]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 %2 = load i8*, i8** %1 ret i8* %2 } +; Function Attrs: inlinehint nounwind +define internal %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %this) #4 { + %tmp.this = alloca %UntypedPtr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + %2 = load i8*, i8** %1 + call void @ctor.67(%UntypedPtr* %tmp.this, i8* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this + ret %UntypedPtr %3 +} + ; Function Attrs: alwaysinline nounwind -define internal void @ctor.195(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %other) #3 { - %this.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr +define internal void @ctor.181(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %other) #3 { %other.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %other, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 - %3 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr - %4 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %3, i32 0, i32 0 - call void @ctor.196(%"RangeWithLookahead[BufferedCharSourceRange]"* %2, %"RangeWithLookahead[BufferedCharSourceRange]"* %4) - %5 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr - %6 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5, i32 0, i32 1 - %7 = load %Location*, %Location** %6 - %8 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %9 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %8, i32 0, i32 1 - store %Location* %7, %Location** %9 + %1 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 0 + %2 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr + %3 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2, i32 0, i32 0 + call void @ctor.182(%"RangeWithLookahead[BufferedCharSourceRange]"* %1, %"RangeWithLookahead[BufferedCharSourceRange]"* %3) + %4 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr + %5 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4, i32 0, i32 1 + %6 = load %Location*, %Location** %5 + %7 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 1 + store %Location* %6, %Location** %7 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.196(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"* %other) #3 { - %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr +define internal void @ctor.182(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"* %other) #3 { %other.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* store %"RangeWithLookahead[BufferedCharSourceRange]"* %other, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %1, i32 0, i32 0 - %3 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr - %4 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %3, i32 0, i32 0 - call void @ctor.197(%BufferedCharSourceRange* %2, %BufferedCharSourceRange* %4) - %5 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr + %1 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + %2 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr + %3 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %2, i32 0, i32 0 + call void @ctor.183(%BufferedCharSourceRange* %1, %BufferedCharSourceRange* %3) + %4 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %5 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr %6 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %5, i32 0, i32 1 - %7 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr - %8 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %7, i32 0, i32 1 - call void @ctor.198(%"Vector[Char]"* %6, %"Vector[Char]"* %8) + call void @ctor.184(%"Vector[Char]"* %4, %"Vector[Char]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.197(%BufferedCharSourceRange* %this, %BufferedCharSourceRange* %other) #3 { - %this.addr = alloca %BufferedCharSourceRange* - store %BufferedCharSourceRange* %this, %BufferedCharSourceRange** %this.addr +define internal void @ctor.183(%BufferedCharSourceRange* %this, %BufferedCharSourceRange* %other) #3 { %other.addr = alloca %BufferedCharSourceRange* store %BufferedCharSourceRange* %other, %BufferedCharSourceRange** %other.addr br label %code @@ -6305,96 +5700,72 @@ code: ; preds = %0 %1 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %other.addr %2 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %1, i32 0, i32 0 %3 = load %BufferedCharSource*, %BufferedCharSource** %2 - %4 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %this.addr - %5 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %4, i32 0, i32 0 - store %BufferedCharSource* %3, %BufferedCharSource** %5 + %4 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %this, i32 0, i32 0 + store %BufferedCharSource* %3, %BufferedCharSource** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.198(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr - %other.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %other, %"Vector[Char]"** %other.addr +define internal void @ctor.184(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #4 { %size = alloca i64 - %"$tmpC" = alloca %"RawPtr[Char]" - %"$tmpC1" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" + %"$tmpForRef1" = alloca %"RawPtr[Char]" %dst = alloca %"RawPtr[Char]" %src = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 - call void @ctor.138(%"RawPtr[Char]"* %2) - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %3, i32 0, i32 1 - call void @ctor.138(%"RawPtr[Char]"* %4) - %5 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %6 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %5, i32 0, i32 2 - call void @ctor.138(%"RawPtr[Char]"* %6) - %7 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %8 = call i64 @size.199(%"Vector[Char]"* %7) - store i64 %8, i64* %size - %9 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %10 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %9, i32 0, i32 0 - %11 = load i64, i64* %size - call void @allocRawPtr(%"RawPtr[Char]"* %"$tmpC", i64 %11) - call void @"=.200"(%"RawPtr[Char]"* %10, %"RawPtr[Char]"* %"$tmpC") - %12 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %13 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %12, i32 0, i32 1 - %14 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %15 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %14, i32 0, i32 0 - %16 = load %"RawPtr[Char]", %"RawPtr[Char]"* %15 - %17 = load i64, i64* %size - call void @advance.201(%"RawPtr[Char]"* %"$tmpC1", %"RawPtr[Char]" %16, i64 %17) - call void @"=.200"(%"RawPtr[Char]"* %13, %"RawPtr[Char]"* %"$tmpC1") - %18 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %19 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %18, i32 0, i32 2 - %20 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %21 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %20, i32 0, i32 1 - call void @"=.200"(%"RawPtr[Char]"* %19, %"RawPtr[Char]"* %21) - %22 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %23 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %22, i32 0, i32 0 - call void @ctor.192(%"RawPtr[Char]"* %dst, %"RawPtr[Char]"* %23) - %24 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %25 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %24, i32 0, i32 0 - call void @ctor.192(%"RawPtr[Char]"* %src, %"RawPtr[Char]"* %25) - %26 = load %"RawPtr[Char]", %"RawPtr[Char]"* %dst - %27 = call i8* @bytePtr(%"RawPtr[Char]" %26) - %28 = load %"RawPtr[Char]", %"RawPtr[Char]"* %src - %29 = call i8* @bytePtr(%"RawPtr[Char]" %28) - %30 = load i64, i64* %size - %31 = mul i64 %30, 1 - call void @_spr_memcpy(i8* %27, i8* %29, i64 %31) - ret void -} - -; Function Attrs: inlinehint nounwind -define internal i64 @size.199(%"Vector[Char]"* %this) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + call void @ctor.125(%"RawPtr[Char]"* %1) + %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + call void @ctor.125(%"RawPtr[Char]"* %2) + %3 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 2 + call void @ctor.125(%"RawPtr[Char]"* %3) + %4 = call i64 @size.185(%"Vector[Char]"* %other) + store i64 %4, i64* %size + %5 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %6 = load i64, i64* %size + %7 = call %"RawPtr[Char]" @allocRawPtr(i64 %6) + store %"RawPtr[Char]" %7, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %5, %"RawPtr[Char]"* %"$tmpForRef") + %8 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %9 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %10 = load i64, i64* %size + %11 = call %"RawPtr[Char]" @advance.187(%"RawPtr[Char]"* %9, i64 %10) + store %"RawPtr[Char]" %11, %"RawPtr[Char]"* %"$tmpForRef1" + call void @"=.186"(%"RawPtr[Char]"* %8, %"RawPtr[Char]"* %"$tmpForRef1") + %12 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 2 + %13 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + call void @"=.186"(%"RawPtr[Char]"* %12, %"RawPtr[Char]"* %13) + %14 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + call void @ctor.178(%"RawPtr[Char]"* %dst, %"RawPtr[Char]"* %14) + %15 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %other, i32 0, i32 0 + call void @ctor.178(%"RawPtr[Char]"* %src, %"RawPtr[Char]"* %15) + %16 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %dst) + %17 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %src) + %18 = load i64, i64* %size + %19 = mul i64 %18, 1 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %16, %UntypedPtr %17, i64 %19) + ret void +} + +; Function Attrs: inlinehint nounwind +define internal i64 @size.185(%"Vector[Char]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 1 + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %5 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %4, i32 0, i32 0 - %6 = load %"RawPtr[Char]", %"RawPtr[Char]"* %5 - %7 = call i64 @diff(%"RawPtr[Char]" %3, %"RawPtr[Char]" %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = call i64 @diff(%"RawPtr[Char]"* %1, %"RawPtr[Char]" %3) + store i64 %4, i64* %tmp.this + %5 = load i64, i64* %tmp.this + ret i64 %5 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.200"(%"RawPtr[Char]"* %this, %"RawPtr[Char]"* %other) #3 { - %this.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %this, %"RawPtr[Char]"** %this.addr +define internal void @"=.186"(%"RawPtr[Char]"* %this, %"RawPtr[Char]"* %other) #3 { %other.addr = alloca %"RawPtr[Char]"* store %"RawPtr[Char]"* %other, %"RawPtr[Char]"** %other.addr br label %code @@ -6403,76 +5774,66 @@ code: ; preds = %0 %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %other.addr %2 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %1, i32 0, i32 0 %3 = load i8*, i8** %2 - %4 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %this.addr - %5 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %4 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + store i8* %3, i8** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal void @advance.201(%"RawPtr[Char]"* sret %_result, %"RawPtr[Char]" %this, i64 %n) #4 { - %_result.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %_result, %"RawPtr[Char]"** %_result.addr - %this.addr = alloca %"RawPtr[Char]" - store %"RawPtr[Char]" %this, %"RawPtr[Char]"* %this.addr +define internal %"RawPtr[Char]" @advance.187(%"RawPtr[Char]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr + %tmp.this = alloca %"RawPtr[Char]" + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %_result.addr - %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %this.addr - %3 = call i8* @bytePtr(%"RawPtr[Char]" %2) + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + %2 = load i8*, i8** %1 + call void @ctor.67(%UntypedPtr* %tmp.this1, i8* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 %4 = load i64, i64* %n.addr %5 = mul i64 %4, 1 - %6 = call i8* @ptrAdd(i8* %3, i64 %5) - call void @ctor.194(%"RawPtr[Char]"* %1, i8* %6) - ret void + %6 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %5) + call void @ctor.180(%"RawPtr[Char]"* %tmp.this, %UntypedPtr %6) + %7 = load %"RawPtr[Char]", %"RawPtr[Char]"* %tmp.this + ret %"RawPtr[Char]" %7 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.202(%Token* %this, %Token* %other) #3 { - %this.addr = alloca %Token* - store %Token* %this, %Token** %this.addr +define internal void @ctor.188(%Token* %this, %Token* %other) #3 { %other.addr = alloca %Token* store %Token* %other, %Token** %other.addr br label %code code: ; preds = %0 - %1 = load %Token*, %Token** %this.addr - %2 = getelementptr inbounds %Token, %Token* %1, i32 0, i32 0 - %3 = load %Token*, %Token** %other.addr - %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 - call void @ctor.182(%Location* %2, %Location* %4) - %5 = load %Token*, %Token** %this.addr + %1 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 0 + %2 = load %Token*, %Token** %other.addr + %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 0 + call void @ctor.169(%Location* %1, %Location* %3) + %4 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 1 + %5 = load %Token*, %Token** %other.addr %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 1 - %7 = load %Token*, %Token** %other.addr - %8 = getelementptr inbounds %Token, %Token* %7, i32 0, i32 1 - call void @ctor.203(%TokenType* %6, %TokenType* %8) - %9 = load %Token*, %Token** %this.addr - %10 = getelementptr inbounds %Token, %Token* %9, i32 0, i32 2 - %11 = load %Token*, %Token** %other.addr - %12 = getelementptr inbounds %Token, %Token* %11, i32 0, i32 2 - call void @ctor.189(%String* %10, %String* %12) - %13 = load %Token*, %Token** %other.addr - %14 = getelementptr inbounds %Token, %Token* %13, i32 0, i32 3 - %15 = load i64, i64* %14 - %16 = load %Token*, %Token** %this.addr - %17 = getelementptr inbounds %Token, %Token* %16, i32 0, i32 3 - store i64 %15, i64* %17 - %18 = load %Token*, %Token** %other.addr - %19 = getelementptr inbounds %Token, %Token* %18, i32 0, i32 4 - %20 = load double, double* %19 - %21 = load %Token*, %Token** %this.addr - %22 = getelementptr inbounds %Token, %Token* %21, i32 0, i32 4 - store double %20, double* %22 + call void @ctor.189(%TokenType* %4, %TokenType* %6) + %7 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 2 + %8 = load %Token*, %Token** %other.addr + %9 = getelementptr inbounds %Token, %Token* %8, i32 0, i32 2 + call void @ctor.175(%String* %7, %String* %9) + %10 = load %Token*, %Token** %other.addr + %11 = getelementptr inbounds %Token, %Token* %10, i32 0, i32 3 + %12 = load i64, i64* %11 + %13 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 3 + store i64 %12, i64* %13 + %14 = load %Token*, %Token** %other.addr + %15 = getelementptr inbounds %Token, %Token* %14, i32 0, i32 4 + %16 = load double, double* %15 + %17 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 4 + store double %16, double* %17 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.203(%TokenType* %this, %TokenType* %other) #3 { - %this.addr = alloca %TokenType* - store %TokenType* %this, %TokenType** %this.addr +define internal void @ctor.189(%TokenType* %this, %TokenType* %other) #3 { %other.addr = alloca %TokenType* store %TokenType* %other, %TokenType** %other.addr br label %code @@ -6481,190 +5842,154 @@ code: ; preds = %0 %1 = load %TokenType*, %TokenType** %other.addr %2 = getelementptr inbounds %TokenType, %TokenType* %1, i32 0, i32 0 %3 = load i32, i32* %2 - %4 = load %TokenType*, %TokenType** %this.addr - %5 = getelementptr inbounds %TokenType, %TokenType* %4, i32 0, i32 0 - store i32 %3, i32* %5 + %4 = getelementptr inbounds %TokenType, %TokenType* %this, i32 0, i32 0 + store i32 %3, i32* %4 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.204(%ErrorReporter* %this, %ErrorReporter* %other) #3 { - %this.addr = alloca %ErrorReporter* - store %ErrorReporter* %this, %ErrorReporter** %this.addr +define internal void @ctor.190(%ErrorReporter* %this, %ErrorReporter* %other) #3 { %other.addr = alloca %ErrorReporter* store %ErrorReporter* %other, %ErrorReporter** %other.addr br label %code code: ; preds = %0 - %1 = load %ErrorReporter*, %ErrorReporter** %this.addr - %2 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %1, i32 0, i32 0 - %3 = load %ErrorReporter*, %ErrorReporter** %other.addr - %4 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %3, i32 0, i32 0 - call void @ctor.187(%UntypedPtr* %2, %UntypedPtr* %4) - %5 = load %ErrorReporter*, %ErrorReporter** %this.addr - %6 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %5, i32 0, i32 1 - %7 = load %ErrorReporter*, %ErrorReporter** %other.addr - %8 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %7, i32 0, i32 1 - call void @ctor.205(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %6, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %8) + %1 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %this, i32 0, i32 0 + %2 = load %ErrorReporter*, %ErrorReporter** %other.addr + %3 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) + %5 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %this, i32 0, i32 1 + %6 = load %ErrorReporter*, %ErrorReporter** %other.addr + %7 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %6, i32 0, i32 1 + call void @ctor.191(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %5, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %7) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.205(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %other, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %other.addr +define internal void @ctor.191(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* + store %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %other, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.206(%"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"* %other) #3 { - %this.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* - store %"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr +define internal void @ctor.192(%"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"* %other) #3 { %other.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* store %"SparrowLayoutDecoder[SparrowScanner]"* %other, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %1, i32 0, i32 0 - %3 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %3, i32 0, i32 0 - call void @ctor.207(%"RangeWithLookahead[SparrowScanner]"* %2, %"RangeWithLookahead[SparrowScanner]"* %4) - %5 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr + %1 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + %2 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr + %3 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %2, i32 0, i32 0 + call void @ctor.193(%"RangeWithLookahead[SparrowScanner]"* %1, %"RangeWithLookahead[SparrowScanner]"* %3) + %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 1 + %5 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %5, i32 0, i32 1 - %7 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %8 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %7, i32 0, i32 1 - call void @ctor.204(%ErrorReporter* %6, %ErrorReporter* %8) - %9 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %10 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %9, i32 0, i32 2 + call void @ctor.190(%ErrorReporter* %4, %ErrorReporter* %6) + %7 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + %8 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr + %9 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %8, i32 0, i32 2 + call void @ctor.208(%"Vector[UInt]"* %7, %"Vector[UInt]"* %9) + %10 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 %11 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %12 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %11, i32 0, i32 2 - call void @ctor.221(%"Vector[UInt]"* %10, %"Vector[UInt]"* %12) - %13 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %14 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %13, i32 0, i32 3 - %15 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %16 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %15, i32 0, i32 3 - call void @ctor.198(%"Vector[Char]"* %14, %"Vector[Char]"* %16) - %17 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %18 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %17, i32 0, i32 4 - %19 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %20 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %19, i32 0, i32 4 - call void @ctor.203(%TokenType* %18, %TokenType* %20) - %21 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %22 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %21, i32 0, i32 5 - %23 = load i32, i32* %22 - %24 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %25 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %24, i32 0, i32 5 - store i32 %23, i32* %25 + %12 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %11, i32 0, i32 3 + call void @ctor.184(%"Vector[Char]"* %10, %"Vector[Char]"* %12) + %13 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 4 + %14 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr + %15 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %14, i32 0, i32 4 + call void @ctor.189(%TokenType* %13, %TokenType* %15) + %16 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr + %17 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %16, i32 0, i32 5 + %18 = load i32, i32* %17 + %19 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + store i32 %18, i32* %19 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.207(%"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"* %other) #3 { - %this.addr = alloca %"RangeWithLookahead[SparrowScanner]"* - store %"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"** %this.addr +define internal void @ctor.193(%"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"* %other) #3 { %other.addr = alloca %"RangeWithLookahead[SparrowScanner]"* store %"RangeWithLookahead[SparrowScanner]"* %other, %"RangeWithLookahead[SparrowScanner]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %1, i32 0, i32 0 - %3 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %other.addr - %4 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %3, i32 0, i32 0 - call void @ctor.181(%SparrowScanner* %2, %SparrowScanner* %4) - %5 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 0 + %2 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %other.addr + %3 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %2, i32 0, i32 0 + call void @ctor.168(%SparrowScanner* %1, %SparrowScanner* %3) + %4 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 + %5 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %other.addr %6 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %5, i32 0, i32 1 - %7 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %other.addr - %8 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %7, i32 0, i32 1 - call void @ctor.208(%"Vector[Token]"* %6, %"Vector[Token]"* %8) + call void @ctor.194(%"Vector[Token]"* %4, %"Vector[Token]"* %6) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.208(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr - %other.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %other, %"Vector[Token]"** %other.addr +define internal void @ctor.194(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #4 { %size = alloca i64 - %"$tmpC" = alloca %"RawPtr[Token]" - %"$tmpC1" = alloca %"RawPtr[Token]" + %"$tmpForRef" = alloca %"RawPtr[Token]" + %"$tmpForRef1" = alloca %"RawPtr[Token]" %dst = alloca %"RawPtr[Token]" %src = alloca %"RawPtr[Token]" - %"$tmpC2" = alloca %"RawPtr[Token]" - %"$tmpC3" = alloca %"RawPtr[Token]" - br label %code - -code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 - call void @ctor.150(%"RawPtr[Token]"* %2) - %3 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %3, i32 0, i32 1 - call void @ctor.150(%"RawPtr[Token]"* %4) - %5 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %6 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %5, i32 0, i32 2 - call void @ctor.150(%"RawPtr[Token]"* %6) - %7 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %8 = call i64 @size.209(%"Vector[Token]"* %7) - store i64 %8, i64* %size - %9 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %10 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %9, i32 0, i32 0 - %11 = load i64, i64* %size - call void @allocRawPtr.213(%"RawPtr[Token]"* %"$tmpC", i64 %11) - call void @"=.212"(%"RawPtr[Token]"* %10, %"RawPtr[Token]"* %"$tmpC") - %12 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %13 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %12, i32 0, i32 1 - %14 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %15 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %14, i32 0, i32 0 - %16 = load %"RawPtr[Token]", %"RawPtr[Token]"* %15 - %17 = load i64, i64* %size - call void @advance.215(%"RawPtr[Token]"* %"$tmpC1", %"RawPtr[Token]" %16, i64 %17) - call void @"=.212"(%"RawPtr[Token]"* %13, %"RawPtr[Token]"* %"$tmpC1") - %18 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %19 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %18, i32 0, i32 2 - %20 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %21 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %20, i32 0, i32 1 - call void @"=.212"(%"RawPtr[Token]"* %19, %"RawPtr[Token]"* %21) - %22 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %23 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %22, i32 0, i32 0 - call void @ctor.217(%"RawPtr[Token]"* %dst, %"RawPtr[Token]"* %23) - %24 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %25 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %24, i32 0, i32 0 - call void @ctor.217(%"RawPtr[Token]"* %src, %"RawPtr[Token]"* %25) + %"$tmpForRef2" = alloca %"RawPtr[Token]" + %"$tmpForRef3" = alloca %"RawPtr[Token]" + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + call void @ctor.137(%"RawPtr[Token]"* %1) + %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + call void @ctor.137(%"RawPtr[Token]"* %2) + %3 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 2 + call void @ctor.137(%"RawPtr[Token]"* %3) + %4 = call i64 @size.195(%"Vector[Token]"* %other) + store i64 %4, i64* %size + %5 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %6 = load i64, i64* %size + %7 = call %"RawPtr[Token]" @allocRawPtr.199(i64 %6) + store %"RawPtr[Token]" %7, %"RawPtr[Token]"* %"$tmpForRef" + call void @"=.198"(%"RawPtr[Token]"* %5, %"RawPtr[Token]"* %"$tmpForRef") + %8 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %9 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %10 = load i64, i64* %size + %11 = call %"RawPtr[Token]" @advance.201(%"RawPtr[Token]"* %9, i64 %10) + store %"RawPtr[Token]" %11, %"RawPtr[Token]"* %"$tmpForRef1" + call void @"=.198"(%"RawPtr[Token]"* %8, %"RawPtr[Token]"* %"$tmpForRef1") + %12 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 2 + %13 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + call void @"=.198"(%"RawPtr[Token]"* %12, %"RawPtr[Token]"* %13) + %14 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + call void @ctor.204(%"RawPtr[Token]"* %dst, %"RawPtr[Token]"* %14) + %15 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %other, i32 0, i32 0 + call void @ctor.204(%"RawPtr[Token]"* %src, %"RawPtr[Token]"* %15) br label %while_block while_block: ; preds = %while_step, %code - %26 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %27 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %26, i32 0, i32 1 - %28 = call i1 @"==.218"(%"RawPtr[Token]"* %dst, %"RawPtr[Token]"* %27) - %29 = xor i1 true, %28 - br i1 %29, label %while_body, label %while_end + %16 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %17 = call i1 @"==.205"(%"RawPtr[Token]"* %dst, %"RawPtr[Token]"* %16) + %18 = xor i1 true, %17 + br i1 %18, label %while_body, label %while_end while_body: ; preds = %while_block - %30 = load %"RawPtr[Token]", %"RawPtr[Token]"* %dst - %31 = call %Token* @value.219(%"RawPtr[Token]" %30) - %32 = load %"RawPtr[Token]", %"RawPtr[Token]"* %src - %33 = call %Token* @value.219(%"RawPtr[Token]" %32) - call void @ctor.202(%Token* %31, %Token* %33) - %34 = load %"RawPtr[Token]", %"RawPtr[Token]"* %dst - call void @advance.220(%"RawPtr[Token]"* %"$tmpC2", %"RawPtr[Token]" %34) - call void @"=.212"(%"RawPtr[Token]"* %dst, %"RawPtr[Token]"* %"$tmpC2") - %35 = load %"RawPtr[Token]", %"RawPtr[Token]"* %src - call void @advance.220(%"RawPtr[Token]"* %"$tmpC3", %"RawPtr[Token]" %35) - call void @"=.212"(%"RawPtr[Token]"* %src, %"RawPtr[Token]"* %"$tmpC3") + %19 = call %Token* @value.206(%"RawPtr[Token]"* %dst) + %20 = call %Token* @value.206(%"RawPtr[Token]"* %src) + call void @ctor.188(%Token* %19, %Token* %20) + %21 = call %"RawPtr[Token]" @advance.207(%"RawPtr[Token]"* %dst) + store %"RawPtr[Token]" %21, %"RawPtr[Token]"* %"$tmpForRef2" + call void @"=.198"(%"RawPtr[Token]"* %dst, %"RawPtr[Token]"* %"$tmpForRef2") + %22 = call %"RawPtr[Token]" @advance.207(%"RawPtr[Token]"* %src) + store %"RawPtr[Token]" %22, %"RawPtr[Token]"* %"$tmpForRef3" + call void @"=.198"(%"RawPtr[Token]"* %src, %"RawPtr[Token]"* %"$tmpForRef3") br label %while_step while_step: ; preds = %while_body @@ -6675,66 +6000,63 @@ while_end: ; preds = %while_block } ; Function Attrs: inlinehint nounwind -define internal i64 @size.209(%"Vector[Token]"* %this) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal i64 @size.195(%"Vector[Token]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 1 + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 %3 = load %"RawPtr[Token]", %"RawPtr[Token]"* %2 - %4 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %5 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %4, i32 0, i32 0 - %6 = load %"RawPtr[Token]", %"RawPtr[Token]"* %5 - %7 = call i64 @diff.210(%"RawPtr[Token]" %3, %"RawPtr[Token]" %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = call i64 @diff.196(%"RawPtr[Token]"* %1, %"RawPtr[Token]" %3) + store i64 %4, i64* %tmp.this + %5 = load i64, i64* %tmp.this + ret i64 %5 } ; Function Attrs: inlinehint nounwind -define internal i64 @diff.210(%"RawPtr[Token]" %this, %"RawPtr[Token]" %other) #4 { - %this.addr = alloca %"RawPtr[Token]" - store %"RawPtr[Token]" %this, %"RawPtr[Token]"* %this.addr +define internal i64 @diff.196(%"RawPtr[Token]"* %this, %"RawPtr[Token]" %other) #4 { %other.addr = alloca %"RawPtr[Token]" store %"RawPtr[Token]" %other, %"RawPtr[Token]"* %other.addr - %tmp.this = alloca i64 - %tmp.this1 = alloca i64 + %tmp.this = alloca %UntypedPtr + %tmp.this1 = alloca %UntypedPtr + %tmp.this2 = alloca i64 br label %code code: ; preds = %0 - %1 = load %"RawPtr[Token]", %"RawPtr[Token]"* %this.addr - %2 = call i8* @bytePtr.211(%"RawPtr[Token]" %1) - %3 = load %"RawPtr[Token]", %"RawPtr[Token]"* %other.addr - %4 = call i8* @bytePtr.211(%"RawPtr[Token]" %3) - %5 = call i64 @ptrDiff(i8* %2, i8* %4) - store i64 72, i64* %tmp.this1 - %6 = load i64, i64* %tmp.this1 - %7 = sdiv i64 %5, %6 - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + %2 = load %Token*, %Token** %1 + call void @ctor.197(%UntypedPtr* %tmp.this, %Token* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this + %4 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %other.addr, i32 0, i32 0 + %5 = load %Token*, %Token** %4 + call void @ctor.197(%UntypedPtr* %tmp.this1, %Token* %5) + %6 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + %7 = call i64 bitcast (i64 (i8*, i8*)* @ptrDiff to i64 (%UntypedPtr, %UntypedPtr)*)(%UntypedPtr %3, %UntypedPtr %6) + store i64 72, i64* %tmp.this2 + %8 = load i64, i64* %tmp.this2 + %9 = sdiv i64 %7, %8 + ret i64 %9 } ; Function Attrs: inlinehint nounwind -define internal i8* @bytePtr.211(%"RawPtr[Token]" %this) #4 { - %this.addr = alloca %"RawPtr[Token]" - store %"RawPtr[Token]" %this, %"RawPtr[Token]"* %this.addr +define internal void @ctor.197(%UntypedPtr* %this, %Token* %val) #4 { + %val.addr = alloca %Token* + store %Token* %val, %Token** %val.addr br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this.addr, i32 0, i32 0 - %2 = load %Token*, %Token** %1 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = load %Token*, %Token** %val.addr %3 = bitcast %Token* %2 to i8* - ret i8* %3 + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* %3, i8** %4 + ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.212"(%"RawPtr[Token]"* %this, %"RawPtr[Token]"* %other) #3 { - %this.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %this, %"RawPtr[Token]"** %this.addr +define internal void @"=.198"(%"RawPtr[Token]"* %this, %"RawPtr[Token]"* %other) #3 { %other.addr = alloca %"RawPtr[Token]"* store %"RawPtr[Token]"* %other, %"RawPtr[Token]"** %other.addr br label %code @@ -6743,32 +6065,34 @@ code: ; preds = %0 %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %other.addr %2 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %1, i32 0, i32 0 %3 = load %Token*, %Token** %2 - %4 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %this.addr - %5 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %4, i32 0, i32 0 - store %Token* %3, %Token** %5 + %4 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + store %Token* %3, %Token** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal void @allocRawPtr.213(%"RawPtr[Token]"* sret %_result, i64 %num) #4 { - %_result.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %_result, %"RawPtr[Token]"** %_result.addr +define internal %"RawPtr[Token]" @allocRawPtr.199(i64 %num) #4 { %num.addr = alloca i64 store i64 %num, i64* %num.addr + %tmp.this = alloca %"RawPtr[Token]" + %"$tmpForRef" = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %_result.addr - %2 = load i64, i64* %num.addr - %3 = mul i64 %2, 72 - %4 = call i8* @malloc(i64 %3) - %5 = bitcast i8* %4 to %Token* - call void @ctor.214(%"RawPtr[Token]"* %1, %Token* %5) - ret void + %1 = load i64, i64* %num.addr + %2 = mul i64 %1, 72 + %3 = call %UntypedPtr @malloc(i64 %2) + store %UntypedPtr %3, %UntypedPtr* %"$tmpForRef" + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %"$tmpForRef", i32 0, i32 0 + %5 = load i8*, i8** %4 + %6 = bitcast i8* %5 to %Token* + call void @ctor.200(%"RawPtr[Token]"* %tmp.this, %Token* %6) + %7 = load %"RawPtr[Token]", %"RawPtr[Token]"* %tmp.this + ret %"RawPtr[Token]" %7 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.214(%"RawPtr[Token]"* %this, %Token* %f_ptr) #3 { +define internal void @ctor.200(%"RawPtr[Token]"* %this, %Token* %f_ptr) #3 { %this.addr = alloca %"RawPtr[Token]"* store %"RawPtr[Token]"* %this, %"RawPtr[Token]"** %this.addr %f_ptr.addr = alloca %Token* @@ -6784,50 +6108,57 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @advance.215(%"RawPtr[Token]"* sret %_result, %"RawPtr[Token]" %this, i64 %n) #4 { - %_result.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %_result, %"RawPtr[Token]"** %_result.addr - %this.addr = alloca %"RawPtr[Token]" - store %"RawPtr[Token]" %this, %"RawPtr[Token]"* %this.addr +define internal %"RawPtr[Token]" @advance.201(%"RawPtr[Token]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr + %tmp.this = alloca %"RawPtr[Token]" + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %_result.addr - %2 = load %"RawPtr[Token]", %"RawPtr[Token]"* %this.addr - %3 = call i8* @bytePtr.211(%"RawPtr[Token]" %2) + %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + %2 = load %Token*, %Token** %1 + call void @ctor.197(%UntypedPtr* %tmp.this1, %Token* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 %4 = load i64, i64* %n.addr %5 = mul i64 %4, 72 - %6 = call i8* @ptrAdd(i8* %3, i64 %5) - call void @ctor.216(%"RawPtr[Token]"* %1, i8* %6) - ret void + %6 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %5) + call void @ctor.202(%"RawPtr[Token]"* %tmp.this, %UntypedPtr %6) + %7 = load %"RawPtr[Token]", %"RawPtr[Token]"* %tmp.this + ret %"RawPtr[Token]" %7 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.216(%"RawPtr[Token]"* %this, i8* %byteRef) #4 { - %this.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %this, %"RawPtr[Token]"** %this.addr - %byteRef.addr = alloca i8* - store i8* %byteRef, i8** %byteRef.addr +define internal void @ctor.202(%"RawPtr[Token]"* %this, %UntypedPtr %p) #4 { + %p.addr = alloca %UntypedPtr + store %UntypedPtr %p, %UntypedPtr* %p.addr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %this.addr - %2 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %1, i32 0, i32 0 - store %Token* null, %Token** %2 - %3 = load i8*, i8** %byteRef.addr - %4 = bitcast i8* %3 to %Token* - %5 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %this.addr - %6 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %5, i32 0, i32 0 - store %Token* %4, %Token** %6 + %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + store %Token* null, %Token** %1 + %2 = load %UntypedPtr, %UntypedPtr* %p.addr + %3 = call %Token* @asRefOf.203(%UntypedPtr %2) + %4 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + store %Token* %3, %Token** %4 ret void } +; Function Attrs: inlinehint nounwind +define internal %Token* @asRefOf.203(%UntypedPtr %this) #4 { + %this.addr = alloca %UntypedPtr + store %UntypedPtr %this, %UntypedPtr* %this.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this.addr, i32 0, i32 0 + %2 = load i8*, i8** %1 + %3 = bitcast i8* %2 to %Token* + ret %Token* %3 +} + ; Function Attrs: alwaysinline nounwind -define internal void @ctor.217(%"RawPtr[Token]"* %this, %"RawPtr[Token]"* %other) #3 { - %this.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %this, %"RawPtr[Token]"** %this.addr +define internal void @ctor.204(%"RawPtr[Token]"* %this, %"RawPtr[Token]"* %other) #3 { %other.addr = alloca %"RawPtr[Token]"* store %"RawPtr[Token]"* %other, %"RawPtr[Token]"** %other.addr br label %code @@ -6836,14 +6167,13 @@ code: ; preds = %0 %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %other.addr %2 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %1, i32 0, i32 0 %3 = load %Token*, %Token** %2 - %4 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %this.addr - %5 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %4, i32 0, i32 0 - store %Token* %3, %Token** %5 + %4 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + store %Token* %3, %Token** %4 ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.218"(%"RawPtr[Token]"* %this, %"RawPtr[Token]"* %other) #3 { +define internal i1 @"==.205"(%"RawPtr[Token]"* %this, %"RawPtr[Token]"* %other) #3 { %this.addr = alloca %"RawPtr[Token]"* store %"RawPtr[Token]"* %this, %"RawPtr[Token]"** %this.addr %other.addr = alloca %"RawPtr[Token]"* @@ -6864,155 +6194,134 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal %Token* @value.219(%"RawPtr[Token]" %this) #4 { - %this.addr = alloca %"RawPtr[Token]" - store %"RawPtr[Token]" %this, %"RawPtr[Token]"* %this.addr +define internal %Token* @value.206(%"RawPtr[Token]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 %2 = load %Token*, %Token** %1 ret %Token* %2 } ; Function Attrs: inlinehint nounwind -define internal void @advance.220(%"RawPtr[Token]"* sret %_result, %"RawPtr[Token]" %this) #4 { - %_result.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %_result, %"RawPtr[Token]"** %_result.addr - %this.addr = alloca %"RawPtr[Token]" - store %"RawPtr[Token]" %this, %"RawPtr[Token]"* %this.addr +define internal %"RawPtr[Token]" @advance.207(%"RawPtr[Token]"* %this) #4 { + %tmp.this = alloca %"RawPtr[Token]" + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %_result.addr - %2 = load %"RawPtr[Token]", %"RawPtr[Token]"* %this.addr - %3 = call i8* @bytePtr.211(%"RawPtr[Token]" %2) - %4 = call i8* @ptrAdd(i8* %3, i64 72) - call void @ctor.216(%"RawPtr[Token]"* %1, i8* %4) - ret void + %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + %2 = load %Token*, %Token** %1 + call void @ctor.197(%UntypedPtr* %tmp.this1, %Token* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + %4 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 72) + call void @ctor.202(%"RawPtr[Token]"* %tmp.this, %UntypedPtr %4) + %5 = load %"RawPtr[Token]", %"RawPtr[Token]"* %tmp.this + ret %"RawPtr[Token]" %5 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.221(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr - %other.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %other, %"Vector[UInt]"** %other.addr +define internal void @ctor.208(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #4 { %size = alloca i64 - %"$tmpC" = alloca %"RawPtr[UInt]" - %"$tmpC1" = alloca %"RawPtr[UInt]" + %"$tmpForRef" = alloca %"RawPtr[UInt]" + %"$tmpForRef1" = alloca %"RawPtr[UInt]" %dst = alloca %"RawPtr[UInt]" %src = alloca %"RawPtr[UInt]" br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 0 - call void @ctor.152(%"RawPtr[UInt]"* %2) - %3 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %3, i32 0, i32 1 - call void @ctor.152(%"RawPtr[UInt]"* %4) - %5 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %6 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %5, i32 0, i32 2 - call void @ctor.152(%"RawPtr[UInt]"* %6) - %7 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %8 = call i64 @size.222(%"Vector[UInt]"* %7) - store i64 %8, i64* %size - %9 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %10 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %9, i32 0, i32 0 - %11 = load i64, i64* %size - call void @allocRawPtr.226(%"RawPtr[UInt]"* %"$tmpC", i64 %11) - call void @"=.225"(%"RawPtr[UInt]"* %10, %"RawPtr[UInt]"* %"$tmpC") - %12 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %13 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %12, i32 0, i32 1 - %14 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %15 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %14, i32 0, i32 0 - %16 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %15 - %17 = load i64, i64* %size - call void @advance.228(%"RawPtr[UInt]"* %"$tmpC1", %"RawPtr[UInt]" %16, i64 %17) - call void @"=.225"(%"RawPtr[UInt]"* %13, %"RawPtr[UInt]"* %"$tmpC1") - %18 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %19 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %18, i32 0, i32 2 - %20 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %21 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %20, i32 0, i32 1 - call void @"=.225"(%"RawPtr[UInt]"* %19, %"RawPtr[UInt]"* %21) - %22 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %23 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %22, i32 0, i32 0 - call void @ctor.230(%"RawPtr[UInt]"* %dst, %"RawPtr[UInt]"* %23) - %24 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %25 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %24, i32 0, i32 0 - call void @ctor.230(%"RawPtr[UInt]"* %src, %"RawPtr[UInt]"* %25) - %26 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %dst - %27 = call i8* @bytePtr.224(%"RawPtr[UInt]" %26) - %28 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %src - %29 = call i8* @bytePtr.224(%"RawPtr[UInt]" %28) - %30 = load i64, i64* %size - %31 = mul i64 %30, 4 - call void @_spr_memcpy(i8* %27, i8* %29, i64 %31) - ret void -} - -; Function Attrs: inlinehint nounwind -define internal i64 @size.222(%"Vector[UInt]"* %this) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + call void @ctor.139(%"RawPtr[UInt]"* %1) + %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + call void @ctor.139(%"RawPtr[UInt]"* %2) + %3 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 2 + call void @ctor.139(%"RawPtr[UInt]"* %3) + %4 = call i64 @size.209(%"Vector[UInt]"* %other) + store i64 %4, i64* %size + %5 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + %6 = load i64, i64* %size + %7 = call %"RawPtr[UInt]" @allocRawPtr.213(i64 %6) + store %"RawPtr[UInt]" %7, %"RawPtr[UInt]"* %"$tmpForRef" + call void @"=.212"(%"RawPtr[UInt]"* %5, %"RawPtr[UInt]"* %"$tmpForRef") + %8 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %9 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + %10 = load i64, i64* %size + %11 = call %"RawPtr[UInt]" @advance.215(%"RawPtr[UInt]"* %9, i64 %10) + store %"RawPtr[UInt]" %11, %"RawPtr[UInt]"* %"$tmpForRef1" + call void @"=.212"(%"RawPtr[UInt]"* %8, %"RawPtr[UInt]"* %"$tmpForRef1") + %12 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 2 + %13 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + call void @"=.212"(%"RawPtr[UInt]"* %12, %"RawPtr[UInt]"* %13) + %14 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + call void @ctor.218(%"RawPtr[UInt]"* %dst, %"RawPtr[UInt]"* %14) + %15 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %other, i32 0, i32 0 + call void @ctor.218(%"RawPtr[UInt]"* %src, %"RawPtr[UInt]"* %15) + %16 = call %UntypedPtr @untypedPtr.219(%"RawPtr[UInt]"* %dst) + %17 = call %UntypedPtr @untypedPtr.219(%"RawPtr[UInt]"* %src) + %18 = load i64, i64* %size + %19 = mul i64 %18, 4 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %16, %UntypedPtr %17, i64 %19) + ret void +} + +; Function Attrs: inlinehint nounwind +define internal i64 @size.209(%"Vector[UInt]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 1 + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 %3 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %2 - %4 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %5 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %4, i32 0, i32 0 - %6 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %5 - %7 = call i64 @diff.223(%"RawPtr[UInt]" %3, %"RawPtr[UInt]" %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = call i64 @diff.210(%"RawPtr[UInt]"* %1, %"RawPtr[UInt]" %3) + store i64 %4, i64* %tmp.this + %5 = load i64, i64* %tmp.this + ret i64 %5 } ; Function Attrs: inlinehint nounwind -define internal i64 @diff.223(%"RawPtr[UInt]" %this, %"RawPtr[UInt]" %other) #4 { - %this.addr = alloca %"RawPtr[UInt]" - store %"RawPtr[UInt]" %this, %"RawPtr[UInt]"* %this.addr +define internal i64 @diff.210(%"RawPtr[UInt]"* %this, %"RawPtr[UInt]" %other) #4 { %other.addr = alloca %"RawPtr[UInt]" store %"RawPtr[UInt]" %other, %"RawPtr[UInt]"* %other.addr - %tmp.this = alloca i64 - %tmp.this1 = alloca i64 + %tmp.this = alloca %UntypedPtr + %tmp.this1 = alloca %UntypedPtr + %tmp.this2 = alloca i64 br label %code code: ; preds = %0 - %1 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %this.addr - %2 = call i8* @bytePtr.224(%"RawPtr[UInt]" %1) - %3 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %other.addr - %4 = call i8* @bytePtr.224(%"RawPtr[UInt]" %3) - %5 = call i64 @ptrDiff(i8* %2, i8* %4) - store i64 4, i64* %tmp.this1 - %6 = load i64, i64* %tmp.this1 - %7 = sdiv i64 %5, %6 - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + %2 = load i32*, i32** %1 + call void @ctor.211(%UntypedPtr* %tmp.this, i32* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this + %4 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %other.addr, i32 0, i32 0 + %5 = load i32*, i32** %4 + call void @ctor.211(%UntypedPtr* %tmp.this1, i32* %5) + %6 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + %7 = call i64 bitcast (i64 (i8*, i8*)* @ptrDiff to i64 (%UntypedPtr, %UntypedPtr)*)(%UntypedPtr %3, %UntypedPtr %6) + store i64 4, i64* %tmp.this2 + %8 = load i64, i64* %tmp.this2 + %9 = sdiv i64 %7, %8 + ret i64 %9 } ; Function Attrs: inlinehint nounwind -define internal i8* @bytePtr.224(%"RawPtr[UInt]" %this) #4 { - %this.addr = alloca %"RawPtr[UInt]" - store %"RawPtr[UInt]" %this, %"RawPtr[UInt]"* %this.addr +define internal void @ctor.211(%UntypedPtr* %this, i32* %val) #4 { + %val.addr = alloca i32* + store i32* %val, i32** %val.addr br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this.addr, i32 0, i32 0 - %2 = load i32*, i32** %1 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = load i32*, i32** %val.addr %3 = bitcast i32* %2 to i8* - ret i8* %3 + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* %3, i8** %4 + ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.225"(%"RawPtr[UInt]"* %this, %"RawPtr[UInt]"* %other) #3 { - %this.addr = alloca %"RawPtr[UInt]"* - store %"RawPtr[UInt]"* %this, %"RawPtr[UInt]"** %this.addr +define internal void @"=.212"(%"RawPtr[UInt]"* %this, %"RawPtr[UInt]"* %other) #3 { %other.addr = alloca %"RawPtr[UInt]"* store %"RawPtr[UInt]"* %other, %"RawPtr[UInt]"** %other.addr br label %code @@ -7021,32 +6330,34 @@ code: ; preds = %0 %1 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %other.addr %2 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %1, i32 0, i32 0 %3 = load i32*, i32** %2 - %4 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %this.addr - %5 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %4, i32 0, i32 0 - store i32* %3, i32** %5 + %4 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + store i32* %3, i32** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal void @allocRawPtr.226(%"RawPtr[UInt]"* sret %_result, i64 %num) #4 { - %_result.addr = alloca %"RawPtr[UInt]"* - store %"RawPtr[UInt]"* %_result, %"RawPtr[UInt]"** %_result.addr +define internal %"RawPtr[UInt]" @allocRawPtr.213(i64 %num) #4 { %num.addr = alloca i64 store i64 %num, i64* %num.addr + %tmp.this = alloca %"RawPtr[UInt]" + %"$tmpForRef" = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %_result.addr - %2 = load i64, i64* %num.addr - %3 = mul i64 %2, 4 - %4 = call i8* @malloc(i64 %3) - %5 = bitcast i8* %4 to i32* - call void @ctor.227(%"RawPtr[UInt]"* %1, i32* %5) - ret void + %1 = load i64, i64* %num.addr + %2 = mul i64 %1, 4 + %3 = call %UntypedPtr @malloc(i64 %2) + store %UntypedPtr %3, %UntypedPtr* %"$tmpForRef" + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %"$tmpForRef", i32 0, i32 0 + %5 = load i8*, i8** %4 + %6 = bitcast i8* %5 to i32* + call void @ctor.214(%"RawPtr[UInt]"* %tmp.this, i32* %6) + %7 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %tmp.this + ret %"RawPtr[UInt]" %7 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.227(%"RawPtr[UInt]"* %this, i32* %f_ptr) #3 { +define internal void @ctor.214(%"RawPtr[UInt]"* %this, i32* %f_ptr) #3 { %this.addr = alloca %"RawPtr[UInt]"* store %"RawPtr[UInt]"* %this, %"RawPtr[UInt]"** %this.addr %f_ptr.addr = alloca i32* @@ -7062,50 +6373,57 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @advance.228(%"RawPtr[UInt]"* sret %_result, %"RawPtr[UInt]" %this, i64 %n) #4 { - %_result.addr = alloca %"RawPtr[UInt]"* - store %"RawPtr[UInt]"* %_result, %"RawPtr[UInt]"** %_result.addr - %this.addr = alloca %"RawPtr[UInt]" - store %"RawPtr[UInt]" %this, %"RawPtr[UInt]"* %this.addr +define internal %"RawPtr[UInt]" @advance.215(%"RawPtr[UInt]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr + %tmp.this = alloca %"RawPtr[UInt]" + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %_result.addr - %2 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %this.addr - %3 = call i8* @bytePtr.224(%"RawPtr[UInt]" %2) + %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + %2 = load i32*, i32** %1 + call void @ctor.211(%UntypedPtr* %tmp.this1, i32* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 %4 = load i64, i64* %n.addr %5 = mul i64 %4, 4 - %6 = call i8* @ptrAdd(i8* %3, i64 %5) - call void @ctor.229(%"RawPtr[UInt]"* %1, i8* %6) - ret void + %6 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %5) + call void @ctor.216(%"RawPtr[UInt]"* %tmp.this, %UntypedPtr %6) + %7 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %tmp.this + ret %"RawPtr[UInt]" %7 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.229(%"RawPtr[UInt]"* %this, i8* %byteRef) #4 { - %this.addr = alloca %"RawPtr[UInt]"* - store %"RawPtr[UInt]"* %this, %"RawPtr[UInt]"** %this.addr - %byteRef.addr = alloca i8* - store i8* %byteRef, i8** %byteRef.addr +define internal void @ctor.216(%"RawPtr[UInt]"* %this, %UntypedPtr %p) #4 { + %p.addr = alloca %UntypedPtr + store %UntypedPtr %p, %UntypedPtr* %p.addr br label %code code: ; preds = %0 - %1 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %this.addr - %2 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %1, i32 0, i32 0 - store i32* null, i32** %2 - %3 = load i8*, i8** %byteRef.addr - %4 = bitcast i8* %3 to i32* - %5 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %this.addr - %6 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %5, i32 0, i32 0 - store i32* %4, i32** %6 + %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + store i32* null, i32** %1 + %2 = load %UntypedPtr, %UntypedPtr* %p.addr + %3 = call i32* @asRefOf.217(%UntypedPtr %2) + %4 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + store i32* %3, i32** %4 ret void } +; Function Attrs: inlinehint nounwind +define internal i32* @asRefOf.217(%UntypedPtr %this) #4 { + %this.addr = alloca %UntypedPtr + store %UntypedPtr %this, %UntypedPtr* %this.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this.addr, i32 0, i32 0 + %2 = load i8*, i8** %1 + %3 = bitcast i8* %2 to i32* + ret i32* %3 +} + ; Function Attrs: alwaysinline nounwind -define internal void @ctor.230(%"RawPtr[UInt]"* %this, %"RawPtr[UInt]"* %other) #3 { - %this.addr = alloca %"RawPtr[UInt]"* - store %"RawPtr[UInt]"* %this, %"RawPtr[UInt]"** %this.addr +define internal void @ctor.218(%"RawPtr[UInt]"* %this, %"RawPtr[UInt]"* %other) #3 { %other.addr = alloca %"RawPtr[UInt]"* store %"RawPtr[UInt]"* %other, %"RawPtr[UInt]"** %other.addr br label %code @@ -7114,796 +6432,672 @@ code: ; preds = %0 %1 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %other.addr %2 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %1, i32 0, i32 0 %3 = load i32*, i32** %2 - %4 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %this.addr - %5 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %4, i32 0, i32 0 - store i32* %3, i32** %5 + %4 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + store i32* %3, i32** %4 ret void } +; Function Attrs: inlinehint nounwind +define internal %UntypedPtr @untypedPtr.219(%"RawPtr[UInt]"* %this) #4 { + %tmp.this = alloca %UntypedPtr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + %2 = load i32*, i32** %1 + call void @ctor.211(%UntypedPtr* %tmp.this, i32* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this + ret %UntypedPtr %3 +} + ; Function Attrs: alwaysinline nounwind -define internal void @ctor.231(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal void @ctor.220(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { %other.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %other, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 - %3 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 0 - call void @ctor.232(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %4) - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 0, i32 0 + call void @ctor.221(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %3) + %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 + call void @ctor.188(%Token* %4, %Token* %6) %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 1 - call void @ctor.202(%Token* %6, %Token* %8) - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, i32 0, i32 2 - %11 = load i1, i1* %10 - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, i32 0, i32 2 - store i1 %11, i1* %13 - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %15 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, i32 0, i32 3 - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %17 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, i32 0, i32 3 - call void @ctor.233(%AstBuilder* %15, %AstBuilder* %17) - %18 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %19 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %18, i32 0, i32 4 - %20 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %21 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %20, i32 0, i32 4 - call void @ctor.204(%ErrorReporter* %19, %ErrorReporter* %21) + %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 2 + %9 = load i1, i1* %8 + %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 2 + store i1 %9, i1* %10 + %11 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr + %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, i32 0, i32 3 + call void @ctor.222(%AstBuilder* %11, %AstBuilder* %13) + %14 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 4 + %15 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr + %16 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %15, i32 0, i32 4 + call void @ctor.190(%ErrorReporter* %14, %ErrorReporter* %16) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.232(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { - %this.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* - store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal void @ctor.221(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { %other.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %other, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 - %3 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %4 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 0 - call void @ctor.206(%"SparrowLayoutDecoder[SparrowScanner]"* %2, %"SparrowLayoutDecoder[SparrowScanner]"* %4) - %5 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + %2 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr + %3 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 0, i32 0 + call void @ctor.192(%"SparrowLayoutDecoder[SparrowScanner]"* %1, %"SparrowLayoutDecoder[SparrowScanner]"* %3) + %4 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %5 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr %6 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %8 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 1 - call void @ctor.208(%"Vector[Token]"* %6, %"Vector[Token]"* %8) + call void @ctor.194(%"Vector[Token]"* %4, %"Vector[Token]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.233(%AstBuilder* %this, %AstBuilder* %other) #3 { - %this.addr = alloca %AstBuilder* - store %AstBuilder* %this, %AstBuilder** %this.addr +define internal void @ctor.222(%AstBuilder* %this, %AstBuilder* %other) #3 { %other.addr = alloca %AstBuilder* store %AstBuilder* %other, %AstBuilder** %other.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %this.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 0 - %3 = load %AstBuilder*, %AstBuilder** %other.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - call void @ctor.187(%UntypedPtr* %2, %UntypedPtr* %4) - %5 = load %AstBuilder*, %AstBuilder** %this.addr - %6 = getelementptr inbounds %AstBuilder, %AstBuilder* %5, i32 0, i32 1 - %7 = load %AstBuilder*, %AstBuilder** %other.addr - %8 = getelementptr inbounds %AstBuilder, %AstBuilder* %7, i32 0, i32 1 - call void @ctor.234(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %6, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %8) - %9 = load %AstBuilder*, %AstBuilder** %this.addr + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 0 + %2 = load %AstBuilder*, %AstBuilder** %other.addr + %3 = getelementptr inbounds %AstBuilder, %AstBuilder* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) + %5 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 1 + %6 = load %AstBuilder*, %AstBuilder** %other.addr + %7 = getelementptr inbounds %AstBuilder, %AstBuilder* %6, i32 0, i32 1 + call void @ctor.223(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %5, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %7) + %8 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 2 + %9 = load %AstBuilder*, %AstBuilder** %other.addr %10 = getelementptr inbounds %AstBuilder, %AstBuilder* %9, i32 0, i32 2 - %11 = load %AstBuilder*, %AstBuilder** %other.addr - %12 = getelementptr inbounds %AstBuilder, %AstBuilder* %11, i32 0, i32 2 - call void @ctor.235(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %10, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %12) - %13 = load %AstBuilder*, %AstBuilder** %this.addr - %14 = getelementptr inbounds %AstBuilder, %AstBuilder* %13, i32 0, i32 3 + call void @ctor.224(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %8, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %10) + %11 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 3 + %12 = load %AstBuilder*, %AstBuilder** %other.addr + %13 = getelementptr inbounds %AstBuilder, %AstBuilder* %12, i32 0, i32 3 + call void @ctor.224(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %11, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %13) + %14 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 4 %15 = load %AstBuilder*, %AstBuilder** %other.addr - %16 = getelementptr inbounds %AstBuilder, %AstBuilder* %15, i32 0, i32 3 - call void @ctor.235(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %14, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %16) - %17 = load %AstBuilder*, %AstBuilder** %this.addr - %18 = getelementptr inbounds %AstBuilder, %AstBuilder* %17, i32 0, i32 4 - %19 = load %AstBuilder*, %AstBuilder** %other.addr - %20 = getelementptr inbounds %AstBuilder, %AstBuilder* %19, i32 0, i32 4 - call void @ctor.236(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %18, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %20) - %21 = load %AstBuilder*, %AstBuilder** %this.addr - %22 = getelementptr inbounds %AstBuilder, %AstBuilder* %21, i32 0, i32 5 - %23 = load %AstBuilder*, %AstBuilder** %other.addr - %24 = getelementptr inbounds %AstBuilder, %AstBuilder* %23, i32 0, i32 5 - call void @ctor.237(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %22, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %24) - %25 = load %AstBuilder*, %AstBuilder** %this.addr - %26 = getelementptr inbounds %AstBuilder, %AstBuilder* %25, i32 0, i32 6 + %16 = getelementptr inbounds %AstBuilder, %AstBuilder* %15, i32 0, i32 4 + call void @ctor.225(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %14, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %16) + %17 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 5 + %18 = load %AstBuilder*, %AstBuilder** %other.addr + %19 = getelementptr inbounds %AstBuilder, %AstBuilder* %18, i32 0, i32 5 + call void @ctor.226(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %17, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %19) + %20 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 6 + %21 = load %AstBuilder*, %AstBuilder** %other.addr + %22 = getelementptr inbounds %AstBuilder, %AstBuilder* %21, i32 0, i32 6 + call void @ctor.227(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %20, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %22) + %23 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 7 + %24 = load %AstBuilder*, %AstBuilder** %other.addr + %25 = getelementptr inbounds %AstBuilder, %AstBuilder* %24, i32 0, i32 7 + call void @ctor.228(%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %23, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %25) + %26 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 8 %27 = load %AstBuilder*, %AstBuilder** %other.addr - %28 = getelementptr inbounds %AstBuilder, %AstBuilder* %27, i32 0, i32 6 - call void @ctor.238(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %26, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %28) - %29 = load %AstBuilder*, %AstBuilder** %this.addr - %30 = getelementptr inbounds %AstBuilder, %AstBuilder* %29, i32 0, i32 7 - %31 = load %AstBuilder*, %AstBuilder** %other.addr - %32 = getelementptr inbounds %AstBuilder, %AstBuilder* %31, i32 0, i32 7 - call void @ctor.239(%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %30, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %32) - %33 = load %AstBuilder*, %AstBuilder** %this.addr - %34 = getelementptr inbounds %AstBuilder, %AstBuilder* %33, i32 0, i32 8 - %35 = load %AstBuilder*, %AstBuilder** %other.addr - %36 = getelementptr inbounds %AstBuilder, %AstBuilder* %35, i32 0, i32 8 - call void @ctor.236(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %34, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %36) - %37 = load %AstBuilder*, %AstBuilder** %this.addr - %38 = getelementptr inbounds %AstBuilder, %AstBuilder* %37, i32 0, i32 9 + %28 = getelementptr inbounds %AstBuilder, %AstBuilder* %27, i32 0, i32 8 + call void @ctor.225(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %26, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %28) + %29 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 9 + %30 = load %AstBuilder*, %AstBuilder** %other.addr + %31 = getelementptr inbounds %AstBuilder, %AstBuilder* %30, i32 0, i32 9 + call void @ctor.229(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %29, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %31) + %32 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 10 + %33 = load %AstBuilder*, %AstBuilder** %other.addr + %34 = getelementptr inbounds %AstBuilder, %AstBuilder* %33, i32 0, i32 10 + call void @ctor.225(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %32, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %34) + %35 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 11 + %36 = load %AstBuilder*, %AstBuilder** %other.addr + %37 = getelementptr inbounds %AstBuilder, %AstBuilder* %36, i32 0, i32 11 + call void @ctor.225(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %35, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %37) + %38 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 12 %39 = load %AstBuilder*, %AstBuilder** %other.addr - %40 = getelementptr inbounds %AstBuilder, %AstBuilder* %39, i32 0, i32 9 - call void @ctor.240(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %38, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %40) - %41 = load %AstBuilder*, %AstBuilder** %this.addr - %42 = getelementptr inbounds %AstBuilder, %AstBuilder* %41, i32 0, i32 10 - %43 = load %AstBuilder*, %AstBuilder** %other.addr - %44 = getelementptr inbounds %AstBuilder, %AstBuilder* %43, i32 0, i32 10 - call void @ctor.236(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %42, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %44) - %45 = load %AstBuilder*, %AstBuilder** %this.addr - %46 = getelementptr inbounds %AstBuilder, %AstBuilder* %45, i32 0, i32 11 - %47 = load %AstBuilder*, %AstBuilder** %other.addr - %48 = getelementptr inbounds %AstBuilder, %AstBuilder* %47, i32 0, i32 11 - call void @ctor.236(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %46, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %48) - %49 = load %AstBuilder*, %AstBuilder** %this.addr - %50 = getelementptr inbounds %AstBuilder, %AstBuilder* %49, i32 0, i32 12 + %40 = getelementptr inbounds %AstBuilder, %AstBuilder* %39, i32 0, i32 12 + call void @ctor.225(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %38, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %40) + %41 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 13 + %42 = load %AstBuilder*, %AstBuilder** %other.addr + %43 = getelementptr inbounds %AstBuilder, %AstBuilder* %42, i32 0, i32 13 + call void @ctor.230(%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %41, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %43) + %44 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 14 + %45 = load %AstBuilder*, %AstBuilder** %other.addr + %46 = getelementptr inbounds %AstBuilder, %AstBuilder* %45, i32 0, i32 14 + call void @ctor.231(%"FunctionPtr2[Node, UntypedPtr, Node]"* %44, %"FunctionPtr2[Node, UntypedPtr, Node]"* %46) + %47 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 15 + %48 = load %AstBuilder*, %AstBuilder** %other.addr + %49 = getelementptr inbounds %AstBuilder, %AstBuilder* %48, i32 0, i32 15 + call void @ctor.232(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %47, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %49) + %50 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 16 %51 = load %AstBuilder*, %AstBuilder** %other.addr - %52 = getelementptr inbounds %AstBuilder, %AstBuilder* %51, i32 0, i32 12 - call void @ctor.241(%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %50, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %52) - %53 = load %AstBuilder*, %AstBuilder** %this.addr - %54 = getelementptr inbounds %AstBuilder, %AstBuilder* %53, i32 0, i32 13 - %55 = load %AstBuilder*, %AstBuilder** %other.addr - %56 = getelementptr inbounds %AstBuilder, %AstBuilder* %55, i32 0, i32 13 - call void @ctor.242(%"FunctionPtr2[Node, UntypedPtr, Node]"* %54, %"FunctionPtr2[Node, UntypedPtr, Node]"* %56) - %57 = load %AstBuilder*, %AstBuilder** %this.addr - %58 = getelementptr inbounds %AstBuilder, %AstBuilder* %57, i32 0, i32 14 - %59 = load %AstBuilder*, %AstBuilder** %other.addr - %60 = getelementptr inbounds %AstBuilder, %AstBuilder* %59, i32 0, i32 14 - call void @ctor.243(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %58, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %60) - %61 = load %AstBuilder*, %AstBuilder** %this.addr - %62 = getelementptr inbounds %AstBuilder, %AstBuilder* %61, i32 0, i32 15 + %52 = getelementptr inbounds %AstBuilder, %AstBuilder* %51, i32 0, i32 16 + call void @ctor.233(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %50, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %52) + %53 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 17 + %54 = load %AstBuilder*, %AstBuilder** %other.addr + %55 = getelementptr inbounds %AstBuilder, %AstBuilder* %54, i32 0, i32 17 + call void @ctor.226(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %53, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %55) + %56 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 18 + %57 = load %AstBuilder*, %AstBuilder** %other.addr + %58 = getelementptr inbounds %AstBuilder, %AstBuilder* %57, i32 0, i32 18 + call void @ctor.234(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %56, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %58) + %59 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 19 + %60 = load %AstBuilder*, %AstBuilder** %other.addr + %61 = getelementptr inbounds %AstBuilder, %AstBuilder* %60, i32 0, i32 19 + call void @ctor.232(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %59, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %61) + %62 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 20 %63 = load %AstBuilder*, %AstBuilder** %other.addr - %64 = getelementptr inbounds %AstBuilder, %AstBuilder* %63, i32 0, i32 15 - call void @ctor.244(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %62, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %64) - %65 = load %AstBuilder*, %AstBuilder** %this.addr - %66 = getelementptr inbounds %AstBuilder, %AstBuilder* %65, i32 0, i32 16 - %67 = load %AstBuilder*, %AstBuilder** %other.addr - %68 = getelementptr inbounds %AstBuilder, %AstBuilder* %67, i32 0, i32 16 - call void @ctor.237(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %66, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %68) - %69 = load %AstBuilder*, %AstBuilder** %this.addr - %70 = getelementptr inbounds %AstBuilder, %AstBuilder* %69, i32 0, i32 17 - %71 = load %AstBuilder*, %AstBuilder** %other.addr - %72 = getelementptr inbounds %AstBuilder, %AstBuilder* %71, i32 0, i32 17 - call void @ctor.245(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %70, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %72) - %73 = load %AstBuilder*, %AstBuilder** %this.addr - %74 = getelementptr inbounds %AstBuilder, %AstBuilder* %73, i32 0, i32 18 + %64 = getelementptr inbounds %AstBuilder, %AstBuilder* %63, i32 0, i32 20 + call void @ctor.232(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %62, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %64) + %65 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 21 + %66 = load %AstBuilder*, %AstBuilder** %other.addr + %67 = getelementptr inbounds %AstBuilder, %AstBuilder* %66, i32 0, i32 21 + call void @ctor.232(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %65, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %67) + %68 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 22 + %69 = load %AstBuilder*, %AstBuilder** %other.addr + %70 = getelementptr inbounds %AstBuilder, %AstBuilder* %69, i32 0, i32 22 + call void @ctor.224(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %68, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %70) + %71 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 23 + %72 = load %AstBuilder*, %AstBuilder** %other.addr + %73 = getelementptr inbounds %AstBuilder, %AstBuilder* %72, i32 0, i32 23 + call void @ctor.235(%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %71, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %73) + %74 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 24 %75 = load %AstBuilder*, %AstBuilder** %other.addr - %76 = getelementptr inbounds %AstBuilder, %AstBuilder* %75, i32 0, i32 18 - call void @ctor.243(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %74, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %76) - %77 = load %AstBuilder*, %AstBuilder** %this.addr - %78 = getelementptr inbounds %AstBuilder, %AstBuilder* %77, i32 0, i32 19 - %79 = load %AstBuilder*, %AstBuilder** %other.addr - %80 = getelementptr inbounds %AstBuilder, %AstBuilder* %79, i32 0, i32 19 - call void @ctor.243(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %78, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %80) - %81 = load %AstBuilder*, %AstBuilder** %this.addr - %82 = getelementptr inbounds %AstBuilder, %AstBuilder* %81, i32 0, i32 20 - %83 = load %AstBuilder*, %AstBuilder** %other.addr - %84 = getelementptr inbounds %AstBuilder, %AstBuilder* %83, i32 0, i32 20 - call void @ctor.243(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %82, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %84) - %85 = load %AstBuilder*, %AstBuilder** %this.addr - %86 = getelementptr inbounds %AstBuilder, %AstBuilder* %85, i32 0, i32 21 + %76 = getelementptr inbounds %AstBuilder, %AstBuilder* %75, i32 0, i32 24 + call void @ctor.236(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %74, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %76) + %77 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 25 + %78 = load %AstBuilder*, %AstBuilder** %other.addr + %79 = getelementptr inbounds %AstBuilder, %AstBuilder* %78, i32 0, i32 25 + call void @ctor.237(%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %77, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %79) + %80 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 26 + %81 = load %AstBuilder*, %AstBuilder** %other.addr + %82 = getelementptr inbounds %AstBuilder, %AstBuilder* %81, i32 0, i32 26 + call void @ctor.238(%"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %80, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %82) + %83 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 27 + %84 = load %AstBuilder*, %AstBuilder** %other.addr + %85 = getelementptr inbounds %AstBuilder, %AstBuilder* %84, i32 0, i32 27 + call void @ctor.239(%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %83, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %85) + %86 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 28 %87 = load %AstBuilder*, %AstBuilder** %other.addr - %88 = getelementptr inbounds %AstBuilder, %AstBuilder* %87, i32 0, i32 21 - call void @ctor.235(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %86, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %88) - %89 = load %AstBuilder*, %AstBuilder** %this.addr - %90 = getelementptr inbounds %AstBuilder, %AstBuilder* %89, i32 0, i32 22 - %91 = load %AstBuilder*, %AstBuilder** %other.addr - %92 = getelementptr inbounds %AstBuilder, %AstBuilder* %91, i32 0, i32 22 - call void @ctor.246(%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %90, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %92) - %93 = load %AstBuilder*, %AstBuilder** %this.addr - %94 = getelementptr inbounds %AstBuilder, %AstBuilder* %93, i32 0, i32 23 - %95 = load %AstBuilder*, %AstBuilder** %other.addr - %96 = getelementptr inbounds %AstBuilder, %AstBuilder* %95, i32 0, i32 23 - call void @ctor.247(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %94, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %96) - %97 = load %AstBuilder*, %AstBuilder** %this.addr - %98 = getelementptr inbounds %AstBuilder, %AstBuilder* %97, i32 0, i32 24 + %88 = getelementptr inbounds %AstBuilder, %AstBuilder* %87, i32 0, i32 28 + call void @ctor.240(%"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %86, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %88) + %89 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 29 + %90 = load %AstBuilder*, %AstBuilder** %other.addr + %91 = getelementptr inbounds %AstBuilder, %AstBuilder* %90, i32 0, i32 29 + call void @ctor.241(%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %89, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %91) + %92 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 30 + %93 = load %AstBuilder*, %AstBuilder** %other.addr + %94 = getelementptr inbounds %AstBuilder, %AstBuilder* %93, i32 0, i32 30 + call void @ctor.242(%"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %92, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %94) + %95 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 31 + %96 = load %AstBuilder*, %AstBuilder** %other.addr + %97 = getelementptr inbounds %AstBuilder, %AstBuilder* %96, i32 0, i32 31 + call void @ctor.243(%"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %95, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %97) + %98 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 32 %99 = load %AstBuilder*, %AstBuilder** %other.addr - %100 = getelementptr inbounds %AstBuilder, %AstBuilder* %99, i32 0, i32 24 - call void @ctor.248(%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %98, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %100) - %101 = load %AstBuilder*, %AstBuilder** %this.addr - %102 = getelementptr inbounds %AstBuilder, %AstBuilder* %101, i32 0, i32 25 - %103 = load %AstBuilder*, %AstBuilder** %other.addr - %104 = getelementptr inbounds %AstBuilder, %AstBuilder* %103, i32 0, i32 25 - call void @ctor.249(%"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %102, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %104) - %105 = load %AstBuilder*, %AstBuilder** %this.addr - %106 = getelementptr inbounds %AstBuilder, %AstBuilder* %105, i32 0, i32 26 - %107 = load %AstBuilder*, %AstBuilder** %other.addr - %108 = getelementptr inbounds %AstBuilder, %AstBuilder* %107, i32 0, i32 26 - call void @ctor.250(%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %106, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %108) - %109 = load %AstBuilder*, %AstBuilder** %this.addr - %110 = getelementptr inbounds %AstBuilder, %AstBuilder* %109, i32 0, i32 27 + %100 = getelementptr inbounds %AstBuilder, %AstBuilder* %99, i32 0, i32 32 + call void @ctor.244(%"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %98, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %100) + %101 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 33 + %102 = load %AstBuilder*, %AstBuilder** %other.addr + %103 = getelementptr inbounds %AstBuilder, %AstBuilder* %102, i32 0, i32 33 + call void @ctor.234(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %101, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %103) + %104 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 34 + %105 = load %AstBuilder*, %AstBuilder** %other.addr + %106 = getelementptr inbounds %AstBuilder, %AstBuilder* %105, i32 0, i32 34 + call void @ctor.245(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %104, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %106) + %107 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 35 + %108 = load %AstBuilder*, %AstBuilder** %other.addr + %109 = getelementptr inbounds %AstBuilder, %AstBuilder* %108, i32 0, i32 35 + call void @ctor.246(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %107, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %109) + %110 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 36 %111 = load %AstBuilder*, %AstBuilder** %other.addr - %112 = getelementptr inbounds %AstBuilder, %AstBuilder* %111, i32 0, i32 27 - call void @ctor.251(%"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %110, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %112) - %113 = load %AstBuilder*, %AstBuilder** %this.addr - %114 = getelementptr inbounds %AstBuilder, %AstBuilder* %113, i32 0, i32 28 - %115 = load %AstBuilder*, %AstBuilder** %other.addr - %116 = getelementptr inbounds %AstBuilder, %AstBuilder* %115, i32 0, i32 28 - call void @ctor.252(%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %114, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %116) - %117 = load %AstBuilder*, %AstBuilder** %this.addr - %118 = getelementptr inbounds %AstBuilder, %AstBuilder* %117, i32 0, i32 29 - %119 = load %AstBuilder*, %AstBuilder** %other.addr - %120 = getelementptr inbounds %AstBuilder, %AstBuilder* %119, i32 0, i32 29 - call void @ctor.253(%"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %118, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %120) - %121 = load %AstBuilder*, %AstBuilder** %this.addr - %122 = getelementptr inbounds %AstBuilder, %AstBuilder* %121, i32 0, i32 30 + %112 = getelementptr inbounds %AstBuilder, %AstBuilder* %111, i32 0, i32 36 + call void @ctor.227(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %110, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %112) + %113 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 37 + %114 = load %AstBuilder*, %AstBuilder** %other.addr + %115 = getelementptr inbounds %AstBuilder, %AstBuilder* %114, i32 0, i32 37 + call void @ctor.246(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %113, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %115) + %116 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 38 + %117 = load %AstBuilder*, %AstBuilder** %other.addr + %118 = getelementptr inbounds %AstBuilder, %AstBuilder* %117, i32 0, i32 38 + call void @ctor.236(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %116, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %118) + %119 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 39 + %120 = load %AstBuilder*, %AstBuilder** %other.addr + %121 = getelementptr inbounds %AstBuilder, %AstBuilder* %120, i32 0, i32 39 + call void @ctor.236(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %119, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %121) + %122 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 40 %123 = load %AstBuilder*, %AstBuilder** %other.addr - %124 = getelementptr inbounds %AstBuilder, %AstBuilder* %123, i32 0, i32 30 - call void @ctor.254(%"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %122, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %124) - %125 = load %AstBuilder*, %AstBuilder** %this.addr - %126 = getelementptr inbounds %AstBuilder, %AstBuilder* %125, i32 0, i32 31 - %127 = load %AstBuilder*, %AstBuilder** %other.addr - %128 = getelementptr inbounds %AstBuilder, %AstBuilder* %127, i32 0, i32 31 - call void @ctor.255(%"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %126, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %128) - %129 = load %AstBuilder*, %AstBuilder** %this.addr - %130 = getelementptr inbounds %AstBuilder, %AstBuilder* %129, i32 0, i32 32 - %131 = load %AstBuilder*, %AstBuilder** %other.addr - %132 = getelementptr inbounds %AstBuilder, %AstBuilder* %131, i32 0, i32 32 - call void @ctor.245(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %130, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %132) - %133 = load %AstBuilder*, %AstBuilder** %this.addr - %134 = getelementptr inbounds %AstBuilder, %AstBuilder* %133, i32 0, i32 33 - %135 = load %AstBuilder*, %AstBuilder** %other.addr - %136 = getelementptr inbounds %AstBuilder, %AstBuilder* %135, i32 0, i32 33 - call void @ctor.256(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %134, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %136) - %137 = load %AstBuilder*, %AstBuilder** %this.addr - %138 = getelementptr inbounds %AstBuilder, %AstBuilder* %137, i32 0, i32 34 - %139 = load %AstBuilder*, %AstBuilder** %other.addr - %140 = getelementptr inbounds %AstBuilder, %AstBuilder* %139, i32 0, i32 34 - call void @ctor.257(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %138, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %140) - %141 = load %AstBuilder*, %AstBuilder** %this.addr - %142 = getelementptr inbounds %AstBuilder, %AstBuilder* %141, i32 0, i32 35 - %143 = load %AstBuilder*, %AstBuilder** %other.addr - %144 = getelementptr inbounds %AstBuilder, %AstBuilder* %143, i32 0, i32 35 - call void @ctor.238(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %142, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %144) - %145 = load %AstBuilder*, %AstBuilder** %this.addr - %146 = getelementptr inbounds %AstBuilder, %AstBuilder* %145, i32 0, i32 36 - %147 = load %AstBuilder*, %AstBuilder** %other.addr - %148 = getelementptr inbounds %AstBuilder, %AstBuilder* %147, i32 0, i32 36 - call void @ctor.257(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %146, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %148) - %149 = load %AstBuilder*, %AstBuilder** %this.addr - %150 = getelementptr inbounds %AstBuilder, %AstBuilder* %149, i32 0, i32 37 - %151 = load %AstBuilder*, %AstBuilder** %other.addr - %152 = getelementptr inbounds %AstBuilder, %AstBuilder* %151, i32 0, i32 37 - call void @ctor.247(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %150, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %152) - %153 = load %AstBuilder*, %AstBuilder** %this.addr - %154 = getelementptr inbounds %AstBuilder, %AstBuilder* %153, i32 0, i32 38 - %155 = load %AstBuilder*, %AstBuilder** %other.addr - %156 = getelementptr inbounds %AstBuilder, %AstBuilder* %155, i32 0, i32 38 - call void @ctor.247(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %154, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %156) - %157 = load %AstBuilder*, %AstBuilder** %this.addr - %158 = getelementptr inbounds %AstBuilder, %AstBuilder* %157, i32 0, i32 39 - %159 = load %AstBuilder*, %AstBuilder** %other.addr - %160 = getelementptr inbounds %AstBuilder, %AstBuilder* %159, i32 0, i32 39 - call void @ctor.256(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %158, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %160) - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.234(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %this.addr + %124 = getelementptr inbounds %AstBuilder, %AstBuilder* %123, i32 0, i32 40 + call void @ctor.245(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %122, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %124) + ret void +} + +; Function Attrs: alwaysinline nounwind +define internal void @ctor.223(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %other) #3 { %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* store %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %other, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.235(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %other.addr +define internal void @ctor.224(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.236(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %other.addr +define internal void @ctor.225(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.237(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %other.addr +define internal void @ctor.226(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.238(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %other.addr +define internal void @ctor.227(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* + store %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.239(%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %other.addr +define internal void @ctor.228(%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* + store %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.240(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %other.addr +define internal void @ctor.229(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* + store %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.241(%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* - store %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* - store %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %other.addr +define internal void @ctor.230(%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* + store %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.242(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Node]"* - store %"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"** %this.addr +define internal void @ctor.231(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"* %other) #3 { %other.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Node]"* store %"FunctionPtr2[Node, UntypedPtr, Node]"* %other, %"FunctionPtr2[Node, UntypedPtr, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.243(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %other) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %this.addr - %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %other, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %other.addr +define internal void @ctor.232(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %other) #3 { + %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %other, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.244(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %other.addr +define internal void @ctor.233(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.245(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %other.addr +define internal void @ctor.234(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.246(%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %other.addr +define internal void @ctor.235(%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* + store %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.247(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %this, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %other) #3 { - %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, @Location]"* - store %"FunctionPtr2[Node, UntypedPtr, @Location]"* %this, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %this.addr - %other.addr = alloca %"FunctionPtr2[Node, UntypedPtr, @Location]"* - store %"FunctionPtr2[Node, UntypedPtr, @Location]"* %other, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %other.addr +define internal void @ctor.236(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %this, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %other) #3 { + %other.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Location const]"* + store %"FunctionPtr2[Node, UntypedPtr, Location const]"* %other, %"FunctionPtr2[Node, UntypedPtr, Location const]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr2[Node, UntypedPtr, @Location]"*, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, @Location]", %"FunctionPtr2[Node, UntypedPtr, @Location]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr2[Node, UntypedPtr, @Location]"*, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, @Location]", %"FunctionPtr2[Node, UntypedPtr, @Location]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Location const]", %"FunctionPtr2[Node, UntypedPtr, Location const]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr2[Node, UntypedPtr, Location const]"*, %"FunctionPtr2[Node, UntypedPtr, Location const]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Location const]", %"FunctionPtr2[Node, UntypedPtr, Location const]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.248(%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %other.addr +define internal void @ctor.237(%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]", %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]", %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]", %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]", %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.249(%"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %other.addr +define internal void @ctor.238(%"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Int]", %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Int]", %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Int]", %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Int]", %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.250(%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %other.addr +define internal void @ctor.239(%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]", %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]", %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]", %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]", %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.251(%"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %other.addr +define internal void @ctor.240(%"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Long]", %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Long]", %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Long]", %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Long]", %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.252(%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %other.addr +define internal void @ctor.241(%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]", %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]", %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]", %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]", %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.253(%"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %other.addr +define internal void @ctor.242(%"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Float]", %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Float]", %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Float]", %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Float]", %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.254(%"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %other.addr +define internal void @ctor.243(%"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Double]", %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Double]", %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Double]", %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Double]", %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.255(%"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %other.addr +define internal void @ctor.244(%"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Char]", %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Char]", %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Char]", %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Char]", %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.256(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %other.addr +define internal void @ctor.245(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Node]", %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Node]", %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Node]", %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Node]", %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.257(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %other.addr +define internal void @ctor.246(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.258(%ParserContext* %this) #3 { - %this.addr = alloca %ParserContext* - store %ParserContext* %this, %ParserContext** %this.addr +define internal void @dtor.247(%ParserContext* %this) #3 { br label %code code: ; preds = %0 - %1 = load %ParserContext*, %ParserContext** %this.addr - %2 = getelementptr inbounds %ParserContext, %ParserContext* %1, i32 0, i32 2 - call void @dtor.259(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2) - %3 = load %ParserContext*, %ParserContext** %this.addr - %4 = getelementptr inbounds %ParserContext, %ParserContext* %3, i32 0, i32 1 - call void @dtor.266(%"SparrowLayoutDecoder[SparrowScanner]"* %4) - %5 = load %ParserContext*, %ParserContext** %this.addr - %6 = getelementptr inbounds %ParserContext, %ParserContext* %5, i32 0, i32 0 - call void @dtor.277(%SparrowScanner* %6) + %1 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 2 + call void @dtor.248(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) + %2 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 1 + call void @dtor.255(%"SparrowLayoutDecoder[SparrowScanner]"* %2) + %3 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 0 + call void @dtor.266(%SparrowScanner* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.259(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #3 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal void @dtor.248(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 1 - call void @dtor.260(%Token* %2) - %3 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 0 - call void @dtor.262(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %4) + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + call void @dtor.249(%Token* %1) + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @dtor.251(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.260(%Token* %this) #3 { - %this.addr = alloca %Token* - store %Token* %this, %Token** %this.addr +define internal void @dtor.249(%Token* %this) #3 { br label %code code: ; preds = %0 - %1 = load %Token*, %Token** %this.addr - %2 = getelementptr inbounds %Token, %Token* %1, i32 0, i32 2 - call void @dtor.261(%String* %2) + %1 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 2 + call void @dtor.250(%String* %1) ret void } ; Function Attrs: inlinehint nounwind -define internal void @dtor.261(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal void @dtor.250(%String* %this) #4 { br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - call void @freePtr(%"RawPtr[Char]" %3) + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + call void @freePtr(%"RawPtr[Char]"* %1) ret void } ; Function Attrs: inlinehint nounwind -define internal void @freePtr(%"RawPtr[Char]" %this) #4 { - %this.addr = alloca %"RawPtr[Char]" - store %"RawPtr[Char]" %this, %"RawPtr[Char]"* %this.addr +define internal void @freePtr(%"RawPtr[Char]"* %this) #4 { + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"RawPtr[Char]", %"RawPtr[Char]"* %this.addr - %2 = call i1 @isSet(%"RawPtr[Char]" %1) - br i1 %2, label %if_then, label %if_end + %1 = call i1 @isSet(%"RawPtr[Char]"* %this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %this.addr - %4 = call i8* @bytePtr(%"RawPtr[Char]" %3) - call void @free(i8* %4) + %2 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + %3 = load i8*, i8** %2 + call void @ctor.67(%UntypedPtr* %tmp.this, i8* %3) + %4 = load %UntypedPtr, %UntypedPtr* %tmp.this + call void @free(%UntypedPtr %4) br label %if_end if_end: ; preds = %if_then, %if_block @@ -7911,93 +7105,80 @@ if_end: ; preds = %if_then, %if_block } ; Function Attrs: inlinehint nounwind -define internal i1 @isSet(%"RawPtr[Char]" %this) #4 { - %this.addr = alloca %"RawPtr[Char]" - store %"RawPtr[Char]" %this, %"RawPtr[Char]"* %this.addr +define internal i1 @isSet(%"RawPtr[Char]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 %2 = load i8*, i8** %1 %3 = call i1 @implOpRefNE(i8* %2, i8* null) ret i1 %3 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.262(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this) #3 { - %this.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* - store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal void @dtor.251(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 1 - call void @dtor.263(%"Vector[Token]"* %2) - %3 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %4 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 0 - call void @dtor.266(%"SparrowLayoutDecoder[SparrowScanner]"* %4) + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + call void @dtor.252(%"Vector[Token]"* %1) + %2 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @dtor.255(%"SparrowLayoutDecoder[SparrowScanner]"* %2) ret void } ; Function Attrs: inlinehint nounwind -define internal void @dtor.263(%"Vector[Token]"* %this) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal void @dtor.252(%"Vector[Token]"* %this) #4 { %p = alloca %"RawPtr[Token]" - %"$tmpC" = alloca %"RawPtr[Token]" + %"$tmpForRef" = alloca %"RawPtr[Token]" br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 - call void @ctor.217(%"RawPtr[Token]"* %p, %"RawPtr[Token]"* %2) + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + call void @ctor.204(%"RawPtr[Token]"* %p, %"RawPtr[Token]"* %1) br label %while_block while_block: ; preds = %while_step, %code - %3 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %3, i32 0, i32 1 - %5 = call i1 @"==.218"(%"RawPtr[Token]"* %p, %"RawPtr[Token]"* %4) - %6 = xor i1 true, %5 - br i1 %6, label %while_body, label %while_end + %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %3 = call i1 @"==.205"(%"RawPtr[Token]"* %p, %"RawPtr[Token]"* %2) + %4 = xor i1 true, %3 + br i1 %4, label %while_body, label %while_end while_body: ; preds = %while_block - %7 = load %"RawPtr[Token]", %"RawPtr[Token]"* %p - %8 = call %Token* @value.219(%"RawPtr[Token]" %7) - call void @dtor.260(%Token* %8) + %5 = call %Token* @value.206(%"RawPtr[Token]"* %p) + call void @dtor.249(%Token* %5) br label %while_step while_step: ; preds = %while_body - %9 = load %"RawPtr[Token]", %"RawPtr[Token]"* %p - call void @advance.220(%"RawPtr[Token]"* %"$tmpC", %"RawPtr[Token]" %9) - call void @"=.212"(%"RawPtr[Token]"* %p, %"RawPtr[Token]"* %"$tmpC") + %6 = call %"RawPtr[Token]" @advance.207(%"RawPtr[Token]"* %p) + store %"RawPtr[Token]" %6, %"RawPtr[Token]"* %"$tmpForRef" + call void @"=.198"(%"RawPtr[Token]"* %p, %"RawPtr[Token]"* %"$tmpForRef") br label %while_block while_end: ; preds = %while_block - %10 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %11 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %10, i32 0, i32 0 - %12 = load %"RawPtr[Token]", %"RawPtr[Token]"* %11 - call void @freePtr.264(%"RawPtr[Token]" %12) + %7 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + call void @freePtr.253(%"RawPtr[Token]"* %7) ret void } ; Function Attrs: inlinehint nounwind -define internal void @freePtr.264(%"RawPtr[Token]" %this) #4 { - %this.addr = alloca %"RawPtr[Token]" - store %"RawPtr[Token]" %this, %"RawPtr[Token]"* %this.addr +define internal void @freePtr.253(%"RawPtr[Token]"* %this) #4 { + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"RawPtr[Token]", %"RawPtr[Token]"* %this.addr - %2 = call i1 @isSet.265(%"RawPtr[Token]" %1) - br i1 %2, label %if_then, label %if_end + %1 = call i1 @isSet.254(%"RawPtr[Token]"* %this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %3 = load %"RawPtr[Token]", %"RawPtr[Token]"* %this.addr - %4 = call i8* @bytePtr.211(%"RawPtr[Token]" %3) - call void @free(i8* %4) + %2 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + %3 = load %Token*, %Token** %2 + call void @ctor.197(%UntypedPtr* %tmp.this, %Token* %3) + %4 = load %UntypedPtr, %UntypedPtr* %tmp.this + call void @free(%UntypedPtr %4) br label %if_end if_end: ; preds = %if_then, %if_block @@ -8005,13 +7186,11 @@ if_end: ; preds = %if_then, %if_block } ; Function Attrs: inlinehint nounwind -define internal i1 @isSet.265(%"RawPtr[Token]" %this) #4 { - %this.addr = alloca %"RawPtr[Token]" - store %"RawPtr[Token]" %this, %"RawPtr[Token]"* %this.addr +define internal i1 @isSet.254(%"RawPtr[Token]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 %2 = load %Token*, %Token** %1 %3 = bitcast %Token* %2 to i8* %4 = call i1 @implOpRefNE(i8* %3, i8* null) @@ -8019,67 +7198,55 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.266(%"SparrowLayoutDecoder[SparrowScanner]"* %this) #3 { - %this.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* - store %"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr +define internal void @dtor.255(%"SparrowLayoutDecoder[SparrowScanner]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %1, i32 0, i32 3 - call void @dtor.267(%"Vector[Char]"* %2) - %3 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %3, i32 0, i32 2 - call void @dtor.270(%"Vector[UInt]"* %4) - %5 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %5, i32 0, i32 0 - call void @dtor.276(%"RangeWithLookahead[SparrowScanner]"* %6) + %1 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + call void @dtor.256(%"Vector[Char]"* %1) + %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + call void @dtor.259(%"Vector[UInt]"* %2) + %3 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @dtor.265(%"RangeWithLookahead[SparrowScanner]"* %3) ret void } ; Function Attrs: inlinehint nounwind -define internal void @dtor.267(%"Vector[Char]"* %this) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal void @dtor.256(%"Vector[Char]"* %this) #4 { %p = alloca %"RawPtr[Char]" - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 - call void @ctor.192(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %2) + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + call void @ctor.178(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %1) br label %while_block while_block: ; preds = %while_step, %code - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %3, i32 0, i32 1 - %5 = call i1 @"==.268"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %4) - %6 = xor i1 true, %5 - br i1 %6, label %while_body, label %while_end + %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %3 = call i1 @"==.257"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %2) + %4 = xor i1 true, %3 + br i1 %4, label %while_body, label %while_end while_body: ; preds = %while_block - %7 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - %8 = call i8* @value(%"RawPtr[Char]" %7) - %9 = load i8, i8* %8 + %5 = call i8* @value(%"RawPtr[Char]"* %p) + %6 = load i8, i8* %5 br label %while_step while_step: ; preds = %while_body - %10 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - call void @advance.269(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %10) - call void @"=.200"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpC") + %7 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %p) + store %"RawPtr[Char]" %7, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpForRef") br label %while_block while_end: ; preds = %while_block - %11 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %12 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %11, i32 0, i32 0 - %13 = load %"RawPtr[Char]", %"RawPtr[Char]"* %12 - call void @freePtr(%"RawPtr[Char]" %13) + %8 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + call void @freePtr(%"RawPtr[Char]"* %8) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.268"(%"RawPtr[Char]"* %this, %"RawPtr[Char]"* %other) #3 { +define internal i1 @"==.257"(%"RawPtr[Char]"* %this, %"RawPtr[Char]"* %other) #3 { %this.addr = alloca %"RawPtr[Char]"* store %"RawPtr[Char]"* %this, %"RawPtr[Char]"** %this.addr %other.addr = alloca %"RawPtr[Char]"* @@ -8098,65 +7265,58 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @advance.269(%"RawPtr[Char]"* sret %_result, %"RawPtr[Char]" %this) #4 { - %_result.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %_result, %"RawPtr[Char]"** %_result.addr - %this.addr = alloca %"RawPtr[Char]" - store %"RawPtr[Char]" %this, %"RawPtr[Char]"* %this.addr +define internal %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %this) #4 { + %tmp.this = alloca %"RawPtr[Char]" + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %_result.addr - %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %this.addr - %3 = call i8* @bytePtr(%"RawPtr[Char]" %2) - %4 = call i8* @ptrAdd(i8* %3, i64 1) - call void @ctor.194(%"RawPtr[Char]"* %1, i8* %4) - ret void + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + %2 = load i8*, i8** %1 + call void @ctor.67(%UntypedPtr* %tmp.this1, i8* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + %4 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 1) + call void @ctor.180(%"RawPtr[Char]"* %tmp.this, %UntypedPtr %4) + %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %tmp.this + ret %"RawPtr[Char]" %5 } ; Function Attrs: inlinehint nounwind -define internal void @dtor.270(%"Vector[UInt]"* %this) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr +define internal void @dtor.259(%"Vector[UInt]"* %this) #4 { %p = alloca %"RawPtr[UInt]" - %"$tmpC" = alloca %"RawPtr[UInt]" + %"$tmpForRef" = alloca %"RawPtr[UInt]" br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 0 - call void @ctor.230(%"RawPtr[UInt]"* %p, %"RawPtr[UInt]"* %2) + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + call void @ctor.218(%"RawPtr[UInt]"* %p, %"RawPtr[UInt]"* %1) br label %while_block while_block: ; preds = %while_step, %code - %3 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %3, i32 0, i32 1 - %5 = call i1 @"==.271"(%"RawPtr[UInt]"* %p, %"RawPtr[UInt]"* %4) - %6 = xor i1 true, %5 - br i1 %6, label %while_body, label %while_end + %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %3 = call i1 @"==.260"(%"RawPtr[UInt]"* %p, %"RawPtr[UInt]"* %2) + %4 = xor i1 true, %3 + br i1 %4, label %while_body, label %while_end while_body: ; preds = %while_block - %7 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %p - %8 = call i32* @value.272(%"RawPtr[UInt]" %7) - %9 = load i32, i32* %8 + %5 = call i32* @value.261(%"RawPtr[UInt]"* %p) + %6 = load i32, i32* %5 br label %while_step while_step: ; preds = %while_body - %10 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %p - call void @advance.273(%"RawPtr[UInt]"* %"$tmpC", %"RawPtr[UInt]" %10) - call void @"=.225"(%"RawPtr[UInt]"* %p, %"RawPtr[UInt]"* %"$tmpC") + %7 = call %"RawPtr[UInt]" @advance.262(%"RawPtr[UInt]"* %p) + store %"RawPtr[UInt]" %7, %"RawPtr[UInt]"* %"$tmpForRef" + call void @"=.212"(%"RawPtr[UInt]"* %p, %"RawPtr[UInt]"* %"$tmpForRef") br label %while_block while_end: ; preds = %while_block - %11 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %12 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %11, i32 0, i32 0 - %13 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %12 - call void @freePtr.274(%"RawPtr[UInt]" %13) + %8 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + call void @freePtr.263(%"RawPtr[UInt]"* %8) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.271"(%"RawPtr[UInt]"* %this, %"RawPtr[UInt]"* %other) #3 { +define internal i1 @"==.260"(%"RawPtr[UInt]"* %this, %"RawPtr[UInt]"* %other) #3 { %this.addr = alloca %"RawPtr[UInt]"* store %"RawPtr[UInt]"* %this, %"RawPtr[UInt]"** %this.addr %other.addr = alloca %"RawPtr[UInt]"* @@ -8177,52 +7337,50 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal i32* @value.272(%"RawPtr[UInt]" %this) #4 { - %this.addr = alloca %"RawPtr[UInt]" - store %"RawPtr[UInt]" %this, %"RawPtr[UInt]"* %this.addr +define internal i32* @value.261(%"RawPtr[UInt]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 %2 = load i32*, i32** %1 ret i32* %2 } ; Function Attrs: inlinehint nounwind -define internal void @advance.273(%"RawPtr[UInt]"* sret %_result, %"RawPtr[UInt]" %this) #4 { - %_result.addr = alloca %"RawPtr[UInt]"* - store %"RawPtr[UInt]"* %_result, %"RawPtr[UInt]"** %_result.addr - %this.addr = alloca %"RawPtr[UInt]" - store %"RawPtr[UInt]" %this, %"RawPtr[UInt]"* %this.addr +define internal %"RawPtr[UInt]" @advance.262(%"RawPtr[UInt]"* %this) #4 { + %tmp.this = alloca %"RawPtr[UInt]" + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %_result.addr - %2 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %this.addr - %3 = call i8* @bytePtr.224(%"RawPtr[UInt]" %2) - %4 = call i8* @ptrAdd(i8* %3, i64 4) - call void @ctor.229(%"RawPtr[UInt]"* %1, i8* %4) - ret void + %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + %2 = load i32*, i32** %1 + call void @ctor.211(%UntypedPtr* %tmp.this1, i32* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + %4 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 4) + call void @ctor.216(%"RawPtr[UInt]"* %tmp.this, %UntypedPtr %4) + %5 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %tmp.this + ret %"RawPtr[UInt]" %5 } ; Function Attrs: inlinehint nounwind -define internal void @freePtr.274(%"RawPtr[UInt]" %this) #4 { - %this.addr = alloca %"RawPtr[UInt]" - store %"RawPtr[UInt]" %this, %"RawPtr[UInt]"* %this.addr +define internal void @freePtr.263(%"RawPtr[UInt]"* %this) #4 { + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %this.addr - %2 = call i1 @isSet.275(%"RawPtr[UInt]" %1) - br i1 %2, label %if_then, label %if_end + %1 = call i1 @isSet.264(%"RawPtr[UInt]"* %this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %3 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %this.addr - %4 = call i8* @bytePtr.224(%"RawPtr[UInt]" %3) - call void @free(i8* %4) + %2 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + %3 = load i32*, i32** %2 + call void @ctor.211(%UntypedPtr* %tmp.this, i32* %3) + %4 = load %UntypedPtr, %UntypedPtr* %tmp.this + call void @free(%UntypedPtr %4) br label %if_end if_end: ; preds = %if_then, %if_block @@ -8230,13 +7388,11 @@ if_end: ; preds = %if_then, %if_block } ; Function Attrs: inlinehint nounwind -define internal i1 @isSet.275(%"RawPtr[UInt]" %this) #4 { - %this.addr = alloca %"RawPtr[UInt]" - store %"RawPtr[UInt]" %this, %"RawPtr[UInt]"* %this.addr +define internal i1 @isSet.264(%"RawPtr[UInt]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 %2 = load i32*, i32** %1 %3 = bitcast i32* %2 to i8* %4 = call i1 @implOpRefNE(i8* %3, i8* null) @@ -8244,204 +7400,161 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.276(%"RangeWithLookahead[SparrowScanner]"* %this) #3 { - %this.addr = alloca %"RangeWithLookahead[SparrowScanner]"* - store %"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"** %this.addr +define internal void @dtor.265(%"RangeWithLookahead[SparrowScanner]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %1, i32 0, i32 1 - call void @dtor.263(%"Vector[Token]"* %2) - %3 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %4 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %3, i32 0, i32 0 - call void @dtor.277(%SparrowScanner* %4) + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 + call void @dtor.252(%"Vector[Token]"* %1) + %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 0 + call void @dtor.266(%SparrowScanner* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.277(%SparrowScanner* %this) #3 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr +define internal void @dtor.266(%SparrowScanner* %this) #3 { br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 3 - call void @dtor.260(%Token* %2) - %3 = load %SparrowScanner*, %SparrowScanner** %this.addr - %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %3, i32 0, i32 2 - call void @dtor.278(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4) - %5 = load %SparrowScanner*, %SparrowScanner** %this.addr - %6 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %5, i32 0, i32 1 - call void @dtor.280(%BufferedCharSource* %6) + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + call void @dtor.249(%Token* %1) + %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @dtor.267(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2) + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 1 + call void @dtor.269(%BufferedCharSource* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.278(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this) #3 { - %this.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr +define internal void @dtor.267(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 - call void @dtor.279(%"RangeWithLookahead[BufferedCharSourceRange]"* %2) + %1 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 0 + call void @dtor.268(%"RangeWithLookahead[BufferedCharSourceRange]"* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.279(%"RangeWithLookahead[BufferedCharSourceRange]"* %this) #3 { - %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr +define internal void @dtor.268(%"RangeWithLookahead[BufferedCharSourceRange]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %1, i32 0, i32 1 - call void @dtor.267(%"Vector[Char]"* %2) + %1 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + call void @dtor.256(%"Vector[Char]"* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.280(%BufferedCharSource* %this) #3 { - %this.addr = alloca %BufferedCharSource* - store %BufferedCharSource* %this, %BufferedCharSource** %this.addr +define internal void @dtor.269(%BufferedCharSource* %this) #3 { br label %code code: ; preds = %0 - %1 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %2 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %1, i32 0, i32 1 - call void @dtor.261(%String* %2) + %1 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 1 + call void @dtor.250(%String* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.281"(%ParserContext* %this, %ParserContext* %other) #3 { - %this.addr = alloca %ParserContext* - store %ParserContext* %this, %ParserContext** %this.addr +define internal void @"=.270"(%ParserContext* %this, %ParserContext* %other) #3 { %other.addr = alloca %ParserContext* store %ParserContext* %other, %ParserContext** %other.addr br label %code code: ; preds = %0 - %1 = load %ParserContext*, %ParserContext** %this.addr - %2 = getelementptr inbounds %ParserContext, %ParserContext* %1, i32 0, i32 0 - %3 = load %ParserContext*, %ParserContext** %other.addr - %4 = getelementptr inbounds %ParserContext, %ParserContext* %3, i32 0, i32 0 - call void @"=.282"(%SparrowScanner* %2, %SparrowScanner* %4) - %5 = load %ParserContext*, %ParserContext** %this.addr + %1 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 0 + %2 = load %ParserContext*, %ParserContext** %other.addr + %3 = getelementptr inbounds %ParserContext, %ParserContext* %2, i32 0, i32 0 + call void @"=.271"(%SparrowScanner* %1, %SparrowScanner* %3) + %4 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 1 + %5 = load %ParserContext*, %ParserContext** %other.addr %6 = getelementptr inbounds %ParserContext, %ParserContext* %5, i32 0, i32 1 - %7 = load %ParserContext*, %ParserContext** %other.addr - %8 = getelementptr inbounds %ParserContext, %ParserContext* %7, i32 0, i32 1 - call void @"=.301"(%"SparrowLayoutDecoder[SparrowScanner]"* %6, %"SparrowLayoutDecoder[SparrowScanner]"* %8) - %9 = load %ParserContext*, %ParserContext** %this.addr - %10 = getelementptr inbounds %ParserContext, %ParserContext* %9, i32 0, i32 2 - %11 = load %ParserContext*, %ParserContext** %other.addr - %12 = getelementptr inbounds %ParserContext, %ParserContext* %11, i32 0, i32 2 - call void @"=.307"(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12) + call void @"=.289"(%"SparrowLayoutDecoder[SparrowScanner]"* %4, %"SparrowLayoutDecoder[SparrowScanner]"* %6) + %7 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 2 + %8 = load %ParserContext*, %ParserContext** %other.addr + %9 = getelementptr inbounds %ParserContext, %ParserContext* %8, i32 0, i32 2 + call void @"=.295"(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.282"(%SparrowScanner* %this, %SparrowScanner* %other) #3 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr +define internal void @"=.271"(%SparrowScanner* %this, %SparrowScanner* %other) #3 { %other.addr = alloca %SparrowScanner* store %SparrowScanner* %other, %SparrowScanner** %other.addr br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 0 - %3 = load %SparrowScanner*, %SparrowScanner** %other.addr - %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %3, i32 0, i32 0 - call void @"=.283"(%Location* %2, %Location* %4) - %5 = load %SparrowScanner*, %SparrowScanner** %this.addr + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 0 + %2 = load %SparrowScanner*, %SparrowScanner** %other.addr + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %2, i32 0, i32 0 + call void @"=.272"(%Location* %1, %Location* %3) + %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 1 + %5 = load %SparrowScanner*, %SparrowScanner** %other.addr %6 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %5, i32 0, i32 1 - %7 = load %SparrowScanner*, %SparrowScanner** %other.addr - %8 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %7, i32 0, i32 1 - call void @"=.286"(%BufferedCharSource* %6, %BufferedCharSource* %8) - %9 = load %SparrowScanner*, %SparrowScanner** %this.addr - %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %9, i32 0, i32 2 + call void @"=.275"(%BufferedCharSource* %4, %BufferedCharSource* %6) + %7 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %8 = load %SparrowScanner*, %SparrowScanner** %other.addr + %9 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %8, i32 0, i32 2 + call void @"=.280"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %7, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %9) + %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 %11 = load %SparrowScanner*, %SparrowScanner** %other.addr - %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %11, i32 0, i32 2 - call void @"=.292"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %10, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %12) - %13 = load %SparrowScanner*, %SparrowScanner** %this.addr - %14 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %13, i32 0, i32 3 - %15 = load %SparrowScanner*, %SparrowScanner** %other.addr - %16 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %15, i32 0, i32 3 - call void @"=.297"(%Token* %14, %Token* %16) - %17 = load %SparrowScanner*, %SparrowScanner** %other.addr - %18 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %17, i32 0, i32 4 - %19 = load i1, i1* %18 - %20 = load %SparrowScanner*, %SparrowScanner** %this.addr - %21 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %20, i32 0, i32 4 - store i1 %19, i1* %21 - %22 = load %SparrowScanner*, %SparrowScanner** %this.addr - %23 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %22, i32 0, i32 5 - %24 = load %SparrowScanner*, %SparrowScanner** %other.addr - %25 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %24, i32 0, i32 5 - call void @"=.299"(%ErrorReporter* %23, %ErrorReporter* %25) - %26 = load %SparrowScanner*, %SparrowScanner** %other.addr - %27 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %26, i32 0, i32 6 - %28 = load i1, i1* %27 - %29 = load %SparrowScanner*, %SparrowScanner** %this.addr - %30 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %29, i32 0, i32 6 - store i1 %28, i1* %30 + %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %11, i32 0, i32 3 + call void @"=.285"(%Token* %10, %Token* %12) + %13 = load %SparrowScanner*, %SparrowScanner** %other.addr + %14 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %13, i32 0, i32 4 + %15 = load i1, i1* %14 + %16 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 4 + store i1 %15, i1* %16 + %17 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 5 + %18 = load %SparrowScanner*, %SparrowScanner** %other.addr + %19 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %18, i32 0, i32 5 + call void @"=.287"(%ErrorReporter* %17, %ErrorReporter* %19) + %20 = load %SparrowScanner*, %SparrowScanner** %other.addr + %21 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %20, i32 0, i32 6 + %22 = load i1, i1* %21 + %23 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 6 + store i1 %22, i1* %23 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.283"(%Location* %this, %Location* %other) #3 { - %this.addr = alloca %Location* - store %Location* %this, %Location** %this.addr +define internal void @"=.272"(%Location* %this, %Location* %other) #3 { %other.addr = alloca %Location* store %Location* %other, %Location** %other.addr br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %this.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 0 - %3 = load %Location*, %Location** %other.addr - %4 = getelementptr inbounds %Location, %Location* %3, i32 0, i32 0 - call void @"=.284"(%SourceCode* %2, %SourceCode* %4) - %5 = load %Location*, %Location** %this.addr + %1 = getelementptr inbounds %Location, %Location* %this, i32 0, i32 0 + %2 = load %Location*, %Location** %other.addr + %3 = getelementptr inbounds %Location, %Location* %2, i32 0, i32 0 + call void @"=.273"(%SourceCode* %1, %SourceCode* %3) + %4 = getelementptr inbounds %Location, %Location* %this, i32 0, i32 1 + %5 = load %Location*, %Location** %other.addr %6 = getelementptr inbounds %Location, %Location* %5, i32 0, i32 1 - %7 = load %Location*, %Location** %other.addr - %8 = getelementptr inbounds %Location, %Location* %7, i32 0, i32 1 - call void @"=.285"(%LineCol* %6, %LineCol* %8) - %9 = load %Location*, %Location** %this.addr - %10 = getelementptr inbounds %Location, %Location* %9, i32 0, i32 2 - %11 = load %Location*, %Location** %other.addr - %12 = getelementptr inbounds %Location, %Location* %11, i32 0, i32 2 - call void @"=.285"(%LineCol* %10, %LineCol* %12) + call void @"=.274"(%LineCol* %4, %LineCol* %6) + %7 = getelementptr inbounds %Location, %Location* %this, i32 0, i32 2 + %8 = load %Location*, %Location** %other.addr + %9 = getelementptr inbounds %Location, %Location* %8, i32 0, i32 2 + call void @"=.274"(%LineCol* %7, %LineCol* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.284"(%SourceCode* %this, %SourceCode* %other) #3 { - %this.addr = alloca %SourceCode* - store %SourceCode* %this, %SourceCode** %this.addr +define internal void @"=.273"(%SourceCode* %this, %SourceCode* %other) #3 { %other.addr = alloca %SourceCode* store %SourceCode* %other, %SourceCode** %other.addr br label %code code: ; preds = %0 - %1 = load %SourceCode*, %SourceCode** %other.addr - %2 = getelementptr inbounds %SourceCode, %SourceCode* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %SourceCode*, %SourceCode** %this.addr - %5 = getelementptr inbounds %SourceCode, %SourceCode* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %SourceCode, %SourceCode* %this, i32 0, i32 0 + %2 = load %SourceCode*, %SourceCode** %other.addr + %3 = getelementptr inbounds %SourceCode, %SourceCode* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.285"(%LineCol* %this, %LineCol* %other) #3 { - %this.addr = alloca %LineCol* - store %LineCol* %this, %LineCol** %this.addr +define internal void @"=.274"(%LineCol* %this, %LineCol* %other) #3 { %other.addr = alloca %LineCol* store %LineCol* %other, %LineCol** %other.addr br label %code @@ -8450,230 +7563,162 @@ code: ; preds = %0 %1 = load %LineCol*, %LineCol** %other.addr %2 = getelementptr inbounds %LineCol, %LineCol* %1, i32 0, i32 0 %3 = load i32, i32* %2 - %4 = load %LineCol*, %LineCol** %this.addr - %5 = getelementptr inbounds %LineCol, %LineCol* %4, i32 0, i32 0 - store i32 %3, i32* %5 - %6 = load %LineCol*, %LineCol** %other.addr - %7 = getelementptr inbounds %LineCol, %LineCol* %6, i32 0, i32 1 - %8 = load i32, i32* %7 - %9 = load %LineCol*, %LineCol** %this.addr - %10 = getelementptr inbounds %LineCol, %LineCol* %9, i32 0, i32 1 - store i32 %8, i32* %10 + %4 = getelementptr inbounds %LineCol, %LineCol* %this, i32 0, i32 0 + store i32 %3, i32* %4 + %5 = load %LineCol*, %LineCol** %other.addr + %6 = getelementptr inbounds %LineCol, %LineCol* %5, i32 0, i32 1 + %7 = load i32, i32* %6 + %8 = getelementptr inbounds %LineCol, %LineCol* %this, i32 0, i32 1 + store i32 %7, i32* %8 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.286"(%BufferedCharSource* %this, %BufferedCharSource* %other) #3 { - %this.addr = alloca %BufferedCharSource* - store %BufferedCharSource* %this, %BufferedCharSource** %this.addr +define internal void @"=.275"(%BufferedCharSource* %this, %BufferedCharSource* %other) #3 { %other.addr = alloca %BufferedCharSource* store %BufferedCharSource* %other, %BufferedCharSource** %other.addr br label %code code: ; preds = %0 - %1 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %2 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %1, i32 0, i32 0 - %3 = load %BufferedCharSource*, %BufferedCharSource** %other.addr - %4 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %3, i32 0, i32 0 - call void @"=.287"(%CharSource* %2, %CharSource* %4) - %5 = load %BufferedCharSource*, %BufferedCharSource** %this.addr + %1 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 0 + %2 = load %BufferedCharSource*, %BufferedCharSource** %other.addr + %3 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %2, i32 0, i32 0 + call void @"=.276"(%CharSource* %1, %CharSource* %3) + %4 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 1 + %5 = load %BufferedCharSource*, %BufferedCharSource** %other.addr %6 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %5, i32 0, i32 1 - %7 = load %BufferedCharSource*, %BufferedCharSource** %other.addr - %8 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %7, i32 0, i32 1 - %9 = call %String* @"=.290"(%String* %6, %String* %8) - %10 = load %BufferedCharSource*, %BufferedCharSource** %other.addr - %11 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %10, i32 0, i32 2 - %12 = load i32, i32* %11 - %13 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %14 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %13, i32 0, i32 2 - store i32 %12, i32* %14 + %7 = call %String* @"=.278"(%String* %4, %String* %6) + %8 = load %BufferedCharSource*, %BufferedCharSource** %other.addr + %9 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %8, i32 0, i32 2 + %10 = load i32, i32* %9 + %11 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 2 + store i32 %10, i32* %11 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.287"(%CharSource* %this, %CharSource* %other) #3 { - %this.addr = alloca %CharSource* - store %CharSource* %this, %CharSource** %this.addr +define internal void @"=.276"(%CharSource* %this, %CharSource* %other) #3 { %other.addr = alloca %CharSource* store %CharSource* %other, %CharSource** %other.addr br label %code code: ; preds = %0 - %1 = load %CharSource*, %CharSource** %this.addr - %2 = getelementptr inbounds %CharSource, %CharSource* %1, i32 0, i32 0 - %3 = load %CharSource*, %CharSource** %other.addr - %4 = getelementptr inbounds %CharSource, %CharSource* %3, i32 0, i32 0 - call void @"=.288"(%UntypedPtr* %2, %UntypedPtr* %4) - %5 = load %CharSource*, %CharSource** %this.addr + %1 = getelementptr inbounds %CharSource, %CharSource* %this, i32 0, i32 0 + %2 = load %CharSource*, %CharSource** %other.addr + %3 = getelementptr inbounds %CharSource, %CharSource* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) + %4 = getelementptr inbounds %CharSource, %CharSource* %this, i32 0, i32 1 + %5 = load %CharSource*, %CharSource** %other.addr %6 = getelementptr inbounds %CharSource, %CharSource* %5, i32 0, i32 1 - %7 = load %CharSource*, %CharSource** %other.addr - %8 = getelementptr inbounds %CharSource, %CharSource* %7, i32 0, i32 1 - call void @"=.289"(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %6, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %8) - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @"=.288"(%UntypedPtr* %this, %UntypedPtr* %other) #3 { - %this.addr = alloca %UntypedPtr* - store %UntypedPtr* %this, %UntypedPtr** %this.addr - %other.addr = alloca %UntypedPtr* - store %UntypedPtr* %other, %UntypedPtr** %other.addr - br label %code - -code: ; preds = %0 - %1 = load %UntypedPtr*, %UntypedPtr** %other.addr - %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %UntypedPtr*, %UntypedPtr** %this.addr - %5 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %4, i32 0, i32 0 - store i8* %3, i8** %5 + call void @"=.277"(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %4, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.289"(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* - store %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* - store %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %other, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %other.addr +define internal void @"=.277"(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* + store %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %other, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @String, Int]"*, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @String, Int]", %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Void, UntypedPtr, @String, Int]"*, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @String, Int]", %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, String mut, Int]", %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"*, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, String mut, Int]", %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: inlinehint nounwind -define internal %String* @"=.290"(%String* %this, %String* %other) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %other.addr = alloca %String* - store %String* %other, %String** %other.addr +define internal %String* @"=.278"(%String* %this, %String* %other) #4 { %tmp = alloca %String br label %code code: ; preds = %0 - %1 = load %String*, %String** %other.addr - call void @ctor.189(%String* %tmp, %String* %1) - %2 = load %String*, %String** %this.addr - call void @swap(%String* %tmp, %String* %2) - %3 = load %String*, %String** %this.addr - call void @dtor.261(%String* %tmp) - ret %String* %3 + call void @ctor.175(%String* %tmp, %String* %other) + call void @swap(%String* %tmp, %String* %this) + call void @dtor.250(%String* %tmp) + ret %String* %this dumy_block: ; No predecessors! - call void @dtor.261(%String* %tmp) + call void @dtor.250(%String* %tmp) unreachable } ; Function Attrs: inlinehint nounwind define internal void @swap(%String* %this, %String* %other) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %other.addr = alloca %String* - store %String* %other, %String** %other.addr br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - %3 = load %String*, %String** %other.addr - %4 = getelementptr inbounds %String, %String* %3, i32 0, i32 0 - call void @swap.291(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) - %5 = load %String*, %String** %this.addr - %6 = getelementptr inbounds %String, %String* %5, i32 0, i32 1 - %7 = load %String*, %String** %other.addr - %8 = getelementptr inbounds %String, %String* %7, i32 0, i32 1 - call void @swap.291(%"RawPtr[Char]"* %6, %"RawPtr[Char]"* %8) - %9 = load %String*, %String** %this.addr - %10 = getelementptr inbounds %String, %String* %9, i32 0, i32 2 - %11 = load %String*, %String** %other.addr - %12 = getelementptr inbounds %String, %String* %11, i32 0, i32 2 - call void @swap.291(%"RawPtr[Char]"* %10, %"RawPtr[Char]"* %12) + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %2 = getelementptr inbounds %String, %String* %other, i32 0, i32 0 + call void @swap.279(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %2) + %3 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %4 = getelementptr inbounds %String, %String* %other, i32 0, i32 1 + call void @swap.279(%"RawPtr[Char]"* %3, %"RawPtr[Char]"* %4) + %5 = getelementptr inbounds %String, %String* %this, i32 0, i32 2 + %6 = getelementptr inbounds %String, %String* %other, i32 0, i32 2 + call void @swap.279(%"RawPtr[Char]"* %5, %"RawPtr[Char]"* %6) ret void } ; Function Attrs: inlinehint nounwind -define internal void @swap.291(%"RawPtr[Char]"* %this, %"RawPtr[Char]"* %other) #4 { - %this.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %this, %"RawPtr[Char]"** %this.addr - %other.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %other, %"RawPtr[Char]"** %other.addr +define internal void @swap.279(%"RawPtr[Char]"* %this, %"RawPtr[Char]"* %other) #4 { %t = alloca i8* br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %this.addr - %2 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - store i8* %3, i8** %t - %4 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %other.addr - %5 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %this.addr - %8 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %7, i32 0, i32 0 - store i8* %6, i8** %8 - %9 = load i8*, i8** %t - %10 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %other.addr - %11 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %10, i32 0, i32 0 - store i8* %9, i8** %11 + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + %2 = load i8*, i8** %1 + store i8* %2, i8** %t + %3 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %other, i32 0, i32 0 + %4 = load i8*, i8** %3 + %5 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + store i8* %4, i8** %5 + %6 = load i8*, i8** %t + %7 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %other, i32 0, i32 0 + store i8* %6, i8** %7 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.292"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %other) #3 { - %this.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr +define internal void @"=.280"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %other) #3 { %other.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %other, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 - %3 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr - %4 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %3, i32 0, i32 0 - call void @"=.293"(%"RangeWithLookahead[BufferedCharSourceRange]"* %2, %"RangeWithLookahead[BufferedCharSourceRange]"* %4) - %5 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr - %6 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5, i32 0, i32 1 - %7 = load %Location*, %Location** %6 - %8 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %9 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %8, i32 0, i32 1 - store %Location* %7, %Location** %9 + %1 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 0 + %2 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr + %3 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2, i32 0, i32 0 + call void @"=.281"(%"RangeWithLookahead[BufferedCharSourceRange]"* %1, %"RangeWithLookahead[BufferedCharSourceRange]"* %3) + %4 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr + %5 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4, i32 0, i32 1 + %6 = load %Location*, %Location** %5 + %7 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 1 + store %Location* %6, %Location** %7 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.293"(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"* %other) #3 { - %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr +define internal void @"=.281"(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"* %other) #3 { %other.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* store %"RangeWithLookahead[BufferedCharSourceRange]"* %other, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %1, i32 0, i32 0 - %3 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr - %4 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %3, i32 0, i32 0 - call void @"=.294"(%BufferedCharSourceRange* %2, %BufferedCharSourceRange* %4) - %5 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr + %1 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + %2 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr + %3 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %2, i32 0, i32 0 + call void @"=.282"(%BufferedCharSourceRange* %1, %BufferedCharSourceRange* %3) + %4 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %5 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr %6 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %5, i32 0, i32 1 - %7 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr - %8 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %7, i32 0, i32 1 - %9 = call %"Vector[Char]"** @"=.295"(%"Vector[Char]"* %6, %"Vector[Char]"* %8) + %7 = call %"Vector[Char]"* @"=.283"(%"Vector[Char]"* %4, %"Vector[Char]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.294"(%BufferedCharSourceRange* %this, %BufferedCharSourceRange* %other) #3 { - %this.addr = alloca %BufferedCharSourceRange* - store %BufferedCharSourceRange* %this, %BufferedCharSourceRange** %this.addr +define internal void @"=.282"(%BufferedCharSourceRange* %this, %BufferedCharSourceRange* %other) #3 { %other.addr = alloca %BufferedCharSourceRange* store %BufferedCharSourceRange* %other, %BufferedCharSourceRange** %other.addr br label %code @@ -8682,123 +7727,91 @@ code: ; preds = %0 %1 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %other.addr %2 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %1, i32 0, i32 0 %3 = load %BufferedCharSource*, %BufferedCharSource** %2 - %4 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %this.addr - %5 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %4, i32 0, i32 0 - store %BufferedCharSource* %3, %BufferedCharSource** %5 + %4 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %this, i32 0, i32 0 + store %BufferedCharSource* %3, %BufferedCharSource** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal %"Vector[Char]"** @"=.295"(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr - %other.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %other, %"Vector[Char]"** %other.addr +define internal %"Vector[Char]"* @"=.283"(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #4 { %tmp = alloca %"Vector[Char]" br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - call void @ctor.198(%"Vector[Char]"* %tmp, %"Vector[Char]"* %1) - %2 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - call void @swap.296(%"Vector[Char]"* %tmp, %"Vector[Char]"* %2) - call void @dtor.267(%"Vector[Char]"* %tmp) - ret %"Vector[Char]"** %this.addr + call void @ctor.184(%"Vector[Char]"* %tmp, %"Vector[Char]"* %other) + call void @swap.284(%"Vector[Char]"* %tmp, %"Vector[Char]"* %this) + call void @dtor.256(%"Vector[Char]"* %tmp) + ret %"Vector[Char]"* %this dumy_block: ; No predecessors! - call void @dtor.267(%"Vector[Char]"* %tmp) + call void @dtor.256(%"Vector[Char]"* %tmp) unreachable } ; Function Attrs: inlinehint nounwind -define internal void @swap.296(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr - %other.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %other, %"Vector[Char]"** %other.addr +define internal void @swap.284(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #4 { %tmp = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 - call void @ctor.192(%"RawPtr[Char]"* %tmp, %"RawPtr[Char]"* %2) - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %3, i32 0, i32 0 - %5 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %6 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %5, i32 0, i32 0 - call void @"=.200"(%"RawPtr[Char]"* %4, %"RawPtr[Char]"* %6) - %7 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %8 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %7, i32 0, i32 0 - call void @"=.200"(%"RawPtr[Char]"* %8, %"RawPtr[Char]"* %tmp) - %9 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %10 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %9, i32 0, i32 1 - call void @"=.200"(%"RawPtr[Char]"* %tmp, %"RawPtr[Char]"* %10) - %11 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %12 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %11, i32 0, i32 1 - %13 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %14 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %13, i32 0, i32 1 - call void @"=.200"(%"RawPtr[Char]"* %12, %"RawPtr[Char]"* %14) - %15 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %16 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %15, i32 0, i32 1 - call void @"=.200"(%"RawPtr[Char]"* %16, %"RawPtr[Char]"* %tmp) - %17 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %18 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %17, i32 0, i32 2 - call void @"=.200"(%"RawPtr[Char]"* %tmp, %"RawPtr[Char]"* %18) - %19 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %20 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %19, i32 0, i32 2 - %21 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %22 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %21, i32 0, i32 2 - call void @"=.200"(%"RawPtr[Char]"* %20, %"RawPtr[Char]"* %22) - %23 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %24 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %23, i32 0, i32 2 - call void @"=.200"(%"RawPtr[Char]"* %24, %"RawPtr[Char]"* %tmp) - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @"=.297"(%Token* %this, %Token* %other) #3 { - %this.addr = alloca %Token* - store %Token* %this, %Token** %this.addr + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + call void @ctor.178(%"RawPtr[Char]"* %tmp, %"RawPtr[Char]"* %1) + %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %3 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %other, i32 0, i32 0 + call void @"=.186"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %3) + %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %other, i32 0, i32 0 + call void @"=.186"(%"RawPtr[Char]"* %4, %"RawPtr[Char]"* %tmp) + %5 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + call void @"=.186"(%"RawPtr[Char]"* %tmp, %"RawPtr[Char]"* %5) + %6 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %7 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %other, i32 0, i32 1 + call void @"=.186"(%"RawPtr[Char]"* %6, %"RawPtr[Char]"* %7) + %8 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %other, i32 0, i32 1 + call void @"=.186"(%"RawPtr[Char]"* %8, %"RawPtr[Char]"* %tmp) + %9 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 2 + call void @"=.186"(%"RawPtr[Char]"* %tmp, %"RawPtr[Char]"* %9) + %10 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 2 + %11 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %other, i32 0, i32 2 + call void @"=.186"(%"RawPtr[Char]"* %10, %"RawPtr[Char]"* %11) + %12 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %other, i32 0, i32 2 + call void @"=.186"(%"RawPtr[Char]"* %12, %"RawPtr[Char]"* %tmp) + ret void +} + +; Function Attrs: alwaysinline nounwind +define internal void @"=.285"(%Token* %this, %Token* %other) #3 { %other.addr = alloca %Token* store %Token* %other, %Token** %other.addr br label %code code: ; preds = %0 - %1 = load %Token*, %Token** %this.addr - %2 = getelementptr inbounds %Token, %Token* %1, i32 0, i32 0 - %3 = load %Token*, %Token** %other.addr - %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 - call void @"=.283"(%Location* %2, %Location* %4) - %5 = load %Token*, %Token** %this.addr + %1 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 0 + %2 = load %Token*, %Token** %other.addr + %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 0 + call void @"=.272"(%Location* %1, %Location* %3) + %4 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 1 + %5 = load %Token*, %Token** %other.addr %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 1 - %7 = load %Token*, %Token** %other.addr - %8 = getelementptr inbounds %Token, %Token* %7, i32 0, i32 1 - call void @"=.298"(%TokenType* %6, %TokenType* %8) - %9 = load %Token*, %Token** %this.addr - %10 = getelementptr inbounds %Token, %Token* %9, i32 0, i32 2 + call void @"=.286"(%TokenType* %4, %TokenType* %6) + %7 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 2 + %8 = load %Token*, %Token** %other.addr + %9 = getelementptr inbounds %Token, %Token* %8, i32 0, i32 2 + %10 = call %String* @"=.278"(%String* %7, %String* %9) %11 = load %Token*, %Token** %other.addr - %12 = getelementptr inbounds %Token, %Token* %11, i32 0, i32 2 - %13 = call %String* @"=.290"(%String* %10, %String* %12) - %14 = load %Token*, %Token** %other.addr - %15 = getelementptr inbounds %Token, %Token* %14, i32 0, i32 3 - %16 = load i64, i64* %15 - %17 = load %Token*, %Token** %this.addr - %18 = getelementptr inbounds %Token, %Token* %17, i32 0, i32 3 - store i64 %16, i64* %18 - %19 = load %Token*, %Token** %other.addr - %20 = getelementptr inbounds %Token, %Token* %19, i32 0, i32 4 - %21 = load double, double* %20 - %22 = load %Token*, %Token** %this.addr - %23 = getelementptr inbounds %Token, %Token* %22, i32 0, i32 4 - store double %21, double* %23 + %12 = getelementptr inbounds %Token, %Token* %11, i32 0, i32 3 + %13 = load i64, i64* %12 + %14 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 3 + store i64 %13, i64* %14 + %15 = load %Token*, %Token** %other.addr + %16 = getelementptr inbounds %Token, %Token* %15, i32 0, i32 4 + %17 = load double, double* %16 + %18 = getelementptr inbounds %Token, %Token* %this, i32 0, i32 4 + store double %17, double* %18 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.298"(%TokenType* %this, %TokenType* %other) #3 { - %this.addr = alloca %TokenType* - store %TokenType* %this, %TokenType** %this.addr +define internal void @"=.286"(%TokenType* %this, %TokenType* %other) #3 { %other.addr = alloca %TokenType* store %TokenType* %other, %TokenType** %other.addr br label %code @@ -8807,959 +7820,749 @@ code: ; preds = %0 %1 = load %TokenType*, %TokenType** %other.addr %2 = getelementptr inbounds %TokenType, %TokenType* %1, i32 0, i32 0 %3 = load i32, i32* %2 - %4 = load %TokenType*, %TokenType** %this.addr - %5 = getelementptr inbounds %TokenType, %TokenType* %4, i32 0, i32 0 - store i32 %3, i32* %5 + %4 = getelementptr inbounds %TokenType, %TokenType* %this, i32 0, i32 0 + store i32 %3, i32* %4 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.299"(%ErrorReporter* %this, %ErrorReporter* %other) #3 { - %this.addr = alloca %ErrorReporter* - store %ErrorReporter* %this, %ErrorReporter** %this.addr +define internal void @"=.287"(%ErrorReporter* %this, %ErrorReporter* %other) #3 { %other.addr = alloca %ErrorReporter* store %ErrorReporter* %other, %ErrorReporter** %other.addr br label %code code: ; preds = %0 - %1 = load %ErrorReporter*, %ErrorReporter** %this.addr - %2 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %1, i32 0, i32 0 - %3 = load %ErrorReporter*, %ErrorReporter** %other.addr - %4 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %3, i32 0, i32 0 - call void @"=.288"(%UntypedPtr* %2, %UntypedPtr* %4) - %5 = load %ErrorReporter*, %ErrorReporter** %this.addr + %1 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %this, i32 0, i32 0 + %2 = load %ErrorReporter*, %ErrorReporter** %other.addr + %3 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) + %4 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %this, i32 0, i32 1 + %5 = load %ErrorReporter*, %ErrorReporter** %other.addr %6 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %5, i32 0, i32 1 - %7 = load %ErrorReporter*, %ErrorReporter** %other.addr - %8 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %7, i32 0, i32 1 - call void @"=.300"(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %6, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %8) + call void @"=.288"(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %4, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.300"(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %other, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %other.addr +define internal void @"=.288"(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* + store %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %other, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.301"(%"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"* %other) #3 { - %this.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* - store %"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr +define internal void @"=.289"(%"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"* %other) #3 { %other.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* store %"SparrowLayoutDecoder[SparrowScanner]"* %other, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %1, i32 0, i32 0 - %3 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %3, i32 0, i32 0 - call void @"=.302"(%"RangeWithLookahead[SparrowScanner]"* %2, %"RangeWithLookahead[SparrowScanner]"* %4) - %5 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr + %1 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + %2 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr + %3 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %2, i32 0, i32 0 + call void @"=.290"(%"RangeWithLookahead[SparrowScanner]"* %1, %"RangeWithLookahead[SparrowScanner]"* %3) + %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 1 + %5 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %5, i32 0, i32 1 - %7 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %8 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %7, i32 0, i32 1 - call void @"=.299"(%ErrorReporter* %6, %ErrorReporter* %8) - %9 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %10 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %9, i32 0, i32 2 - %11 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %12 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %11, i32 0, i32 2 - %13 = call %"Vector[UInt]"** @"=.305"(%"Vector[UInt]"* %10, %"Vector[UInt]"* %12) - %14 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %15 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %14, i32 0, i32 3 + call void @"=.287"(%ErrorReporter* %4, %ErrorReporter* %6) + %7 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + %8 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr + %9 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %8, i32 0, i32 2 + %10 = call %"Vector[UInt]"* @"=.293"(%"Vector[UInt]"* %7, %"Vector[UInt]"* %9) + %11 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + %12 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr + %13 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %12, i32 0, i32 3 + %14 = call %"Vector[Char]"* @"=.283"(%"Vector[Char]"* %11, %"Vector[Char]"* %13) + %15 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 4 %16 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %17 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %16, i32 0, i32 3 - %18 = call %"Vector[Char]"** @"=.295"(%"Vector[Char]"* %15, %"Vector[Char]"* %17) - %19 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %20 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %19, i32 0, i32 4 - %21 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %22 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %21, i32 0, i32 4 - call void @"=.298"(%TokenType* %20, %TokenType* %22) - %23 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr - %24 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %23, i32 0, i32 5 - %25 = load i32, i32* %24 - %26 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %27 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %26, i32 0, i32 5 - store i32 %25, i32* %27 + %17 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %16, i32 0, i32 4 + call void @"=.286"(%TokenType* %15, %TokenType* %17) + %18 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr + %19 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %18, i32 0, i32 5 + %20 = load i32, i32* %19 + %21 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + store i32 %20, i32* %21 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.302"(%"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"* %other) #3 { - %this.addr = alloca %"RangeWithLookahead[SparrowScanner]"* - store %"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"** %this.addr +define internal void @"=.290"(%"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"* %other) #3 { %other.addr = alloca %"RangeWithLookahead[SparrowScanner]"* store %"RangeWithLookahead[SparrowScanner]"* %other, %"RangeWithLookahead[SparrowScanner]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %1, i32 0, i32 0 - %3 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %other.addr - %4 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %3, i32 0, i32 0 - call void @"=.282"(%SparrowScanner* %2, %SparrowScanner* %4) - %5 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 0 + %2 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %other.addr + %3 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %2, i32 0, i32 0 + call void @"=.271"(%SparrowScanner* %1, %SparrowScanner* %3) + %4 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 + %5 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %other.addr %6 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %5, i32 0, i32 1 - %7 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %other.addr - %8 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %7, i32 0, i32 1 - %9 = call %"Vector[Token]"** @"=.303"(%"Vector[Token]"* %6, %"Vector[Token]"* %8) + %7 = call %"Vector[Token]"* @"=.291"(%"Vector[Token]"* %4, %"Vector[Token]"* %6) ret void } ; Function Attrs: inlinehint nounwind -define internal %"Vector[Token]"** @"=.303"(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr - %other.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %other, %"Vector[Token]"** %other.addr +define internal %"Vector[Token]"* @"=.291"(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #4 { %tmp = alloca %"Vector[Token]" br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - call void @ctor.208(%"Vector[Token]"* %tmp, %"Vector[Token]"* %1) - %2 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - call void @swap.304(%"Vector[Token]"* %tmp, %"Vector[Token]"* %2) - call void @dtor.263(%"Vector[Token]"* %tmp) - ret %"Vector[Token]"** %this.addr + call void @ctor.194(%"Vector[Token]"* %tmp, %"Vector[Token]"* %other) + call void @swap.292(%"Vector[Token]"* %tmp, %"Vector[Token]"* %this) + call void @dtor.252(%"Vector[Token]"* %tmp) + ret %"Vector[Token]"* %this dumy_block: ; No predecessors! - call void @dtor.263(%"Vector[Token]"* %tmp) + call void @dtor.252(%"Vector[Token]"* %tmp) unreachable } ; Function Attrs: inlinehint nounwind -define internal void @swap.304(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr - %other.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %other, %"Vector[Token]"** %other.addr +define internal void @swap.292(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #4 { %tmp = alloca %"RawPtr[Token]" br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 - call void @ctor.217(%"RawPtr[Token]"* %tmp, %"RawPtr[Token]"* %2) - %3 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %3, i32 0, i32 0 - %5 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %6 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %5, i32 0, i32 0 - call void @"=.212"(%"RawPtr[Token]"* %4, %"RawPtr[Token]"* %6) - %7 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %8 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %7, i32 0, i32 0 - call void @"=.212"(%"RawPtr[Token]"* %8, %"RawPtr[Token]"* %tmp) - %9 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %10 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %9, i32 0, i32 1 - call void @"=.212"(%"RawPtr[Token]"* %tmp, %"RawPtr[Token]"* %10) - %11 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %12 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %11, i32 0, i32 1 - %13 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %14 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %13, i32 0, i32 1 - call void @"=.212"(%"RawPtr[Token]"* %12, %"RawPtr[Token]"* %14) - %15 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %16 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %15, i32 0, i32 1 - call void @"=.212"(%"RawPtr[Token]"* %16, %"RawPtr[Token]"* %tmp) - %17 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %18 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %17, i32 0, i32 2 - call void @"=.212"(%"RawPtr[Token]"* %tmp, %"RawPtr[Token]"* %18) - %19 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %20 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %19, i32 0, i32 2 - %21 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %22 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %21, i32 0, i32 2 - call void @"=.212"(%"RawPtr[Token]"* %20, %"RawPtr[Token]"* %22) - %23 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %24 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %23, i32 0, i32 2 - call void @"=.212"(%"RawPtr[Token]"* %24, %"RawPtr[Token]"* %tmp) - ret void -} - -; Function Attrs: inlinehint nounwind -define internal %"Vector[UInt]"** @"=.305"(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr - %other.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %other, %"Vector[UInt]"** %other.addr + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + call void @ctor.204(%"RawPtr[Token]"* %tmp, %"RawPtr[Token]"* %1) + %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %3 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %other, i32 0, i32 0 + call void @"=.198"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %3) + %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %other, i32 0, i32 0 + call void @"=.198"(%"RawPtr[Token]"* %4, %"RawPtr[Token]"* %tmp) + %5 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + call void @"=.198"(%"RawPtr[Token]"* %tmp, %"RawPtr[Token]"* %5) + %6 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %7 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %other, i32 0, i32 1 + call void @"=.198"(%"RawPtr[Token]"* %6, %"RawPtr[Token]"* %7) + %8 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %other, i32 0, i32 1 + call void @"=.198"(%"RawPtr[Token]"* %8, %"RawPtr[Token]"* %tmp) + %9 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 2 + call void @"=.198"(%"RawPtr[Token]"* %tmp, %"RawPtr[Token]"* %9) + %10 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 2 + %11 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %other, i32 0, i32 2 + call void @"=.198"(%"RawPtr[Token]"* %10, %"RawPtr[Token]"* %11) + %12 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %other, i32 0, i32 2 + call void @"=.198"(%"RawPtr[Token]"* %12, %"RawPtr[Token]"* %tmp) + ret void +} + +; Function Attrs: inlinehint nounwind +define internal %"Vector[UInt]"* @"=.293"(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #4 { %tmp = alloca %"Vector[UInt]" br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - call void @ctor.221(%"Vector[UInt]"* %tmp, %"Vector[UInt]"* %1) - %2 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - call void @swap.306(%"Vector[UInt]"* %tmp, %"Vector[UInt]"* %2) - call void @dtor.270(%"Vector[UInt]"* %tmp) - ret %"Vector[UInt]"** %this.addr + call void @ctor.208(%"Vector[UInt]"* %tmp, %"Vector[UInt]"* %other) + call void @swap.294(%"Vector[UInt]"* %tmp, %"Vector[UInt]"* %this) + call void @dtor.259(%"Vector[UInt]"* %tmp) + ret %"Vector[UInt]"* %this dumy_block: ; No predecessors! - call void @dtor.270(%"Vector[UInt]"* %tmp) + call void @dtor.259(%"Vector[UInt]"* %tmp) unreachable } ; Function Attrs: inlinehint nounwind -define internal void @swap.306(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr - %other.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %other, %"Vector[UInt]"** %other.addr +define internal void @swap.294(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #4 { %tmp = alloca %"RawPtr[UInt]" br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 0 - call void @ctor.230(%"RawPtr[UInt]"* %tmp, %"RawPtr[UInt]"* %2) - %3 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %3, i32 0, i32 0 - %5 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %6 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %5, i32 0, i32 0 - call void @"=.225"(%"RawPtr[UInt]"* %4, %"RawPtr[UInt]"* %6) - %7 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %8 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %7, i32 0, i32 0 - call void @"=.225"(%"RawPtr[UInt]"* %8, %"RawPtr[UInt]"* %tmp) - %9 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %10 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %9, i32 0, i32 1 - call void @"=.225"(%"RawPtr[UInt]"* %tmp, %"RawPtr[UInt]"* %10) - %11 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %12 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %11, i32 0, i32 1 - %13 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %14 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %13, i32 0, i32 1 - call void @"=.225"(%"RawPtr[UInt]"* %12, %"RawPtr[UInt]"* %14) - %15 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %16 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %15, i32 0, i32 1 - call void @"=.225"(%"RawPtr[UInt]"* %16, %"RawPtr[UInt]"* %tmp) - %17 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %18 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %17, i32 0, i32 2 - call void @"=.225"(%"RawPtr[UInt]"* %tmp, %"RawPtr[UInt]"* %18) - %19 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %20 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %19, i32 0, i32 2 - %21 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %22 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %21, i32 0, i32 2 - call void @"=.225"(%"RawPtr[UInt]"* %20, %"RawPtr[UInt]"* %22) - %23 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %24 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %23, i32 0, i32 2 - call void @"=.225"(%"RawPtr[UInt]"* %24, %"RawPtr[UInt]"* %tmp) - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @"=.307"(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + call void @ctor.218(%"RawPtr[UInt]"* %tmp, %"RawPtr[UInt]"* %1) + %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + %3 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %other, i32 0, i32 0 + call void @"=.212"(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %3) + %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %other, i32 0, i32 0 + call void @"=.212"(%"RawPtr[UInt]"* %4, %"RawPtr[UInt]"* %tmp) + %5 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + call void @"=.212"(%"RawPtr[UInt]"* %tmp, %"RawPtr[UInt]"* %5) + %6 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %7 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %other, i32 0, i32 1 + call void @"=.212"(%"RawPtr[UInt]"* %6, %"RawPtr[UInt]"* %7) + %8 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %other, i32 0, i32 1 + call void @"=.212"(%"RawPtr[UInt]"* %8, %"RawPtr[UInt]"* %tmp) + %9 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 2 + call void @"=.212"(%"RawPtr[UInt]"* %tmp, %"RawPtr[UInt]"* %9) + %10 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 2 + %11 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %other, i32 0, i32 2 + call void @"=.212"(%"RawPtr[UInt]"* %10, %"RawPtr[UInt]"* %11) + %12 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %other, i32 0, i32 2 + call void @"=.212"(%"RawPtr[UInt]"* %12, %"RawPtr[UInt]"* %tmp) + ret void +} + +; Function Attrs: alwaysinline nounwind +define internal void @"=.295"(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { %other.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %other, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 - %3 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 0 - call void @"=.308"(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %4) - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 0, i32 0 + call void @"=.296"(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %3) + %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 + call void @"=.285"(%Token* %4, %Token* %6) %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 1 - call void @"=.297"(%Token* %6, %Token* %8) - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, i32 0, i32 2 - %11 = load i1, i1* %10 - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, i32 0, i32 2 - store i1 %11, i1* %13 - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %15 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, i32 0, i32 3 - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %17 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, i32 0, i32 3 - call void @"=.309"(%AstBuilder* %15, %AstBuilder* %17) - %18 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %19 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %18, i32 0, i32 4 - %20 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %21 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %20, i32 0, i32 4 - call void @"=.299"(%ErrorReporter* %19, %ErrorReporter* %21) + %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 2 + %9 = load i1, i1* %8 + %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 2 + store i1 %9, i1* %10 + %11 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr + %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, i32 0, i32 3 + call void @"=.297"(%AstBuilder* %11, %AstBuilder* %13) + %14 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 4 + %15 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr + %16 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %15, i32 0, i32 4 + call void @"=.287"(%ErrorReporter* %14, %ErrorReporter* %16) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.308"(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { - %this.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* - store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal void @"=.296"(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { %other.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %other, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 - %3 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %4 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 0 - call void @"=.301"(%"SparrowLayoutDecoder[SparrowScanner]"* %2, %"SparrowLayoutDecoder[SparrowScanner]"* %4) - %5 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + %2 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr + %3 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 0, i32 0 + call void @"=.289"(%"SparrowLayoutDecoder[SparrowScanner]"* %1, %"SparrowLayoutDecoder[SparrowScanner]"* %3) + %4 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %5 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr %6 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr - %8 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 1 - %9 = call %"Vector[Token]"** @"=.303"(%"Vector[Token]"* %6, %"Vector[Token]"* %8) + %7 = call %"Vector[Token]"* @"=.291"(%"Vector[Token]"* %4, %"Vector[Token]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.309"(%AstBuilder* %this, %AstBuilder* %other) #3 { - %this.addr = alloca %AstBuilder* - store %AstBuilder* %this, %AstBuilder** %this.addr +define internal void @"=.297"(%AstBuilder* %this, %AstBuilder* %other) #3 { %other.addr = alloca %AstBuilder* store %AstBuilder* %other, %AstBuilder** %other.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %this.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 0 - %3 = load %AstBuilder*, %AstBuilder** %other.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - call void @"=.288"(%UntypedPtr* %2, %UntypedPtr* %4) - %5 = load %AstBuilder*, %AstBuilder** %this.addr + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 0 + %2 = load %AstBuilder*, %AstBuilder** %other.addr + %3 = getelementptr inbounds %AstBuilder, %AstBuilder* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) + %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 1 + %5 = load %AstBuilder*, %AstBuilder** %other.addr %6 = getelementptr inbounds %AstBuilder, %AstBuilder* %5, i32 0, i32 1 - %7 = load %AstBuilder*, %AstBuilder** %other.addr - %8 = getelementptr inbounds %AstBuilder, %AstBuilder* %7, i32 0, i32 1 - call void @"=.310"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %6, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %8) - %9 = load %AstBuilder*, %AstBuilder** %this.addr - %10 = getelementptr inbounds %AstBuilder, %AstBuilder* %9, i32 0, i32 2 + call void @"=.298"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %4, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %6) + %7 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 2 + %8 = load %AstBuilder*, %AstBuilder** %other.addr + %9 = getelementptr inbounds %AstBuilder, %AstBuilder* %8, i32 0, i32 2 + call void @"=.299"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %7, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %9) + %10 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 3 %11 = load %AstBuilder*, %AstBuilder** %other.addr - %12 = getelementptr inbounds %AstBuilder, %AstBuilder* %11, i32 0, i32 2 - call void @"=.311"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %10, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %12) - %13 = load %AstBuilder*, %AstBuilder** %this.addr - %14 = getelementptr inbounds %AstBuilder, %AstBuilder* %13, i32 0, i32 3 - %15 = load %AstBuilder*, %AstBuilder** %other.addr - %16 = getelementptr inbounds %AstBuilder, %AstBuilder* %15, i32 0, i32 3 - call void @"=.311"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %14, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %16) - %17 = load %AstBuilder*, %AstBuilder** %this.addr - %18 = getelementptr inbounds %AstBuilder, %AstBuilder* %17, i32 0, i32 4 - %19 = load %AstBuilder*, %AstBuilder** %other.addr - %20 = getelementptr inbounds %AstBuilder, %AstBuilder* %19, i32 0, i32 4 - call void @"=.312"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %18, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %20) - %21 = load %AstBuilder*, %AstBuilder** %this.addr - %22 = getelementptr inbounds %AstBuilder, %AstBuilder* %21, i32 0, i32 5 + %12 = getelementptr inbounds %AstBuilder, %AstBuilder* %11, i32 0, i32 3 + call void @"=.299"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %10, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %12) + %13 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 4 + %14 = load %AstBuilder*, %AstBuilder** %other.addr + %15 = getelementptr inbounds %AstBuilder, %AstBuilder* %14, i32 0, i32 4 + call void @"=.300"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %13, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %15) + %16 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 5 + %17 = load %AstBuilder*, %AstBuilder** %other.addr + %18 = getelementptr inbounds %AstBuilder, %AstBuilder* %17, i32 0, i32 5 + call void @"=.301"(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %16, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %18) + %19 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 6 + %20 = load %AstBuilder*, %AstBuilder** %other.addr + %21 = getelementptr inbounds %AstBuilder, %AstBuilder* %20, i32 0, i32 6 + call void @"=.302"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %19, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %21) + %22 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 7 %23 = load %AstBuilder*, %AstBuilder** %other.addr - %24 = getelementptr inbounds %AstBuilder, %AstBuilder* %23, i32 0, i32 5 - call void @"=.313"(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %22, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %24) - %25 = load %AstBuilder*, %AstBuilder** %this.addr - %26 = getelementptr inbounds %AstBuilder, %AstBuilder* %25, i32 0, i32 6 - %27 = load %AstBuilder*, %AstBuilder** %other.addr - %28 = getelementptr inbounds %AstBuilder, %AstBuilder* %27, i32 0, i32 6 - call void @"=.314"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %26, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %28) - %29 = load %AstBuilder*, %AstBuilder** %this.addr - %30 = getelementptr inbounds %AstBuilder, %AstBuilder* %29, i32 0, i32 7 - %31 = load %AstBuilder*, %AstBuilder** %other.addr - %32 = getelementptr inbounds %AstBuilder, %AstBuilder* %31, i32 0, i32 7 - call void @"=.315"(%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %30, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %32) - %33 = load %AstBuilder*, %AstBuilder** %this.addr - %34 = getelementptr inbounds %AstBuilder, %AstBuilder* %33, i32 0, i32 8 + %24 = getelementptr inbounds %AstBuilder, %AstBuilder* %23, i32 0, i32 7 + call void @"=.303"(%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %22, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %24) + %25 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 8 + %26 = load %AstBuilder*, %AstBuilder** %other.addr + %27 = getelementptr inbounds %AstBuilder, %AstBuilder* %26, i32 0, i32 8 + call void @"=.300"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %25, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %27) + %28 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 9 + %29 = load %AstBuilder*, %AstBuilder** %other.addr + %30 = getelementptr inbounds %AstBuilder, %AstBuilder* %29, i32 0, i32 9 + call void @"=.304"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %28, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %30) + %31 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 10 + %32 = load %AstBuilder*, %AstBuilder** %other.addr + %33 = getelementptr inbounds %AstBuilder, %AstBuilder* %32, i32 0, i32 10 + call void @"=.300"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %31, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %33) + %34 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 11 %35 = load %AstBuilder*, %AstBuilder** %other.addr - %36 = getelementptr inbounds %AstBuilder, %AstBuilder* %35, i32 0, i32 8 - call void @"=.312"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %34, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %36) - %37 = load %AstBuilder*, %AstBuilder** %this.addr - %38 = getelementptr inbounds %AstBuilder, %AstBuilder* %37, i32 0, i32 9 - %39 = load %AstBuilder*, %AstBuilder** %other.addr - %40 = getelementptr inbounds %AstBuilder, %AstBuilder* %39, i32 0, i32 9 - call void @"=.316"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %38, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %40) - %41 = load %AstBuilder*, %AstBuilder** %this.addr - %42 = getelementptr inbounds %AstBuilder, %AstBuilder* %41, i32 0, i32 10 - %43 = load %AstBuilder*, %AstBuilder** %other.addr - %44 = getelementptr inbounds %AstBuilder, %AstBuilder* %43, i32 0, i32 10 - call void @"=.312"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %42, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %44) - %45 = load %AstBuilder*, %AstBuilder** %this.addr - %46 = getelementptr inbounds %AstBuilder, %AstBuilder* %45, i32 0, i32 11 + %36 = getelementptr inbounds %AstBuilder, %AstBuilder* %35, i32 0, i32 11 + call void @"=.300"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %34, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %36) + %37 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 12 + %38 = load %AstBuilder*, %AstBuilder** %other.addr + %39 = getelementptr inbounds %AstBuilder, %AstBuilder* %38, i32 0, i32 12 + call void @"=.300"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %37, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %39) + %40 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 13 + %41 = load %AstBuilder*, %AstBuilder** %other.addr + %42 = getelementptr inbounds %AstBuilder, %AstBuilder* %41, i32 0, i32 13 + call void @"=.305"(%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %40, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %42) + %43 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 14 + %44 = load %AstBuilder*, %AstBuilder** %other.addr + %45 = getelementptr inbounds %AstBuilder, %AstBuilder* %44, i32 0, i32 14 + call void @"=.306"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %43, %"FunctionPtr2[Node, UntypedPtr, Node]"* %45) + %46 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 15 %47 = load %AstBuilder*, %AstBuilder** %other.addr - %48 = getelementptr inbounds %AstBuilder, %AstBuilder* %47, i32 0, i32 11 - call void @"=.312"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %46, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %48) - %49 = load %AstBuilder*, %AstBuilder** %this.addr - %50 = getelementptr inbounds %AstBuilder, %AstBuilder* %49, i32 0, i32 12 - %51 = load %AstBuilder*, %AstBuilder** %other.addr - %52 = getelementptr inbounds %AstBuilder, %AstBuilder* %51, i32 0, i32 12 - call void @"=.317"(%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %50, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %52) - %53 = load %AstBuilder*, %AstBuilder** %this.addr - %54 = getelementptr inbounds %AstBuilder, %AstBuilder* %53, i32 0, i32 13 - %55 = load %AstBuilder*, %AstBuilder** %other.addr - %56 = getelementptr inbounds %AstBuilder, %AstBuilder* %55, i32 0, i32 13 - call void @"=.318"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %54, %"FunctionPtr2[Node, UntypedPtr, Node]"* %56) - %57 = load %AstBuilder*, %AstBuilder** %this.addr - %58 = getelementptr inbounds %AstBuilder, %AstBuilder* %57, i32 0, i32 14 + %48 = getelementptr inbounds %AstBuilder, %AstBuilder* %47, i32 0, i32 15 + call void @"=.307"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %46, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %48) + %49 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 16 + %50 = load %AstBuilder*, %AstBuilder** %other.addr + %51 = getelementptr inbounds %AstBuilder, %AstBuilder* %50, i32 0, i32 16 + call void @"=.308"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %49, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %51) + %52 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 17 + %53 = load %AstBuilder*, %AstBuilder** %other.addr + %54 = getelementptr inbounds %AstBuilder, %AstBuilder* %53, i32 0, i32 17 + call void @"=.301"(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %52, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %54) + %55 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 18 + %56 = load %AstBuilder*, %AstBuilder** %other.addr + %57 = getelementptr inbounds %AstBuilder, %AstBuilder* %56, i32 0, i32 18 + call void @"=.309"(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %55, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %57) + %58 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 19 %59 = load %AstBuilder*, %AstBuilder** %other.addr - %60 = getelementptr inbounds %AstBuilder, %AstBuilder* %59, i32 0, i32 14 - call void @"=.319"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %58, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %60) - %61 = load %AstBuilder*, %AstBuilder** %this.addr - %62 = getelementptr inbounds %AstBuilder, %AstBuilder* %61, i32 0, i32 15 - %63 = load %AstBuilder*, %AstBuilder** %other.addr - %64 = getelementptr inbounds %AstBuilder, %AstBuilder* %63, i32 0, i32 15 - call void @"=.320"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %62, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %64) - %65 = load %AstBuilder*, %AstBuilder** %this.addr - %66 = getelementptr inbounds %AstBuilder, %AstBuilder* %65, i32 0, i32 16 - %67 = load %AstBuilder*, %AstBuilder** %other.addr - %68 = getelementptr inbounds %AstBuilder, %AstBuilder* %67, i32 0, i32 16 - call void @"=.313"(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %66, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %68) - %69 = load %AstBuilder*, %AstBuilder** %this.addr - %70 = getelementptr inbounds %AstBuilder, %AstBuilder* %69, i32 0, i32 17 + %60 = getelementptr inbounds %AstBuilder, %AstBuilder* %59, i32 0, i32 19 + call void @"=.307"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %58, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %60) + %61 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 20 + %62 = load %AstBuilder*, %AstBuilder** %other.addr + %63 = getelementptr inbounds %AstBuilder, %AstBuilder* %62, i32 0, i32 20 + call void @"=.307"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %61, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %63) + %64 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 21 + %65 = load %AstBuilder*, %AstBuilder** %other.addr + %66 = getelementptr inbounds %AstBuilder, %AstBuilder* %65, i32 0, i32 21 + call void @"=.307"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %64, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %66) + %67 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 22 + %68 = load %AstBuilder*, %AstBuilder** %other.addr + %69 = getelementptr inbounds %AstBuilder, %AstBuilder* %68, i32 0, i32 22 + call void @"=.299"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %67, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %69) + %70 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 23 %71 = load %AstBuilder*, %AstBuilder** %other.addr - %72 = getelementptr inbounds %AstBuilder, %AstBuilder* %71, i32 0, i32 17 - call void @"=.321"(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %70, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %72) - %73 = load %AstBuilder*, %AstBuilder** %this.addr - %74 = getelementptr inbounds %AstBuilder, %AstBuilder* %73, i32 0, i32 18 - %75 = load %AstBuilder*, %AstBuilder** %other.addr - %76 = getelementptr inbounds %AstBuilder, %AstBuilder* %75, i32 0, i32 18 - call void @"=.319"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %74, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %76) - %77 = load %AstBuilder*, %AstBuilder** %this.addr - %78 = getelementptr inbounds %AstBuilder, %AstBuilder* %77, i32 0, i32 19 - %79 = load %AstBuilder*, %AstBuilder** %other.addr - %80 = getelementptr inbounds %AstBuilder, %AstBuilder* %79, i32 0, i32 19 - call void @"=.319"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %78, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %80) - %81 = load %AstBuilder*, %AstBuilder** %this.addr - %82 = getelementptr inbounds %AstBuilder, %AstBuilder* %81, i32 0, i32 20 + %72 = getelementptr inbounds %AstBuilder, %AstBuilder* %71, i32 0, i32 23 + call void @"=.310"(%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %70, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %72) + %73 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 24 + %74 = load %AstBuilder*, %AstBuilder** %other.addr + %75 = getelementptr inbounds %AstBuilder, %AstBuilder* %74, i32 0, i32 24 + call void @"=.311"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %73, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %75) + %76 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 25 + %77 = load %AstBuilder*, %AstBuilder** %other.addr + %78 = getelementptr inbounds %AstBuilder, %AstBuilder* %77, i32 0, i32 25 + call void @"=.312"(%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %76, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %78) + %79 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 26 + %80 = load %AstBuilder*, %AstBuilder** %other.addr + %81 = getelementptr inbounds %AstBuilder, %AstBuilder* %80, i32 0, i32 26 + call void @"=.313"(%"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %79, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %81) + %82 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 27 %83 = load %AstBuilder*, %AstBuilder** %other.addr - %84 = getelementptr inbounds %AstBuilder, %AstBuilder* %83, i32 0, i32 20 - call void @"=.319"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %82, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %84) - %85 = load %AstBuilder*, %AstBuilder** %this.addr - %86 = getelementptr inbounds %AstBuilder, %AstBuilder* %85, i32 0, i32 21 - %87 = load %AstBuilder*, %AstBuilder** %other.addr - %88 = getelementptr inbounds %AstBuilder, %AstBuilder* %87, i32 0, i32 21 - call void @"=.311"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %86, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %88) - %89 = load %AstBuilder*, %AstBuilder** %this.addr - %90 = getelementptr inbounds %AstBuilder, %AstBuilder* %89, i32 0, i32 22 - %91 = load %AstBuilder*, %AstBuilder** %other.addr - %92 = getelementptr inbounds %AstBuilder, %AstBuilder* %91, i32 0, i32 22 - call void @"=.322"(%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %90, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %92) - %93 = load %AstBuilder*, %AstBuilder** %this.addr - %94 = getelementptr inbounds %AstBuilder, %AstBuilder* %93, i32 0, i32 23 + %84 = getelementptr inbounds %AstBuilder, %AstBuilder* %83, i32 0, i32 27 + call void @"=.314"(%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %82, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %84) + %85 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 28 + %86 = load %AstBuilder*, %AstBuilder** %other.addr + %87 = getelementptr inbounds %AstBuilder, %AstBuilder* %86, i32 0, i32 28 + call void @"=.315"(%"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %85, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %87) + %88 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 29 + %89 = load %AstBuilder*, %AstBuilder** %other.addr + %90 = getelementptr inbounds %AstBuilder, %AstBuilder* %89, i32 0, i32 29 + call void @"=.316"(%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %88, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %90) + %91 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 30 + %92 = load %AstBuilder*, %AstBuilder** %other.addr + %93 = getelementptr inbounds %AstBuilder, %AstBuilder* %92, i32 0, i32 30 + call void @"=.317"(%"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %91, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %93) + %94 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 31 %95 = load %AstBuilder*, %AstBuilder** %other.addr - %96 = getelementptr inbounds %AstBuilder, %AstBuilder* %95, i32 0, i32 23 - call void @"=.323"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %94, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %96) - %97 = load %AstBuilder*, %AstBuilder** %this.addr - %98 = getelementptr inbounds %AstBuilder, %AstBuilder* %97, i32 0, i32 24 - %99 = load %AstBuilder*, %AstBuilder** %other.addr - %100 = getelementptr inbounds %AstBuilder, %AstBuilder* %99, i32 0, i32 24 - call void @"=.324"(%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %98, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %100) - %101 = load %AstBuilder*, %AstBuilder** %this.addr - %102 = getelementptr inbounds %AstBuilder, %AstBuilder* %101, i32 0, i32 25 - %103 = load %AstBuilder*, %AstBuilder** %other.addr - %104 = getelementptr inbounds %AstBuilder, %AstBuilder* %103, i32 0, i32 25 - call void @"=.325"(%"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %102, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %104) - %105 = load %AstBuilder*, %AstBuilder** %this.addr - %106 = getelementptr inbounds %AstBuilder, %AstBuilder* %105, i32 0, i32 26 + %96 = getelementptr inbounds %AstBuilder, %AstBuilder* %95, i32 0, i32 31 + call void @"=.318"(%"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %94, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %96) + %97 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 32 + %98 = load %AstBuilder*, %AstBuilder** %other.addr + %99 = getelementptr inbounds %AstBuilder, %AstBuilder* %98, i32 0, i32 32 + call void @"=.319"(%"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %97, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %99) + %100 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 33 + %101 = load %AstBuilder*, %AstBuilder** %other.addr + %102 = getelementptr inbounds %AstBuilder, %AstBuilder* %101, i32 0, i32 33 + call void @"=.309"(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %100, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %102) + %103 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 34 + %104 = load %AstBuilder*, %AstBuilder** %other.addr + %105 = getelementptr inbounds %AstBuilder, %AstBuilder* %104, i32 0, i32 34 + call void @"=.320"(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %103, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %105) + %106 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 35 %107 = load %AstBuilder*, %AstBuilder** %other.addr - %108 = getelementptr inbounds %AstBuilder, %AstBuilder* %107, i32 0, i32 26 - call void @"=.326"(%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %106, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %108) - %109 = load %AstBuilder*, %AstBuilder** %this.addr - %110 = getelementptr inbounds %AstBuilder, %AstBuilder* %109, i32 0, i32 27 - %111 = load %AstBuilder*, %AstBuilder** %other.addr - %112 = getelementptr inbounds %AstBuilder, %AstBuilder* %111, i32 0, i32 27 - call void @"=.327"(%"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %110, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %112) - %113 = load %AstBuilder*, %AstBuilder** %this.addr - %114 = getelementptr inbounds %AstBuilder, %AstBuilder* %113, i32 0, i32 28 - %115 = load %AstBuilder*, %AstBuilder** %other.addr - %116 = getelementptr inbounds %AstBuilder, %AstBuilder* %115, i32 0, i32 28 - call void @"=.328"(%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %114, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %116) - %117 = load %AstBuilder*, %AstBuilder** %this.addr - %118 = getelementptr inbounds %AstBuilder, %AstBuilder* %117, i32 0, i32 29 + %108 = getelementptr inbounds %AstBuilder, %AstBuilder* %107, i32 0, i32 35 + call void @"=.321"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %106, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %108) + %109 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 36 + %110 = load %AstBuilder*, %AstBuilder** %other.addr + %111 = getelementptr inbounds %AstBuilder, %AstBuilder* %110, i32 0, i32 36 + call void @"=.302"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %109, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %111) + %112 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 37 + %113 = load %AstBuilder*, %AstBuilder** %other.addr + %114 = getelementptr inbounds %AstBuilder, %AstBuilder* %113, i32 0, i32 37 + call void @"=.321"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %112, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %114) + %115 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 38 + %116 = load %AstBuilder*, %AstBuilder** %other.addr + %117 = getelementptr inbounds %AstBuilder, %AstBuilder* %116, i32 0, i32 38 + call void @"=.311"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %115, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %117) + %118 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 39 %119 = load %AstBuilder*, %AstBuilder** %other.addr - %120 = getelementptr inbounds %AstBuilder, %AstBuilder* %119, i32 0, i32 29 - call void @"=.329"(%"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %118, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %120) - %121 = load %AstBuilder*, %AstBuilder** %this.addr - %122 = getelementptr inbounds %AstBuilder, %AstBuilder* %121, i32 0, i32 30 - %123 = load %AstBuilder*, %AstBuilder** %other.addr - %124 = getelementptr inbounds %AstBuilder, %AstBuilder* %123, i32 0, i32 30 - call void @"=.330"(%"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %122, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %124) - %125 = load %AstBuilder*, %AstBuilder** %this.addr - %126 = getelementptr inbounds %AstBuilder, %AstBuilder* %125, i32 0, i32 31 - %127 = load %AstBuilder*, %AstBuilder** %other.addr - %128 = getelementptr inbounds %AstBuilder, %AstBuilder* %127, i32 0, i32 31 - call void @"=.331"(%"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %126, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %128) - %129 = load %AstBuilder*, %AstBuilder** %this.addr - %130 = getelementptr inbounds %AstBuilder, %AstBuilder* %129, i32 0, i32 32 - %131 = load %AstBuilder*, %AstBuilder** %other.addr - %132 = getelementptr inbounds %AstBuilder, %AstBuilder* %131, i32 0, i32 32 - call void @"=.321"(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %130, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %132) - %133 = load %AstBuilder*, %AstBuilder** %this.addr - %134 = getelementptr inbounds %AstBuilder, %AstBuilder* %133, i32 0, i32 33 - %135 = load %AstBuilder*, %AstBuilder** %other.addr - %136 = getelementptr inbounds %AstBuilder, %AstBuilder* %135, i32 0, i32 33 - call void @"=.332"(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %134, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %136) - %137 = load %AstBuilder*, %AstBuilder** %this.addr - %138 = getelementptr inbounds %AstBuilder, %AstBuilder* %137, i32 0, i32 34 - %139 = load %AstBuilder*, %AstBuilder** %other.addr - %140 = getelementptr inbounds %AstBuilder, %AstBuilder* %139, i32 0, i32 34 - call void @"=.333"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %138, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %140) - %141 = load %AstBuilder*, %AstBuilder** %this.addr - %142 = getelementptr inbounds %AstBuilder, %AstBuilder* %141, i32 0, i32 35 - %143 = load %AstBuilder*, %AstBuilder** %other.addr - %144 = getelementptr inbounds %AstBuilder, %AstBuilder* %143, i32 0, i32 35 - call void @"=.314"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %142, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %144) - %145 = load %AstBuilder*, %AstBuilder** %this.addr - %146 = getelementptr inbounds %AstBuilder, %AstBuilder* %145, i32 0, i32 36 - %147 = load %AstBuilder*, %AstBuilder** %other.addr - %148 = getelementptr inbounds %AstBuilder, %AstBuilder* %147, i32 0, i32 36 - call void @"=.333"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %146, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %148) - %149 = load %AstBuilder*, %AstBuilder** %this.addr - %150 = getelementptr inbounds %AstBuilder, %AstBuilder* %149, i32 0, i32 37 - %151 = load %AstBuilder*, %AstBuilder** %other.addr - %152 = getelementptr inbounds %AstBuilder, %AstBuilder* %151, i32 0, i32 37 - call void @"=.323"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %150, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %152) - %153 = load %AstBuilder*, %AstBuilder** %this.addr - %154 = getelementptr inbounds %AstBuilder, %AstBuilder* %153, i32 0, i32 38 - %155 = load %AstBuilder*, %AstBuilder** %other.addr - %156 = getelementptr inbounds %AstBuilder, %AstBuilder* %155, i32 0, i32 38 - call void @"=.323"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %154, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %156) - %157 = load %AstBuilder*, %AstBuilder** %this.addr - %158 = getelementptr inbounds %AstBuilder, %AstBuilder* %157, i32 0, i32 39 - %159 = load %AstBuilder*, %AstBuilder** %other.addr - %160 = getelementptr inbounds %AstBuilder, %AstBuilder* %159, i32 0, i32 39 - call void @"=.332"(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %158, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %160) - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @"=.310"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %this.addr + %120 = getelementptr inbounds %AstBuilder, %AstBuilder* %119, i32 0, i32 39 + call void @"=.311"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %118, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %120) + %121 = getelementptr inbounds %AstBuilder, %AstBuilder* %this, i32 0, i32 40 + %122 = load %AstBuilder*, %AstBuilder** %other.addr + %123 = getelementptr inbounds %AstBuilder, %AstBuilder* %122, i32 0, i32 40 + call void @"=.320"(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %121, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %123) + ret void +} + +; Function Attrs: alwaysinline nounwind +define internal void @"=.298"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %other) #3 { %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* store %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %other, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.311"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %other.addr +define internal void @"=.299"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.312"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %other.addr +define internal void @"=.300"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.313"(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %other.addr +define internal void @"=.301"(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.314"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %other.addr +define internal void @"=.302"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* + store %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.315"(%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %other.addr +define internal void @"=.303"(%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* + store %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.316"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %other.addr +define internal void @"=.304"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* + store %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.317"(%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* - store %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* - store %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %other.addr +define internal void @"=.305"(%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* + store %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.318"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Node]"* - store %"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"** %this.addr +define internal void @"=.306"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"* %other) #3 { %other.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Node]"* store %"FunctionPtr2[Node, UntypedPtr, Node]"* %other, %"FunctionPtr2[Node, UntypedPtr, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.319"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %other) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %this.addr - %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %other, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %other.addr +define internal void @"=.307"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %other) #3 { + %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %other, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.320"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %other.addr +define internal void @"=.308"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.321"(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %other.addr +define internal void @"=.309"(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.322"(%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %other.addr +define internal void @"=.310"(%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* + store %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.323"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %this, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %other) #3 { - %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, @Location]"* - store %"FunctionPtr2[Node, UntypedPtr, @Location]"* %this, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %this.addr - %other.addr = alloca %"FunctionPtr2[Node, UntypedPtr, @Location]"* - store %"FunctionPtr2[Node, UntypedPtr, @Location]"* %other, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %other.addr +define internal void @"=.311"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %this, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %other) #3 { + %other.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Location const]"* + store %"FunctionPtr2[Node, UntypedPtr, Location const]"* %other, %"FunctionPtr2[Node, UntypedPtr, Location const]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr2[Node, UntypedPtr, @Location]"*, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, @Location]", %"FunctionPtr2[Node, UntypedPtr, @Location]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr2[Node, UntypedPtr, @Location]"*, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, @Location]", %"FunctionPtr2[Node, UntypedPtr, @Location]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Location const]", %"FunctionPtr2[Node, UntypedPtr, Location const]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr2[Node, UntypedPtr, Location const]"*, %"FunctionPtr2[Node, UntypedPtr, Location const]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Location const]", %"FunctionPtr2[Node, UntypedPtr, Location const]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.324"(%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %other.addr +define internal void @"=.312"(%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]", %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]", %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]", %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]", %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.325"(%"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %other.addr +define internal void @"=.313"(%"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Int]", %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Int]", %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Int]", %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Int]", %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.326"(%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %other.addr +define internal void @"=.314"(%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]", %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]", %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]", %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]", %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.327"(%"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %other.addr +define internal void @"=.315"(%"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Long]", %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Long]", %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Long]", %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Long]", %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.328"(%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %other.addr +define internal void @"=.316"(%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]", %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]", %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]", %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]", %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.329"(%"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %other.addr +define internal void @"=.317"(%"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Float]", %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Float]", %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Float]", %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Float]", %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.330"(%"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %other.addr +define internal void @"=.318"(%"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Double]", %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Double]", %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Double]", %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Double]", %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.331"(%"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %other.addr +define internal void @"=.319"(%"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Char]", %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Char]", %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Char]", %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Char]", %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.332"(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %other.addr +define internal void @"=.320"(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Node]", %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Node]", %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Node]", %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Node]", %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.333"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %other.addr +define internal void @"=.321"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %other) #3 { + %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.334"(%ParserContext* %this, %ParserContext* %other) #3 { +define internal i1 @"==.322"(%ParserContext* %this, %ParserContext* %other) #3 { %this.addr = alloca %ParserContext* store %ParserContext* %this, %ParserContext** %this.addr %other.addr = alloca %ParserContext* @@ -9771,7 +8574,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %ParserContext, %ParserContext* %1, i32 0, i32 0 %3 = load %ParserContext*, %ParserContext** %other.addr %4 = getelementptr inbounds %ParserContext, %ParserContext* %3, i32 0, i32 0 - %5 = call i1 @"==.335"(%SparrowScanner* %2, %SparrowScanner* %4) + %5 = call i1 @"==.323"(%SparrowScanner* %2, %SparrowScanner* %4) br i1 %5, label %cond.true1, label %cond.false2 cond.true: ; preds = %cond.end3 @@ -9779,7 +8582,7 @@ cond.true: ; preds = %cond.end3 %7 = getelementptr inbounds %ParserContext, %ParserContext* %6, i32 0, i32 2 %8 = load %ParserContext*, %ParserContext** %other.addr %9 = getelementptr inbounds %ParserContext, %ParserContext* %8, i32 0, i32 2 - %10 = call i1 @"==.361"(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9) + %10 = call i1 @"==.348"(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9) br label %cond.end cond.false: ; preds = %cond.end3 @@ -9794,7 +8597,7 @@ cond.true1: ; preds = %code %12 = getelementptr inbounds %ParserContext, %ParserContext* %11, i32 0, i32 1 %13 = load %ParserContext*, %ParserContext** %other.addr %14 = getelementptr inbounds %ParserContext, %ParserContext* %13, i32 0, i32 1 - %15 = call i1 @"==.355"(%"SparrowLayoutDecoder[SparrowScanner]"* %12, %"SparrowLayoutDecoder[SparrowScanner]"* %14) + %15 = call i1 @"==.342"(%"SparrowLayoutDecoder[SparrowScanner]"* %12, %"SparrowLayoutDecoder[SparrowScanner]"* %14) br label %cond.end3 cond.false2: ; preds = %code @@ -9806,7 +8609,7 @@ cond.end3: ; preds = %cond.false2, %cond. } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.335"(%SparrowScanner* %this, %SparrowScanner* %other) #3 { +define internal i1 @"==.323"(%SparrowScanner* %this, %SparrowScanner* %other) #3 { %this.addr = alloca %SparrowScanner* store %SparrowScanner* %this, %SparrowScanner** %this.addr %other.addr = alloca %SparrowScanner* @@ -9818,7 +8621,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 0 %3 = load %SparrowScanner*, %SparrowScanner** %other.addr %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %3, i32 0, i32 0 - %5 = call i1 @"==.336"(%Location* %2, %Location* %4) + %5 = call i1 @"==.324"(%Location* %2, %Location* %4) br i1 %5, label %cond.true13, label %cond.false14 cond.true: ; preds = %cond.end3 @@ -9843,7 +8646,7 @@ cond.true1: ; preds = %cond.end6 %14 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %13, i32 0, i32 5 %15 = load %SparrowScanner*, %SparrowScanner** %other.addr %16 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %15, i32 0, i32 5 - %17 = call i1 @"==.353"(%ErrorReporter* %14, %ErrorReporter* %16) + %17 = call i1 @"==.340"(%ErrorReporter* %14, %ErrorReporter* %16) br label %cond.end3 cond.false2: ; preds = %cond.end6 @@ -9875,7 +8678,7 @@ cond.true7: ; preds = %cond.end12 %26 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %25, i32 0, i32 3 %27 = load %SparrowScanner*, %SparrowScanner** %other.addr %28 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %27, i32 0, i32 3 - %29 = call i1 @"==.351"(%Token* %26, %Token* %28) + %29 = call i1 @"==.338"(%Token* %26, %Token* %28) br label %cond.end9 cond.false8: ; preds = %cond.end12 @@ -9890,7 +8693,7 @@ cond.true10: ; preds = %cond.end15 %31 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %30, i32 0, i32 2 %32 = load %SparrowScanner*, %SparrowScanner** %other.addr %33 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %32, i32 0, i32 2 - %34 = call i1 @"==.346"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %31, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %33) + %34 = call i1 @"==.333"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %31, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %33) br label %cond.end12 cond.false11: ; preds = %cond.end15 @@ -9905,7 +8708,7 @@ cond.true13: ; preds = %code %36 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %35, i32 0, i32 1 %37 = load %SparrowScanner*, %SparrowScanner** %other.addr %38 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %37, i32 0, i32 1 - %39 = call i1 @"==.339"(%BufferedCharSource* %36, %BufferedCharSource* %38) + %39 = call i1 @"==.328"(%BufferedCharSource* %36, %BufferedCharSource* %38) br label %cond.end15 cond.false14: ; preds = %code @@ -9917,7 +8720,7 @@ cond.end15: ; preds = %cond.false14, %cond } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.336"(%Location* %this, %Location* %other) #3 { +define internal i1 @"==.324"(%Location* %this, %Location* %other) #3 { %this.addr = alloca %Location* store %Location* %this, %Location** %this.addr %other.addr = alloca %Location* @@ -9929,7 +8732,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 0 %3 = load %Location*, %Location** %other.addr %4 = getelementptr inbounds %Location, %Location* %3, i32 0, i32 0 - %5 = call i1 @"==.337"(%SourceCode* %2, %SourceCode* %4) + %5 = call i1 @"==.325"(%SourceCode* %2, %SourceCode* %4) br i1 %5, label %cond.true1, label %cond.false2 cond.true: ; preds = %cond.end3 @@ -9937,7 +8740,7 @@ cond.true: ; preds = %cond.end3 %7 = getelementptr inbounds %Location, %Location* %6, i32 0, i32 2 %8 = load %Location*, %Location** %other.addr %9 = getelementptr inbounds %Location, %Location* %8, i32 0, i32 2 - %10 = call i1 @"==.338"(%LineCol* %7, %LineCol* %9) + %10 = call i1 @"==.327"(%LineCol* %7, %LineCol* %9) br label %cond.end cond.false: ; preds = %cond.end3 @@ -9952,7 +8755,7 @@ cond.true1: ; preds = %code %12 = getelementptr inbounds %Location, %Location* %11, i32 0, i32 1 %13 = load %Location*, %Location** %other.addr %14 = getelementptr inbounds %Location, %Location* %13, i32 0, i32 1 - %15 = call i1 @"==.338"(%LineCol* %12, %LineCol* %14) + %15 = call i1 @"==.327"(%LineCol* %12, %LineCol* %14) br label %cond.end3 cond.false2: ; preds = %code @@ -9964,7 +8767,7 @@ cond.end3: ; preds = %cond.false2, %cond. } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.337"(%SourceCode* %this, %SourceCode* %other) #3 { +define internal i1 @"==.325"(%SourceCode* %this, %SourceCode* %other) #3 { %this.addr = alloca %SourceCode* store %SourceCode* %this, %SourceCode** %this.addr %other.addr = alloca %SourceCode* @@ -9974,16 +8777,33 @@ define internal i1 @"==.337"(%SourceCode* %this, %SourceCode* %other) #3 { code: ; preds = %0 %1 = load %SourceCode*, %SourceCode** %this.addr %2 = getelementptr inbounds %SourceCode, %SourceCode* %1, i32 0, i32 0 + %3 = load %SourceCode*, %SourceCode** %other.addr + %4 = getelementptr inbounds %SourceCode, %SourceCode* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 +} + +; Function Attrs: alwaysinline nounwind +define internal i1 @"==.326"(%UntypedPtr* %this, %UntypedPtr* %other) #3 { + %this.addr = alloca %UntypedPtr* + store %UntypedPtr* %this, %UntypedPtr** %this.addr + %other.addr = alloca %UntypedPtr* + store %UntypedPtr* %other, %UntypedPtr** %other.addr + br label %code + +code: ; preds = %0 + %1 = load %UntypedPtr*, %UntypedPtr** %this.addr + %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %1, i32 0, i32 0 %3 = load i8*, i8** %2 - %4 = load %SourceCode*, %SourceCode** %other.addr - %5 = getelementptr inbounds %SourceCode, %SourceCode* %4, i32 0, i32 0 + %4 = load %UntypedPtr*, %UntypedPtr** %other.addr + %5 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %4, i32 0, i32 0 %6 = load i8*, i8** %5 %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) ret i1 %7 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.338"(%LineCol* %this, %LineCol* %other) #3 { +define internal i1 @"==.327"(%LineCol* %this, %LineCol* %other) #3 { %this.addr = alloca %LineCol* store %LineCol* %this, %LineCol** %this.addr %other.addr = alloca %LineCol* @@ -10019,7 +8839,7 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.339"(%BufferedCharSource* %this, %BufferedCharSource* %other) #3 { +define internal i1 @"==.328"(%BufferedCharSource* %this, %BufferedCharSource* %other) #3 { %this.addr = alloca %BufferedCharSource* store %BufferedCharSource* %this, %BufferedCharSource** %this.addr %other.addr = alloca %BufferedCharSource* @@ -10031,7 +8851,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %1, i32 0, i32 0 %3 = load %BufferedCharSource*, %BufferedCharSource** %other.addr %4 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %3, i32 0, i32 0 - %5 = call i1 @"==.340"(%CharSource* %2, %CharSource* %4) + %5 = call i1 @"==.329"(%CharSource* %2, %CharSource* %4) br i1 %5, label %cond.true1, label %cond.false2 cond.true: ; preds = %cond.end3 @@ -10056,7 +8876,7 @@ cond.true1: ; preds = %code %14 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %13, i32 0, i32 1 %15 = load %BufferedCharSource*, %BufferedCharSource** %other.addr %16 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %15, i32 0, i32 1 - %17 = call i1 @"==.343"(%String* %14, %String* %16) + %17 = call i1 @"==.331"(%String* %14, %String* %16) br label %cond.end3 cond.false2: ; preds = %code @@ -10068,7 +8888,7 @@ cond.end3: ; preds = %cond.false2, %cond. } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.340"(%CharSource* %this, %CharSource* %other) #3 { +define internal i1 @"==.329"(%CharSource* %this, %CharSource* %other) #3 { %this.addr = alloca %CharSource* store %CharSource* %this, %CharSource** %this.addr %other.addr = alloca %CharSource* @@ -10080,7 +8900,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %CharSource, %CharSource* %1, i32 0, i32 0 %3 = load %CharSource*, %CharSource** %other.addr %4 = getelementptr inbounds %CharSource, %CharSource* %3, i32 0, i32 0 - %5 = call i1 @"==.341"(%UntypedPtr* %2, %UntypedPtr* %4) + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -10088,7 +8908,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %CharSource, %CharSource* %6, i32 0, i32 1 %8 = load %CharSource*, %CharSource** %other.addr %9 = getelementptr inbounds %CharSource, %CharSource* %8, i32 0, i32 1 - %10 = call i1 @"==.342"(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %7, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %9) + %10 = call i1 @"==.330"(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %7, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %9) br label %cond.end cond.false: ; preds = %code @@ -10100,49 +8920,24 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.341"(%UntypedPtr* %this, %UntypedPtr* %other) #3 { - %this.addr = alloca %UntypedPtr* - store %UntypedPtr* %this, %UntypedPtr** %this.addr - %other.addr = alloca %UntypedPtr* - store %UntypedPtr* %other, %UntypedPtr** %other.addr - br label %code - -code: ; preds = %0 - %1 = load %UntypedPtr*, %UntypedPtr** %this.addr - %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %UntypedPtr*, %UntypedPtr** %other.addr - %5 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 -} - -; Function Attrs: alwaysinline nounwind -define internal i1 @"==.342"(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* - store %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* - store %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %other, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %other.addr +define internal i1 @"==.330"(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* + store %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* + store %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %other, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @String, Int]"*, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @String, Int]", %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Void, UntypedPtr, @String, Int]"*, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @String, Int]", %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"*, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, String mut, Int]", %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"*, %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, String mut, Int]", %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: inlinehint nounwind -define internal i1 @"==.343"(%String* %this, %String* %other) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %other.addr = alloca %String* - store %String* %other, %String** %other.addr +define internal i1 @"==.331"(%String* %this, %String* %other) #4 { %i = alloca i64 %s = alloca i64 br label %code @@ -10151,53 +8946,48 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %String*, %String** %this.addr - %2 = call i64 @size.190(%String* %1) - %3 = load %String*, %String** %other.addr - %4 = call i64 @size.190(%String* %3) - %5 = icmp ne i64 %2, %4 - br i1 %5, label %if_then, label %if_end + %1 = call i64 @size.176(%String* %this) + %2 = call i64 @size.176(%String* %other) + %3 = icmp ne i64 %1, %2 + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 false if_end: ; preds = %dumy_block, %if_block store i64 0, i64* %i - %6 = load %String*, %String** %this.addr - %7 = call i64 @size.190(%String* %6) - store i64 %7, i64* %s + %4 = call i64 @size.176(%String* %this) + store i64 %4, i64* %s br label %while_block dumy_block: ; No predecessors! br label %if_end while_block: ; preds = %while_step, %if_end - %8 = load i64, i64* %i - %9 = load i64, i64* %s - %10 = icmp slt i64 %8, %9 - br i1 %10, label %while_body, label %while_end + %5 = load i64, i64* %i + %6 = load i64, i64* %s + %7 = icmp slt i64 %5, %6 + br i1 %7, label %while_body, label %while_end while_body: ; preds = %while_block br label %if_block1 while_step: ; preds = %if_end3 - %11 = call i64 @"post_++.43"(i64* %i) + %8 = call i64 @"post_++.43"(i64* %i) br label %while_block while_end: ; preds = %while_block ret i1 true if_block1: ; preds = %while_body - %12 = load %String*, %String** %this.addr - %13 = load i64, i64* %i - %14 = call i8* @"().344"(%String* %12, i64 %13) - %15 = load i8, i8* %14 - %16 = load %String*, %String** %other.addr - %17 = load i64, i64* %i - %18 = call i8* @"().344"(%String* %16, i64 %17) - %19 = load i8, i8* %18 - %20 = icmp ne i8 %15, %19 - br i1 %20, label %if_then2, label %if_end3 + %9 = load i64, i64* %i + %10 = call i8* @"().332"(%String* %this, i64 %9) + %11 = load i8, i8* %10 + %12 = load i64, i64* %i + %13 = call i8* @"().332"(%String* %other, i64 %12) + %14 = load i8, i8* %13 + %15 = icmp ne i8 %11, %14 + br i1 %15, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 ret i1 false @@ -10210,40 +9000,26 @@ dumy_block4: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal i8* @"().344"(%String* %this, i64 %index) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal i8* @"().332"(%String* %this, i64 %index) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = load i64, i64* %index.addr - store i64 %4, i64* %tmp.this - %5 = load i64, i64* %tmp.this - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %3, i64 %5) - %6 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %7 = call i8* @value(%"RawPtr[Char]" %6) - ret i8* %7 -} - -; Function Attrs: alwaysinline nounwind -define internal void @dtor.345(%"RawPtr[Char]"* %this) #3 { - %this.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %this, %"RawPtr[Char]"** %this.addr - br label %code - -code: ; preds = %0 - ret void + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %2 = load i64, i64* %index.addr + store i64 %2, i64* %tmp.this + %3 = load i64, i64* %tmp.this + %4 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %1, i64 %3) + store %"RawPtr[Char]" %4, %"RawPtr[Char]"* %"$tmpForRef" + %5 = call i8* @value(%"RawPtr[Char]"* %"$tmpForRef") + ret i8* %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.346"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %other) #3 { +define internal i1 @"==.333"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %other) #3 { %this.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr %other.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* @@ -10255,7 +9031,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 %3 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %other.addr %4 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %3, i32 0, i32 0 - %5 = call i1 @"==.347"(%"RangeWithLookahead[BufferedCharSourceRange]"* %2, %"RangeWithLookahead[BufferedCharSourceRange]"* %4) + %5 = call i1 @"==.334"(%"RangeWithLookahead[BufferedCharSourceRange]"* %2, %"RangeWithLookahead[BufferedCharSourceRange]"* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -10279,7 +9055,7 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.347"(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"* %other) #3 { +define internal i1 @"==.334"(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"* %other) #3 { %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr %other.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* @@ -10291,7 +9067,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %1, i32 0, i32 0 %3 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr %4 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %3, i32 0, i32 0 - %5 = call i1 @"==.348"(%BufferedCharSourceRange* %2, %BufferedCharSourceRange* %4) + %5 = call i1 @"==.335"(%BufferedCharSourceRange* %2, %BufferedCharSourceRange* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -10299,7 +9075,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %6, i32 0, i32 1 %8 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %other.addr %9 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %8, i32 0, i32 1 - %10 = call i1 @"==.349"(%"Vector[Char]"* %7, %"Vector[Char]"* %9) + %10 = call i1 @"==.336"(%"Vector[Char]"* %7, %"Vector[Char]"* %9) br label %cond.end cond.false: ; preds = %code @@ -10311,7 +9087,7 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.348"(%BufferedCharSourceRange* %this, %BufferedCharSourceRange* %other) #3 { +define internal i1 @"==.335"(%BufferedCharSourceRange* %this, %BufferedCharSourceRange* %other) #3 { %this.addr = alloca %BufferedCharSourceRange* store %BufferedCharSourceRange* %this, %BufferedCharSourceRange** %this.addr %other.addr = alloca %BufferedCharSourceRange* @@ -10332,11 +9108,7 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal i1 @"==.349"(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr - %other.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %other, %"Vector[Char]"** %other.addr +define internal i1 @"==.336"(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #4 { %i = alloca i32 %s = alloca i64 %tmp.this = alloca i64 @@ -10348,63 +9120,58 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = call i64 @size.199(%"Vector[Char]"* %1) - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %4 = call i64 @size.199(%"Vector[Char]"* %3) - %5 = icmp ne i64 %2, %4 - br i1 %5, label %if_then, label %if_end + %1 = call i64 @size.185(%"Vector[Char]"* %this) + %2 = call i64 @size.185(%"Vector[Char]"* %other) + %3 = icmp ne i64 %1, %2 + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 false if_end: ; preds = %dumy_block, %if_block store i32 0, i32* %i - %6 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %7 = call i64 @size.199(%"Vector[Char]"* %6) - store i64 %7, i64* %s + %4 = call i64 @size.185(%"Vector[Char]"* %this) + store i64 %4, i64* %s br label %while_block dumy_block: ; No predecessors! br label %if_end while_block: ; preds = %while_step, %if_end - %8 = load i32, i32* %i - %9 = zext i32 %8 to i64 - store i64 %9, i64* %tmp.this - %10 = load i64, i64* %tmp.this - %11 = load i64, i64* %s - %12 = icmp slt i64 %10, %11 - br i1 %12, label %while_body, label %while_end + %5 = load i32, i32* %i + %6 = zext i32 %5 to i64 + store i64 %6, i64* %tmp.this + %7 = load i64, i64* %tmp.this + %8 = load i64, i64* %s + %9 = icmp slt i64 %7, %8 + br i1 %9, label %while_body, label %while_end while_body: ; preds = %while_block br label %if_block1 while_step: ; preds = %if_end3 - %13 = call i32 @"post_++.39"(i32* %i) + %10 = call i32 @"post_++.39"(i32* %i) br label %while_block while_end: ; preds = %while_block ret i1 true if_block1: ; preds = %while_body - %14 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %15 = load i32, i32* %i - %16 = zext i32 %15 to i64 - store i64 %16, i64* %tmp.this4 - %17 = load i64, i64* %tmp.this4 - %18 = call i8* @at.350(%"Vector[Char]"* %14, i64 %17) - %19 = load i8, i8* %18 - %20 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %21 = load i32, i32* %i - %22 = zext i32 %21 to i64 - store i64 %22, i64* %tmp.this5 - %23 = load i64, i64* %tmp.this5 - %24 = call i8* @at.350(%"Vector[Char]"* %20, i64 %23) - %25 = load i8, i8* %24 - %26 = icmp eq i8 %19, %25 - %27 = xor i1 true, %26 - br i1 %27, label %if_then2, label %if_end3 + %11 = load i32, i32* %i + %12 = zext i32 %11 to i64 + store i64 %12, i64* %tmp.this4 + %13 = load i64, i64* %tmp.this4 + %14 = call i8* @at.337(%"Vector[Char]"* %this, i64 %13) + %15 = load i8, i8* %14 + %16 = load i32, i32* %i + %17 = zext i32 %16 to i64 + store i64 %17, i64* %tmp.this5 + %18 = load i64, i64* %tmp.this5 + %19 = call i8* @at.337(%"Vector[Char]"* %other, i64 %18) + %20 = load i8, i8* %19 + %21 = icmp eq i8 %15, %20 + %22 = xor i1 true, %21 + br i1 %22, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 ret i1 false @@ -10417,27 +9184,23 @@ dumy_block6: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal i8* @at.350(%"Vector[Char]"* %this, i64 %index) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal i8* @at.337(%"Vector[Char]"* %this, i64 %index) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = load i64, i64* %index.addr - call void @advance.201(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %3, i64 %4) - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %6 = call i8* @value(%"RawPtr[Char]" %5) - ret i8* %6 + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %2 = load i64, i64* %index.addr + %3 = call %"RawPtr[Char]" @advance.187(%"RawPtr[Char]"* %1, i64 %2) + store %"RawPtr[Char]" %3, %"RawPtr[Char]"* %"$tmpForRef" + %4 = call i8* @value(%"RawPtr[Char]"* %"$tmpForRef") + ret i8* %4 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.351"(%Token* %this, %Token* %other) #3 { +define internal i1 @"==.338"(%Token* %this, %Token* %other) #3 { %this.addr = alloca %Token* store %Token* %this, %Token** %this.addr %other.addr = alloca %Token* @@ -10449,7 +9212,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %Token, %Token* %1, i32 0, i32 0 %3 = load %Token*, %Token** %other.addr %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 - %5 = call i1 @"==.336"(%Location* %2, %Location* %4) + %5 = call i1 @"==.324"(%Location* %2, %Location* %4) br i1 %5, label %cond.true7, label %cond.false8 cond.true: ; preds = %cond.end3 @@ -10491,7 +9254,7 @@ cond.true4: ; preds = %cond.end9 %21 = getelementptr inbounds %Token, %Token* %20, i32 0, i32 2 %22 = load %Token*, %Token** %other.addr %23 = getelementptr inbounds %Token, %Token* %22, i32 0, i32 2 - %24 = call i1 @"==.343"(%String* %21, %String* %23) + %24 = call i1 @"==.331"(%String* %21, %String* %23) br label %cond.end6 cond.false5: ; preds = %cond.end9 @@ -10506,7 +9269,7 @@ cond.true7: ; preds = %code %26 = getelementptr inbounds %Token, %Token* %25, i32 0, i32 1 %27 = load %Token*, %Token** %other.addr %28 = getelementptr inbounds %Token, %Token* %27, i32 0, i32 1 - %29 = call i1 @"==.352"(%TokenType* %26, %TokenType* %28) + %29 = call i1 @"==.339"(%TokenType* %26, %TokenType* %28) br label %cond.end9 cond.false8: ; preds = %code @@ -10518,7 +9281,7 @@ cond.end9: ; preds = %cond.false8, %cond. } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.352"(%TokenType* %this, %TokenType* %other) #3 { +define internal i1 @"==.339"(%TokenType* %this, %TokenType* %other) #3 { %this.addr = alloca %TokenType* store %TokenType* %this, %TokenType** %this.addr %other.addr = alloca %TokenType* @@ -10537,7 +9300,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.353"(%ErrorReporter* %this, %ErrorReporter* %other) #3 { +define internal i1 @"==.340"(%ErrorReporter* %this, %ErrorReporter* %other) #3 { %this.addr = alloca %ErrorReporter* store %ErrorReporter* %this, %ErrorReporter** %this.addr %other.addr = alloca %ErrorReporter* @@ -10549,7 +9312,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %1, i32 0, i32 0 %3 = load %ErrorReporter*, %ErrorReporter** %other.addr %4 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %3, i32 0, i32 0 - %5 = call i1 @"==.341"(%UntypedPtr* %2, %UntypedPtr* %4) + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -10557,7 +9320,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %6, i32 0, i32 1 %8 = load %ErrorReporter*, %ErrorReporter** %other.addr %9 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %8, i32 0, i32 1 - %10 = call i1 @"==.354"(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %7, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %9) + %10 = call i1 @"==.341"(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %7, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %9) br label %cond.end cond.false: ; preds = %code @@ -10569,26 +9332,24 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.354"(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %other, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %other.addr +define internal i1 @"==.341"(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* + store %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* + store %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %other, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.355"(%"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"* %other) #3 { +define internal i1 @"==.342"(%"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"* %other) #3 { %this.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* store %"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr %other.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* @@ -10600,7 +9361,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %1, i32 0, i32 0 %3 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %3, i32 0, i32 0 - %5 = call i1 @"==.356"(%"RangeWithLookahead[SparrowScanner]"* %2, %"RangeWithLookahead[SparrowScanner]"* %4) + %5 = call i1 @"==.343"(%"RangeWithLookahead[SparrowScanner]"* %2, %"RangeWithLookahead[SparrowScanner]"* %4) br i1 %5, label %cond.true10, label %cond.false11 cond.true: ; preds = %cond.end3 @@ -10625,7 +9386,7 @@ cond.true1: ; preds = %cond.end6 %14 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %13, i32 0, i32 4 %15 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr %16 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %15, i32 0, i32 4 - %17 = call i1 @"==.352"(%TokenType* %14, %TokenType* %16) + %17 = call i1 @"==.339"(%TokenType* %14, %TokenType* %16) br label %cond.end3 cond.false2: ; preds = %cond.end6 @@ -10640,7 +9401,7 @@ cond.true4: ; preds = %cond.end9 %19 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %18, i32 0, i32 3 %20 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr %21 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %20, i32 0, i32 3 - %22 = call i1 @"==.349"(%"Vector[Char]"* %19, %"Vector[Char]"* %21) + %22 = call i1 @"==.336"(%"Vector[Char]"* %19, %"Vector[Char]"* %21) br label %cond.end6 cond.false5: ; preds = %cond.end9 @@ -10655,7 +9416,7 @@ cond.true7: ; preds = %cond.end12 %24 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %23, i32 0, i32 2 %25 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr %26 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %25, i32 0, i32 2 - %27 = call i1 @"==.359"(%"Vector[UInt]"* %24, %"Vector[UInt]"* %26) + %27 = call i1 @"==.346"(%"Vector[UInt]"* %24, %"Vector[UInt]"* %26) br label %cond.end9 cond.false8: ; preds = %cond.end12 @@ -10670,7 +9431,7 @@ cond.true10: ; preds = %code %29 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %28, i32 0, i32 1 %30 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %other.addr %31 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %30, i32 0, i32 1 - %32 = call i1 @"==.353"(%ErrorReporter* %29, %ErrorReporter* %31) + %32 = call i1 @"==.340"(%ErrorReporter* %29, %ErrorReporter* %31) br label %cond.end12 cond.false11: ; preds = %code @@ -10682,7 +9443,7 @@ cond.end12: ; preds = %cond.false11, %cond } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.356"(%"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"* %other) #3 { +define internal i1 @"==.343"(%"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"* %other) #3 { %this.addr = alloca %"RangeWithLookahead[SparrowScanner]"* store %"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"** %this.addr %other.addr = alloca %"RangeWithLookahead[SparrowScanner]"* @@ -10694,7 +9455,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %1, i32 0, i32 0 %3 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %other.addr %4 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %3, i32 0, i32 0 - %5 = call i1 @"==.335"(%SparrowScanner* %2, %SparrowScanner* %4) + %5 = call i1 @"==.323"(%SparrowScanner* %2, %SparrowScanner* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -10702,7 +9463,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %6, i32 0, i32 1 %8 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %other.addr %9 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %8, i32 0, i32 1 - %10 = call i1 @"==.357"(%"Vector[Token]"* %7, %"Vector[Token]"* %9) + %10 = call i1 @"==.344"(%"Vector[Token]"* %7, %"Vector[Token]"* %9) br label %cond.end cond.false: ; preds = %code @@ -10714,11 +9475,7 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: inlinehint nounwind -define internal i1 @"==.357"(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr - %other.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %other, %"Vector[Token]"** %other.addr +define internal i1 @"==.344"(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #4 { %i = alloca i32 %s = alloca i64 %tmp.this = alloca i64 @@ -10730,61 +9487,56 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = call i64 @size.209(%"Vector[Token]"* %1) - %3 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %4 = call i64 @size.209(%"Vector[Token]"* %3) - %5 = icmp ne i64 %2, %4 - br i1 %5, label %if_then, label %if_end + %1 = call i64 @size.195(%"Vector[Token]"* %this) + %2 = call i64 @size.195(%"Vector[Token]"* %other) + %3 = icmp ne i64 %1, %2 + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 false if_end: ; preds = %dumy_block, %if_block store i32 0, i32* %i - %6 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %7 = call i64 @size.209(%"Vector[Token]"* %6) - store i64 %7, i64* %s + %4 = call i64 @size.195(%"Vector[Token]"* %this) + store i64 %4, i64* %s br label %while_block dumy_block: ; No predecessors! br label %if_end while_block: ; preds = %while_step, %if_end - %8 = load i32, i32* %i - %9 = zext i32 %8 to i64 - store i64 %9, i64* %tmp.this - %10 = load i64, i64* %tmp.this - %11 = load i64, i64* %s - %12 = icmp slt i64 %10, %11 - br i1 %12, label %while_body, label %while_end + %5 = load i32, i32* %i + %6 = zext i32 %5 to i64 + store i64 %6, i64* %tmp.this + %7 = load i64, i64* %tmp.this + %8 = load i64, i64* %s + %9 = icmp slt i64 %7, %8 + br i1 %9, label %while_body, label %while_end while_body: ; preds = %while_block br label %if_block1 while_step: ; preds = %if_end3 - %13 = call i32 @"post_++.39"(i32* %i) + %10 = call i32 @"post_++.39"(i32* %i) br label %while_block while_end: ; preds = %while_block ret i1 true if_block1: ; preds = %while_body - %14 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr + %11 = load i32, i32* %i + %12 = zext i32 %11 to i64 + store i64 %12, i64* %tmp.this4 + %13 = load i64, i64* %tmp.this4 + %14 = call %Token* @at.345(%"Vector[Token]"* %this, i64 %13) %15 = load i32, i32* %i %16 = zext i32 %15 to i64 - store i64 %16, i64* %tmp.this4 - %17 = load i64, i64* %tmp.this4 - %18 = call %Token* @at.358(%"Vector[Token]"* %14, i64 %17) - %19 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %20 = load i32, i32* %i - %21 = zext i32 %20 to i64 - store i64 %21, i64* %tmp.this5 - %22 = load i64, i64* %tmp.this5 - %23 = call %Token* @at.358(%"Vector[Token]"* %19, i64 %22) - %24 = call i1 @"==.351"(%Token* %18, %Token* %23) - %25 = xor i1 true, %24 - br i1 %25, label %if_then2, label %if_end3 + store i64 %16, i64* %tmp.this5 + %17 = load i64, i64* %tmp.this5 + %18 = call %Token* @at.345(%"Vector[Token]"* %other, i64 %17) + %19 = call i1 @"==.338"(%Token* %14, %Token* %18) + %20 = xor i1 true, %19 + br i1 %20, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 ret i1 false @@ -10797,31 +9549,23 @@ dumy_block6: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal %Token* @at.358(%"Vector[Token]"* %this, i64 %index) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal %Token* @at.345(%"Vector[Token]"* %this, i64 %index) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr - %"$tmpC" = alloca %"RawPtr[Token]" + %"$tmpForRef" = alloca %"RawPtr[Token]" br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 - %3 = load %"RawPtr[Token]", %"RawPtr[Token]"* %2 - %4 = load i64, i64* %index.addr - call void @advance.215(%"RawPtr[Token]"* %"$tmpC", %"RawPtr[Token]" %3, i64 %4) - %5 = load %"RawPtr[Token]", %"RawPtr[Token]"* %"$tmpC" - %6 = call %Token* @value.219(%"RawPtr[Token]" %5) - ret %Token* %6 + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %2 = load i64, i64* %index.addr + %3 = call %"RawPtr[Token]" @advance.201(%"RawPtr[Token]"* %1, i64 %2) + store %"RawPtr[Token]" %3, %"RawPtr[Token]"* %"$tmpForRef" + %4 = call %Token* @value.206(%"RawPtr[Token]"* %"$tmpForRef") + ret %Token* %4 } ; Function Attrs: inlinehint nounwind -define internal i1 @"==.359"(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr - %other.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %other, %"Vector[UInt]"** %other.addr +define internal i1 @"==.346"(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #4 { %i = alloca i32 %s = alloca i64 %tmp.this = alloca i64 @@ -10833,63 +9577,58 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = call i64 @size.222(%"Vector[UInt]"* %1) - %3 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %4 = call i64 @size.222(%"Vector[UInt]"* %3) - %5 = icmp ne i64 %2, %4 - br i1 %5, label %if_then, label %if_end + %1 = call i64 @size.209(%"Vector[UInt]"* %this) + %2 = call i64 @size.209(%"Vector[UInt]"* %other) + %3 = icmp ne i64 %1, %2 + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 false if_end: ; preds = %dumy_block, %if_block store i32 0, i32* %i - %6 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %7 = call i64 @size.222(%"Vector[UInt]"* %6) - store i64 %7, i64* %s + %4 = call i64 @size.209(%"Vector[UInt]"* %this) + store i64 %4, i64* %s br label %while_block dumy_block: ; No predecessors! br label %if_end while_block: ; preds = %while_step, %if_end - %8 = load i32, i32* %i - %9 = zext i32 %8 to i64 - store i64 %9, i64* %tmp.this - %10 = load i64, i64* %tmp.this - %11 = load i64, i64* %s - %12 = icmp slt i64 %10, %11 - br i1 %12, label %while_body, label %while_end + %5 = load i32, i32* %i + %6 = zext i32 %5 to i64 + store i64 %6, i64* %tmp.this + %7 = load i64, i64* %tmp.this + %8 = load i64, i64* %s + %9 = icmp slt i64 %7, %8 + br i1 %9, label %while_body, label %while_end while_body: ; preds = %while_block br label %if_block1 while_step: ; preds = %if_end3 - %13 = call i32 @"post_++.39"(i32* %i) + %10 = call i32 @"post_++.39"(i32* %i) br label %while_block while_end: ; preds = %while_block ret i1 true if_block1: ; preds = %while_body - %14 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %15 = load i32, i32* %i - %16 = zext i32 %15 to i64 - store i64 %16, i64* %tmp.this4 - %17 = load i64, i64* %tmp.this4 - %18 = call i32* @at.360(%"Vector[UInt]"* %14, i64 %17) - %19 = load i32, i32* %18 - %20 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %21 = load i32, i32* %i - %22 = zext i32 %21 to i64 - store i64 %22, i64* %tmp.this5 - %23 = load i64, i64* %tmp.this5 - %24 = call i32* @at.360(%"Vector[UInt]"* %20, i64 %23) - %25 = load i32, i32* %24 - %26 = icmp eq i32 %19, %25 - %27 = xor i1 true, %26 - br i1 %27, label %if_then2, label %if_end3 + %11 = load i32, i32* %i + %12 = zext i32 %11 to i64 + store i64 %12, i64* %tmp.this4 + %13 = load i64, i64* %tmp.this4 + %14 = call i32* @at.347(%"Vector[UInt]"* %this, i64 %13) + %15 = load i32, i32* %14 + %16 = load i32, i32* %i + %17 = zext i32 %16 to i64 + store i64 %17, i64* %tmp.this5 + %18 = load i64, i64* %tmp.this5 + %19 = call i32* @at.347(%"Vector[UInt]"* %other, i64 %18) + %20 = load i32, i32* %19 + %21 = icmp eq i32 %15, %20 + %22 = xor i1 true, %21 + br i1 %22, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 ret i1 false @@ -10902,27 +9641,23 @@ dumy_block6: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal i32* @at.360(%"Vector[UInt]"* %this, i64 %index) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr +define internal i32* @at.347(%"Vector[UInt]"* %this, i64 %index) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr - %"$tmpC" = alloca %"RawPtr[UInt]" + %"$tmpForRef" = alloca %"RawPtr[UInt]" br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 0 - %3 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %2 - %4 = load i64, i64* %index.addr - call void @advance.228(%"RawPtr[UInt]"* %"$tmpC", %"RawPtr[UInt]" %3, i64 %4) - %5 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %"$tmpC" - %6 = call i32* @value.272(%"RawPtr[UInt]" %5) - ret i32* %6 + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + %2 = load i64, i64* %index.addr + %3 = call %"RawPtr[UInt]" @advance.215(%"RawPtr[UInt]"* %1, i64 %2) + store %"RawPtr[UInt]" %3, %"RawPtr[UInt]"* %"$tmpForRef" + %4 = call i32* @value.261(%"RawPtr[UInt]"* %"$tmpForRef") + ret i32* %4 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.361"(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { +define internal i1 @"==.348"(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %other.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* @@ -10934,7 +9669,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 %3 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 0 - %5 = call i1 @"==.362"(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %4) + %5 = call i1 @"==.349"(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %4) br i1 %5, label %cond.true7, label %cond.false8 cond.true: ; preds = %cond.end3 @@ -10942,7 +9677,7 @@ cond.true: ; preds = %cond.end3 %7 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %6, i32 0, i32 4 %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8, i32 0, i32 4 - %10 = call i1 @"==.353"(%ErrorReporter* %7, %ErrorReporter* %9) + %10 = call i1 @"==.340"(%ErrorReporter* %7, %ErrorReporter* %9) br label %cond.end cond.false: ; preds = %cond.end3 @@ -10957,7 +9692,7 @@ cond.true1: ; preds = %cond.end6 %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, i32 0, i32 3 %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr %14 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, i32 0, i32 3 - %15 = call i1 @"==.363"(%AstBuilder* %12, %AstBuilder* %14) + %15 = call i1 @"==.350"(%AstBuilder* %12, %AstBuilder* %14) br label %cond.end3 cond.false2: ; preds = %cond.end6 @@ -10989,7 +9724,7 @@ cond.true7: ; preds = %code %24 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23, i32 0, i32 1 %25 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr %26 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %25, i32 0, i32 1 - %27 = call i1 @"==.351"(%Token* %24, %Token* %26) + %27 = call i1 @"==.338"(%Token* %24, %Token* %26) br label %cond.end9 cond.false8: ; preds = %code @@ -11001,7 +9736,7 @@ cond.end9: ; preds = %cond.false8, %cond. } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.362"(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { +define internal i1 @"==.349"(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %other) #3 { %this.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %other.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* @@ -11013,7 +9748,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 %3 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr %4 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 0 - %5 = call i1 @"==.355"(%"SparrowLayoutDecoder[SparrowScanner]"* %2, %"SparrowLayoutDecoder[SparrowScanner]"* %4) + %5 = call i1 @"==.342"(%"SparrowLayoutDecoder[SparrowScanner]"* %2, %"SparrowLayoutDecoder[SparrowScanner]"* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -11021,7 +9756,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %6, i32 0, i32 1 %8 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %other.addr %9 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %8, i32 0, i32 1 - %10 = call i1 @"==.357"(%"Vector[Token]"* %7, %"Vector[Token]"* %9) + %10 = call i1 @"==.344"(%"Vector[Token]"* %7, %"Vector[Token]"* %9) br label %cond.end cond.false: ; preds = %code @@ -11033,7 +9768,7 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.363"(%AstBuilder* %this, %AstBuilder* %other) #3 { +define internal i1 @"==.350"(%AstBuilder* %this, %AstBuilder* %other) #3 { %this.addr = alloca %AstBuilder* store %AstBuilder* %this, %AstBuilder** %this.addr %other.addr = alloca %AstBuilder* @@ -11045,597 +9780,612 @@ code: ; preds = %0 %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 0 %3 = load %AstBuilder*, %AstBuilder** %other.addr %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = call i1 @"==.341"(%UntypedPtr* %2, %UntypedPtr* %4) - br i1 %5, label %cond.true112, label %cond.false113 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + br i1 %5, label %cond.true115, label %cond.false116 cond.true: ; preds = %cond.end3 %6 = load %AstBuilder*, %AstBuilder** %this.addr - %7 = getelementptr inbounds %AstBuilder, %AstBuilder* %6, i32 0, i32 39 + %7 = getelementptr inbounds %AstBuilder, %AstBuilder* %6, i32 0, i32 40 %8 = load %AstBuilder*, %AstBuilder** %other.addr - %9 = getelementptr inbounds %AstBuilder, %AstBuilder* %8, i32 0, i32 39 - %10 = call i1 @"==.386"(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %7, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %9) + %9 = getelementptr inbounds %AstBuilder, %AstBuilder* %8, i32 0, i32 40 + %10 = call i1 @"==.373"(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %7, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %9) br label %cond.end cond.false: ; preds = %cond.end3 br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res152 = phi i1 [ %10, %cond.true ], [ false, %cond.false ] - ret i1 %cond.res152 + %cond.res156 = phi i1 [ %10, %cond.true ], [ false, %cond.false ] + ret i1 %cond.res156 cond.true1: ; preds = %cond.end6 %11 = load %AstBuilder*, %AstBuilder** %this.addr - %12 = getelementptr inbounds %AstBuilder, %AstBuilder* %11, i32 0, i32 38 + %12 = getelementptr inbounds %AstBuilder, %AstBuilder* %11, i32 0, i32 39 %13 = load %AstBuilder*, %AstBuilder** %other.addr - %14 = getelementptr inbounds %AstBuilder, %AstBuilder* %13, i32 0, i32 38 - %15 = call i1 @"==.377"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %12, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %14) + %14 = getelementptr inbounds %AstBuilder, %AstBuilder* %13, i32 0, i32 39 + %15 = call i1 @"==.364"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %12, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %14) br label %cond.end3 cond.false2: ; preds = %cond.end6 br label %cond.end3 cond.end3: ; preds = %cond.false2, %cond.true1 - %cond.res151 = phi i1 [ %15, %cond.true1 ], [ false, %cond.false2 ] - br i1 %cond.res151, label %cond.true, label %cond.false + %cond.res155 = phi i1 [ %15, %cond.true1 ], [ false, %cond.false2 ] + br i1 %cond.res155, label %cond.true, label %cond.false cond.true4: ; preds = %cond.end9 %16 = load %AstBuilder*, %AstBuilder** %this.addr - %17 = getelementptr inbounds %AstBuilder, %AstBuilder* %16, i32 0, i32 37 + %17 = getelementptr inbounds %AstBuilder, %AstBuilder* %16, i32 0, i32 38 %18 = load %AstBuilder*, %AstBuilder** %other.addr - %19 = getelementptr inbounds %AstBuilder, %AstBuilder* %18, i32 0, i32 37 - %20 = call i1 @"==.377"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %17, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %19) + %19 = getelementptr inbounds %AstBuilder, %AstBuilder* %18, i32 0, i32 38 + %20 = call i1 @"==.364"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %17, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %19) br label %cond.end6 cond.false5: ; preds = %cond.end9 br label %cond.end6 cond.end6: ; preds = %cond.false5, %cond.true4 - %cond.res150 = phi i1 [ %20, %cond.true4 ], [ false, %cond.false5 ] - br i1 %cond.res150, label %cond.true1, label %cond.false2 + %cond.res154 = phi i1 [ %20, %cond.true4 ], [ false, %cond.false5 ] + br i1 %cond.res154, label %cond.true1, label %cond.false2 cond.true7: ; preds = %cond.end12 %21 = load %AstBuilder*, %AstBuilder** %this.addr - %22 = getelementptr inbounds %AstBuilder, %AstBuilder* %21, i32 0, i32 36 + %22 = getelementptr inbounds %AstBuilder, %AstBuilder* %21, i32 0, i32 37 %23 = load %AstBuilder*, %AstBuilder** %other.addr - %24 = getelementptr inbounds %AstBuilder, %AstBuilder* %23, i32 0, i32 36 - %25 = call i1 @"==.387"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %22, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %24) + %24 = getelementptr inbounds %AstBuilder, %AstBuilder* %23, i32 0, i32 37 + %25 = call i1 @"==.374"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %22, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %24) br label %cond.end9 cond.false8: ; preds = %cond.end12 br label %cond.end9 cond.end9: ; preds = %cond.false8, %cond.true7 - %cond.res149 = phi i1 [ %25, %cond.true7 ], [ false, %cond.false8 ] - br i1 %cond.res149, label %cond.true4, label %cond.false5 + %cond.res153 = phi i1 [ %25, %cond.true7 ], [ false, %cond.false8 ] + br i1 %cond.res153, label %cond.true4, label %cond.false5 cond.true10: ; preds = %cond.end15 %26 = load %AstBuilder*, %AstBuilder** %this.addr - %27 = getelementptr inbounds %AstBuilder, %AstBuilder* %26, i32 0, i32 35 + %27 = getelementptr inbounds %AstBuilder, %AstBuilder* %26, i32 0, i32 36 %28 = load %AstBuilder*, %AstBuilder** %other.addr - %29 = getelementptr inbounds %AstBuilder, %AstBuilder* %28, i32 0, i32 35 - %30 = call i1 @"==.368"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %27, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %29) + %29 = getelementptr inbounds %AstBuilder, %AstBuilder* %28, i32 0, i32 36 + %30 = call i1 @"==.355"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %27, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %29) br label %cond.end12 cond.false11: ; preds = %cond.end15 br label %cond.end12 cond.end12: ; preds = %cond.false11, %cond.true10 - %cond.res148 = phi i1 [ %30, %cond.true10 ], [ false, %cond.false11 ] - br i1 %cond.res148, label %cond.true7, label %cond.false8 + %cond.res152 = phi i1 [ %30, %cond.true10 ], [ false, %cond.false11 ] + br i1 %cond.res152, label %cond.true7, label %cond.false8 cond.true13: ; preds = %cond.end18 %31 = load %AstBuilder*, %AstBuilder** %this.addr - %32 = getelementptr inbounds %AstBuilder, %AstBuilder* %31, i32 0, i32 34 + %32 = getelementptr inbounds %AstBuilder, %AstBuilder* %31, i32 0, i32 35 %33 = load %AstBuilder*, %AstBuilder** %other.addr - %34 = getelementptr inbounds %AstBuilder, %AstBuilder* %33, i32 0, i32 34 - %35 = call i1 @"==.387"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %32, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %34) + %34 = getelementptr inbounds %AstBuilder, %AstBuilder* %33, i32 0, i32 35 + %35 = call i1 @"==.374"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %32, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %34) br label %cond.end15 cond.false14: ; preds = %cond.end18 br label %cond.end15 cond.end15: ; preds = %cond.false14, %cond.true13 - %cond.res147 = phi i1 [ %35, %cond.true13 ], [ false, %cond.false14 ] - br i1 %cond.res147, label %cond.true10, label %cond.false11 + %cond.res151 = phi i1 [ %35, %cond.true13 ], [ false, %cond.false14 ] + br i1 %cond.res151, label %cond.true10, label %cond.false11 cond.true16: ; preds = %cond.end21 %36 = load %AstBuilder*, %AstBuilder** %this.addr - %37 = getelementptr inbounds %AstBuilder, %AstBuilder* %36, i32 0, i32 33 + %37 = getelementptr inbounds %AstBuilder, %AstBuilder* %36, i32 0, i32 34 %38 = load %AstBuilder*, %AstBuilder** %other.addr - %39 = getelementptr inbounds %AstBuilder, %AstBuilder* %38, i32 0, i32 33 - %40 = call i1 @"==.386"(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %37, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %39) + %39 = getelementptr inbounds %AstBuilder, %AstBuilder* %38, i32 0, i32 34 + %40 = call i1 @"==.373"(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %37, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %39) br label %cond.end18 cond.false17: ; preds = %cond.end21 br label %cond.end18 cond.end18: ; preds = %cond.false17, %cond.true16 - %cond.res146 = phi i1 [ %40, %cond.true16 ], [ false, %cond.false17 ] - br i1 %cond.res146, label %cond.true13, label %cond.false14 + %cond.res150 = phi i1 [ %40, %cond.true16 ], [ false, %cond.false17 ] + br i1 %cond.res150, label %cond.true13, label %cond.false14 cond.true19: ; preds = %cond.end24 %41 = load %AstBuilder*, %AstBuilder** %this.addr - %42 = getelementptr inbounds %AstBuilder, %AstBuilder* %41, i32 0, i32 32 + %42 = getelementptr inbounds %AstBuilder, %AstBuilder* %41, i32 0, i32 33 %43 = load %AstBuilder*, %AstBuilder** %other.addr - %44 = getelementptr inbounds %AstBuilder, %AstBuilder* %43, i32 0, i32 32 - %45 = call i1 @"==.375"(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %42, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %44) + %44 = getelementptr inbounds %AstBuilder, %AstBuilder* %43, i32 0, i32 33 + %45 = call i1 @"==.362"(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %42, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %44) br label %cond.end21 cond.false20: ; preds = %cond.end24 br label %cond.end21 cond.end21: ; preds = %cond.false20, %cond.true19 - %cond.res145 = phi i1 [ %45, %cond.true19 ], [ false, %cond.false20 ] - br i1 %cond.res145, label %cond.true16, label %cond.false17 + %cond.res149 = phi i1 [ %45, %cond.true19 ], [ false, %cond.false20 ] + br i1 %cond.res149, label %cond.true16, label %cond.false17 cond.true22: ; preds = %cond.end27 %46 = load %AstBuilder*, %AstBuilder** %this.addr - %47 = getelementptr inbounds %AstBuilder, %AstBuilder* %46, i32 0, i32 31 + %47 = getelementptr inbounds %AstBuilder, %AstBuilder* %46, i32 0, i32 32 %48 = load %AstBuilder*, %AstBuilder** %other.addr - %49 = getelementptr inbounds %AstBuilder, %AstBuilder* %48, i32 0, i32 31 - %50 = call i1 @"==.385"(%"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %47, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %49) + %49 = getelementptr inbounds %AstBuilder, %AstBuilder* %48, i32 0, i32 32 + %50 = call i1 @"==.372"(%"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %47, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %49) br label %cond.end24 cond.false23: ; preds = %cond.end27 br label %cond.end24 cond.end24: ; preds = %cond.false23, %cond.true22 - %cond.res144 = phi i1 [ %50, %cond.true22 ], [ false, %cond.false23 ] - br i1 %cond.res144, label %cond.true19, label %cond.false20 + %cond.res148 = phi i1 [ %50, %cond.true22 ], [ false, %cond.false23 ] + br i1 %cond.res148, label %cond.true19, label %cond.false20 cond.true25: ; preds = %cond.end30 %51 = load %AstBuilder*, %AstBuilder** %this.addr - %52 = getelementptr inbounds %AstBuilder, %AstBuilder* %51, i32 0, i32 30 + %52 = getelementptr inbounds %AstBuilder, %AstBuilder* %51, i32 0, i32 31 %53 = load %AstBuilder*, %AstBuilder** %other.addr - %54 = getelementptr inbounds %AstBuilder, %AstBuilder* %53, i32 0, i32 30 - %55 = call i1 @"==.384"(%"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %52, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %54) + %54 = getelementptr inbounds %AstBuilder, %AstBuilder* %53, i32 0, i32 31 + %55 = call i1 @"==.371"(%"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %52, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %54) br label %cond.end27 cond.false26: ; preds = %cond.end30 br label %cond.end27 cond.end27: ; preds = %cond.false26, %cond.true25 - %cond.res143 = phi i1 [ %55, %cond.true25 ], [ false, %cond.false26 ] - br i1 %cond.res143, label %cond.true22, label %cond.false23 + %cond.res147 = phi i1 [ %55, %cond.true25 ], [ false, %cond.false26 ] + br i1 %cond.res147, label %cond.true22, label %cond.false23 cond.true28: ; preds = %cond.end33 %56 = load %AstBuilder*, %AstBuilder** %this.addr - %57 = getelementptr inbounds %AstBuilder, %AstBuilder* %56, i32 0, i32 29 + %57 = getelementptr inbounds %AstBuilder, %AstBuilder* %56, i32 0, i32 30 %58 = load %AstBuilder*, %AstBuilder** %other.addr - %59 = getelementptr inbounds %AstBuilder, %AstBuilder* %58, i32 0, i32 29 - %60 = call i1 @"==.383"(%"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %57, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %59) + %59 = getelementptr inbounds %AstBuilder, %AstBuilder* %58, i32 0, i32 30 + %60 = call i1 @"==.370"(%"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %57, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %59) br label %cond.end30 cond.false29: ; preds = %cond.end33 br label %cond.end30 cond.end30: ; preds = %cond.false29, %cond.true28 - %cond.res142 = phi i1 [ %60, %cond.true28 ], [ false, %cond.false29 ] - br i1 %cond.res142, label %cond.true25, label %cond.false26 + %cond.res146 = phi i1 [ %60, %cond.true28 ], [ false, %cond.false29 ] + br i1 %cond.res146, label %cond.true25, label %cond.false26 cond.true31: ; preds = %cond.end36 %61 = load %AstBuilder*, %AstBuilder** %this.addr - %62 = getelementptr inbounds %AstBuilder, %AstBuilder* %61, i32 0, i32 28 + %62 = getelementptr inbounds %AstBuilder, %AstBuilder* %61, i32 0, i32 29 %63 = load %AstBuilder*, %AstBuilder** %other.addr - %64 = getelementptr inbounds %AstBuilder, %AstBuilder* %63, i32 0, i32 28 - %65 = call i1 @"==.382"(%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %62, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %64) + %64 = getelementptr inbounds %AstBuilder, %AstBuilder* %63, i32 0, i32 29 + %65 = call i1 @"==.369"(%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %62, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %64) br label %cond.end33 cond.false32: ; preds = %cond.end36 br label %cond.end33 cond.end33: ; preds = %cond.false32, %cond.true31 - %cond.res141 = phi i1 [ %65, %cond.true31 ], [ false, %cond.false32 ] - br i1 %cond.res141, label %cond.true28, label %cond.false29 + %cond.res145 = phi i1 [ %65, %cond.true31 ], [ false, %cond.false32 ] + br i1 %cond.res145, label %cond.true28, label %cond.false29 cond.true34: ; preds = %cond.end39 %66 = load %AstBuilder*, %AstBuilder** %this.addr - %67 = getelementptr inbounds %AstBuilder, %AstBuilder* %66, i32 0, i32 27 + %67 = getelementptr inbounds %AstBuilder, %AstBuilder* %66, i32 0, i32 28 %68 = load %AstBuilder*, %AstBuilder** %other.addr - %69 = getelementptr inbounds %AstBuilder, %AstBuilder* %68, i32 0, i32 27 - %70 = call i1 @"==.381"(%"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %67, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %69) + %69 = getelementptr inbounds %AstBuilder, %AstBuilder* %68, i32 0, i32 28 + %70 = call i1 @"==.368"(%"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %67, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %69) br label %cond.end36 cond.false35: ; preds = %cond.end39 br label %cond.end36 cond.end36: ; preds = %cond.false35, %cond.true34 - %cond.res140 = phi i1 [ %70, %cond.true34 ], [ false, %cond.false35 ] - br i1 %cond.res140, label %cond.true31, label %cond.false32 + %cond.res144 = phi i1 [ %70, %cond.true34 ], [ false, %cond.false35 ] + br i1 %cond.res144, label %cond.true31, label %cond.false32 cond.true37: ; preds = %cond.end42 %71 = load %AstBuilder*, %AstBuilder** %this.addr - %72 = getelementptr inbounds %AstBuilder, %AstBuilder* %71, i32 0, i32 26 + %72 = getelementptr inbounds %AstBuilder, %AstBuilder* %71, i32 0, i32 27 %73 = load %AstBuilder*, %AstBuilder** %other.addr - %74 = getelementptr inbounds %AstBuilder, %AstBuilder* %73, i32 0, i32 26 - %75 = call i1 @"==.380"(%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %72, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %74) + %74 = getelementptr inbounds %AstBuilder, %AstBuilder* %73, i32 0, i32 27 + %75 = call i1 @"==.367"(%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %72, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %74) br label %cond.end39 cond.false38: ; preds = %cond.end42 br label %cond.end39 cond.end39: ; preds = %cond.false38, %cond.true37 - %cond.res139 = phi i1 [ %75, %cond.true37 ], [ false, %cond.false38 ] - br i1 %cond.res139, label %cond.true34, label %cond.false35 + %cond.res143 = phi i1 [ %75, %cond.true37 ], [ false, %cond.false38 ] + br i1 %cond.res143, label %cond.true34, label %cond.false35 cond.true40: ; preds = %cond.end45 %76 = load %AstBuilder*, %AstBuilder** %this.addr - %77 = getelementptr inbounds %AstBuilder, %AstBuilder* %76, i32 0, i32 25 + %77 = getelementptr inbounds %AstBuilder, %AstBuilder* %76, i32 0, i32 26 %78 = load %AstBuilder*, %AstBuilder** %other.addr - %79 = getelementptr inbounds %AstBuilder, %AstBuilder* %78, i32 0, i32 25 - %80 = call i1 @"==.379"(%"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %77, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %79) + %79 = getelementptr inbounds %AstBuilder, %AstBuilder* %78, i32 0, i32 26 + %80 = call i1 @"==.366"(%"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %77, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %79) br label %cond.end42 cond.false41: ; preds = %cond.end45 br label %cond.end42 cond.end42: ; preds = %cond.false41, %cond.true40 - %cond.res138 = phi i1 [ %80, %cond.true40 ], [ false, %cond.false41 ] - br i1 %cond.res138, label %cond.true37, label %cond.false38 + %cond.res142 = phi i1 [ %80, %cond.true40 ], [ false, %cond.false41 ] + br i1 %cond.res142, label %cond.true37, label %cond.false38 cond.true43: ; preds = %cond.end48 %81 = load %AstBuilder*, %AstBuilder** %this.addr - %82 = getelementptr inbounds %AstBuilder, %AstBuilder* %81, i32 0, i32 24 + %82 = getelementptr inbounds %AstBuilder, %AstBuilder* %81, i32 0, i32 25 %83 = load %AstBuilder*, %AstBuilder** %other.addr - %84 = getelementptr inbounds %AstBuilder, %AstBuilder* %83, i32 0, i32 24 - %85 = call i1 @"==.378"(%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %82, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %84) + %84 = getelementptr inbounds %AstBuilder, %AstBuilder* %83, i32 0, i32 25 + %85 = call i1 @"==.365"(%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %82, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %84) br label %cond.end45 cond.false44: ; preds = %cond.end48 br label %cond.end45 cond.end45: ; preds = %cond.false44, %cond.true43 - %cond.res137 = phi i1 [ %85, %cond.true43 ], [ false, %cond.false44 ] - br i1 %cond.res137, label %cond.true40, label %cond.false41 + %cond.res141 = phi i1 [ %85, %cond.true43 ], [ false, %cond.false44 ] + br i1 %cond.res141, label %cond.true40, label %cond.false41 cond.true46: ; preds = %cond.end51 %86 = load %AstBuilder*, %AstBuilder** %this.addr - %87 = getelementptr inbounds %AstBuilder, %AstBuilder* %86, i32 0, i32 23 + %87 = getelementptr inbounds %AstBuilder, %AstBuilder* %86, i32 0, i32 24 %88 = load %AstBuilder*, %AstBuilder** %other.addr - %89 = getelementptr inbounds %AstBuilder, %AstBuilder* %88, i32 0, i32 23 - %90 = call i1 @"==.377"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %87, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %89) + %89 = getelementptr inbounds %AstBuilder, %AstBuilder* %88, i32 0, i32 24 + %90 = call i1 @"==.364"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %87, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %89) br label %cond.end48 cond.false47: ; preds = %cond.end51 br label %cond.end48 cond.end48: ; preds = %cond.false47, %cond.true46 - %cond.res136 = phi i1 [ %90, %cond.true46 ], [ false, %cond.false47 ] - br i1 %cond.res136, label %cond.true43, label %cond.false44 + %cond.res140 = phi i1 [ %90, %cond.true46 ], [ false, %cond.false47 ] + br i1 %cond.res140, label %cond.true43, label %cond.false44 cond.true49: ; preds = %cond.end54 %91 = load %AstBuilder*, %AstBuilder** %this.addr - %92 = getelementptr inbounds %AstBuilder, %AstBuilder* %91, i32 0, i32 22 + %92 = getelementptr inbounds %AstBuilder, %AstBuilder* %91, i32 0, i32 23 %93 = load %AstBuilder*, %AstBuilder** %other.addr - %94 = getelementptr inbounds %AstBuilder, %AstBuilder* %93, i32 0, i32 22 - %95 = call i1 @"==.376"(%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %92, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %94) + %94 = getelementptr inbounds %AstBuilder, %AstBuilder* %93, i32 0, i32 23 + %95 = call i1 @"==.363"(%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %92, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %94) br label %cond.end51 cond.false50: ; preds = %cond.end54 br label %cond.end51 cond.end51: ; preds = %cond.false50, %cond.true49 - %cond.res135 = phi i1 [ %95, %cond.true49 ], [ false, %cond.false50 ] - br i1 %cond.res135, label %cond.true46, label %cond.false47 + %cond.res139 = phi i1 [ %95, %cond.true49 ], [ false, %cond.false50 ] + br i1 %cond.res139, label %cond.true46, label %cond.false47 cond.true52: ; preds = %cond.end57 %96 = load %AstBuilder*, %AstBuilder** %this.addr - %97 = getelementptr inbounds %AstBuilder, %AstBuilder* %96, i32 0, i32 21 + %97 = getelementptr inbounds %AstBuilder, %AstBuilder* %96, i32 0, i32 22 %98 = load %AstBuilder*, %AstBuilder** %other.addr - %99 = getelementptr inbounds %AstBuilder, %AstBuilder* %98, i32 0, i32 21 - %100 = call i1 @"==.365"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %97, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %99) + %99 = getelementptr inbounds %AstBuilder, %AstBuilder* %98, i32 0, i32 22 + %100 = call i1 @"==.352"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %97, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %99) br label %cond.end54 cond.false53: ; preds = %cond.end57 br label %cond.end54 cond.end54: ; preds = %cond.false53, %cond.true52 - %cond.res134 = phi i1 [ %100, %cond.true52 ], [ false, %cond.false53 ] - br i1 %cond.res134, label %cond.true49, label %cond.false50 + %cond.res138 = phi i1 [ %100, %cond.true52 ], [ false, %cond.false53 ] + br i1 %cond.res138, label %cond.true49, label %cond.false50 cond.true55: ; preds = %cond.end60 %101 = load %AstBuilder*, %AstBuilder** %this.addr - %102 = getelementptr inbounds %AstBuilder, %AstBuilder* %101, i32 0, i32 20 + %102 = getelementptr inbounds %AstBuilder, %AstBuilder* %101, i32 0, i32 21 %103 = load %AstBuilder*, %AstBuilder** %other.addr - %104 = getelementptr inbounds %AstBuilder, %AstBuilder* %103, i32 0, i32 20 - %105 = call i1 @"==.373"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %102, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %104) + %104 = getelementptr inbounds %AstBuilder, %AstBuilder* %103, i32 0, i32 21 + %105 = call i1 @"==.360"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %102, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %104) br label %cond.end57 cond.false56: ; preds = %cond.end60 br label %cond.end57 cond.end57: ; preds = %cond.false56, %cond.true55 - %cond.res133 = phi i1 [ %105, %cond.true55 ], [ false, %cond.false56 ] - br i1 %cond.res133, label %cond.true52, label %cond.false53 + %cond.res137 = phi i1 [ %105, %cond.true55 ], [ false, %cond.false56 ] + br i1 %cond.res137, label %cond.true52, label %cond.false53 cond.true58: ; preds = %cond.end63 %106 = load %AstBuilder*, %AstBuilder** %this.addr - %107 = getelementptr inbounds %AstBuilder, %AstBuilder* %106, i32 0, i32 19 + %107 = getelementptr inbounds %AstBuilder, %AstBuilder* %106, i32 0, i32 20 %108 = load %AstBuilder*, %AstBuilder** %other.addr - %109 = getelementptr inbounds %AstBuilder, %AstBuilder* %108, i32 0, i32 19 - %110 = call i1 @"==.373"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %107, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %109) + %109 = getelementptr inbounds %AstBuilder, %AstBuilder* %108, i32 0, i32 20 + %110 = call i1 @"==.360"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %107, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %109) br label %cond.end60 cond.false59: ; preds = %cond.end63 br label %cond.end60 cond.end60: ; preds = %cond.false59, %cond.true58 - %cond.res132 = phi i1 [ %110, %cond.true58 ], [ false, %cond.false59 ] - br i1 %cond.res132, label %cond.true55, label %cond.false56 + %cond.res136 = phi i1 [ %110, %cond.true58 ], [ false, %cond.false59 ] + br i1 %cond.res136, label %cond.true55, label %cond.false56 cond.true61: ; preds = %cond.end66 %111 = load %AstBuilder*, %AstBuilder** %this.addr - %112 = getelementptr inbounds %AstBuilder, %AstBuilder* %111, i32 0, i32 18 + %112 = getelementptr inbounds %AstBuilder, %AstBuilder* %111, i32 0, i32 19 %113 = load %AstBuilder*, %AstBuilder** %other.addr - %114 = getelementptr inbounds %AstBuilder, %AstBuilder* %113, i32 0, i32 18 - %115 = call i1 @"==.373"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %112, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %114) + %114 = getelementptr inbounds %AstBuilder, %AstBuilder* %113, i32 0, i32 19 + %115 = call i1 @"==.360"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %112, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %114) br label %cond.end63 cond.false62: ; preds = %cond.end66 br label %cond.end63 cond.end63: ; preds = %cond.false62, %cond.true61 - %cond.res131 = phi i1 [ %115, %cond.true61 ], [ false, %cond.false62 ] - br i1 %cond.res131, label %cond.true58, label %cond.false59 + %cond.res135 = phi i1 [ %115, %cond.true61 ], [ false, %cond.false62 ] + br i1 %cond.res135, label %cond.true58, label %cond.false59 cond.true64: ; preds = %cond.end69 %116 = load %AstBuilder*, %AstBuilder** %this.addr - %117 = getelementptr inbounds %AstBuilder, %AstBuilder* %116, i32 0, i32 17 + %117 = getelementptr inbounds %AstBuilder, %AstBuilder* %116, i32 0, i32 18 %118 = load %AstBuilder*, %AstBuilder** %other.addr - %119 = getelementptr inbounds %AstBuilder, %AstBuilder* %118, i32 0, i32 17 - %120 = call i1 @"==.375"(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %117, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %119) + %119 = getelementptr inbounds %AstBuilder, %AstBuilder* %118, i32 0, i32 18 + %120 = call i1 @"==.362"(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %117, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %119) br label %cond.end66 cond.false65: ; preds = %cond.end69 br label %cond.end66 cond.end66: ; preds = %cond.false65, %cond.true64 - %cond.res130 = phi i1 [ %120, %cond.true64 ], [ false, %cond.false65 ] - br i1 %cond.res130, label %cond.true61, label %cond.false62 + %cond.res134 = phi i1 [ %120, %cond.true64 ], [ false, %cond.false65 ] + br i1 %cond.res134, label %cond.true61, label %cond.false62 cond.true67: ; preds = %cond.end72 %121 = load %AstBuilder*, %AstBuilder** %this.addr - %122 = getelementptr inbounds %AstBuilder, %AstBuilder* %121, i32 0, i32 16 + %122 = getelementptr inbounds %AstBuilder, %AstBuilder* %121, i32 0, i32 17 %123 = load %AstBuilder*, %AstBuilder** %other.addr - %124 = getelementptr inbounds %AstBuilder, %AstBuilder* %123, i32 0, i32 16 - %125 = call i1 @"==.367"(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %122, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %124) + %124 = getelementptr inbounds %AstBuilder, %AstBuilder* %123, i32 0, i32 17 + %125 = call i1 @"==.354"(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %122, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %124) br label %cond.end69 cond.false68: ; preds = %cond.end72 br label %cond.end69 cond.end69: ; preds = %cond.false68, %cond.true67 - %cond.res129 = phi i1 [ %125, %cond.true67 ], [ false, %cond.false68 ] - br i1 %cond.res129, label %cond.true64, label %cond.false65 + %cond.res133 = phi i1 [ %125, %cond.true67 ], [ false, %cond.false68 ] + br i1 %cond.res133, label %cond.true64, label %cond.false65 cond.true70: ; preds = %cond.end75 %126 = load %AstBuilder*, %AstBuilder** %this.addr - %127 = getelementptr inbounds %AstBuilder, %AstBuilder* %126, i32 0, i32 15 + %127 = getelementptr inbounds %AstBuilder, %AstBuilder* %126, i32 0, i32 16 %128 = load %AstBuilder*, %AstBuilder** %other.addr - %129 = getelementptr inbounds %AstBuilder, %AstBuilder* %128, i32 0, i32 15 - %130 = call i1 @"==.374"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %127, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %129) + %129 = getelementptr inbounds %AstBuilder, %AstBuilder* %128, i32 0, i32 16 + %130 = call i1 @"==.361"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %127, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %129) br label %cond.end72 cond.false71: ; preds = %cond.end75 br label %cond.end72 cond.end72: ; preds = %cond.false71, %cond.true70 - %cond.res128 = phi i1 [ %130, %cond.true70 ], [ false, %cond.false71 ] - br i1 %cond.res128, label %cond.true67, label %cond.false68 + %cond.res132 = phi i1 [ %130, %cond.true70 ], [ false, %cond.false71 ] + br i1 %cond.res132, label %cond.true67, label %cond.false68 cond.true73: ; preds = %cond.end78 %131 = load %AstBuilder*, %AstBuilder** %this.addr - %132 = getelementptr inbounds %AstBuilder, %AstBuilder* %131, i32 0, i32 14 + %132 = getelementptr inbounds %AstBuilder, %AstBuilder* %131, i32 0, i32 15 %133 = load %AstBuilder*, %AstBuilder** %other.addr - %134 = getelementptr inbounds %AstBuilder, %AstBuilder* %133, i32 0, i32 14 - %135 = call i1 @"==.373"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %132, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %134) + %134 = getelementptr inbounds %AstBuilder, %AstBuilder* %133, i32 0, i32 15 + %135 = call i1 @"==.360"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %132, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %134) br label %cond.end75 cond.false74: ; preds = %cond.end78 br label %cond.end75 cond.end75: ; preds = %cond.false74, %cond.true73 - %cond.res127 = phi i1 [ %135, %cond.true73 ], [ false, %cond.false74 ] - br i1 %cond.res127, label %cond.true70, label %cond.false71 + %cond.res131 = phi i1 [ %135, %cond.true73 ], [ false, %cond.false74 ] + br i1 %cond.res131, label %cond.true70, label %cond.false71 cond.true76: ; preds = %cond.end81 %136 = load %AstBuilder*, %AstBuilder** %this.addr - %137 = getelementptr inbounds %AstBuilder, %AstBuilder* %136, i32 0, i32 13 + %137 = getelementptr inbounds %AstBuilder, %AstBuilder* %136, i32 0, i32 14 %138 = load %AstBuilder*, %AstBuilder** %other.addr - %139 = getelementptr inbounds %AstBuilder, %AstBuilder* %138, i32 0, i32 13 - %140 = call i1 @"==.372"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %137, %"FunctionPtr2[Node, UntypedPtr, Node]"* %139) + %139 = getelementptr inbounds %AstBuilder, %AstBuilder* %138, i32 0, i32 14 + %140 = call i1 @"==.359"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %137, %"FunctionPtr2[Node, UntypedPtr, Node]"* %139) br label %cond.end78 cond.false77: ; preds = %cond.end81 br label %cond.end78 cond.end78: ; preds = %cond.false77, %cond.true76 - %cond.res126 = phi i1 [ %140, %cond.true76 ], [ false, %cond.false77 ] - br i1 %cond.res126, label %cond.true73, label %cond.false74 + %cond.res130 = phi i1 [ %140, %cond.true76 ], [ false, %cond.false77 ] + br i1 %cond.res130, label %cond.true73, label %cond.false74 cond.true79: ; preds = %cond.end84 %141 = load %AstBuilder*, %AstBuilder** %this.addr - %142 = getelementptr inbounds %AstBuilder, %AstBuilder* %141, i32 0, i32 12 + %142 = getelementptr inbounds %AstBuilder, %AstBuilder* %141, i32 0, i32 13 %143 = load %AstBuilder*, %AstBuilder** %other.addr - %144 = getelementptr inbounds %AstBuilder, %AstBuilder* %143, i32 0, i32 12 - %145 = call i1 @"==.371"(%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %142, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %144) + %144 = getelementptr inbounds %AstBuilder, %AstBuilder* %143, i32 0, i32 13 + %145 = call i1 @"==.358"(%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %142, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %144) br label %cond.end81 cond.false80: ; preds = %cond.end84 br label %cond.end81 cond.end81: ; preds = %cond.false80, %cond.true79 - %cond.res125 = phi i1 [ %145, %cond.true79 ], [ false, %cond.false80 ] - br i1 %cond.res125, label %cond.true76, label %cond.false77 + %cond.res129 = phi i1 [ %145, %cond.true79 ], [ false, %cond.false80 ] + br i1 %cond.res129, label %cond.true76, label %cond.false77 cond.true82: ; preds = %cond.end87 %146 = load %AstBuilder*, %AstBuilder** %this.addr - %147 = getelementptr inbounds %AstBuilder, %AstBuilder* %146, i32 0, i32 11 + %147 = getelementptr inbounds %AstBuilder, %AstBuilder* %146, i32 0, i32 12 %148 = load %AstBuilder*, %AstBuilder** %other.addr - %149 = getelementptr inbounds %AstBuilder, %AstBuilder* %148, i32 0, i32 11 - %150 = call i1 @"==.366"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %147, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %149) + %149 = getelementptr inbounds %AstBuilder, %AstBuilder* %148, i32 0, i32 12 + %150 = call i1 @"==.353"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %147, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %149) br label %cond.end84 cond.false83: ; preds = %cond.end87 br label %cond.end84 cond.end84: ; preds = %cond.false83, %cond.true82 - %cond.res124 = phi i1 [ %150, %cond.true82 ], [ false, %cond.false83 ] - br i1 %cond.res124, label %cond.true79, label %cond.false80 + %cond.res128 = phi i1 [ %150, %cond.true82 ], [ false, %cond.false83 ] + br i1 %cond.res128, label %cond.true79, label %cond.false80 cond.true85: ; preds = %cond.end90 %151 = load %AstBuilder*, %AstBuilder** %this.addr - %152 = getelementptr inbounds %AstBuilder, %AstBuilder* %151, i32 0, i32 10 + %152 = getelementptr inbounds %AstBuilder, %AstBuilder* %151, i32 0, i32 11 %153 = load %AstBuilder*, %AstBuilder** %other.addr - %154 = getelementptr inbounds %AstBuilder, %AstBuilder* %153, i32 0, i32 10 - %155 = call i1 @"==.366"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %152, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %154) + %154 = getelementptr inbounds %AstBuilder, %AstBuilder* %153, i32 0, i32 11 + %155 = call i1 @"==.353"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %152, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %154) br label %cond.end87 cond.false86: ; preds = %cond.end90 br label %cond.end87 cond.end87: ; preds = %cond.false86, %cond.true85 - %cond.res123 = phi i1 [ %155, %cond.true85 ], [ false, %cond.false86 ] - br i1 %cond.res123, label %cond.true82, label %cond.false83 + %cond.res127 = phi i1 [ %155, %cond.true85 ], [ false, %cond.false86 ] + br i1 %cond.res127, label %cond.true82, label %cond.false83 cond.true88: ; preds = %cond.end93 %156 = load %AstBuilder*, %AstBuilder** %this.addr - %157 = getelementptr inbounds %AstBuilder, %AstBuilder* %156, i32 0, i32 9 + %157 = getelementptr inbounds %AstBuilder, %AstBuilder* %156, i32 0, i32 10 %158 = load %AstBuilder*, %AstBuilder** %other.addr - %159 = getelementptr inbounds %AstBuilder, %AstBuilder* %158, i32 0, i32 9 - %160 = call i1 @"==.370"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %157, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %159) + %159 = getelementptr inbounds %AstBuilder, %AstBuilder* %158, i32 0, i32 10 + %160 = call i1 @"==.353"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %157, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %159) br label %cond.end90 cond.false89: ; preds = %cond.end93 br label %cond.end90 cond.end90: ; preds = %cond.false89, %cond.true88 - %cond.res122 = phi i1 [ %160, %cond.true88 ], [ false, %cond.false89 ] - br i1 %cond.res122, label %cond.true85, label %cond.false86 + %cond.res126 = phi i1 [ %160, %cond.true88 ], [ false, %cond.false89 ] + br i1 %cond.res126, label %cond.true85, label %cond.false86 cond.true91: ; preds = %cond.end96 %161 = load %AstBuilder*, %AstBuilder** %this.addr - %162 = getelementptr inbounds %AstBuilder, %AstBuilder* %161, i32 0, i32 8 + %162 = getelementptr inbounds %AstBuilder, %AstBuilder* %161, i32 0, i32 9 %163 = load %AstBuilder*, %AstBuilder** %other.addr - %164 = getelementptr inbounds %AstBuilder, %AstBuilder* %163, i32 0, i32 8 - %165 = call i1 @"==.366"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %162, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %164) + %164 = getelementptr inbounds %AstBuilder, %AstBuilder* %163, i32 0, i32 9 + %165 = call i1 @"==.357"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %162, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %164) br label %cond.end93 cond.false92: ; preds = %cond.end96 br label %cond.end93 cond.end93: ; preds = %cond.false92, %cond.true91 - %cond.res121 = phi i1 [ %165, %cond.true91 ], [ false, %cond.false92 ] - br i1 %cond.res121, label %cond.true88, label %cond.false89 + %cond.res125 = phi i1 [ %165, %cond.true91 ], [ false, %cond.false92 ] + br i1 %cond.res125, label %cond.true88, label %cond.false89 cond.true94: ; preds = %cond.end99 %166 = load %AstBuilder*, %AstBuilder** %this.addr - %167 = getelementptr inbounds %AstBuilder, %AstBuilder* %166, i32 0, i32 7 + %167 = getelementptr inbounds %AstBuilder, %AstBuilder* %166, i32 0, i32 8 %168 = load %AstBuilder*, %AstBuilder** %other.addr - %169 = getelementptr inbounds %AstBuilder, %AstBuilder* %168, i32 0, i32 7 - %170 = call i1 @"==.369"(%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %167, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %169) + %169 = getelementptr inbounds %AstBuilder, %AstBuilder* %168, i32 0, i32 8 + %170 = call i1 @"==.353"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %167, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %169) br label %cond.end96 cond.false95: ; preds = %cond.end99 br label %cond.end96 cond.end96: ; preds = %cond.false95, %cond.true94 - %cond.res120 = phi i1 [ %170, %cond.true94 ], [ false, %cond.false95 ] - br i1 %cond.res120, label %cond.true91, label %cond.false92 + %cond.res124 = phi i1 [ %170, %cond.true94 ], [ false, %cond.false95 ] + br i1 %cond.res124, label %cond.true91, label %cond.false92 cond.true97: ; preds = %cond.end102 %171 = load %AstBuilder*, %AstBuilder** %this.addr - %172 = getelementptr inbounds %AstBuilder, %AstBuilder* %171, i32 0, i32 6 + %172 = getelementptr inbounds %AstBuilder, %AstBuilder* %171, i32 0, i32 7 %173 = load %AstBuilder*, %AstBuilder** %other.addr - %174 = getelementptr inbounds %AstBuilder, %AstBuilder* %173, i32 0, i32 6 - %175 = call i1 @"==.368"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %172, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %174) + %174 = getelementptr inbounds %AstBuilder, %AstBuilder* %173, i32 0, i32 7 + %175 = call i1 @"==.356"(%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %172, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %174) br label %cond.end99 cond.false98: ; preds = %cond.end102 br label %cond.end99 cond.end99: ; preds = %cond.false98, %cond.true97 - %cond.res119 = phi i1 [ %175, %cond.true97 ], [ false, %cond.false98 ] - br i1 %cond.res119, label %cond.true94, label %cond.false95 + %cond.res123 = phi i1 [ %175, %cond.true97 ], [ false, %cond.false98 ] + br i1 %cond.res123, label %cond.true94, label %cond.false95 cond.true100: ; preds = %cond.end105 %176 = load %AstBuilder*, %AstBuilder** %this.addr - %177 = getelementptr inbounds %AstBuilder, %AstBuilder* %176, i32 0, i32 5 + %177 = getelementptr inbounds %AstBuilder, %AstBuilder* %176, i32 0, i32 6 %178 = load %AstBuilder*, %AstBuilder** %other.addr - %179 = getelementptr inbounds %AstBuilder, %AstBuilder* %178, i32 0, i32 5 - %180 = call i1 @"==.367"(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %177, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %179) + %179 = getelementptr inbounds %AstBuilder, %AstBuilder* %178, i32 0, i32 6 + %180 = call i1 @"==.355"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %177, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %179) br label %cond.end102 cond.false101: ; preds = %cond.end105 br label %cond.end102 cond.end102: ; preds = %cond.false101, %cond.true100 - %cond.res118 = phi i1 [ %180, %cond.true100 ], [ false, %cond.false101 ] - br i1 %cond.res118, label %cond.true97, label %cond.false98 + %cond.res122 = phi i1 [ %180, %cond.true100 ], [ false, %cond.false101 ] + br i1 %cond.res122, label %cond.true97, label %cond.false98 cond.true103: ; preds = %cond.end108 %181 = load %AstBuilder*, %AstBuilder** %this.addr - %182 = getelementptr inbounds %AstBuilder, %AstBuilder* %181, i32 0, i32 4 + %182 = getelementptr inbounds %AstBuilder, %AstBuilder* %181, i32 0, i32 5 %183 = load %AstBuilder*, %AstBuilder** %other.addr - %184 = getelementptr inbounds %AstBuilder, %AstBuilder* %183, i32 0, i32 4 - %185 = call i1 @"==.366"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %182, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %184) + %184 = getelementptr inbounds %AstBuilder, %AstBuilder* %183, i32 0, i32 5 + %185 = call i1 @"==.354"(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %182, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %184) br label %cond.end105 cond.false104: ; preds = %cond.end108 br label %cond.end105 cond.end105: ; preds = %cond.false104, %cond.true103 - %cond.res117 = phi i1 [ %185, %cond.true103 ], [ false, %cond.false104 ] - br i1 %cond.res117, label %cond.true100, label %cond.false101 + %cond.res121 = phi i1 [ %185, %cond.true103 ], [ false, %cond.false104 ] + br i1 %cond.res121, label %cond.true100, label %cond.false101 cond.true106: ; preds = %cond.end111 %186 = load %AstBuilder*, %AstBuilder** %this.addr - %187 = getelementptr inbounds %AstBuilder, %AstBuilder* %186, i32 0, i32 3 + %187 = getelementptr inbounds %AstBuilder, %AstBuilder* %186, i32 0, i32 4 %188 = load %AstBuilder*, %AstBuilder** %other.addr - %189 = getelementptr inbounds %AstBuilder, %AstBuilder* %188, i32 0, i32 3 - %190 = call i1 @"==.365"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %187, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %189) + %189 = getelementptr inbounds %AstBuilder, %AstBuilder* %188, i32 0, i32 4 + %190 = call i1 @"==.353"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %187, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %189) br label %cond.end108 cond.false107: ; preds = %cond.end111 br label %cond.end108 cond.end108: ; preds = %cond.false107, %cond.true106 - %cond.res116 = phi i1 [ %190, %cond.true106 ], [ false, %cond.false107 ] - br i1 %cond.res116, label %cond.true103, label %cond.false104 + %cond.res120 = phi i1 [ %190, %cond.true106 ], [ false, %cond.false107 ] + br i1 %cond.res120, label %cond.true103, label %cond.false104 cond.true109: ; preds = %cond.end114 %191 = load %AstBuilder*, %AstBuilder** %this.addr - %192 = getelementptr inbounds %AstBuilder, %AstBuilder* %191, i32 0, i32 2 + %192 = getelementptr inbounds %AstBuilder, %AstBuilder* %191, i32 0, i32 3 %193 = load %AstBuilder*, %AstBuilder** %other.addr - %194 = getelementptr inbounds %AstBuilder, %AstBuilder* %193, i32 0, i32 2 - %195 = call i1 @"==.365"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %192, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %194) + %194 = getelementptr inbounds %AstBuilder, %AstBuilder* %193, i32 0, i32 3 + %195 = call i1 @"==.352"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %192, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %194) br label %cond.end111 cond.false110: ; preds = %cond.end114 br label %cond.end111 cond.end111: ; preds = %cond.false110, %cond.true109 - %cond.res115 = phi i1 [ %195, %cond.true109 ], [ false, %cond.false110 ] - br i1 %cond.res115, label %cond.true106, label %cond.false107 + %cond.res119 = phi i1 [ %195, %cond.true109 ], [ false, %cond.false110 ] + br i1 %cond.res119, label %cond.true106, label %cond.false107 -cond.true112: ; preds = %code +cond.true112: ; preds = %cond.end117 %196 = load %AstBuilder*, %AstBuilder** %this.addr - %197 = getelementptr inbounds %AstBuilder, %AstBuilder* %196, i32 0, i32 1 + %197 = getelementptr inbounds %AstBuilder, %AstBuilder* %196, i32 0, i32 2 %198 = load %AstBuilder*, %AstBuilder** %other.addr - %199 = getelementptr inbounds %AstBuilder, %AstBuilder* %198, i32 0, i32 1 - %200 = call i1 @"==.364"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %197, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %199) + %199 = getelementptr inbounds %AstBuilder, %AstBuilder* %198, i32 0, i32 2 + %200 = call i1 @"==.352"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %197, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %199) br label %cond.end114 -cond.false113: ; preds = %code +cond.false113: ; preds = %cond.end117 br label %cond.end114 cond.end114: ; preds = %cond.false113, %cond.true112 - %cond.res = phi i1 [ %200, %cond.true112 ], [ false, %cond.false113 ] - br i1 %cond.res, label %cond.true109, label %cond.false110 + %cond.res118 = phi i1 [ %200, %cond.true112 ], [ false, %cond.false113 ] + br i1 %cond.res118, label %cond.true109, label %cond.false110 + +cond.true115: ; preds = %code + %201 = load %AstBuilder*, %AstBuilder** %this.addr + %202 = getelementptr inbounds %AstBuilder, %AstBuilder* %201, i32 0, i32 1 + %203 = load %AstBuilder*, %AstBuilder** %other.addr + %204 = getelementptr inbounds %AstBuilder, %AstBuilder* %203, i32 0, i32 1 + %205 = call i1 @"==.351"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %202, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %204) + br label %cond.end117 + +cond.false116: ; preds = %code + br label %cond.end117 + +cond.end117: ; preds = %cond.false116, %cond.true115 + %cond.res = phi i1 [ %205, %cond.true115 ], [ false, %cond.false116 ] + br i1 %cond.res, label %cond.true112, label %cond.false113 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.364"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %other) #3 { +define internal i1 @"==.351"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %other) #3 { %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* store %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %this.addr %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* @@ -11645,149 +10395,133 @@ define internal i1 @"==.364"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %thi code: ; preds = %0 %1 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %this.addr %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Node, Node]", %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.365"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %other.addr +define internal i1 @"==.352"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.366"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %other.addr +define internal i1 @"==.353"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.367"(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %other.addr +define internal i1 @"==.354"(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %other, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]", %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.368"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %other.addr +define internal i1 @"==.355"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* + store %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* + store %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.369"(%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %other.addr +define internal i1 @"==.356"(%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* + store %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* + store %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.370"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %other.addr +define internal i1 @"==.357"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* + store %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* + store %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %other, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]", %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.371"(%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* - store %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* - store %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %other.addr +define internal i1 @"==.358"(%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* + store %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* + store %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]", %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.372"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"* %other) #3 { +define internal i1 @"==.359"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"* %other) #3 { %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Node]"* store %"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"** %this.addr %other.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Node]"* @@ -11797,347 +10531,290 @@ define internal i1 @"==.372"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"F code: ; preds = %0 %1 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %this.addr %2 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %3 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Node]", %"FunctionPtr2[Node, UntypedPtr, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.373"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %other) #3 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %this.addr - %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %other, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %other.addr +define internal i1 @"==.360"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %other) #3 { + %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"** %this.addr + %other.addr = alloca %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* + store %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %other, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]", %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.374"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %other.addr +define internal i1 @"==.361"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.375"(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %other.addr +define internal i1 @"==.362"(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]", %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]", %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.376"(%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %other.addr +define internal i1 @"==.363"(%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* + store %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* + store %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %other, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]", %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.377"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %this, %"FunctionPtr2[Node, UntypedPtr, @Location]"* %other) #3 { - %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, @Location]"* - store %"FunctionPtr2[Node, UntypedPtr, @Location]"* %this, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %this.addr - %other.addr = alloca %"FunctionPtr2[Node, UntypedPtr, @Location]"* - store %"FunctionPtr2[Node, UntypedPtr, @Location]"* %other, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %other.addr +define internal i1 @"==.364"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %this, %"FunctionPtr2[Node, UntypedPtr, Location const]"* %other) #3 { + %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Location const]"* + store %"FunctionPtr2[Node, UntypedPtr, Location const]"* %this, %"FunctionPtr2[Node, UntypedPtr, Location const]"** %this.addr + %other.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Location const]"* + store %"FunctionPtr2[Node, UntypedPtr, Location const]"* %other, %"FunctionPtr2[Node, UntypedPtr, Location const]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr2[Node, UntypedPtr, @Location]"*, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, @Location]", %"FunctionPtr2[Node, UntypedPtr, @Location]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr2[Node, UntypedPtr, @Location]"*, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, @Location]", %"FunctionPtr2[Node, UntypedPtr, @Location]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr2[Node, UntypedPtr, Location const]"*, %"FunctionPtr2[Node, UntypedPtr, Location const]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Location const]", %"FunctionPtr2[Node, UntypedPtr, Location const]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr2[Node, UntypedPtr, Location const]"*, %"FunctionPtr2[Node, UntypedPtr, Location const]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr2[Node, UntypedPtr, Location const]", %"FunctionPtr2[Node, UntypedPtr, Location const]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.378"(%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %other.addr +define internal i1 @"==.365"(%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]", %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]", %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]", %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]", %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.379"(%"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %other.addr +define internal i1 @"==.366"(%"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Int]", %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Int]", %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Int]", %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Int]", %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.380"(%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %other.addr +define internal i1 @"==.367"(%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]", %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]", %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]", %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]", %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.381"(%"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %other.addr +define internal i1 @"==.368"(%"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Long]", %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Long]", %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Long]", %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Long]", %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.382"(%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %other.addr +define internal i1 @"==.369"(%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]", %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]", %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]", %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]", %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.383"(%"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %other.addr +define internal i1 @"==.370"(%"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Float]", %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Float]", %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Float]", %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Float]", %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.384"(%"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %other.addr +define internal i1 @"==.371"(%"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Double]", %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Double]", %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Double]", %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Double]", %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.385"(%"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %other.addr +define internal i1 @"==.372"(%"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Char]", %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Char]", %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Char]", %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Char]", %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.386"(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %other, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %other.addr +define internal i1 @"==.373"(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* + store %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %other, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Node]", %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, @Location, Node]", %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Node]", %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr3[Node, UntypedPtr, Location const, Node]", %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.387"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %other) #3 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %this.addr - %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %other.addr +define internal i1 @"==.374"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %other) #3 { + %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"** %this.addr + %other.addr = alloca %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* + store %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %other, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %this.addr - %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %other.addr - %5 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 + %1 = load %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"** %this.addr + %2 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %1, i32 0, i32 0 + %3 = load %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"** %other.addr + %4 = getelementptr inbounds %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]", %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) + ret i1 %5 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.388(%ParserContext* %this, %CharSource %chars, %Location %loc, %AstBuilder* %astBuilder, %ErrorReporter %reporter) #4 { - %this.addr = alloca %ParserContext* - store %ParserContext* %this, %ParserContext** %this.addr - %chars.addr = alloca %CharSource - store %CharSource %chars, %CharSource* %chars.addr +define internal void @ctor.375(%ParserContext* %this, %CharSource* %chars, %Location %loc, %AstBuilder* %astBuilder, %ErrorReporter* %reporter) #4 { %loc.addr = alloca %Location store %Location %loc, %Location* %loc.addr - %astBuilder.addr = alloca %AstBuilder* - store %AstBuilder* %astBuilder, %AstBuilder** %astBuilder.addr - %reporter.addr = alloca %ErrorReporter - store %ErrorReporter %reporter, %ErrorReporter* %reporter.addr br label %code code: ; preds = %0 - %1 = load %ParserContext*, %ParserContext** %this.addr - %2 = getelementptr inbounds %ParserContext, %ParserContext* %1, i32 0, i32 0 - %3 = load %CharSource, %CharSource* %chars.addr - %4 = load %ErrorReporter, %ErrorReporter* %reporter.addr - call void @ctor.389(%SparrowScanner* %2, %CharSource %3, %ErrorReporter %4, %Location* %loc.addr, i1 false) - %5 = load %ParserContext*, %ParserContext** %this.addr - %6 = getelementptr inbounds %ParserContext, %ParserContext* %5, i32 0, i32 1 - %7 = load %ParserContext*, %ParserContext** %this.addr - %8 = getelementptr inbounds %ParserContext, %ParserContext* %7, i32 0, i32 0 - %9 = load %SparrowScanner, %SparrowScanner* %8 - %10 = load %ErrorReporter, %ErrorReporter* %reporter.addr - call void @ctor.402(%"SparrowLayoutDecoder[SparrowScanner]"* %6, %SparrowScanner %9, %ErrorReporter %10) - %11 = load %ParserContext*, %ParserContext** %this.addr - %12 = getelementptr inbounds %ParserContext, %ParserContext* %11, i32 0, i32 2 - %13 = load %ParserContext*, %ParserContext** %this.addr - %14 = getelementptr inbounds %ParserContext, %ParserContext* %13, i32 0, i32 1 - %15 = load %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %14 - %16 = load %AstBuilder*, %AstBuilder** %astBuilder.addr - %17 = load %ErrorReporter, %ErrorReporter* %reporter.addr - call void @ctor.519(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, %"SparrowLayoutDecoder[SparrowScanner]" %15, %AstBuilder* %16, %ErrorReporter %17) + %1 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 0 + %2 = load %Location, %Location* %loc.addr + call void @ctor.376(%SparrowScanner* %1, %CharSource* %chars, %ErrorReporter* %reporter, %Location %2, i1 false) + %3 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 1 + %4 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 0 + call void @ctor.389(%"SparrowLayoutDecoder[SparrowScanner]"* %3, %SparrowScanner* %4, %ErrorReporter* %reporter) + %5 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 2 + %6 = getelementptr inbounds %ParserContext, %ParserContext* %this, i32 0, i32 1 + call void @ctor.507(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, %"SparrowLayoutDecoder[SparrowScanner]"* %6, %AstBuilder* %astBuilder, %ErrorReporter* %reporter) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.389(%SparrowScanner* %this, %CharSource %chars, %ErrorReporter %errorReporter, %Location* %iniLocation, i1 %emitWitespace) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr - %chars.addr = alloca %CharSource - store %CharSource %chars, %CharSource* %chars.addr - %errorReporter.addr = alloca %ErrorReporter - store %ErrorReporter %errorReporter, %ErrorReporter* %errorReporter.addr - %iniLocation.addr = alloca %Location* - store %Location* %iniLocation, %Location** %iniLocation.addr +define internal void @ctor.376(%SparrowScanner* %this, %CharSource* %chars, %ErrorReporter* %errorReporter, %Location %iniLocation, i1 %emitWitespace) #4 { + %iniLocation.addr = alloca %Location + store %Location %iniLocation, %Location* %iniLocation.addr %emitWitespace.addr = alloca i1 store i1 %emitWitespace, i1* %emitWitespace.addr %tmp.this = alloca %"RangeWithLookahead[BufferedCharSourceRange]" @@ -12145,78 +10822,53 @@ define internal void @ctor.389(%SparrowScanner* %this, %CharSource %chars, %Erro br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 6 - store i1 false, i1* %2 - %3 = load %SparrowScanner*, %SparrowScanner** %this.addr - %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %3, i32 0, i32 0 - %5 = load %Location*, %Location** %iniLocation.addr - call void @ctor.182(%Location* %4, %Location* %5) - %6 = load %SparrowScanner*, %SparrowScanner** %this.addr - %7 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %6, i32 0, i32 1 - %8 = load %CharSource, %CharSource* %chars.addr - call void @ctor.390(%BufferedCharSource* %7, %CharSource %8) - %9 = load %SparrowScanner*, %SparrowScanner** %this.addr - %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %9, i32 0, i32 2 - %11 = load %SparrowScanner*, %SparrowScanner** %this.addr - %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %11, i32 0, i32 1 - call void @all(%BufferedCharSourceRange* %"$tmpC", %BufferedCharSource* %12) - %13 = load %BufferedCharSourceRange, %BufferedCharSourceRange* %"$tmpC" - call void @ctor.393(%"RangeWithLookahead[BufferedCharSourceRange]"* %tmp.this, %BufferedCharSourceRange %13) - %14 = load %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %tmp.this - %15 = load %SparrowScanner*, %SparrowScanner** %this.addr - %16 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %15, i32 0, i32 0 - call void @ctor.392(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %10, %"RangeWithLookahead[BufferedCharSourceRange]" %14, %Location* %16) - call void @dtor.279(%"RangeWithLookahead[BufferedCharSourceRange]"* %tmp.this) - %17 = load %SparrowScanner*, %SparrowScanner** %this.addr - %18 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %17, i32 0, i32 3 - call void @ctor.143(%Token* %18) - %19 = load %SparrowScanner*, %SparrowScanner** %this.addr - %20 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %19, i32 0, i32 4 - store i1 false, i1* %20 - %21 = load %SparrowScanner*, %SparrowScanner** %this.addr - %22 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %21, i32 0, i32 5 - call void @ctor.204(%ErrorReporter* %22, %ErrorReporter* %errorReporter.addr) - %23 = load i1, i1* %emitWitespace.addr - %24 = load %SparrowScanner*, %SparrowScanner** %this.addr - %25 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %24, i32 0, i32 6 - store i1 %23, i1* %25 - ret void -} - -; Function Attrs: inlinehint nounwind -define internal void @ctor.390(%BufferedCharSource* %this, %CharSource %src) #4 { - %this.addr = alloca %BufferedCharSource* - store %BufferedCharSource* %this, %BufferedCharSource** %this.addr - %src.addr = alloca %CharSource - store %CharSource %src, %CharSource* %src.addr + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 6 + store i1 false, i1* %1 + %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 0 + call void @ctor.169(%Location* %2, %Location* %iniLocation.addr) + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 1 + call void @ctor.377(%BufferedCharSource* %3, %CharSource* %chars) + %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 1 + call void @all(%BufferedCharSourceRange* %"$tmpC", %BufferedCharSource* %5) + call void @ctor.380(%"RangeWithLookahead[BufferedCharSourceRange]"* %tmp.this, %BufferedCharSourceRange* %"$tmpC") + %6 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 0 + call void @ctor.379(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4, %"RangeWithLookahead[BufferedCharSourceRange]"* %tmp.this, %Location* %6) + call void @dtor.268(%"RangeWithLookahead[BufferedCharSourceRange]"* %tmp.this) + %7 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + call void @ctor.130(%Token* %7) + %8 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 4 + store i1 false, i1* %8 + %9 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 5 + call void @ctor.190(%ErrorReporter* %9, %ErrorReporter* %errorReporter) + %10 = load i1, i1* %emitWitespace.addr + %11 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 6 + store i1 %10, i1* %11 + ret void +} + +; Function Attrs: inlinehint nounwind +define internal void @ctor.377(%BufferedCharSource* %this, %CharSource* %src) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %2 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %1, i32 0, i32 0 - call void @ctor.186(%CharSource* %2, %CharSource* %src.addr) - %3 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %4 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %3, i32 0, i32 1 - call void @ctor.137(%String* %4) - %5 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %6 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %5, i32 0, i32 1 + %1 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 0 + call void @ctor.173(%CharSource* %1, %CharSource* %src) + %2 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 1 + call void @ctor.124(%String* %2) + %3 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 1 store i64 4096, i64* %tmp.this - %7 = load i64, i64* %tmp.this - call void @reserve(%String* %6, i64 %7) - %8 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %9 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %8, i32 0, i32 2 - store i32 0, i32* %9 - %10 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - call void @_ensureBufferHasData(%BufferedCharSource* %10) + %4 = load i64, i64* %tmp.this + call void @reserve(%String* %3, i64 %4) + %5 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 2 + store i32 0, i32* %5 + call void @_ensureBufferHasData(%BufferedCharSource* %this) ret void } ; Function Attrs: inlinehint nounwind define internal void @reserve(%String* %this, i64 %n) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr %n.addr = alloca i64 store i64 %n, i64* %n.addr %curCapacity = alloca i64 @@ -12227,23 +10879,22 @@ define internal void @reserve(%String* %this, i64 %n) #4 { %tmp.this10 = alloca i64 %tmp.this11 = alloca double %curSize = alloca i64 - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this12 = alloca i64 - %"$tmpC13" = alloca %"RawPtr[Char]" + %"$tmpForRef13" = alloca %"RawPtr[Char]" %tmp.this14 = alloca i64 br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = call i64 @capacity(%String* %1) - store i64 %2, i64* %curCapacity + %1 = call i64 @capacity(%String* %this) + store i64 %1, i64* %curCapacity br label %if_block if_block: ; preds = %code - %3 = load i64, i64* %n.addr - %4 = load i64, i64* %curCapacity - %5 = icmp sle i64 %3, %4 - br i1 %5, label %if_then, label %if_end + %2 = load i64, i64* %n.addr + %3 = load i64, i64* %curCapacity + %4 = icmp sle i64 %2, %3 + br i1 %4, label %if_then, label %if_end if_then: ; preds = %if_block ret void @@ -12255,122 +10906,109 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %6 = load i64, i64* %n.addr + %5 = load i64, i64* %n.addr store i64 16, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = icmp slt i64 %6, %7 - br i1 %8, label %if_then2, label %if_end3 + %6 = load i64, i64* %tmp.this + %7 = icmp slt i64 %5, %6 + br i1 %7, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i64 16, i64* %tmp.this4 - %9 = load i64, i64* %tmp.this4 - store i64 %9, i64* %n.addr + %8 = load i64, i64* %tmp.this4 + store i64 %8, i64* %n.addr br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 br label %if_block5 if_block5: ; preds = %if_end3 - %10 = load i64, i64* %n.addr - %11 = sitofp i64 %10 to double - store double %11, double* %tmp.this8 - %12 = load double, double* %tmp.this8 - %13 = load i64, i64* %curCapacity - %14 = sitofp i64 %13 to double - store double %14, double* %tmp.this9 - %15 = load double, double* %tmp.this9 - %16 = call double @_Double_opMul(double 1.500000e+00, double %15) - %17 = call i1 @_Double_opLT(double %12, double %16) - br i1 %17, label %if_then6, label %if_end7 + %9 = load i64, i64* %n.addr + %10 = sitofp i64 %9 to double + store double %10, double* %tmp.this8 + %11 = load double, double* %tmp.this8 + %12 = load i64, i64* %curCapacity + %13 = sitofp i64 %12 to double + store double %13, double* %tmp.this9 + %14 = load double, double* %tmp.this9 + %15 = call double @_Double_opMul(double 1.500000e+00, double %14) + %16 = call i1 @_Double_opLT(double %11, double %15) + br i1 %16, label %if_then6, label %if_end7 if_then6: ; preds = %if_block5 - %18 = load i64, i64* %curCapacity - %19 = sitofp i64 %18 to double - store double %19, double* %tmp.this11 - %20 = load double, double* %tmp.this11 - %21 = call double @_Double_opMul(double 1.500000e+00, double %20) - %22 = fptoui double %21 to i64 - store i64 %22, i64* %tmp.this10 - %23 = load i64, i64* %tmp.this10 - store i64 %23, i64* %n.addr + %17 = load i64, i64* %curCapacity + %18 = sitofp i64 %17 to double + store double %18, double* %tmp.this11 + %19 = load double, double* %tmp.this11 + %20 = call double @_Double_opMul(double 1.500000e+00, double %19) + %21 = fptoui double %20 to i64 + store i64 %21, i64* %tmp.this10 + %22 = load i64, i64* %tmp.this10 + store i64 %22, i64* %n.addr br label %if_end7 if_end7: ; preds = %if_then6, %if_block5 - %24 = load %String*, %String** %this.addr - %25 = call i64 @size.190(%String* %24) - store i64 %25, i64* %curSize - %26 = load %String*, %String** %this.addr - %27 = getelementptr inbounds %String, %String* %26, i32 0, i32 0 - %28 = load i64, i64* %n.addr - call void @reallocPtr(%"RawPtr[Char]"* %27, i64 %28) - %29 = load %String*, %String** %this.addr - %30 = getelementptr inbounds %String, %String* %29, i32 0, i32 1 - %31 = load %String*, %String** %this.addr - %32 = getelementptr inbounds %String, %String* %31, i32 0, i32 0 - %33 = load %"RawPtr[Char]", %"RawPtr[Char]"* %32 - %34 = load i64, i64* %curSize - store i64 %34, i64* %tmp.this12 - %35 = load i64, i64* %tmp.this12 - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %33, i64 %35) - call void @"=.200"(%"RawPtr[Char]"* %30, %"RawPtr[Char]"* %"$tmpC") - %36 = load %String*, %String** %this.addr - %37 = getelementptr inbounds %String, %String* %36, i32 0, i32 2 - %38 = load %String*, %String** %this.addr - %39 = getelementptr inbounds %String, %String* %38, i32 0, i32 0 - %40 = load %"RawPtr[Char]", %"RawPtr[Char]"* %39 - %41 = load i64, i64* %n.addr - store i64 %41, i64* %tmp.this14 - %42 = load i64, i64* %tmp.this14 - call void @advance(%"RawPtr[Char]"* %"$tmpC13", %"RawPtr[Char]" %40, i64 %42) - call void @"=.200"(%"RawPtr[Char]"* %37, %"RawPtr[Char]"* %"$tmpC13") + %23 = call i64 @size.176(%String* %this) + store i64 %23, i64* %curSize + %24 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %25 = load i64, i64* %n.addr + call void @reallocPtr(%"RawPtr[Char]"* %24, i64 %25) + %26 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %27 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %28 = load i64, i64* %curSize + store i64 %28, i64* %tmp.this12 + %29 = load i64, i64* %tmp.this12 + %30 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %27, i64 %29) + store %"RawPtr[Char]" %30, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %26, %"RawPtr[Char]"* %"$tmpForRef") + %31 = getelementptr inbounds %String, %String* %this, i32 0, i32 2 + %32 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %33 = load i64, i64* %n.addr + store i64 %33, i64* %tmp.this14 + %34 = load i64, i64* %tmp.this14 + %35 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %32, i64 %34) + store %"RawPtr[Char]" %35, %"RawPtr[Char]"* %"$tmpForRef13" + call void @"=.186"(%"RawPtr[Char]"* %31, %"RawPtr[Char]"* %"$tmpForRef13") ret void } ; Function Attrs: inlinehint nounwind define internal i64 @capacity(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 2 + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 2 + %2 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = load %String*, %String** %this.addr - %5 = getelementptr inbounds %String, %String* %4, i32 0, i32 0 - %6 = load %"RawPtr[Char]", %"RawPtr[Char]"* %5 - %7 = call i64 @diff(%"RawPtr[Char]" %3, %"RawPtr[Char]" %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = call i64 @diff(%"RawPtr[Char]"* %1, %"RawPtr[Char]" %3) + store i64 %4, i64* %tmp.this + %5 = load i64, i64* %tmp.this + ret i64 %5 } ; Function Attrs: inlinehint nounwind define internal void @reallocPtr(%"RawPtr[Char]"* %this, i64 %n) #4 { - %this.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %this, %"RawPtr[Char]"** %this.addr %n.addr = alloca i64 store i64 %n, i64* %n.addr + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %this.addr - %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %1 - %3 = call i8* @bytePtr(%"RawPtr[Char]" %2) + %1 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + %2 = load i8*, i8** %1 + call void @ctor.67(%UntypedPtr* %tmp.this, i8* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this %4 = load i64, i64* %n.addr %5 = mul i64 %4, 1 - %6 = call i8* @realloc(i8* %3, i64 %5) - %7 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %this.addr - %8 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %7, i32 0, i32 0 - store i8* %6, i8** %8 + %6 = call %UntypedPtr @realloc(%UntypedPtr %3, i64 %5) + %7 = call i8* @asRefOf.62(%UntypedPtr %6) + %8 = getelementptr inbounds %"RawPtr[Char]", %"RawPtr[Char]"* %this, i32 0, i32 0 + store i8* %7, i8** %8 ret void } ; Function Attrs: inlinehint nounwind define internal void @_ensureBufferHasData(%BufferedCharSource* %this) #4 { - %this.addr = alloca %BufferedCharSource* - store %BufferedCharSource* %this, %BufferedCharSource** %this.addr %tmp.this = alloca i64 br label %code @@ -12378,31 +11016,24 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %2 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %1, i32 0, i32 2 - %3 = load i32, i32* %2 - %4 = zext i32 %3 to i64 - store i64 %4, i64* %tmp.this - %5 = load i64, i64* %tmp.this - %6 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %7 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %6, i32 0, i32 1 - %8 = call i64 @size.190(%String* %7) - %9 = icmp sge i64 %5, %8 - br i1 %9, label %if_then, label %if_end + %1 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 2 + %2 = load i32, i32* %1 + %3 = zext i32 %2 to i64 + store i64 %3, i64* %tmp.this + %4 = load i64, i64* %tmp.this + %5 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 1 + %6 = call i64 @size.176(%String* %5) + %7 = icmp sge i64 %4, %6 + br i1 %7, label %if_then, label %if_end if_then: ; preds = %if_block - %10 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %11 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %10, i32 0, i32 1 - call void @clear(%String* %11) - %12 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %13 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %12, i32 0, i32 2 - store i32 0, i32* %13 - %14 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %15 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %14, i32 0, i32 0 - %16 = load %CharSource, %CharSource* %15 - %17 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - %18 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %17, i32 0, i32 1 - call void @readChars(%CharSource %16, %String* %18, i32 4096) + %8 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 1 + call void @clear(%String* %8) + %9 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 2 + store i32 0, i32* %9 + %10 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 0 + %11 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %this, i32 0, i32 1 + call void @readChars(%CharSource* %10, %String* %11, i32 4096) br label %if_end if_end: ; preds = %if_then, %if_block @@ -12411,153 +11042,136 @@ if_end: ; preds = %if_then, %if_block ; Function Attrs: inlinehint nounwind define internal void @clear(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr %tmp.this = alloca %StringRef br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = load %String*, %String** %this.addr - %3 = getelementptr inbounds %String, %String* %2, i32 0, i32 0 - %4 = load %"RawPtr[Char]", %"RawPtr[Char]"* %3 - %5 = call i8* @bytePtr(%"RawPtr[Char]" %4) - %6 = load %String*, %String** %this.addr - %7 = getelementptr inbounds %String, %String* %6, i32 0, i32 1 - %8 = load %"RawPtr[Char]", %"RawPtr[Char]"* %7 - %9 = call i8* @bytePtr(%"RawPtr[Char]" %8) - call void @ctor.57(%StringRef* %tmp.this, i8* %5, i8* %9) - %10 = load %StringRef, %StringRef* %tmp.this - call void @remove(%String* %1, %StringRef %10) + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %2 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %1) + %3 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %4 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %3) + call void @ctor.60(%StringRef* %tmp.this, %UntypedPtr %2, %UntypedPtr %4) + %5 = load %StringRef, %StringRef* %tmp.this + call void @remove(%String* %this, %StringRef %5) + %6 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %6) ret void } ; Function Attrs: inlinehint nounwind define internal void @remove(%String* %this, %StringRef %range) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr %range.addr = alloca %StringRef store %StringRef %range, %StringRef* %range.addr %rSize = alloca i64 %rBegin = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %rEnd = alloca %"RawPtr[Char]" + %"$tmpForRef1" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 - %"$tmpC" = alloca %"RawPtr[Char]" - %"$tmpC1" = alloca %"RawPtr[Char]" + %"$tmpForRef2" = alloca %"RawPtr[Char]" + %"$tmpForRef3" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = call i64 @size(%StringRef* %range.addr) - store i64 %1, i64* %rSize - %2 = load %StringRef, %StringRef* %range.addr - call void @_frontPtr(%"RawPtr[Char]"* %rBegin, %StringRef %2) - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rBegin - %4 = load i64, i64* %rSize - store i64 %4, i64* %tmp.this - %5 = load i64, i64* %tmp.this - call void @advance(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]" %3, i64 %5) + %1 = load %StringRef, %StringRef* %range.addr + %2 = call i64 @size(%StringRef %1) + store i64 %2, i64* %rSize + %3 = load %StringRef, %StringRef* %range.addr + %4 = call %"RawPtr[Char]" @_frontPtr(%StringRef %3) + store %"RawPtr[Char]" %4, %"RawPtr[Char]"* %"$tmpForRef" + call void @ctor.178(%"RawPtr[Char]"* %rBegin, %"RawPtr[Char]"* %"$tmpForRef") + %5 = load i64, i64* %rSize + store i64 %5, i64* %tmp.this + %6 = load i64, i64* %tmp.this + %7 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %rBegin, i64 %6) + store %"RawPtr[Char]" %7, %"RawPtr[Char]"* %"$tmpForRef1" + call void @ctor.178(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]"* %"$tmpForRef1") br label %while_block while_block: ; preds = %while_step, %code - %6 = load %String*, %String** %this.addr - %7 = getelementptr inbounds %String, %String* %6, i32 0, i32 1 - %8 = call i1 @"==.268"(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]"* %7) - %9 = xor i1 true, %8 - br i1 %9, label %while_body, label %while_end + %8 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %9 = call i1 @"==.257"(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]"* %8) + %10 = xor i1 true, %9 + br i1 %10, label %while_body, label %while_end while_body: ; preds = %while_block - %10 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rBegin - %11 = call i8* @value(%"RawPtr[Char]" %10) + %11 = call i8* @value(%"RawPtr[Char]"* %rBegin) %12 = load i8, i8* %11 - %13 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rEnd - %14 = call i8* @value(%"RawPtr[Char]" %13) - %15 = load i8, i8* %14 - %16 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rBegin - %17 = call i8* @value(%"RawPtr[Char]" %16) - store i8 %15, i8* %17 - %18 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rBegin - call void @advance.269(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %18) - call void @"=.200"(%"RawPtr[Char]"* %rBegin, %"RawPtr[Char]"* %"$tmpC") - %19 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rEnd - call void @advance.269(%"RawPtr[Char]"* %"$tmpC1", %"RawPtr[Char]" %19) - call void @"=.200"(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]"* %"$tmpC1") + %13 = call i8* @value(%"RawPtr[Char]"* %rEnd) + %14 = load i8, i8* %13 + %15 = call i8* @value(%"RawPtr[Char]"* %rBegin) + store i8 %14, i8* %15 + %16 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %rBegin) + store %"RawPtr[Char]" %16, %"RawPtr[Char]"* %"$tmpForRef2" + call void @"=.186"(%"RawPtr[Char]"* %rBegin, %"RawPtr[Char]"* %"$tmpForRef2") + %17 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %rEnd) + store %"RawPtr[Char]" %17, %"RawPtr[Char]"* %"$tmpForRef3" + call void @"=.186"(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]"* %"$tmpForRef3") br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - %20 = load %String*, %String** %this.addr - %21 = getelementptr inbounds %String, %String* %20, i32 0, i32 1 - call void @"=.200"(%"RawPtr[Char]"* %21, %"RawPtr[Char]"* %rBegin) + %18 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + call void @"=.186"(%"RawPtr[Char]"* %18, %"RawPtr[Char]"* %rBegin) ret void } ; Function Attrs: inlinehint nounwind -define internal void @_frontPtr(%"RawPtr[Char]"* sret %_result, %StringRef %s) #4 { - %_result.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %_result, %"RawPtr[Char]"** %_result.addr +define internal %"RawPtr[Char]" @_frontPtr(%StringRef %s) #4 { %s.addr = alloca %StringRef store %StringRef %s, %StringRef* %s.addr + %tmp.this = alloca %"RawPtr[Char]" + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %_result.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %s.addr, i32 0, i32 0 - %3 = load i8*, i8** %2 - call void @ctor.194(%"RawPtr[Char]"* %1, i8* %3) - ret void + %1 = getelementptr inbounds %StringRef, %StringRef* %s.addr, i32 0, i32 0 + %2 = load %UntypedPtr, %UntypedPtr* %1 + call void @ctor.55(%UntypedPtr* %tmp.this1, %UntypedPtr %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + call void @ctor.180(%"RawPtr[Char]"* %tmp.this, %UntypedPtr %3) + %4 = load %"RawPtr[Char]", %"RawPtr[Char]"* %tmp.this + ret %"RawPtr[Char]" %4 } ; Function Attrs: inlinehint nounwind -define internal void @readChars(%CharSource %obj, %String* %dest, i32 %numChars) #4 { - %obj.addr = alloca %CharSource - store %CharSource %obj, %CharSource* %obj.addr - %dest.addr = alloca %String* - store %String* %dest, %String** %dest.addr +define internal void @readChars(%CharSource* %obj, %String* %dest, i32 %numChars) #4 { %numChars.addr = alloca i32 store i32 %numChars, i32* %numChars.addr br label %code code: ; preds = %0 - %1 = getelementptr inbounds %CharSource, %CharSource* %obj.addr, i32 0, i32 1 - %2 = getelementptr inbounds %CharSource, %CharSource* %obj.addr, i32 0, i32 0 + %1 = getelementptr inbounds %CharSource, %CharSource* %obj, i32 0, i32 1 + %2 = getelementptr inbounds %CharSource, %CharSource* %obj, i32 0, i32 0 %3 = load %UntypedPtr, %UntypedPtr* %2 - %4 = load %String*, %String** %dest.addr - %5 = load i32, i32* %numChars.addr - call void @"().391"(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %1, %UntypedPtr %3, %String* %4, i32 %5) + %4 = load i32, i32* %numChars.addr + call void @"().378"(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %1, %UntypedPtr %3, %String* %dest, i32 %4) ret void } ; Function Attrs: inlinehint nounwind -define internal void @"().391"(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %this, %UntypedPtr %p1, %String* %p2, i32 %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* - store %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %this, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %this.addr +define internal void @"().378"(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %this, %UntypedPtr %p1, %String* %p2, i32 %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %String* - store %String* %p2, %String** %p2.addr %p3.addr = alloca i32 store i32 %p3, i32* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @String, Int]"*, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %String*, %String** %p2.addr - %4 = load i32, i32* %p3.addr - %5 = bitcast %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %1 to void (%UntypedPtr, %String*, i32)** - %6 = load void (%UntypedPtr, %String*, i32)*, void (%UntypedPtr, %String*, i32)** %5 - call void %6(%UntypedPtr %2, %String* %3, i32 %4) + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load i32, i32* %p3.addr + %3 = bitcast %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %this to void (%UntypedPtr, %String*, i32)** + %4 = load void (%UntypedPtr, %String*, i32)*, void (%UntypedPtr, %String*, i32)** %3 + call void %4(%UntypedPtr %1, %String* %p2, i32 %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.392(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]" %fsource, %Location* %flocation) #3 { +define internal void @ctor.379(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"* %fsource, %Location* %flocation) #3 { %this.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %fsource.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]" - store %"RangeWithLookahead[BufferedCharSourceRange]" %fsource, %"RangeWithLookahead[BufferedCharSourceRange]"* %fsource.addr %flocation.addr = alloca %Location* store %Location* %flocation, %Location** %flocation.addr br label %code @@ -12565,7 +11179,7 @@ define internal void @ctor.392(%"LocationSyncCharRange[RangeWithLookahead[Buffer code: ; preds = %0 %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 - call void @ctor.196(%"RangeWithLookahead[BufferedCharSourceRange]"* %2, %"RangeWithLookahead[BufferedCharSourceRange]"* %fsource.addr) + call void @ctor.182(%"RangeWithLookahead[BufferedCharSourceRange]"* %2, %"RangeWithLookahead[BufferedCharSourceRange]"* %fsource) %3 = load %Location*, %Location** %flocation.addr %4 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr %5 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4, i32 0, i32 1 @@ -12574,46 +11188,33 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.393(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, %BufferedCharSourceRange %src) #4 { - %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %src.addr = alloca %BufferedCharSourceRange - store %BufferedCharSourceRange %src, %BufferedCharSourceRange* %src.addr +define internal void @ctor.380(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, %BufferedCharSourceRange* %src) #4 { %tmp.this = alloca i64 - %"$tmpForRef" = alloca i8 br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %1, i32 0, i32 0 - call void @ctor.141(%BufferedCharSourceRange* %2) - %3 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %4 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %3, i32 0, i32 0 - call void @"=.294"(%BufferedCharSourceRange* %4, %BufferedCharSourceRange* %src.addr) - %5 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %6 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %5, i32 0, i32 1 - call void @ctor.142(%"Vector[Char]"* %6) - %7 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %8 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %7, i32 0, i32 1 + %1 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + call void @ctor.128(%BufferedCharSourceRange* %1) + %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + call void @"=.282"(%BufferedCharSourceRange* %2, %BufferedCharSourceRange* %src) + %3 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + call void @ctor.129(%"Vector[Char]"* %3) + %4 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 store i64 10, i64* %tmp.this - %9 = load i64, i64* %tmp.this - call void @reserve.394(%"Vector[Char]"* %8, i64 %9) + %5 = load i64, i64* %tmp.this + call void @reserve.381(%"Vector[Char]"* %4, i64 %5) br label %if_block if_block: ; preds = %code - %10 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %11 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %10, i32 0, i32 0 - %12 = call i1 @"pre_!!"(%BufferedCharSourceRange* %11) - br i1 %12, label %if_then, label %if_end + %6 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + %7 = call i1 @"pre_!!"(%BufferedCharSourceRange* %6) + br i1 %7, label %if_then, label %if_end if_then: ; preds = %if_block - %13 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %14 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %13, i32 0, i32 1 - %15 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %16 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %15, i32 0, i32 0 - %17 = call i8 @"post_++.398"(%BufferedCharSourceRange* %16) - store i8 %17, i8* %"$tmpForRef" - call void @"+="(%"Vector[Char]"* %14, i8* %"$tmpForRef") + %8 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %9 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + %10 = call i8 @"post_++.385"(%BufferedCharSourceRange* %9) + call void @"+="(%"Vector[Char]"* %8, i8 %10) br label %if_end if_end: ; preds = %if_then, %if_block @@ -12621,9 +11222,7 @@ if_end: ; preds = %if_then, %if_block } ; Function Attrs: inlinehint nounwind -define internal void @reserve.394(%"Vector[Char]"* %this, i64 %n) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal void @reserve.381(%"Vector[Char]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr %curCapacity = alloca i64 @@ -12634,21 +11233,20 @@ define internal void @reserve.394(%"Vector[Char]"* %this, i64 %n) #4 { %tmp.this10 = alloca i64 %tmp.this11 = alloca double %curSize = alloca i64 - %"$tmpC" = alloca %"RawPtr[Char]" - %"$tmpC12" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" + %"$tmpForRef12" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = call i64 @capacity.395(%"Vector[Char]"* %1) - store i64 %2, i64* %curCapacity + %1 = call i64 @capacity.382(%"Vector[Char]"* %this) + store i64 %1, i64* %curCapacity br label %if_block if_block: ; preds = %code - %3 = load i64, i64* %n.addr - %4 = load i64, i64* %curCapacity - %5 = icmp sle i64 %3, %4 - br i1 %5, label %if_then, label %if_end + %2 = load i64, i64* %n.addr + %3 = load i64, i64* %curCapacity + %4 = icmp sle i64 %2, %3 + br i1 %4, label %if_then, label %if_end if_then: ; preds = %if_block ret void @@ -12660,299 +11258,249 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %6 = load i64, i64* %n.addr + %5 = load i64, i64* %n.addr store i64 8, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = icmp slt i64 %6, %7 - br i1 %8, label %if_then2, label %if_end3 + %6 = load i64, i64* %tmp.this + %7 = icmp slt i64 %5, %6 + br i1 %7, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i64 8, i64* %tmp.this4 - %9 = load i64, i64* %tmp.this4 - store i64 %9, i64* %n.addr + %8 = load i64, i64* %tmp.this4 + store i64 %8, i64* %n.addr br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 br label %if_block5 if_block5: ; preds = %if_end3 - %10 = load i64, i64* %n.addr - %11 = sitofp i64 %10 to double - store double %11, double* %tmp.this8 - %12 = load double, double* %tmp.this8 - %13 = load i64, i64* %curCapacity - %14 = sitofp i64 %13 to double - store double %14, double* %tmp.this9 - %15 = load double, double* %tmp.this9 - %16 = call double @_Double_opMul(double 2.000000e+00, double %15) - %17 = call i1 @_Double_opLT(double %12, double %16) - br i1 %17, label %if_then6, label %if_end7 + %9 = load i64, i64* %n.addr + %10 = sitofp i64 %9 to double + store double %10, double* %tmp.this8 + %11 = load double, double* %tmp.this8 + %12 = load i64, i64* %curCapacity + %13 = sitofp i64 %12 to double + store double %13, double* %tmp.this9 + %14 = load double, double* %tmp.this9 + %15 = call double @_Double_opMul(double 2.000000e+00, double %14) + %16 = call i1 @_Double_opLT(double %11, double %15) + br i1 %16, label %if_then6, label %if_end7 if_then6: ; preds = %if_block5 - %18 = load i64, i64* %curCapacity - %19 = sitofp i64 %18 to double - store double %19, double* %tmp.this11 - %20 = load double, double* %tmp.this11 - %21 = call double @_Double_opMul(double 2.000000e+00, double %20) - %22 = fptoui double %21 to i64 - store i64 %22, i64* %tmp.this10 - %23 = load i64, i64* %tmp.this10 - store i64 %23, i64* %n.addr + %17 = load i64, i64* %curCapacity + %18 = sitofp i64 %17 to double + store double %18, double* %tmp.this11 + %19 = load double, double* %tmp.this11 + %20 = call double @_Double_opMul(double 2.000000e+00, double %19) + %21 = fptoui double %20 to i64 + store i64 %21, i64* %tmp.this10 + %22 = load i64, i64* %tmp.this10 + store i64 %22, i64* %n.addr br label %if_end7 if_end7: ; preds = %if_then6, %if_block5 - %24 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %25 = call i64 @size.199(%"Vector[Char]"* %24) - store i64 %25, i64* %curSize - %26 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %27 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %26, i32 0, i32 0 - %28 = load i64, i64* %n.addr - call void @reallocPtr(%"RawPtr[Char]"* %27, i64 %28) - %29 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %30 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %29, i32 0, i32 1 - %31 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %32 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %31, i32 0, i32 0 - %33 = load %"RawPtr[Char]", %"RawPtr[Char]"* %32 - %34 = load i64, i64* %curSize - call void @advance.201(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %33, i64 %34) - call void @"=.200"(%"RawPtr[Char]"* %30, %"RawPtr[Char]"* %"$tmpC") - %35 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %36 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %35, i32 0, i32 2 - %37 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %38 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %37, i32 0, i32 0 - %39 = load %"RawPtr[Char]", %"RawPtr[Char]"* %38 - %40 = load i64, i64* %n.addr - call void @advance.201(%"RawPtr[Char]"* %"$tmpC12", %"RawPtr[Char]" %39, i64 %40) - call void @"=.200"(%"RawPtr[Char]"* %36, %"RawPtr[Char]"* %"$tmpC12") - ret void -} - -; Function Attrs: inlinehint nounwind -define internal i64 @capacity.395(%"Vector[Char]"* %this) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr + %23 = call i64 @size.185(%"Vector[Char]"* %this) + store i64 %23, i64* %curSize + %24 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %25 = load i64, i64* %n.addr + call void @reallocPtr(%"RawPtr[Char]"* %24, i64 %25) + %26 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %27 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %28 = load i64, i64* %curSize + %29 = call %"RawPtr[Char]" @advance.187(%"RawPtr[Char]"* %27, i64 %28) + store %"RawPtr[Char]" %29, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %26, %"RawPtr[Char]"* %"$tmpForRef") + %30 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 2 + %31 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %32 = load i64, i64* %n.addr + %33 = call %"RawPtr[Char]" @advance.187(%"RawPtr[Char]"* %31, i64 %32) + store %"RawPtr[Char]" %33, %"RawPtr[Char]"* %"$tmpForRef12" + call void @"=.186"(%"RawPtr[Char]"* %30, %"RawPtr[Char]"* %"$tmpForRef12") + ret void +} + +; Function Attrs: inlinehint nounwind +define internal i64 @capacity.382(%"Vector[Char]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 2 + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 2 + %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %5 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %4, i32 0, i32 0 - %6 = load %"RawPtr[Char]", %"RawPtr[Char]"* %5 - %7 = call i64 @diff(%"RawPtr[Char]" %3, %"RawPtr[Char]" %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = call i64 @diff(%"RawPtr[Char]"* %1, %"RawPtr[Char]" %3) + store i64 %4, i64* %tmp.this + %5 = load i64, i64* %tmp.this + ret i64 %5 } ; Function Attrs: inlinehint nounwind define internal i1 @"pre_!!"(%BufferedCharSourceRange* %r) #4 { - %r.addr = alloca %BufferedCharSourceRange* - store %BufferedCharSourceRange* %r, %BufferedCharSourceRange** %r.addr br label %code code: ; preds = %0 - %1 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %r.addr - %2 = call i1 @isEmpty.396(%BufferedCharSourceRange* %1) - %3 = xor i1 true, %2 - ret i1 %3 + %1 = call i1 @isEmpty.383(%BufferedCharSourceRange* %r) + %2 = xor i1 true, %1 + ret i1 %2 } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.396(%BufferedCharSourceRange* %this) #4 { - %this.addr = alloca %BufferedCharSourceRange* - store %BufferedCharSourceRange* %this, %BufferedCharSourceRange** %this.addr +define internal i1 @isEmpty.383(%BufferedCharSourceRange* %this) #4 { br label %code code: ; preds = %0 - %1 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %this.addr - %2 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %1, i32 0, i32 0 - %3 = load %BufferedCharSource*, %BufferedCharSource** %2 - %4 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %3, i32 0, i32 1 - %5 = call i1 @isEmpty.397(%String* %4) - ret i1 %5 + %1 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %this, i32 0, i32 0 + %2 = load %BufferedCharSource*, %BufferedCharSource** %1 + %3 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %2, i32 0, i32 1 + %4 = call i1 @isEmpty.384(%String* %3) + ret i1 %4 } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.397(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal i1 @isEmpty.384(%String* %this) #4 { br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - %3 = load %String*, %String** %this.addr - %4 = getelementptr inbounds %String, %String* %3, i32 0, i32 1 - %5 = call i1 @"==.268"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) - ret i1 %5 + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %2 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %3 = call i1 @"==.257"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %2) + ret i1 %3 } ; Function Attrs: inlinehint nounwind -define internal void @"+="(%"Vector[Char]"* %this, i8* %value) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr - %value.addr = alloca i8* - store i8* %value, i8** %value.addr +define internal void @"+="(%"Vector[Char]"* %this, i8 %value) #4 { + %value.addr = alloca i8 + store i8 %value, i8* %value.addr br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = load i8*, i8** %value.addr - call void @pushBack(%"Vector[Char]"* %1, i8* %2) + %1 = load i8, i8* %value.addr + call void @pushBack(%"Vector[Char]"* %this, i8 %1) ret void } ; Function Attrs: inlinehint nounwind -define internal void @pushBack(%"Vector[Char]"* %this, i8* %value) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr - %value.addr = alloca i8* - store i8* %value, i8** %value.addr +define internal void @pushBack(%"Vector[Char]"* %this, i8 %value) #4 { + %value.addr = alloca i8 + store i8 %value, i8* %value.addr %t = alloca i64 %tmp.this = alloca i64 %tmp.this4 = alloca i64 %tmp.this5 = alloca i64 - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 1 - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %3, i32 0, i32 2 - %5 = call i1 @"==.268"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) - br i1 %5, label %if_then, label %if_end + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 2 + %3 = call i1 @"==.257"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %2) + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block store i64 2, i64* %tmp.this - %6 = load i64, i64* %tmp.this - %7 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %8 = call i64 @capacity.395(%"Vector[Char]"* %7) - %9 = mul i64 %6, %8 - store i64 %9, i64* %t + %4 = load i64, i64* %tmp.this + %5 = call i64 @capacity.382(%"Vector[Char]"* %this) + %6 = mul i64 %4, %5 + store i64 %6, i64* %t br label %if_block1 if_end: ; preds = %if_end3, %if_block - %10 = load i8*, i8** %value.addr - %11 = load i8, i8* %10 - %12 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %13 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %12, i32 0, i32 1 - %14 = load %"RawPtr[Char]", %"RawPtr[Char]"* %13 - %15 = call i8* @value(%"RawPtr[Char]" %14) - store i8 %11, i8* %15 - %16 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %17 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %16, i32 0, i32 1 - %18 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %19 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %18, i32 0, i32 1 - %20 = load %"RawPtr[Char]", %"RawPtr[Char]"* %19 - call void @advance.269(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %20) - call void @"=.200"(%"RawPtr[Char]"* %17, %"RawPtr[Char]"* %"$tmpC") + %7 = load i8, i8* %value.addr + %8 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %9 = call i8* @value(%"RawPtr[Char]"* %8) + store i8 %7, i8* %9 + %10 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %11 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %12 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %11) + store %"RawPtr[Char]" %12, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %10, %"RawPtr[Char]"* %"$tmpForRef") ret void if_block1: ; preds = %if_then - %21 = load i64, i64* %t + %13 = load i64, i64* %t store i64 2, i64* %tmp.this4 - %22 = load i64, i64* %tmp.this4 - %23 = icmp slt i64 %21, %22 - br i1 %23, label %if_then2, label %if_end3 + %14 = load i64, i64* %tmp.this4 + %15 = icmp slt i64 %13, %14 + br i1 %15, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i64 2, i64* %tmp.this5 - %24 = load i64, i64* %tmp.this5 - store i64 %24, i64* %t + %16 = load i64, i64* %tmp.this5 + store i64 %16, i64* %t br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 - %25 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %26 = load i64, i64* %t - call void @reserve.394(%"Vector[Char]"* %25, i64 %26) + %17 = load i64, i64* %t + call void @reserve.381(%"Vector[Char]"* %this, i64 %17) br label %if_end } ; Function Attrs: inlinehint nounwind -define internal i8 @"post_++.398"(%BufferedCharSourceRange* %r) #4 { - %r.addr = alloca %BufferedCharSourceRange* - store %BufferedCharSourceRange* %r, %BufferedCharSourceRange** %r.addr +define internal i8 @"post_++.385"(%BufferedCharSourceRange* %r) #4 { %res = alloca i8 br label %code code: ; preds = %0 - %1 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %r.addr - %2 = call i8 @front.399(%BufferedCharSourceRange* %1) - store i8 %2, i8* %res - %3 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %r.addr - call void @popFront.400(%BufferedCharSourceRange* %3) - %4 = load i8, i8* %res - ret i8 %4 + %1 = call i8 @front.386(%BufferedCharSourceRange* %r) + store i8 %1, i8* %res + call void @popFront.387(%BufferedCharSourceRange* %r) + %2 = load i8, i8* %res + ret i8 %2 } ; Function Attrs: inlinehint nounwind -define internal i8 @front.399(%BufferedCharSourceRange* %this) #4 { - %this.addr = alloca %BufferedCharSourceRange* - store %BufferedCharSourceRange* %this, %BufferedCharSourceRange** %this.addr +define internal i8 @front.386(%BufferedCharSourceRange* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %this.addr - %2 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %1, i32 0, i32 0 - %3 = load %BufferedCharSource*, %BufferedCharSource** %2 - %4 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %3, i32 0, i32 1 - %5 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %this.addr - %6 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %5, i32 0, i32 0 - %7 = load %BufferedCharSource*, %BufferedCharSource** %6 - %8 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %7, i32 0, i32 2 - %9 = load i32, i32* %8 - %10 = zext i32 %9 to i64 - store i64 %10, i64* %tmp.this - %11 = load i64, i64* %tmp.this - %12 = call i8* @"().344"(%String* %4, i64 %11) - %13 = load i8, i8* %12 - ret i8 %13 + %1 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %this, i32 0, i32 0 + %2 = load %BufferedCharSource*, %BufferedCharSource** %1 + %3 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %2, i32 0, i32 1 + %4 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %this, i32 0, i32 0 + %5 = load %BufferedCharSource*, %BufferedCharSource** %4 + %6 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %5, i32 0, i32 2 + %7 = load i32, i32* %6 + %8 = zext i32 %7 to i64 + store i64 %8, i64* %tmp.this + %9 = load i64, i64* %tmp.this + %10 = call i8* @"().332"(%String* %3, i64 %9) + %11 = load i8, i8* %10 + ret i8 %11 } ; Function Attrs: inlinehint nounwind -define internal void @popFront.400(%BufferedCharSourceRange* %this) #4 { - %this.addr = alloca %BufferedCharSourceRange* - store %BufferedCharSourceRange* %this, %BufferedCharSourceRange** %this.addr +define internal void @popFront.387(%BufferedCharSourceRange* %this) #4 { br label %code code: ; preds = %0 - %1 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %this.addr - %2 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %1, i32 0, i32 0 - %3 = load %BufferedCharSource*, %BufferedCharSource** %2 - %4 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %3, i32 0, i32 2 - %5 = call i32 @"post_++.39"(i32* %4) - %6 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %this.addr - %7 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %6, i32 0, i32 0 - %8 = load %BufferedCharSource*, %BufferedCharSource** %7 - call void @_ensureBufferHasData(%BufferedCharSource* %8) + %1 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %this, i32 0, i32 0 + %2 = load %BufferedCharSource*, %BufferedCharSource** %1 + %3 = getelementptr inbounds %BufferedCharSource, %BufferedCharSource* %2, i32 0, i32 2 + %4 = call i32 @"post_++.39"(i32* %3) + %5 = getelementptr inbounds %BufferedCharSourceRange, %BufferedCharSourceRange* %this, i32 0, i32 0 + %6 = load %BufferedCharSource*, %BufferedCharSource** %5 + call void @_ensureBufferHasData(%BufferedCharSource* %6) ret void } ; Function Attrs: inlinehint nounwind define internal void @all(%BufferedCharSourceRange* sret %_result, %BufferedCharSource* %this) #4 { - %_result.addr = alloca %BufferedCharSourceRange* - store %BufferedCharSourceRange* %_result, %BufferedCharSourceRange** %_result.addr %this.addr = alloca %BufferedCharSource* store %BufferedCharSource* %this, %BufferedCharSource** %this.addr br label %code code: ; preds = %0 - %1 = load %BufferedCharSourceRange*, %BufferedCharSourceRange** %_result.addr - %2 = load %BufferedCharSource*, %BufferedCharSource** %this.addr - call void @ctor.401(%BufferedCharSourceRange* %1, %BufferedCharSource* %2) + %1 = load %BufferedCharSource*, %BufferedCharSource** %this.addr + call void @ctor.388(%BufferedCharSourceRange* %_result, %BufferedCharSource* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.401(%BufferedCharSourceRange* %this, %BufferedCharSource* %f_data) #3 { +define internal void @ctor.388(%BufferedCharSourceRange* %this, %BufferedCharSource* %f_data) #3 { %this.addr = alloca %BufferedCharSourceRange* store %BufferedCharSourceRange* %this, %BufferedCharSourceRange** %this.addr %f_data.addr = alloca %BufferedCharSource* @@ -12968,13 +11516,7 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.402(%"SparrowLayoutDecoder[SparrowScanner]"* %this, %SparrowScanner %tokens, %ErrorReporter %errorReporter) #4 { - %this.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* - store %"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %tokens.addr = alloca %SparrowScanner - store %SparrowScanner %tokens, %SparrowScanner* %tokens.addr - %errorReporter.addr = alloca %ErrorReporter - store %ErrorReporter %errorReporter, %ErrorReporter* %errorReporter.addr +define internal void @ctor.389(%"SparrowLayoutDecoder[SparrowScanner]"* %this, %SparrowScanner* %tokens, %ErrorReporter* %errorReporter) #4 { %tmp.this = alloca i32 %tmp.this1 = alloca %TokenType %"$tmpC" = alloca %Token @@ -12982,71 +11524,59 @@ define internal void @ctor.402(%"SparrowLayoutDecoder[SparrowScanner]"* %this, % br label %code code: ; preds = %0 - %1 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %1, i32 0, i32 2 - call void @ctor.151(%"Vector[UInt]"* %2) - %3 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %3, i32 0, i32 3 - call void @ctor.142(%"Vector[Char]"* %4) - %5 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %5, i32 0, i32 4 - call void @ctor.144(%TokenType* %6) - %7 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %8 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %7, i32 0, i32 5 - store i32 0, i32* %8 - %9 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %10 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %9, i32 0, i32 0 - %11 = load %SparrowScanner, %SparrowScanner* %tokens.addr - call void @ctor.403(%"RangeWithLookahead[SparrowScanner]"* %10, %SparrowScanner %11) - %12 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %13 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %12, i32 0, i32 1 - call void @ctor.204(%ErrorReporter* %13, %ErrorReporter* %errorReporter.addr) - %14 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %15 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %14, i32 0, i32 2 + %1 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + call void @ctor.138(%"Vector[UInt]"* %1) + %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + call void @ctor.129(%"Vector[Char]"* %2) + %3 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 4 + call void @ctor.131(%TokenType* %3) + %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + store i32 0, i32* %4 + %5 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @ctor.390(%"RangeWithLookahead[SparrowScanner]"* %5, %SparrowScanner* %tokens) + %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 1 + call void @ctor.190(%ErrorReporter* %6, %ErrorReporter* %errorReporter) + %7 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 store i32 1, i32* %tmp.this - call void @"+=.486"(%"Vector[UInt]"* %15, i32* %tmp.this) - %16 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %17 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %16, i32 0, i32 4 - call void @ctor.417(%TokenType* %tmp.this1, i32 31) - call void @"=.298"(%TokenType* %17, %TokenType* %tmp.this1) - %18 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %19 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %18, i32 0, i32 5 - store i32 0, i32* %19 + %8 = load i32, i32* %tmp.this + call void @"+=.474"(%"Vector[UInt]"* %7, i32 %8) + %9 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 4 + call void @ctor.404(%TokenType* %tmp.this1, i32 32) + call void @"=.286"(%TokenType* %9, %TokenType* %tmp.this1) + %10 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + store i32 0, i32* %10 br label %if_block if_block: ; preds = %code - %20 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %21 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %20, i32 0, i32 0 - %22 = call i1 @isEmpty.491(%"RangeWithLookahead[SparrowScanner]"* %21) - %23 = xor i1 true, %22 - br i1 %23, label %cond.true, label %cond.false + %11 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + %12 = call i1 @isEmpty.479(%"RangeWithLookahead[SparrowScanner]"* %11) + %13 = xor i1 true, %12 + br i1 %13, label %cond.true, label %cond.false if_then: ; preds = %cond.end - %24 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - call void @popFront.495(%"SparrowLayoutDecoder[SparrowScanner]"* %24) + call void @popFront.483(%"SparrowLayoutDecoder[SparrowScanner]"* %this) br label %if_end if_end: ; preds = %if_then, %cond.end - br i1 %23, label %cond_destruct_alt1, label %cond_destruct_alt2 + br i1 %13, label %cond_destruct_alt1, label %cond_destruct_alt2 cond.true: ; preds = %if_block - %25 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %26 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %25, i32 0, i32 0 - call void @front.493(%Token* %"$tmpC", %"RangeWithLookahead[SparrowScanner]"* %26) - %27 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this2, i32 1) - %28 = call i1 @"==.352"(%TokenType* %27, %TokenType* %tmp.this2) + %14 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @front.481(%Token* %"$tmpC", %"RangeWithLookahead[SparrowScanner]"* %14) + %15 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this2, i32 1) + %16 = call i1 @"==.339"(%TokenType* %15, %TokenType* %tmp.this2) br label %cond.end cond.false: ; preds = %if_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %28, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %16, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then, label %if_end cond_destruct_alt1: ; preds = %if_end - call void @dtor.260(%Token* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC") br label %cond_destruct_end cond_destruct_alt2: ; preds = %if_end @@ -13057,46 +11587,35 @@ cond_destruct_end: ; preds = %cond_destruct_alt2, } ; Function Attrs: inlinehint nounwind -define internal void @ctor.403(%"RangeWithLookahead[SparrowScanner]"* %this, %SparrowScanner %src) #4 { - %this.addr = alloca %"RangeWithLookahead[SparrowScanner]"* - store %"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %src.addr = alloca %SparrowScanner - store %SparrowScanner %src, %SparrowScanner* %src.addr +define internal void @ctor.390(%"RangeWithLookahead[SparrowScanner]"* %this, %SparrowScanner* %src) #4 { %tmp.this = alloca i64 %"$tmpC" = alloca %Token br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %1, i32 0, i32 0 - call void @ctor.129(%SparrowScanner* %2) - %3 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %4 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %3, i32 0, i32 0 - call void @"=.282"(%SparrowScanner* %4, %SparrowScanner* %src.addr) - %5 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %6 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %5, i32 0, i32 1 - call void @ctor.149(%"Vector[Token]"* %6) - %7 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %8 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %7, i32 0, i32 1 + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 0 + call void @ctor.117(%SparrowScanner* %1) + %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 0 + call void @"=.271"(%SparrowScanner* %2, %SparrowScanner* %src) + %3 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 + call void @ctor.136(%"Vector[Token]"* %3) + %4 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 store i64 10, i64* %tmp.this - %9 = load i64, i64* %tmp.this - call void @reserve.404(%"Vector[Token]"* %8, i64 %9) + %5 = load i64, i64* %tmp.this + call void @reserve.391(%"Vector[Token]"* %4, i64 %5) br label %if_block if_block: ; preds = %code - %10 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %11 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %10, i32 0, i32 0 - %12 = call i1 @"pre_!!.407"(%SparrowScanner* %11) - br i1 %12, label %if_then, label %if_end + %6 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 0 + %7 = call i1 @"pre_!!.394"(%SparrowScanner* %6) + br i1 %7, label %if_then, label %if_end if_then: ; preds = %if_block - %13 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %14 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %13, i32 0, i32 1 - %15 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %16 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %15, i32 0, i32 0 - call void @"post_++.411"(%Token* %"$tmpC", %SparrowScanner* %16) - call void @"+=.409"(%"Vector[Token]"* %14, %Token* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC") + %8 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 + %9 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 0 + call void @"post_++.398"(%Token* %"$tmpC", %SparrowScanner* %9) + call void @"+=.396"(%"Vector[Token]"* %8, %Token* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC") br label %if_end if_end: ; preds = %if_then, %if_block @@ -13104,9 +11623,7 @@ if_end: ; preds = %if_then, %if_block } ; Function Attrs: inlinehint nounwind -define internal void @reserve.404(%"Vector[Token]"* %this, i64 %n) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal void @reserve.391(%"Vector[Token]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr %curCapacity = alloca i64 @@ -13117,21 +11634,20 @@ define internal void @reserve.404(%"Vector[Token]"* %this, i64 %n) #4 { %tmp.this10 = alloca i64 %tmp.this11 = alloca double %curSize = alloca i64 - %"$tmpC" = alloca %"RawPtr[Token]" - %"$tmpC12" = alloca %"RawPtr[Token]" + %"$tmpForRef" = alloca %"RawPtr[Token]" + %"$tmpForRef12" = alloca %"RawPtr[Token]" br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = call i64 @capacity.405(%"Vector[Token]"* %1) - store i64 %2, i64* %curCapacity + %1 = call i64 @capacity.392(%"Vector[Token]"* %this) + store i64 %1, i64* %curCapacity br label %if_block if_block: ; preds = %code - %3 = load i64, i64* %n.addr - %4 = load i64, i64* %curCapacity - %5 = icmp sle i64 %3, %4 - br i1 %5, label %if_then, label %if_end + %2 = load i64, i64* %n.addr + %3 = load i64, i64* %curCapacity + %4 = icmp sle i64 %2, %3 + br i1 %4, label %if_then, label %if_end if_then: ; preds = %if_block ret void @@ -13143,132 +11659,115 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %6 = load i64, i64* %n.addr + %5 = load i64, i64* %n.addr store i64 8, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = icmp slt i64 %6, %7 - br i1 %8, label %if_then2, label %if_end3 + %6 = load i64, i64* %tmp.this + %7 = icmp slt i64 %5, %6 + br i1 %7, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i64 8, i64* %tmp.this4 - %9 = load i64, i64* %tmp.this4 - store i64 %9, i64* %n.addr + %8 = load i64, i64* %tmp.this4 + store i64 %8, i64* %n.addr br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 br label %if_block5 if_block5: ; preds = %if_end3 - %10 = load i64, i64* %n.addr - %11 = sitofp i64 %10 to double - store double %11, double* %tmp.this8 - %12 = load double, double* %tmp.this8 - %13 = load i64, i64* %curCapacity - %14 = sitofp i64 %13 to double - store double %14, double* %tmp.this9 - %15 = load double, double* %tmp.this9 - %16 = call double @_Double_opMul(double 2.000000e+00, double %15) - %17 = call i1 @_Double_opLT(double %12, double %16) - br i1 %17, label %if_then6, label %if_end7 + %9 = load i64, i64* %n.addr + %10 = sitofp i64 %9 to double + store double %10, double* %tmp.this8 + %11 = load double, double* %tmp.this8 + %12 = load i64, i64* %curCapacity + %13 = sitofp i64 %12 to double + store double %13, double* %tmp.this9 + %14 = load double, double* %tmp.this9 + %15 = call double @_Double_opMul(double 2.000000e+00, double %14) + %16 = call i1 @_Double_opLT(double %11, double %15) + br i1 %16, label %if_then6, label %if_end7 if_then6: ; preds = %if_block5 - %18 = load i64, i64* %curCapacity - %19 = sitofp i64 %18 to double - store double %19, double* %tmp.this11 - %20 = load double, double* %tmp.this11 - %21 = call double @_Double_opMul(double 2.000000e+00, double %20) - %22 = fptoui double %21 to i64 - store i64 %22, i64* %tmp.this10 - %23 = load i64, i64* %tmp.this10 - store i64 %23, i64* %n.addr + %17 = load i64, i64* %curCapacity + %18 = sitofp i64 %17 to double + store double %18, double* %tmp.this11 + %19 = load double, double* %tmp.this11 + %20 = call double @_Double_opMul(double 2.000000e+00, double %19) + %21 = fptoui double %20 to i64 + store i64 %21, i64* %tmp.this10 + %22 = load i64, i64* %tmp.this10 + store i64 %22, i64* %n.addr br label %if_end7 if_end7: ; preds = %if_then6, %if_block5 - %24 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %25 = call i64 @size.209(%"Vector[Token]"* %24) - store i64 %25, i64* %curSize - %26 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %27 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %26, i32 0, i32 0 - %28 = load i64, i64* %n.addr - call void @reallocPtr.406(%"RawPtr[Token]"* %27, i64 %28) - %29 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %30 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %29, i32 0, i32 1 - %31 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %32 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %31, i32 0, i32 0 - %33 = load %"RawPtr[Token]", %"RawPtr[Token]"* %32 - %34 = load i64, i64* %curSize - call void @advance.215(%"RawPtr[Token]"* %"$tmpC", %"RawPtr[Token]" %33, i64 %34) - call void @"=.212"(%"RawPtr[Token]"* %30, %"RawPtr[Token]"* %"$tmpC") - %35 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %36 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %35, i32 0, i32 2 - %37 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %38 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %37, i32 0, i32 0 - %39 = load %"RawPtr[Token]", %"RawPtr[Token]"* %38 - %40 = load i64, i64* %n.addr - call void @advance.215(%"RawPtr[Token]"* %"$tmpC12", %"RawPtr[Token]" %39, i64 %40) - call void @"=.212"(%"RawPtr[Token]"* %36, %"RawPtr[Token]"* %"$tmpC12") - ret void -} - -; Function Attrs: inlinehint nounwind -define internal i64 @capacity.405(%"Vector[Token]"* %this) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr + %23 = call i64 @size.195(%"Vector[Token]"* %this) + store i64 %23, i64* %curSize + %24 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %25 = load i64, i64* %n.addr + call void @reallocPtr.393(%"RawPtr[Token]"* %24, i64 %25) + %26 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %27 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %28 = load i64, i64* %curSize + %29 = call %"RawPtr[Token]" @advance.201(%"RawPtr[Token]"* %27, i64 %28) + store %"RawPtr[Token]" %29, %"RawPtr[Token]"* %"$tmpForRef" + call void @"=.198"(%"RawPtr[Token]"* %26, %"RawPtr[Token]"* %"$tmpForRef") + %30 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 2 + %31 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %32 = load i64, i64* %n.addr + %33 = call %"RawPtr[Token]" @advance.201(%"RawPtr[Token]"* %31, i64 %32) + store %"RawPtr[Token]" %33, %"RawPtr[Token]"* %"$tmpForRef12" + call void @"=.198"(%"RawPtr[Token]"* %30, %"RawPtr[Token]"* %"$tmpForRef12") + ret void +} + +; Function Attrs: inlinehint nounwind +define internal i64 @capacity.392(%"Vector[Token]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 2 + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 2 + %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 %3 = load %"RawPtr[Token]", %"RawPtr[Token]"* %2 - %4 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %5 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %4, i32 0, i32 0 - %6 = load %"RawPtr[Token]", %"RawPtr[Token]"* %5 - %7 = call i64 @diff.210(%"RawPtr[Token]" %3, %"RawPtr[Token]" %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = call i64 @diff.196(%"RawPtr[Token]"* %1, %"RawPtr[Token]" %3) + store i64 %4, i64* %tmp.this + %5 = load i64, i64* %tmp.this + ret i64 %5 } ; Function Attrs: inlinehint nounwind -define internal void @reallocPtr.406(%"RawPtr[Token]"* %this, i64 %n) #4 { - %this.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %this, %"RawPtr[Token]"** %this.addr +define internal void @reallocPtr.393(%"RawPtr[Token]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %this.addr - %2 = load %"RawPtr[Token]", %"RawPtr[Token]"* %1 - %3 = call i8* @bytePtr.211(%"RawPtr[Token]" %2) + %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + %2 = load %Token*, %Token** %1 + call void @ctor.197(%UntypedPtr* %tmp.this, %Token* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this %4 = load i64, i64* %n.addr %5 = mul i64 %4, 72 - %6 = call i8* @realloc(i8* %3, i64 %5) - %7 = bitcast i8* %6 to %Token* - %8 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %this.addr - %9 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %8, i32 0, i32 0 - store %Token* %7, %Token** %9 + %6 = call %UntypedPtr @realloc(%UntypedPtr %3, i64 %5) + %7 = call %Token* @asRefOf.203(%UntypedPtr %6) + %8 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + store %Token* %7, %Token** %8 ret void } ; Function Attrs: inlinehint nounwind -define internal i1 @"pre_!!.407"(%SparrowScanner* %r) #4 { - %r.addr = alloca %SparrowScanner* - store %SparrowScanner* %r, %SparrowScanner** %r.addr +define internal i1 @"pre_!!.394"(%SparrowScanner* %r) #4 { br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %r.addr - %2 = call i1 @isEmpty.408(%SparrowScanner* %1) - %3 = xor i1 true, %2 - ret i1 %3 + %1 = call i1 @isEmpty.395(%SparrowScanner* %r) + %2 = xor i1 true, %1 + ret i1 %2 } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.408(%SparrowScanner* %this) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr +define internal i1 @isEmpty.395(%SparrowScanner* %this) #4 { br label %code code: ; preds = %0 @@ -13276,151 +11775,114 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @"+=.409"(%"Vector[Token]"* %this, %Token* %value) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr - %value.addr = alloca %Token* - store %Token* %value, %Token** %value.addr +define internal void @"+=.396"(%"Vector[Token]"* %this, %Token* %value) #4 { br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = load %Token*, %Token** %value.addr - call void @pushBack.410(%"Vector[Token]"* %1, %Token* %2) + call void @pushBack.397(%"Vector[Token]"* %this, %Token* %value) ret void } ; Function Attrs: inlinehint nounwind -define internal void @pushBack.410(%"Vector[Token]"* %this, %Token* %value) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr - %value.addr = alloca %Token* - store %Token* %value, %Token** %value.addr +define internal void @pushBack.397(%"Vector[Token]"* %this, %Token* %value) #4 { %t = alloca i64 %tmp.this = alloca i64 %tmp.this4 = alloca i64 %tmp.this5 = alloca i64 - %"$tmpC" = alloca %"RawPtr[Token]" + %"$tmpForRef" = alloca %"RawPtr[Token]" br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 1 - %3 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %3, i32 0, i32 2 - %5 = call i1 @"==.218"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %4) - br i1 %5, label %if_then, label %if_end + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 2 + %3 = call i1 @"==.205"(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %2) + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block store i64 2, i64* %tmp.this - %6 = load i64, i64* %tmp.this - %7 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %8 = call i64 @capacity.405(%"Vector[Token]"* %7) - %9 = mul i64 %6, %8 - store i64 %9, i64* %t + %4 = load i64, i64* %tmp.this + %5 = call i64 @capacity.392(%"Vector[Token]"* %this) + %6 = mul i64 %4, %5 + store i64 %6, i64* %t br label %if_block1 if_end: ; preds = %if_end3, %if_block - %10 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %11 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %10, i32 0, i32 1 - %12 = load %"RawPtr[Token]", %"RawPtr[Token]"* %11 - %13 = call %Token* @value.219(%"RawPtr[Token]" %12) - %14 = load %Token*, %Token** %value.addr - call void @ctor.202(%Token* %13, %Token* %14) - %15 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %16 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %15, i32 0, i32 1 - %17 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %18 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %17, i32 0, i32 1 - %19 = load %"RawPtr[Token]", %"RawPtr[Token]"* %18 - call void @advance.220(%"RawPtr[Token]"* %"$tmpC", %"RawPtr[Token]" %19) - call void @"=.212"(%"RawPtr[Token]"* %16, %"RawPtr[Token]"* %"$tmpC") + %7 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %8 = call %Token* @value.206(%"RawPtr[Token]"* %7) + call void @ctor.188(%Token* %8, %Token* %value) + %9 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %10 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %11 = call %"RawPtr[Token]" @advance.207(%"RawPtr[Token]"* %10) + store %"RawPtr[Token]" %11, %"RawPtr[Token]"* %"$tmpForRef" + call void @"=.198"(%"RawPtr[Token]"* %9, %"RawPtr[Token]"* %"$tmpForRef") ret void if_block1: ; preds = %if_then - %20 = load i64, i64* %t + %12 = load i64, i64* %t store i64 2, i64* %tmp.this4 - %21 = load i64, i64* %tmp.this4 - %22 = icmp slt i64 %20, %21 - br i1 %22, label %if_then2, label %if_end3 + %13 = load i64, i64* %tmp.this4 + %14 = icmp slt i64 %12, %13 + br i1 %14, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i64 2, i64* %tmp.this5 - %23 = load i64, i64* %tmp.this5 - store i64 %23, i64* %t + %15 = load i64, i64* %tmp.this5 + store i64 %15, i64* %t br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 - %24 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %25 = load i64, i64* %t - call void @reserve.404(%"Vector[Token]"* %24, i64 %25) + %16 = load i64, i64* %t + call void @reserve.391(%"Vector[Token]"* %this, i64 %16) br label %if_end } ; Function Attrs: inlinehint nounwind -define internal void @"post_++.411"(%Token* sret %_result, %SparrowScanner* %r) #4 { - %_result.addr = alloca %Token* - store %Token* %_result, %Token** %_result.addr - %r.addr = alloca %SparrowScanner* - store %SparrowScanner* %r, %SparrowScanner** %r.addr +define internal void @"post_++.398"(%Token* sret %_result, %SparrowScanner* %r) #4 { %res = alloca %Token br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %r.addr - call void @front.412(%Token* %res, %SparrowScanner* %1) - %2 = load %SparrowScanner*, %SparrowScanner** %r.addr - call void @popFront.413(%SparrowScanner* %2) - %3 = load %Token*, %Token** %_result.addr - call void @ctor.202(%Token* %3, %Token* %res) - call void @dtor.260(%Token* %res) + call void @front.399(%Token* %res, %SparrowScanner* %r) + call void @popFront.400(%SparrowScanner* %r) + call void @ctor.188(%Token* %_result, %Token* %res) + call void @dtor.249(%Token* %res) ret void dumy_block: ; No predecessors! - call void @dtor.260(%Token* %res) + call void @dtor.249(%Token* %res) ret void } ; Function Attrs: inlinehint nounwind -define internal void @front.412(%Token* sret %_result, %SparrowScanner* %this) #4 { - %_result.addr = alloca %Token* - store %Token* %_result, %Token** %_result.addr - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr +define internal void @front.399(%Token* sret %_result, %SparrowScanner* %this) #4 { br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 4 - %3 = load i1, i1* %2 - %4 = xor i1 true, %3 - br i1 %4, label %if_then, label %if_end + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 4 + %2 = load i1, i1* %1 + %3 = xor i1 true, %2 + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block - %5 = load %SparrowScanner*, %SparrowScanner** %this.addr - %6 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %5, i32 0, i32 4 - store i1 true, i1* %6 - %7 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @popFront.413(%SparrowScanner* %7) + %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 4 + store i1 true, i1* %4 + call void @popFront.400(%SparrowScanner* %this) br label %if_end if_end: ; preds = %if_then, %if_block - %8 = load %Token*, %Token** %_result.addr - %9 = load %SparrowScanner*, %SparrowScanner** %this.addr - %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %9, i32 0, i32 3 - call void @ctor.202(%Token* %8, %Token* %10) + %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + call void @ctor.188(%Token* %_result, %Token* %5) ret void } ; Function Attrs: inlinehint nounwind -define internal void @popFront.413(%SparrowScanner* %this) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr +define internal void @popFront.400(%SparrowScanner* %this) #4 { %tmp.this = alloca %TokenType %"$tmpC" = alloca %TokenType br label %code @@ -13429,51 +11891,41 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - %3 = call i1 @isEmpty.414(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2) - br i1 %3, label %if_then, label %if_else + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %2 = call i1 @isEmpty.401(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) + br i1 %2, label %if_then, label %if_else if_then: ; preds = %if_block - %4 = load %SparrowScanner*, %SparrowScanner** %this.addr - %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %4, i32 0, i32 2 - %6 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5, i32 0, i32 1 - %7 = load %Location*, %Location** %6 - call void @stepOver(%Location* %7) - %8 = load %SparrowScanner*, %SparrowScanner** %this.addr - %9 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %8, i32 0, i32 3 - %10 = getelementptr inbounds %Token, %Token* %9, i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this, i32 0) - call void @"=.298"(%TokenType* %10, %TokenType* %tmp.this) - %11 = load %SparrowScanner*, %SparrowScanner** %this.addr - %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %11, i32 0, i32 3 - %13 = getelementptr inbounds %Token, %Token* %12, i32 0, i32 2 - call void @clear(%String* %13) - %14 = load %SparrowScanner*, %SparrowScanner** %this.addr - %15 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %14, i32 0, i32 3 - %16 = getelementptr inbounds %Token, %Token* %15, i32 0, i32 0 - %17 = load %SparrowScanner*, %SparrowScanner** %this.addr - %18 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %17, i32 0, i32 2 - %19 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %18, i32 0, i32 1 - %20 = load %Location*, %Location** %19 - call void @"=.283"(%Location* %16, %Location* %20) + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %4 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %3, i32 0, i32 1 + %5 = load %Location*, %Location** %4 + call void @stepOver(%Location* %5) + %6 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this, i32 0) + call void @"=.286"(%TokenType* %7, %TokenType* %tmp.this) + %8 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %9 = getelementptr inbounds %Token, %Token* %8, i32 0, i32 2 + call void @clear(%String* %9) + %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %11 = getelementptr inbounds %Token, %Token* %10, i32 0, i32 0 + %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %13 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %12, i32 0, i32 1 + %14 = load %Location*, %Location** %13 + call void @"=.272"(%Location* %11, %Location* %14) br label %if_end if_else: ; preds = %if_block - %21 = load %SparrowScanner*, %SparrowScanner** %this.addr - %22 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %21, i32 0, i32 3 - %23 = getelementptr inbounds %Token, %Token* %22, i32 0, i32 1 - %24 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @nextToken(%TokenType* %"$tmpC", %SparrowScanner* %24) - call void @"=.298"(%TokenType* %23, %TokenType* %"$tmpC") - %25 = load %SparrowScanner*, %SparrowScanner** %this.addr - %26 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %25, i32 0, i32 3 - %27 = getelementptr inbounds %Token, %Token* %26, i32 0, i32 0 - %28 = load %SparrowScanner*, %SparrowScanner** %this.addr - %29 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %28, i32 0, i32 2 - %30 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %29, i32 0, i32 1 - %31 = load %Location*, %Location** %30 - call void @"=.283"(%Location* %27, %Location* %31) + %15 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %16 = getelementptr inbounds %Token, %Token* %15, i32 0, i32 1 + call void @nextToken(%TokenType* %"$tmpC", %SparrowScanner* %this) + call void @"=.286"(%TokenType* %16, %TokenType* %"$tmpC") + %17 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %18 = getelementptr inbounds %Token, %Token* %17, i32 0, i32 0 + %19 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %20 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %19, i32 0, i32 1 + %21 = load %Location*, %Location** %20 + call void @"=.272"(%Location* %18, %Location* %21) br label %if_end if_end: ; preds = %if_else, %if_then @@ -13481,63 +11933,49 @@ if_end: ; preds = %if_else, %if_then } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.414(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this) #4 { - %this.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr +define internal i1 @isEmpty.401(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 - %3 = call i1 @isEmpty.415(%"RangeWithLookahead[BufferedCharSourceRange]"* %2) - ret i1 %3 + %1 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 0 + %2 = call i1 @isEmpty.402(%"RangeWithLookahead[BufferedCharSourceRange]"* %1) + ret i1 %2 } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.415(%"RangeWithLookahead[BufferedCharSourceRange]"* %this) #4 { - %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr +define internal i1 @isEmpty.402(%"RangeWithLookahead[BufferedCharSourceRange]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %1, i32 0, i32 1 - %3 = call i1 @isEmpty.416(%"Vector[Char]"* %2) - ret i1 %3 + %1 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %2 = call i1 @isEmpty.403(%"Vector[Char]"* %1) + ret i1 %2 } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.416(%"Vector[Char]"* %this) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal i1 @isEmpty.403(%"Vector[Char]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %3, i32 0, i32 1 - %5 = call i1 @"==.268"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) - ret i1 %5 + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %3 = call i1 @"==.257"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %2) + ret i1 %3 } ; Function Attrs: inlinehint nounwind define internal void @stepOver(%Location* %l) #4 { - %l.addr = alloca %Location* - store %Location* %l, %Location** %l.addr br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %l.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 1 - %3 = load %Location*, %Location** %l.addr - %4 = getelementptr inbounds %Location, %Location* %3, i32 0, i32 2 - call void @"=.285"(%LineCol* %2, %LineCol* %4) + %1 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 1 + %2 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + call void @"=.274"(%LineCol* %1, %LineCol* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.417(%TokenType* %this, i32 %fdata) #3 { +define internal void @ctor.404(%TokenType* %this, i32 %fdata) #3 { %this.addr = alloca %TokenType* store %TokenType* %this, %TokenType** %this.addr %fdata.addr = alloca i32 @@ -13553,9 +11991,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.418(%TokenType* %this) #3 { - %this.addr = alloca %TokenType* - store %TokenType* %this, %TokenType** %this.addr +define internal void @dtor.405(%TokenType* %this) #3 { br label %code code: ; preds = %0 @@ -13564,10 +12000,6 @@ code: ; preds = %0 ; Function Attrs: noinline nounwind define void @nextToken(%TokenType* sret %_result, %SparrowScanner* %this) #5 { - %_result.addr = alloca %TokenType* - store %TokenType* %_result, %TokenType** %_result.addr - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr %loc = alloca %Location* %tmp.this = alloca i32 %tmp.this1 = alloca i32 @@ -13578,6 +12010,7 @@ define void @nextToken(%TokenType* sret %_result, %SparrowScanner* %this) #5 { %ch217 = alloca i8 %tmp.this21 = alloca %"$lambdaEnclosureData.0" %"$tmpC" = alloca %String + %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef %tmp.this30 = alloca %"$lambdaEnclosureData.1" %tmp.this47 = alloca %"$lambdaEnclosureData.2" @@ -13585,103 +12018,97 @@ define void @nextToken(%TokenType* sret %_result, %SparrowScanner* %this) #5 { %c1 = alloca i8 %c2 = alloca i8 %tmp.this76 = alloca %String - %"$tmpForRef" = alloca %StringRef %tmp.StringRef77 = alloca %StringRef %tmp.this91 = alloca i64 %"$tmpC200" = alloca %String - %tmp.StringRef201 = alloca %StringRef + %"$tmpForRef201" = alloca %StringRef %tmp.StringRef202 = alloca %StringRef - %tmp.this203 = alloca i32 + %"$tmpForRef203" = alloca %StringRef + %tmp.StringRef204 = alloca %StringRef + %tmp.this205 = alloca i32 + %"$tmpForRef206" = alloca i8 br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - %3 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2, i32 0, i32 1 - %4 = load %Location*, %Location** %3 - store %Location* %4, %Location** %loc + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 1 + %3 = load %Location*, %Location** %2 + store %Location* %3, %Location** %loc br label %if_block if_block: ; preds = %code - %5 = load %Location*, %Location** %loc - %6 = getelementptr inbounds %Location, %Location* %5, i32 0, i32 1 - %7 = getelementptr inbounds %LineCol, %LineCol* %6, i32 0, i32 0 - %8 = load i32, i32* %7 + %4 = load %Location*, %Location** %loc + %5 = getelementptr inbounds %Location, %Location* %4, i32 0, i32 1 + %6 = getelementptr inbounds %LineCol, %LineCol* %5, i32 0, i32 0 + %7 = load i32, i32* %6 store i32 1, i32* %tmp.this - %9 = load i32, i32* %tmp.this - %10 = icmp eq i32 %8, %9 - br i1 %10, label %cond.true, label %cond.false + %8 = load i32, i32* %tmp.this + %9 = icmp eq i32 %7, %8 + br i1 %9, label %cond.true, label %cond.false if_then: ; preds = %cond.end - %11 = load %SparrowScanner*, %SparrowScanner** %this.addr - %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %11, i32 0, i32 2 - %13 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %12) - store i8 %13, i8* %ch - %14 = load %SparrowScanner*, %SparrowScanner** %this.addr - %15 = call i8 @peekChar(%SparrowScanner* %14) - store i8 %15, i8* %ch2 + %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %11 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %10) + store i8 %11, i8* %ch + %12 = call i8 @peekChar(%SparrowScanner* %this) + store i8 %12, i8* %ch2 br label %if_block2 if_end: ; preds = %if_end4, %cond.end - br i1 %10, label %cond_destruct_alt1, label %cond_destruct_alt2 + br i1 %9, label %cond_destruct_alt1, label %cond_destruct_alt2 cond.true: ; preds = %if_block - %16 = load %Location*, %Location** %loc - %17 = getelementptr inbounds %Location, %Location* %16, i32 0, i32 1 - %18 = getelementptr inbounds %LineCol, %LineCol* %17, i32 0, i32 1 - %19 = load i32, i32* %18 + %13 = load %Location*, %Location** %loc + %14 = getelementptr inbounds %Location, %Location* %13, i32 0, i32 1 + %15 = getelementptr inbounds %LineCol, %LineCol* %14, i32 0, i32 1 + %16 = load i32, i32* %15 store i32 1, i32* %tmp.this1 - %20 = load i32, i32* %tmp.this1 - %21 = icmp eq i32 %19, %20 + %17 = load i32, i32* %tmp.this1 + %18 = icmp eq i32 %16, %17 br label %cond.end cond.false: ; preds = %if_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %21, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %18, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then, label %if_end if_block2: ; preds = %if_then - %22 = load i8, i8* %ch - %23 = icmp eq i8 %22, 35 - br i1 %23, label %cond.true5, label %cond.false6 + %19 = load i8, i8* %ch + %20 = icmp eq i8 %19, 35 + br i1 %20, label %cond.true5, label %cond.false6 if_then3: ; preds = %cond.end7 - %24 = load %SparrowScanner*, %SparrowScanner** %this.addr - %25 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %24, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %25) - %26 = load %SparrowScanner*, %SparrowScanner** %this.addr - %27 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %26, i32 0, i32 2 - %28 = load %"$lambdaEnclosureData", %"$lambdaEnclosureData"* %tmp.this9 - call void @advanceIf(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %27, %"$lambdaEnclosureData" %28) + %21 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %21) + %22 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @advanceIf(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %22, %"$lambdaEnclosureData"* %tmp.this9) br label %if_block10 if_end4: ; preds = %if_end12, %cond.end7 br label %if_end cond.true5: ; preds = %if_block2 - %29 = load i8, i8* %ch2 - %30 = icmp eq i8 %29, 33 + %23 = load i8, i8* %ch2 + %24 = icmp eq i8 %23, 33 br label %cond.end7 cond.false6: ; preds = %if_block2 br label %cond.end7 cond.end7: ; preds = %cond.false6, %cond.true5 - %cond.res8 = phi i1 [ %30, %cond.true5 ], [ false, %cond.false6 ] + %cond.res8 = phi i1 [ %24, %cond.true5 ], [ false, %cond.false6 ] br i1 %cond.res8, label %if_then3, label %if_end4 if_block10: ; preds = %if_then3 - %31 = load %SparrowScanner*, %SparrowScanner** %this.addr - %32 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %31, i32 0, i32 2 - %33 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %32) - br i1 %33, label %if_then11, label %if_end12 + %25 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %26 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %25) + br i1 %26, label %if_then11, label %if_end12 if_then11: ; preds = %if_block10 - %34 = load %SparrowScanner*, %SparrowScanner** %this.addr - %35 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %34, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %35) + %27 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %27) br label %if_end12 if_end12: ; preds = %if_then11, %if_block10 @@ -13700,68 +12127,59 @@ while_block: ; preds = %while_step, %cond_d br i1 true, label %while_body, label %while_end while_body: ; preds = %while_block - %36 = load %Location*, %Location** %loc - call void @stepOver(%Location* %36) - %37 = load %SparrowScanner*, %SparrowScanner** %this.addr - %38 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %37, i32 0, i32 3 - %39 = getelementptr inbounds %Token, %Token* %38, i32 0, i32 2 - call void @clear(%String* %39) + %28 = load %Location*, %Location** %loc + call void @stepOver(%Location* %28) + %29 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %30 = getelementptr inbounds %Token, %Token* %29, i32 0, i32 2 + call void @clear(%String* %30) br label %if_block13 -while_step: ; preds = %dumy_block204, %if_end94, %if_end81, %if_end50, %if_end33, %if_end24 +while_step: ; preds = %dumy_block207, %if_end94, %if_end81, %if_end50, %if_end33, %if_end24 br label %while_block while_end: ; preds = %while_block ret void if_block13: ; preds = %while_body - %40 = load %SparrowScanner*, %SparrowScanner** %this.addr - %41 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %40, i32 0, i32 2 - %42 = call i1 @isEmpty.414(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %41) - br i1 %42, label %if_then14, label %if_end15 + %31 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %32 = call i1 @isEmpty.401(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %31) + br i1 %32, label %if_then14, label %if_end15 if_then14: ; preds = %if_block13 - %43 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %43, i32 0) + call void @ctor.404(%TokenType* %_result, i32 0) ret void if_end15: ; preds = %dumy_block, %if_block13 - %44 = load %SparrowScanner*, %SparrowScanner** %this.addr - %45 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %44, i32 0, i32 2 - %46 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %45) - store i8 %46, i8* %ch16 - %47 = load %SparrowScanner*, %SparrowScanner** %this.addr - %48 = call i8 @peekChar(%SparrowScanner* %47) - store i8 %48, i8* %ch217 + %33 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %34 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %33) + store i8 %34, i8* %ch16 + %35 = call i8 @peekChar(%SparrowScanner* %this) + store i8 %35, i8* %ch217 br label %if_block18 dumy_block: ; No predecessors! br label %if_end15 if_block18: ; preds = %if_end15 - %49 = load i8, i8* %ch16 - %50 = icmp eq i8 %49, 32 - br i1 %50, label %if_then19, label %if_end20 + %36 = load i8, i8* %ch16 + %37 = icmp eq i8 %36, 32 + br i1 %37, label %if_then19, label %if_end20 if_then19: ; preds = %if_block18 - %51 = load %SparrowScanner*, %SparrowScanner** %this.addr - %52 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %51, i32 0, i32 2 - %53 = load %"$lambdaEnclosureData.0", %"$lambdaEnclosureData.0"* %tmp.this21 - call void @advanceIf.443(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %52, %"$lambdaEnclosureData.0" %53) + %38 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @advanceIf.430(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %38, %"$lambdaEnclosureData.0"* %tmp.this21) br label %if_block22 if_end20: ; preds = %dumy_block26, %if_block18 br label %if_block27 if_block22: ; preds = %if_then19 - %54 = load %SparrowScanner*, %SparrowScanner** %this.addr - %55 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %54, i32 0, i32 6 - %56 = load i1, i1* %55 - br i1 %56, label %if_then23, label %if_end24 + %39 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 6 + %40 = load i1, i1* %39 + br i1 %40, label %if_then23, label %if_end24 if_then23: ; preds = %if_block22 - %57 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %57, i32 255) + call void @ctor.404(%TokenType* %_result, i32 255) ret void if_end24: ; preds = %dumy_block25, %if_block22 @@ -13774,38 +12192,36 @@ dumy_block26: ; No predecessors! br label %if_end20 if_block27: ; preds = %if_end20 - %58 = load i8, i8* %ch16 - %59 = icmp eq i8 %58, 9 - br i1 %59, label %if_then28, label %if_end29 + %41 = load i8, i8* %ch16 + %42 = icmp eq i8 %41, 9 + br i1 %42, label %if_then28, label %if_end29 if_then28: ; preds = %if_block27 - %60 = load %SparrowScanner*, %SparrowScanner** %this.addr - %61 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %62 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str.8, i32 0, i32 0), i8** %61 - store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str.8, i32 0, i32 29), i8** %62 - %63 = load %StringRef, %StringRef* %tmp.StringRef - call void @toString(%String* %"$tmpC", %StringRef %63) - call void @reportError(%SparrowScanner* %60, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") - %64 = load %SparrowScanner*, %SparrowScanner** %this.addr - %65 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %64, i32 0, i32 2 - %66 = load %"$lambdaEnclosureData.1", %"$lambdaEnclosureData.1"* %tmp.this30 - call void @advanceIf.455(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %65, %"$lambdaEnclosureData.1" %66) + %43 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %44 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %45 = bitcast %UntypedPtr* %43 to i8** + %46 = bitcast %UntypedPtr* %44 to i8** + store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str.8, i32 0, i32 0), i8** %45 + store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str.8, i32 0, i32 29), i8** %46 + %47 = load %StringRef, %StringRef* %tmp.StringRef + store %StringRef %47, %StringRef* %"$tmpForRef" + call void @toString(%String* %"$tmpC", %StringRef* %"$tmpForRef") + call void @reportError(%SparrowScanner* %this, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") + %48 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @advanceIf.443(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %48, %"$lambdaEnclosureData.1"* %tmp.this30) br label %if_block31 if_end29: ; preds = %dumy_block35, %if_block27 br label %if_block36 if_block31: ; preds = %if_then28 - %67 = load %SparrowScanner*, %SparrowScanner** %this.addr - %68 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %67, i32 0, i32 6 - %69 = load i1, i1* %68 - br i1 %69, label %if_then32, label %if_end33 + %49 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 6 + %50 = load i1, i1* %49 + br i1 %50, label %if_then32, label %if_end33 if_then32: ; preds = %if_block31 - %70 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %70, i32 255) + call void @ctor.404(%TokenType* %_result, i32 255) ret void if_end33: ; preds = %dumy_block34, %if_block31 @@ -13818,16 +12234,14 @@ dumy_block35: ; No predecessors! br label %if_end29 if_block36: ; preds = %if_end29 - %71 = load i8, i8* %ch16 - %72 = icmp eq i8 %71, 10 - br i1 %72, label %if_then37, label %if_end38 + %51 = load i8, i8* %ch16 + %52 = icmp eq i8 %51, 10 + br i1 %52, label %if_then37, label %if_end38 if_then37: ; preds = %if_block36 - %73 = load %SparrowScanner*, %SparrowScanner** %this.addr - %74 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %73, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %74) - %75 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %75, i32 1) + %53 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %53) + call void @ctor.404(%TokenType* %_result, i32 1) ret void if_end38: ; preds = %dumy_block39, %if_block36 @@ -13837,44 +12251,39 @@ dumy_block39: ; No predecessors! br label %if_end38 if_block40: ; preds = %if_end38 - %76 = load i8, i8* %ch16 - %77 = icmp eq i8 %76, 47 - br i1 %77, label %cond.true43, label %cond.false44 + %54 = load i8, i8* %ch16 + %55 = icmp eq i8 %54, 47 + br i1 %55, label %cond.true43, label %cond.false44 if_then41: ; preds = %cond.end45 - %78 = load %SparrowScanner*, %SparrowScanner** %this.addr - %79 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %78, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %79) - %80 = load %SparrowScanner*, %SparrowScanner** %this.addr - %81 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %80, i32 0, i32 2 - %82 = load %"$lambdaEnclosureData.2", %"$lambdaEnclosureData.2"* %tmp.this47 - call void @advanceIf.462(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %81, %"$lambdaEnclosureData.2" %82) + %56 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %56) + %57 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @advanceIf.450(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %57, %"$lambdaEnclosureData.2"* %tmp.this47) br label %if_block48 if_end42: ; preds = %dumy_block52, %cond.end45 br label %if_block53 cond.true43: ; preds = %if_block40 - %83 = load i8, i8* %ch217 - %84 = icmp eq i8 %83, 47 + %58 = load i8, i8* %ch217 + %59 = icmp eq i8 %58, 47 br label %cond.end45 cond.false44: ; preds = %if_block40 br label %cond.end45 cond.end45: ; preds = %cond.false44, %cond.true43 - %cond.res46 = phi i1 [ %84, %cond.true43 ], [ false, %cond.false44 ] + %cond.res46 = phi i1 [ %59, %cond.true43 ], [ false, %cond.false44 ] br i1 %cond.res46, label %if_then41, label %if_end42 if_block48: ; preds = %if_then41 - %85 = load %SparrowScanner*, %SparrowScanner** %this.addr - %86 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %85, i32 0, i32 6 - %87 = load i1, i1* %86 - br i1 %87, label %if_then49, label %if_end50 + %60 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 6 + %61 = load i1, i1* %60 + br i1 %61, label %if_then49, label %if_end50 if_then49: ; preds = %if_block48 - %88 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %88, i32 254) + call void @ctor.404(%TokenType* %_result, i32 254) ret void if_end50: ; preds = %dumy_block51, %if_block48 @@ -13887,16 +12296,15 @@ dumy_block52: ; No predecessors! br label %if_end42 if_block53: ; preds = %if_end42 - %89 = load i8, i8* %ch16 - %90 = icmp eq i8 %89, 47 - br i1 %90, label %cond.true56, label %cond.false57 + %62 = load i8, i8* %ch16 + %63 = icmp eq i8 %62, 47 + br i1 %63, label %cond.true56, label %cond.false57 if_then54: ; preds = %cond.end58 - %91 = load %SparrowScanner*, %SparrowScanner** %this.addr - %92 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %91, i32 0, i32 2 + %64 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 2, i64* %tmp.this60 - %93 = load i64, i64* %tmp.this60 - call void @advance.469(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %92, i64 %93) + %65 = load i64, i64* %tmp.this60 + call void @advance.457(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %64, i64 %65) store i8 97, i8* %c1 store i8 97, i8* %c2 br label %while_block61 @@ -13905,30 +12313,28 @@ if_end55: ; preds = %dumy_block83, %cond br label %if_block84 cond.true56: ; preds = %if_block53 - %94 = load i8, i8* %ch217 - %95 = icmp eq i8 %94, 42 + %66 = load i8, i8* %ch217 + %67 = icmp eq i8 %66, 42 br label %cond.end58 cond.false57: ; preds = %if_block53 br label %cond.end58 cond.end58: ; preds = %cond.false57, %cond.true56 - %cond.res59 = phi i1 [ %95, %cond.true56 ], [ false, %cond.false57 ] + %cond.res59 = phi i1 [ %67, %cond.true56 ], [ false, %cond.false57 ] br i1 %cond.res59, label %if_then54, label %if_end55 while_block61: ; preds = %while_step63, %if_then54 - %96 = load %SparrowScanner*, %SparrowScanner** %this.addr - %97 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %96, i32 0, i32 2 - %98 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %97) - br i1 %98, label %cond.true65, label %cond.false66 + %68 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %69 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %68) + br i1 %69, label %cond.true65, label %cond.false66 while_body62: ; preds = %cond.end67 - %99 = load i8, i8* %c2 - store i8 %99, i8* %c1 - %100 = load %SparrowScanner*, %SparrowScanner** %this.addr - %101 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %100, i32 0, i32 2 - %102 = call i8 @"pre_++.470"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %101) - store i8 %102, i8* %c2 + %70 = load i8, i8* %c2 + store i8 %70, i8* %c1 + %71 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %72 = call i8 @"pre_++.458"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %71) + store i8 %72, i8* %c2 br label %while_step63 while_step63: ; preds = %while_body62 @@ -13938,9 +12344,9 @@ while_end64: ; preds = %cond.end67 br label %if_block73 cond.true65: ; preds = %while_block61 - %103 = load i8, i8* %c1 - %104 = icmp ne i8 %103, 42 - br i1 %104, label %cond.true68, label %cond.false69 + %73 = load i8, i8* %c1 + %74 = icmp ne i8 %73, 42 + br i1 %74, label %cond.true68, label %cond.false69 cond.false66: ; preds = %while_block61 br label %cond.end67 @@ -13953,53 +12359,48 @@ cond.true68: ; preds = %cond.true65 br label %cond.end70 cond.false69: ; preds = %cond.true65 - %105 = load i8, i8* %c2 - %106 = icmp ne i8 %105, 47 + %75 = load i8, i8* %c2 + %76 = icmp ne i8 %75, 47 br label %cond.end70 cond.end70: ; preds = %cond.false69, %cond.true68 - %cond.res71 = phi i1 [ true, %cond.true68 ], [ %106, %cond.false69 ] + %cond.res71 = phi i1 [ true, %cond.true68 ], [ %76, %cond.false69 ] br label %cond.end67 if_block73: ; preds = %while_end64 - %107 = load %SparrowScanner*, %SparrowScanner** %this.addr - %108 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %107, i32 0, i32 2 - %109 = call i1 @"pre_!"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %108) - br i1 %109, label %if_then74, label %if_end75 + %77 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %78 = call i1 @"pre_!"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %77) + br i1 %78, label %if_then74, label %if_end75 if_then74: ; preds = %if_block73 - %110 = load %SparrowScanner*, %SparrowScanner** %this.addr - %111 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef77, i32 0, i32 0 - %112 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef77, i32 0, i32 1 - store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.9, i32 0, i32 0), i8** %111 - store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.9, i32 0, i32 32), i8** %112 - %113 = load %StringRef, %StringRef* %tmp.StringRef77 - store %StringRef %113, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %tmp.this76, %StringRef* %"$tmpForRef") - call void @reportError(%SparrowScanner* %110, %String* %tmp.this76) - call void @dtor.261(%String* %tmp.this76) - %114 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %114, i32 0) + %79 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef77, i32 0, i32 0 + %80 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef77, i32 0, i32 1 + %81 = bitcast %UntypedPtr* %79 to i8** + %82 = bitcast %UntypedPtr* %80 to i8** + store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.9, i32 0, i32 0), i8** %81 + store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.9, i32 0, i32 32), i8** %82 + %83 = load %StringRef, %StringRef* %tmp.StringRef77 + call void @ctor.459(%String* %tmp.this76, %StringRef %83) + call void @reportError(%SparrowScanner* %this, %String* %tmp.this76) + call void @dtor.250(%String* %tmp.this76) + call void @ctor.404(%TokenType* %_result, i32 0) ret void if_end75: ; preds = %dumy_block78, %if_block73 - %115 = load %SparrowScanner*, %SparrowScanner** %this.addr - %116 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %115, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %116) + %84 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %84) br label %if_block79 dumy_block78: ; No predecessors! br label %if_end75 if_block79: ; preds = %if_end75 - %117 = load %SparrowScanner*, %SparrowScanner** %this.addr - %118 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %117, i32 0, i32 6 - %119 = load i1, i1* %118 - br i1 %119, label %if_then80, label %if_end81 + %85 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 6 + %86 = load i1, i1* %85 + br i1 %86, label %if_then80, label %if_end81 if_then80: ; preds = %if_block79 - %120 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %120, i32 254) + call void @ctor.404(%TokenType* %_result, i32 254) ret void if_end81: ; preds = %dumy_block82, %if_block79 @@ -14012,42 +12413,39 @@ dumy_block83: ; No predecessors! br label %if_end55 if_block84: ; preds = %if_end55 - %121 = load i8, i8* %ch16 - %122 = icmp eq i8 %121, 92 - br i1 %122, label %cond.true87, label %cond.false88 + %87 = load i8, i8* %ch16 + %88 = icmp eq i8 %87, 92 + br i1 %88, label %cond.true87, label %cond.false88 if_then85: ; preds = %cond.end89 - %123 = load %SparrowScanner*, %SparrowScanner** %this.addr - %124 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %123, i32 0, i32 2 + %89 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 2, i64* %tmp.this91 - %125 = load i64, i64* %tmp.this91 - call void @advance.469(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %124, i64 %125) + %90 = load i64, i64* %tmp.this91 + call void @advance.457(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %89, i64 %90) br label %if_block92 if_end86: ; preds = %dumy_block96, %cond.end89 br label %if_block97 cond.true87: ; preds = %if_block84 - %126 = load i8, i8* %ch217 - %127 = icmp eq i8 %126, 10 + %91 = load i8, i8* %ch217 + %92 = icmp eq i8 %91, 10 br label %cond.end89 cond.false88: ; preds = %if_block84 br label %cond.end89 cond.end89: ; preds = %cond.false88, %cond.true87 - %cond.res90 = phi i1 [ %127, %cond.true87 ], [ false, %cond.false88 ] + %cond.res90 = phi i1 [ %92, %cond.true87 ], [ false, %cond.false88 ] br i1 %cond.res90, label %if_then85, label %if_end86 if_block92: ; preds = %if_then85 - %128 = load %SparrowScanner*, %SparrowScanner** %this.addr - %129 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %128, i32 0, i32 6 - %130 = load i1, i1* %129 - br i1 %130, label %if_then93, label %if_end94 + %93 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 6 + %94 = load i1, i1* %93 + br i1 %94, label %if_then93, label %if_end94 if_then93: ; preds = %if_block92 - %131 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %131, i32 253) + call void @ctor.404(%TokenType* %_result, i32 253) ret void if_end94: ; preds = %dumy_block95, %if_block92 @@ -14060,14 +12458,12 @@ dumy_block96: ; No predecessors! br label %if_end86 if_block97: ; preds = %if_end86 - %132 = load i8, i8* %ch16 - %133 = icmp eq i8 %132, 39 - br i1 %133, label %if_then98, label %if_end99 + %95 = load i8, i8* %ch16 + %96 = icmp eq i8 %95, 39 + br i1 %96, label %if_then98, label %if_end99 if_then98: ; preds = %if_block97 - %134 = load %TokenType*, %TokenType** %_result.addr - %135 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @parseString(%TokenType* %134, %SparrowScanner* %135, i8 39) + call void @parseString(%TokenType* %_result, %SparrowScanner* %this, i8 39) ret void if_end99: ; preds = %dumy_block100, %if_block97 @@ -14077,14 +12473,12 @@ dumy_block100: ; No predecessors! br label %if_end99 if_block101: ; preds = %if_end99 - %136 = load i8, i8* %ch16 - %137 = icmp eq i8 %136, 34 - br i1 %137, label %if_then102, label %if_end103 + %97 = load i8, i8* %ch16 + %98 = icmp eq i8 %97, 34 + br i1 %98, label %if_then102, label %if_end103 if_then102: ; preds = %if_block101 - %138 = load %TokenType*, %TokenType** %_result.addr - %139 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @parseString(%TokenType* %138, %SparrowScanner* %139, i8 34) + call void @parseString(%TokenType* %_result, %SparrowScanner* %this, i8 34) ret void if_end103: ; preds = %dumy_block104, %if_block101 @@ -14094,45 +12488,41 @@ dumy_block104: ; No predecessors! br label %if_end103 if_block105: ; preds = %if_end103 - %140 = load i8, i8* %ch16 - %141 = icmp eq i8 %140, 60 - br i1 %141, label %cond.true108, label %cond.false109 + %99 = load i8, i8* %ch16 + %100 = icmp eq i8 %99, 60 + br i1 %100, label %cond.true108, label %cond.false109 if_then106: ; preds = %cond.end110 - %142 = load %TokenType*, %TokenType** %_result.addr - %143 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @parseStringNE(%TokenType* %142, %SparrowScanner* %143) + call void @parseStringNE(%TokenType* %_result, %SparrowScanner* %this) ret void if_end107: ; preds = %dumy_block112, %cond.end110 br label %if_block113 cond.true108: ; preds = %if_block105 - %144 = load i8, i8* %ch217 - %145 = icmp eq i8 %144, 123 + %101 = load i8, i8* %ch217 + %102 = icmp eq i8 %101, 123 br label %cond.end110 cond.false109: ; preds = %if_block105 br label %cond.end110 cond.end110: ; preds = %cond.false109, %cond.true108 - %cond.res111 = phi i1 [ %145, %cond.true108 ], [ false, %cond.false109 ] + %cond.res111 = phi i1 [ %102, %cond.true108 ], [ false, %cond.false109 ] br i1 %cond.res111, label %if_then106, label %if_end107 dumy_block112: ; No predecessors! br label %if_end107 if_block113: ; preds = %if_end107 - %146 = load i8, i8* %ch16 - %147 = icmp eq i8 %146, 123 - br i1 %147, label %if_then114, label %if_end115 + %103 = load i8, i8* %ch16 + %104 = icmp eq i8 %103, 123 + br i1 %104, label %if_then114, label %if_end115 if_then114: ; preds = %if_block113 - %148 = load %SparrowScanner*, %SparrowScanner** %this.addr - %149 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %148, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %149) - %150 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %150, i32 24) + %105 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %105) + call void @ctor.404(%TokenType* %_result, i32 25) ret void if_end115: ; preds = %dumy_block116, %if_block113 @@ -14142,16 +12532,14 @@ dumy_block116: ; No predecessors! br label %if_end115 if_block117: ; preds = %if_end115 - %151 = load i8, i8* %ch16 - %152 = icmp eq i8 %151, 123 - br i1 %152, label %if_then118, label %if_end119 + %106 = load i8, i8* %ch16 + %107 = icmp eq i8 %106, 123 + br i1 %107, label %if_then118, label %if_end119 if_then118: ; preds = %if_block117 - %153 = load %SparrowScanner*, %SparrowScanner** %this.addr - %154 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %153, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %154) - %155 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %155, i32 24) + %108 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %108) + call void @ctor.404(%TokenType* %_result, i32 25) ret void if_end119: ; preds = %dumy_block120, %if_block117 @@ -14161,16 +12549,14 @@ dumy_block120: ; No predecessors! br label %if_end119 if_block121: ; preds = %if_end119 - %156 = load i8, i8* %ch16 - %157 = icmp eq i8 %156, 125 - br i1 %157, label %if_then122, label %if_end123 + %109 = load i8, i8* %ch16 + %110 = icmp eq i8 %109, 125 + br i1 %110, label %if_then122, label %if_end123 if_then122: ; preds = %if_block121 - %158 = load %SparrowScanner*, %SparrowScanner** %this.addr - %159 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %158, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %159) - %160 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %160, i32 25) + %111 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %111) + call void @ctor.404(%TokenType* %_result, i32 26) ret void if_end123: ; preds = %dumy_block124, %if_block121 @@ -14180,16 +12566,14 @@ dumy_block124: ; No predecessors! br label %if_end123 if_block125: ; preds = %if_end123 - %161 = load i8, i8* %ch16 - %162 = icmp eq i8 %161, 91 - br i1 %162, label %if_then126, label %if_end127 + %112 = load i8, i8* %ch16 + %113 = icmp eq i8 %112, 91 + br i1 %113, label %if_then126, label %if_end127 if_then126: ; preds = %if_block125 - %163 = load %SparrowScanner*, %SparrowScanner** %this.addr - %164 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %163, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %164) - %165 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %165, i32 26) + %114 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %114) + call void @ctor.404(%TokenType* %_result, i32 27) ret void if_end127: ; preds = %dumy_block128, %if_block125 @@ -14199,16 +12583,14 @@ dumy_block128: ; No predecessors! br label %if_end127 if_block129: ; preds = %if_end127 - %166 = load i8, i8* %ch16 - %167 = icmp eq i8 %166, 93 - br i1 %167, label %if_then130, label %if_end131 + %115 = load i8, i8* %ch16 + %116 = icmp eq i8 %115, 93 + br i1 %116, label %if_then130, label %if_end131 if_then130: ; preds = %if_block129 - %168 = load %SparrowScanner*, %SparrowScanner** %this.addr - %169 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %168, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %169) - %170 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %170, i32 27) + %117 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %117) + call void @ctor.404(%TokenType* %_result, i32 28) ret void if_end131: ; preds = %dumy_block132, %if_block129 @@ -14218,16 +12600,14 @@ dumy_block132: ; No predecessors! br label %if_end131 if_block133: ; preds = %if_end131 - %171 = load i8, i8* %ch16 - %172 = icmp eq i8 %171, 40 - br i1 %172, label %if_then134, label %if_end135 + %118 = load i8, i8* %ch16 + %119 = icmp eq i8 %118, 40 + br i1 %119, label %if_then134, label %if_end135 if_then134: ; preds = %if_block133 - %173 = load %SparrowScanner*, %SparrowScanner** %this.addr - %174 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %173, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %174) - %175 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %175, i32 28) + %120 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %120) + call void @ctor.404(%TokenType* %_result, i32 29) ret void if_end135: ; preds = %dumy_block136, %if_block133 @@ -14237,16 +12617,14 @@ dumy_block136: ; No predecessors! br label %if_end135 if_block137: ; preds = %if_end135 - %176 = load i8, i8* %ch16 - %177 = icmp eq i8 %176, 41 - br i1 %177, label %if_then138, label %if_end139 + %121 = load i8, i8* %ch16 + %122 = icmp eq i8 %121, 41 + br i1 %122, label %if_then138, label %if_end139 if_then138: ; preds = %if_block137 - %178 = load %SparrowScanner*, %SparrowScanner** %this.addr - %179 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %178, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %179) - %180 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %180, i32 29) + %123 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %123) + call void @ctor.404(%TokenType* %_result, i32 30) ret void if_end139: ; preds = %dumy_block140, %if_block137 @@ -14256,16 +12634,14 @@ dumy_block140: ; No predecessors! br label %if_end139 if_block141: ; preds = %if_end139 - %181 = load i8, i8* %ch16 - %182 = icmp eq i8 %181, 59 - br i1 %182, label %if_then142, label %if_end143 + %124 = load i8, i8* %ch16 + %125 = icmp eq i8 %124, 59 + br i1 %125, label %if_then142, label %if_end143 if_then142: ; preds = %if_block141 - %183 = load %SparrowScanner*, %SparrowScanner** %this.addr - %184 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %183, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %184) - %185 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %185, i32 31) + %126 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %126) + call void @ctor.404(%TokenType* %_result, i32 32) ret void if_end143: ; preds = %dumy_block144, %if_block141 @@ -14275,16 +12651,14 @@ dumy_block144: ; No predecessors! br label %if_end143 if_block145: ; preds = %if_end143 - %186 = load i8, i8* %ch16 - %187 = icmp eq i8 %186, 44 - br i1 %187, label %if_then146, label %if_end147 + %127 = load i8, i8* %ch16 + %128 = icmp eq i8 %127, 44 + br i1 %128, label %if_then146, label %if_end147 if_then146: ; preds = %if_block145 - %188 = load %SparrowScanner*, %SparrowScanner** %this.addr - %189 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %188, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %189) - %190 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %190, i32 32) + %129 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %129) + call void @ctor.404(%TokenType* %_result, i32 33) ret void if_end147: ; preds = %dumy_block148, %if_block145 @@ -14294,16 +12668,14 @@ dumy_block148: ; No predecessors! br label %if_end147 if_block149: ; preds = %if_end147 - %191 = load i8, i8* %ch16 - %192 = icmp eq i8 %191, 96 - br i1 %192, label %if_then150, label %if_end151 + %130 = load i8, i8* %ch16 + %131 = icmp eq i8 %130, 96 + br i1 %131, label %if_then150, label %if_end151 if_then150: ; preds = %if_block149 - %193 = load %SparrowScanner*, %SparrowScanner** %this.addr - %194 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %193, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %194) - %195 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %195, i32 34) + %132 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %132) + call void @ctor.404(%TokenType* %_result, i32 35) ret void if_end151: ; preds = %dumy_block152, %if_block149 @@ -14313,75 +12685,69 @@ dumy_block152: ; No predecessors! br label %if_end151 if_block153: ; preds = %if_end151 - %196 = load i8, i8* %ch16 - %197 = icmp eq i8 %196, 58 - br i1 %197, label %cond.true156, label %cond.false157 + %133 = load i8, i8* %ch16 + %134 = icmp eq i8 %133, 58 + br i1 %134, label %cond.true156, label %cond.false157 if_then154: ; preds = %cond.end158 - %198 = load %SparrowScanner*, %SparrowScanner** %this.addr - %199 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %198, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %199) - %200 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %200, i32 30) + %135 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %135) + call void @ctor.404(%TokenType* %_result, i32 31) ret void if_end155: ; preds = %dumy_block160, %cond.end158 br label %if_block161 cond.true156: ; preds = %if_block153 - %201 = load %SparrowScanner*, %SparrowScanner** %this.addr - %202 = call i8 @peekChar(%SparrowScanner* %201) - %203 = call i1 @isOpChar(i8 %202) - %204 = xor i1 true, %203 + %136 = call i8 @peekChar(%SparrowScanner* %this) + %137 = call i1 @isOpChar(i8 %136) + %138 = xor i1 true, %137 br label %cond.end158 cond.false157: ; preds = %if_block153 br label %cond.end158 cond.end158: ; preds = %cond.false157, %cond.true156 - %cond.res159 = phi i1 [ %204, %cond.true156 ], [ false, %cond.false157 ] + %cond.res159 = phi i1 [ %138, %cond.true156 ], [ false, %cond.false157 ] br i1 %cond.res159, label %if_then154, label %if_end155 dumy_block160: ; No predecessors! br label %if_end155 if_block161: ; preds = %if_end155 - %205 = load i8, i8* %ch16 - %206 = icmp eq i8 %205, 61 - br i1 %206, label %cond.true164, label %cond.false165 + %139 = load i8, i8* %ch16 + %140 = icmp eq i8 %139, 61 + br i1 %140, label %cond.true164, label %cond.false165 if_then162: ; preds = %cond.end166 - %207 = load %SparrowScanner*, %SparrowScanner** %this.addr - %208 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %207, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %208) - %209 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %209, i32 35) + %141 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %141) + call void @ctor.404(%TokenType* %_result, i32 36) ret void if_end163: ; preds = %dumy_block168, %cond.end166 br label %if_block169 cond.true164: ; preds = %if_block161 - %210 = load %SparrowScanner*, %SparrowScanner** %this.addr - %211 = call i8 @peekChar(%SparrowScanner* %210) - %212 = call i1 @isOpChar(i8 %211) - %213 = xor i1 true, %212 + %142 = call i8 @peekChar(%SparrowScanner* %this) + %143 = call i1 @isOpChar(i8 %142) + %144 = xor i1 true, %143 br label %cond.end166 cond.false165: ; preds = %if_block161 br label %cond.end166 cond.end166: ; preds = %cond.false165, %cond.true164 - %cond.res167 = phi i1 [ %213, %cond.true164 ], [ false, %cond.false165 ] + %cond.res167 = phi i1 [ %144, %cond.true164 ], [ false, %cond.false165 ] br i1 %cond.res167, label %if_then162, label %if_end163 dumy_block168: ; No predecessors! br label %if_end163 if_block169: ; preds = %if_end163 - %214 = load i8, i8* %ch16 - %215 = call i1 @isOpCharDot(i8 %214) - br i1 %215, label %if_then170, label %if_end171 + %145 = load i8, i8* %ch16 + %146 = call i1 @isOpCharDot(i8 %145) + br i1 %146, label %if_then170, label %if_end171 if_then170: ; preds = %if_block169 br label %if_block172 @@ -14390,13 +12756,11 @@ if_end171: ; preds = %if_end174, %if_bloc br label %if_block176 if_block172: ; preds = %if_then170 - %216 = load %SparrowScanner*, %SparrowScanner** %this.addr - %217 = call i1 @parseOperator(%SparrowScanner* %216) - br i1 %217, label %if_then173, label %if_end174 + %147 = call i1 @parseOperator(%SparrowScanner* %this) + br i1 %147, label %if_then173, label %if_end174 if_then173: ; preds = %if_block172 - %218 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %218, i32 37) + call void @ctor.404(%TokenType* %_result, i32 38) ret void if_end174: ; preds = %dumy_block175, %if_block172 @@ -14406,46 +12770,42 @@ dumy_block175: ; No predecessors! br label %if_end174 if_block176: ; preds = %if_end171 - %219 = load i8, i8* %ch16 - %220 = icmp eq i8 %219, 46 - br i1 %220, label %cond.true179, label %cond.false180 + %148 = load i8, i8* %ch16 + %149 = icmp eq i8 %148, 46 + br i1 %149, label %cond.true179, label %cond.false180 if_then177: ; preds = %cond.end181 - %221 = load %SparrowScanner*, %SparrowScanner** %this.addr - %222 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %221, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %222) - %223 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %223, i32 33) + %150 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %150) + call void @ctor.404(%TokenType* %_result, i32 34) ret void if_end178: ; preds = %dumy_block183, %cond.end181 br label %if_block184 cond.true179: ; preds = %if_block176 - %224 = load i8, i8* %ch217 - %225 = call i1 @isDigit(i8 %224) - %226 = xor i1 true, %225 + %151 = load i8, i8* %ch217 + %152 = call i1 @isDigit(i8 %151) + %153 = xor i1 true, %152 br label %cond.end181 cond.false180: ; preds = %if_block176 br label %cond.end181 cond.end181: ; preds = %cond.false180, %cond.true179 - %cond.res182 = phi i1 [ %226, %cond.true179 ], [ false, %cond.false180 ] + %cond.res182 = phi i1 [ %153, %cond.true179 ], [ false, %cond.false180 ] br i1 %cond.res182, label %if_then177, label %if_end178 dumy_block183: ; No predecessors! br label %if_end178 if_block184: ; preds = %if_end178 - %227 = load i8, i8* %ch16 - %228 = call i1 @isAlpha(i8 %227) - br i1 %228, label %cond.true187, label %cond.false188 + %154 = load i8, i8* %ch16 + %155 = call i1 @isAlpha(i8 %154) + br i1 %155, label %cond.true187, label %cond.false188 if_then185: ; preds = %cond.end189 - %229 = load %TokenType*, %TokenType** %_result.addr - %230 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @parseIdentifer(%TokenType* %229, %SparrowScanner* %230) + call void @parseIdentifer(%TokenType* %_result, %SparrowScanner* %this) ret void if_end186: ; preds = %dumy_block191, %cond.end189 @@ -14455,151 +12815,132 @@ cond.true187: ; preds = %if_block184 br label %cond.end189 cond.false188: ; preds = %if_block184 - %231 = load i8, i8* %ch16 - %232 = icmp eq i8 %231, 95 + %156 = load i8, i8* %ch16 + %157 = icmp eq i8 %156, 95 br label %cond.end189 cond.end189: ; preds = %cond.false188, %cond.true187 - %cond.res190 = phi i1 [ true, %cond.true187 ], [ %232, %cond.false188 ] + %cond.res190 = phi i1 [ true, %cond.true187 ], [ %157, %cond.false188 ] br i1 %cond.res190, label %if_then185, label %if_end186 dumy_block191: ; No predecessors! br label %if_end186 if_block192: ; preds = %if_end186 - %233 = load i8, i8* %ch16 - %234 = call i1 @isDigit(i8 %233) - br i1 %234, label %cond.true195, label %cond.false196 + %158 = load i8, i8* %ch16 + %159 = call i1 @isDigit(i8 %158) + br i1 %159, label %cond.true195, label %cond.false196 if_then193: ; preds = %cond.end197 - %235 = load %TokenType*, %TokenType** %_result.addr - %236 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @parseNumeric(%TokenType* %235, %SparrowScanner* %236) + call void @parseNumeric(%TokenType* %_result, %SparrowScanner* %this) ret void if_end194: ; preds = %dumy_block199, %cond.end197 - %237 = load %SparrowScanner*, %SparrowScanner** %this.addr - %238 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef201, i32 0, i32 0 - %239 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef201, i32 0, i32 1 - store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.37, i32 0, i32 0), i8** %238 - store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.37, i32 0, i32 26), i8** %239 - %240 = load %StringRef, %StringRef* %tmp.StringRef201 - %241 = load i8, i8* %ch16 - %242 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef202, i32 0, i32 0 - %243 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef202, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.38, i32 0, i32 0), i8** %242 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.38, i32 0, i32 3), i8** %243 - %244 = load %StringRef, %StringRef* %tmp.StringRef202 - %245 = load i8, i8* %ch16 - call void @_ass_32_8z(i32* %tmp.this203, i8 %245) - %246 = load i32, i32* %tmp.this203 - call void @toString.478(%String* %"$tmpC200", %StringRef %240, i8 %241, %StringRef %244, i32 %246, i8 41) - call void @reportError(%SparrowScanner* %237, %String* %"$tmpC200") - call void @dtor.261(%String* %"$tmpC200") - %247 = load %SparrowScanner*, %SparrowScanner** %this.addr - %248 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %247, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %248) - %249 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %249, i32 0) + %160 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef202, i32 0, i32 0 + %161 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef202, i32 0, i32 1 + %162 = bitcast %UntypedPtr* %160 to i8** + %163 = bitcast %UntypedPtr* %161 to i8** + store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.38, i32 0, i32 0), i8** %162 + store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.38, i32 0, i32 26), i8** %163 + %164 = load %StringRef, %StringRef* %tmp.StringRef202 + store %StringRef %164, %StringRef* %"$tmpForRef201" + %165 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef204, i32 0, i32 0 + %166 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef204, i32 0, i32 1 + %167 = bitcast %UntypedPtr* %165 to i8** + %168 = bitcast %UntypedPtr* %166 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.39, i32 0, i32 0), i8** %167 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.39, i32 0, i32 3), i8** %168 + %169 = load %StringRef, %StringRef* %tmp.StringRef204 + store %StringRef %169, %StringRef* %"$tmpForRef203" + %170 = load i8, i8* %ch16 + call void @_ass_32_8z(i32* %tmp.this205, i8 %170) + store i8 41, i8* %"$tmpForRef206" + call void @toString.466(%String* %"$tmpC200", %StringRef* %"$tmpForRef201", i8* %ch16, %StringRef* %"$tmpForRef203", i32* %tmp.this205, i8* %"$tmpForRef206") + call void @reportError(%SparrowScanner* %this, %String* %"$tmpC200") + call void @dtor.250(%String* %"$tmpC200") + %171 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %171) + call void @ctor.404(%TokenType* %_result, i32 0) ret void cond.true195: ; preds = %if_block192 br label %cond.end197 cond.false196: ; preds = %if_block192 - %250 = load i8, i8* %ch16 - %251 = icmp eq i8 %250, 46 + %172 = load i8, i8* %ch16 + %173 = icmp eq i8 %172, 46 br label %cond.end197 cond.end197: ; preds = %cond.false196, %cond.true195 - %cond.res198 = phi i1 [ true, %cond.true195 ], [ %251, %cond.false196 ] + %cond.res198 = phi i1 [ true, %cond.true195 ], [ %173, %cond.false196 ] br i1 %cond.res198, label %if_then193, label %if_end194 dumy_block199: ; No predecessors! br label %if_end194 -dumy_block204: ; No predecessors! +dumy_block207: ; No predecessors! br label %while_step } ; Function Attrs: inlinehint nounwind define internal i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) #4 { - %r.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr br label %code code: ; preds = %0 - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %2 = call i8 @front.419(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) - ret i8 %2 + %1 = call i8 @front.406(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + ret i8 %1 } ; Function Attrs: inlinehint nounwind -define internal i8 @front.419(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this) #4 { - %this.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr +define internal i8 @front.406(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 - %3 = call i8 @front.420(%"RangeWithLookahead[BufferedCharSourceRange]"* %2) - ret i8 %3 + %1 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 0 + %2 = call i8 @front.407(%"RangeWithLookahead[BufferedCharSourceRange]"* %1) + ret i8 %2 } ; Function Attrs: inlinehint nounwind -define internal i8 @front.420(%"RangeWithLookahead[BufferedCharSourceRange]"* %this) #4 { - %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr +define internal i8 @front.407(%"RangeWithLookahead[BufferedCharSourceRange]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %1, i32 0, i32 1 - %3 = call i8* @front.421(%"Vector[Char]"* %2) - %4 = load i8, i8* %3 - ret i8 %4 + %1 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %2 = call i8* @front.408(%"Vector[Char]"* %1) + %3 = load i8, i8* %2 + ret i8 %3 } ; Function Attrs: inlinehint nounwind -define internal i8* @front.421(%"Vector[Char]"* %this) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal i8* @front.408(%"Vector[Char]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = call i8* @value(%"RawPtr[Char]" %3) - ret i8* %4 + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %2 = call i8* @value(%"RawPtr[Char]"* %1) + ret i8* %2 } ; Function Attrs: inlinehint nounwind define internal i8 @peekChar(%SparrowScanner* %this) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr %tmp.this = alloca i32 br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - %3 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2, i32 0, i32 0 + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 store i32 1, i32* %tmp.this - %4 = load i32, i32* %tmp.this - %5 = call i8 @peek(%"RangeWithLookahead[BufferedCharSourceRange]"* %3, i32 %4) - ret i8 %5 + %3 = load i32, i32* %tmp.this + %4 = call i8 @peek(%"RangeWithLookahead[BufferedCharSourceRange]"* %2, i32 %3) + ret i8 %4 } ; Function Attrs: inlinehint nounwind define internal i8 @peek(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 %n) #4 { - %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr %n.addr = alloca i32 store i32 %n, i32* %n.addr %tmp.this = alloca i64 - %"$tmpForRef" = alloca i8 %tmp.this1 = alloca i64 %tmp.this2 = alloca i64 %tmp.this3 = alloca i8 @@ -14613,20 +12954,16 @@ while_block: ; preds = %while_step, %code %2 = zext i32 %1 to i64 store i64 %2, i64* %tmp.this %3 = load i64, i64* %tmp.this - %4 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %5 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %4, i32 0, i32 1 - %6 = call i64 @size.199(%"Vector[Char]"* %5) - %7 = icmp sge i64 %3, %6 - br i1 %7, label %cond.true, label %cond.false + %4 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %5 = call i64 @size.185(%"Vector[Char]"* %4) + %6 = icmp sge i64 %3, %5 + br i1 %6, label %cond.true, label %cond.false while_body: ; preds = %cond.end - %8 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %9 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %8, i32 0, i32 1 - %10 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %11 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %10, i32 0, i32 0 - %12 = call i8 @"post_++.398"(%BufferedCharSourceRange* %11) - store i8 %12, i8* %"$tmpForRef" - call void @"+="(%"Vector[Char]"* %9, i8* %"$tmpForRef") + %7 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %8 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + %9 = call i8 @"post_++.385"(%BufferedCharSourceRange* %8) + call void @"+="(%"Vector[Char]"* %7, i8 %9) br label %while_step while_step: ; preds = %while_body @@ -14636,44 +12973,41 @@ while_end: ; preds = %cond.end br label %if_block cond.true: ; preds = %while_block - %13 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %14 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %13, i32 0, i32 0 - %15 = call i1 @"pre_!!"(%BufferedCharSourceRange* %14) + %10 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + %11 = call i1 @"pre_!!"(%BufferedCharSourceRange* %10) br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %15, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %11, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end if_block: ; preds = %while_end - %16 = load i32, i32* %n.addr - %17 = zext i32 %16 to i64 - store i64 %17, i64* %tmp.this1 - %18 = load i64, i64* %tmp.this1 - %19 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %20 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %19, i32 0, i32 1 - %21 = call i64 @size.199(%"Vector[Char]"* %20) - %22 = icmp slt i64 %18, %21 - br i1 %22, label %if_then, label %if_else + %12 = load i32, i32* %n.addr + %13 = zext i32 %12 to i64 + store i64 %13, i64* %tmp.this1 + %14 = load i64, i64* %tmp.this1 + %15 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %16 = call i64 @size.185(%"Vector[Char]"* %15) + %17 = icmp slt i64 %14, %16 + br i1 %17, label %if_then, label %if_else if_then: ; preds = %if_block - %23 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %24 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %23, i32 0, i32 1 - %25 = load i32, i32* %n.addr - %26 = zext i32 %25 to i64 - store i64 %26, i64* %tmp.this2 - %27 = load i64, i64* %tmp.this2 - %28 = call i8* @"().422"(%"Vector[Char]"* %24, i64 %27) - %29 = load i8, i8* %28 - ret i8 %29 + %18 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %19 = load i32, i32* %n.addr + %20 = zext i32 %19 to i64 + store i64 %20, i64* %tmp.this2 + %21 = load i64, i64* %tmp.this2 + %22 = call i8* @"().409"(%"Vector[Char]"* %18, i64 %21) + %23 = load i8, i8* %22 + ret i8 %23 if_else: ; preds = %if_block store i8 0, i8* %tmp.this3 - %30 = load i8, i8* %tmp.this3 - ret i8 %30 + %24 = load i8, i8* %tmp.this3 + ret i8 %24 if_end: ; preds = %dumy_block4, %dumy_block unreachable @@ -14686,29 +13020,23 @@ dumy_block4: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal i8* @"().422"(%"Vector[Char]"* %this, i64 %index) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal i8* @"().409"(%"Vector[Char]"* %this, i64 %index) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = load i64, i64* %index.addr - call void @advance.201(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %3, i64 %4) - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %6 = call i8* @value(%"RawPtr[Char]" %5) - ret i8* %6 + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %2 = load i64, i64* %index.addr + %3 = call %"RawPtr[Char]" @advance.187(%"RawPtr[Char]"* %1, i64 %2) + store %"RawPtr[Char]" %3, %"RawPtr[Char]"* %"$tmpForRef" + %4 = call i8* @value(%"RawPtr[Char]"* %"$tmpForRef") + ret i8* %4 } ; Function Attrs: inlinehint nounwind -define internal void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this) #4 { - %this.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr +define internal void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this) #4 { %tmp.this = alloca i32 %tmp.this1 = alloca i32 br label %code @@ -14717,200 +13045,186 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 - %3 = call i8 @"pre_*.424"(%"RangeWithLookahead[BufferedCharSourceRange]"* %2) - %4 = icmp eq i8 %3, 10 - br i1 %4, label %if_then, label %if_else + %1 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 0 + %2 = call i8 @"pre_*.411"(%"RangeWithLookahead[BufferedCharSourceRange]"* %1) + %3 = icmp eq i8 %2, 10 + br i1 %3, label %if_then, label %if_else if_then: ; preds = %if_block - %5 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %6 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5, i32 0, i32 1 - %7 = load %Location*, %Location** %6 + %4 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 1 + %5 = load %Location*, %Location** %4 store i32 1, i32* %tmp.this - %8 = load i32, i32* %tmp.this - call void @addLines(%Location* %7, i32 %8) + %6 = load i32, i32* %tmp.this + call void @addLines(%Location* %5, i32 %6) br label %if_end if_else: ; preds = %if_block - %9 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %10 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %9, i32 0, i32 1 - %11 = load %Location*, %Location** %10 + %7 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 1 + %8 = load %Location*, %Location** %7 store i32 1, i32* %tmp.this1 - %12 = load i32, i32* %tmp.this1 - call void @addColumns(%Location* %11, i32 %12) + %9 = load i32, i32* %tmp.this1 + call void @addColumns(%Location* %8, i32 %9) br label %if_end if_end: ; preds = %if_else, %if_then - %13 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %this.addr - %14 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %13, i32 0, i32 0 - call void @popFront.425(%"RangeWithLookahead[BufferedCharSourceRange]"* %14) + %10 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %this, i32 0, i32 0 + call void @popFront.412(%"RangeWithLookahead[BufferedCharSourceRange]"* %10) ret void } ; Function Attrs: inlinehint nounwind -define internal i8 @"pre_*.424"(%"RangeWithLookahead[BufferedCharSourceRange]"* %r) #4 { - %r.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %r, %"RangeWithLookahead[BufferedCharSourceRange]"** %r.addr +define internal i8 @"pre_*.411"(%"RangeWithLookahead[BufferedCharSourceRange]"* %r) #4 { br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %r.addr - %2 = call i8 @front.420(%"RangeWithLookahead[BufferedCharSourceRange]"* %1) - ret i8 %2 + %1 = call i8 @front.407(%"RangeWithLookahead[BufferedCharSourceRange]"* %r) + ret i8 %1 } ; Function Attrs: inlinehint nounwind define internal void @addLines(%Location* %l, i32 %count) #4 { - %l.addr = alloca %Location* - store %Location* %l, %Location** %l.addr %count.addr = alloca i32 store i32 %count, i32* %count.addr %tmp.this = alloca i32 br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %l.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 2 - %3 = getelementptr inbounds %LineCol, %LineCol* %2, i32 0, i32 0 - %4 = load i32, i32* %3 - %5 = load i32, i32* %count.addr - %6 = add i32 %4, %5 - %7 = load %Location*, %Location** %l.addr - %8 = getelementptr inbounds %Location, %Location* %7, i32 0, i32 2 - %9 = getelementptr inbounds %LineCol, %LineCol* %8, i32 0, i32 0 - store i32 %6, i32* %9 + %1 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + %2 = getelementptr inbounds %LineCol, %LineCol* %1, i32 0, i32 0 + %3 = load i32, i32* %2 + %4 = load i32, i32* %count.addr + %5 = add i32 %3, %4 + %6 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + %7 = getelementptr inbounds %LineCol, %LineCol* %6, i32 0, i32 0 + store i32 %5, i32* %7 store i32 1, i32* %tmp.this - %10 = load i32, i32* %tmp.this - %11 = load %Location*, %Location** %l.addr - %12 = getelementptr inbounds %Location, %Location* %11, i32 0, i32 2 - %13 = getelementptr inbounds %LineCol, %LineCol* %12, i32 0, i32 1 - store i32 %10, i32* %13 + %8 = load i32, i32* %tmp.this + %9 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + %10 = getelementptr inbounds %LineCol, %LineCol* %9, i32 0, i32 1 + store i32 %8, i32* %10 ret void } ; Function Attrs: inlinehint nounwind define internal void @addColumns(%Location* %l, i32 %count) #4 { - %l.addr = alloca %Location* - store %Location* %l, %Location** %l.addr %count.addr = alloca i32 store i32 %count, i32* %count.addr br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %l.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 2 - %3 = getelementptr inbounds %LineCol, %LineCol* %2, i32 0, i32 1 - %4 = load i32, i32* %3 - %5 = load i32, i32* %count.addr - %6 = add i32 %4, %5 - %7 = load %Location*, %Location** %l.addr - %8 = getelementptr inbounds %Location, %Location* %7, i32 0, i32 2 - %9 = getelementptr inbounds %LineCol, %LineCol* %8, i32 0, i32 1 - store i32 %6, i32* %9 + %1 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + %2 = getelementptr inbounds %LineCol, %LineCol* %1, i32 0, i32 1 + %3 = load i32, i32* %2 + %4 = load i32, i32* %count.addr + %5 = add i32 %3, %4 + %6 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + %7 = getelementptr inbounds %LineCol, %LineCol* %6, i32 0, i32 1 + store i32 %5, i32* %7 ret void } ; Function Attrs: inlinehint nounwind -define internal void @popFront.425(%"RangeWithLookahead[BufferedCharSourceRange]"* %this) #4 { - %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr +define internal void @popFront.412(%"RangeWithLookahead[BufferedCharSourceRange]"* %this) #4 { %tmp.this = alloca i64 - %"$tmpForRef" = alloca i8 br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %1, i32 0, i32 1 + %1 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 store i64 0, i64* %tmp.this - %3 = load i64, i64* %tmp.this - call void @remove.426(%"Vector[Char]"* %2, i64 %3) + %2 = load i64, i64* %tmp.this + call void @remove.413(%"Vector[Char]"* %1, i64 %2) br label %if_block if_block: ; preds = %code - %4 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %5 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %4, i32 0, i32 1 - %6 = call i1 @isEmpty.416(%"Vector[Char]"* %5) - br i1 %6, label %cond.true, label %cond.false + %3 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %4 = call i1 @isEmpty.403(%"Vector[Char]"* %3) + br i1 %4, label %cond.true, label %cond.false if_then: ; preds = %cond.end - %7 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %8 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %7, i32 0, i32 1 - %9 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %10 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %9, i32 0, i32 0 - %11 = call i8 @"post_++.398"(%BufferedCharSourceRange* %10) - store i8 %11, i8* %"$tmpForRef" - call void @"+="(%"Vector[Char]"* %8, i8* %"$tmpForRef") + %5 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %6 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + %7 = call i8 @"post_++.385"(%BufferedCharSourceRange* %6) + call void @"+="(%"Vector[Char]"* %5, i8 %7) br label %if_end if_end: ; preds = %if_then, %cond.end ret void cond.true: ; preds = %if_block - %12 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %13 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %12, i32 0, i32 0 - %14 = call i1 @"pre_!!"(%BufferedCharSourceRange* %13) + %8 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + %9 = call i1 @"pre_!!"(%BufferedCharSourceRange* %8) br label %cond.end cond.false: ; preds = %if_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %14, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %9, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then, label %if_end } ; Function Attrs: inlinehint nounwind -define internal void @remove.426(%"Vector[Char]"* %this, i64 %index) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal void @remove.413(%"Vector[Char]"* %this, i64 %index) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr %r = alloca %"ContiguousMemoryRange[Char]" + %"$tmpForRef" = alloca %"ContiguousMemoryRange[Char]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - call void @all.427(%"ContiguousMemoryRange[Char]"* %r, %"Vector[Char]"* %1) + %1 = call %"ContiguousMemoryRange[Char]" @all.415(%"Vector[Char]"* %this) + store %"ContiguousMemoryRange[Char]" %1, %"ContiguousMemoryRange[Char]"* %"$tmpForRef" + call void @ctor.414(%"ContiguousMemoryRange[Char]"* %r, %"ContiguousMemoryRange[Char]"* %"$tmpForRef") %2 = load i64, i64* %index.addr - call void @popFront.429(%"ContiguousMemoryRange[Char]"* %r, i64 %2) - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %4 = call i64 @size.199(%"Vector[Char]"* %3) - %5 = load i64, i64* %index.addr - %6 = call i64 @_SizeType_opMinus(i64 %4, i64 %5) + call void @popFront.417(%"ContiguousMemoryRange[Char]"* %r, i64 %2) + %3 = call i64 @size.185(%"Vector[Char]"* %this) + %4 = load i64, i64* %index.addr + %5 = call i64 @_SizeType_opMinus(i64 %3, i64 %4) store i64 1, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = call i64 @_SizeType_opMinus(i64 %6, i64 %7) - call void @popBack.430(%"ContiguousMemoryRange[Char]"* %r, i64 %8) - %9 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %10 = load %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %r - call void @remove.431(%"Vector[Char]"* %9, %"ContiguousMemoryRange[Char]" %10) + %6 = load i64, i64* %tmp.this + %7 = call i64 @_SizeType_opMinus(i64 %5, i64 %6) + call void @popBack.418(%"ContiguousMemoryRange[Char]"* %r, i64 %7) + %8 = load %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %r + call void @remove.419(%"Vector[Char]"* %this, %"ContiguousMemoryRange[Char]" %8) + ret void +} + +; Function Attrs: alwaysinline nounwind +define internal void @ctor.414(%"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"* %other) #3 { + %other.addr = alloca %"ContiguousMemoryRange[Char]"* + store %"ContiguousMemoryRange[Char]"* %other, %"ContiguousMemoryRange[Char]"** %other.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 0 + %2 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %other.addr + %3 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %2, i32 0, i32 0 + call void @ctor.178(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %3) + %4 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 1 + %5 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %other.addr + %6 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %5, i32 0, i32 1 + call void @ctor.178(%"RawPtr[Char]"* %4, %"RawPtr[Char]"* %6) ret void } ; Function Attrs: inlinehint nounwind -define internal void @all.427(%"ContiguousMemoryRange[Char]"* sret %_result, %"Vector[Char]"* %this) #4 { - %_result.addr = alloca %"ContiguousMemoryRange[Char]"* - store %"ContiguousMemoryRange[Char]"* %_result, %"ContiguousMemoryRange[Char]"** %_result.addr - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal %"ContiguousMemoryRange[Char]" @all.415(%"Vector[Char]"* %this) #4 { + %tmp.this = alloca %"ContiguousMemoryRange[Char]" br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %_result.addr - %2 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %3 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %2, i32 0, i32 0 + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %1 + %3 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 %4 = load %"RawPtr[Char]", %"RawPtr[Char]"* %3 - %5 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %6 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %5, i32 0, i32 1 - %7 = load %"RawPtr[Char]", %"RawPtr[Char]"* %6 - call void @ctor.428(%"ContiguousMemoryRange[Char]"* %1, %"RawPtr[Char]" %4, %"RawPtr[Char]" %7) - ret void + call void @ctor.416(%"ContiguousMemoryRange[Char]"* %tmp.this, %"RawPtr[Char]" %2, %"RawPtr[Char]" %4) + %5 = load %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %tmp.this + ret %"ContiguousMemoryRange[Char]" %5 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.428(%"ContiguousMemoryRange[Char]"* %this, %"RawPtr[Char]" %f_begin, %"RawPtr[Char]" %f_end) #3 { +define internal void @ctor.416(%"ContiguousMemoryRange[Char]"* %this, %"RawPtr[Char]" %f_begin, %"RawPtr[Char]" %f_end) #3 { %this.addr = alloca %"ContiguousMemoryRange[Char]"* store %"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"** %this.addr %f_begin.addr = alloca %"RawPtr[Char]" @@ -14922,260 +13236,200 @@ define internal void @ctor.428(%"ContiguousMemoryRange[Char]"* %this, %"RawPtr[C code: ; preds = %0 %1 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %1, i32 0, i32 0 - call void @ctor.192(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %f_begin.addr) + call void @ctor.178(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %f_begin.addr) %3 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr %4 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %3, i32 0, i32 1 - call void @ctor.192(%"RawPtr[Char]"* %4, %"RawPtr[Char]"* %f_end.addr) + call void @ctor.178(%"RawPtr[Char]"* %4, %"RawPtr[Char]"* %f_end.addr) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @popFront.429(%"ContiguousMemoryRange[Char]"* %this, i64 %n) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Char]"* - store %"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"** %this.addr +define internal void @popFront.417(%"ContiguousMemoryRange[Char]"* %this, i64 %n) #3 { %n.addr = alloca i64 store i64 %n, i64* %n.addr - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %3, i32 0, i32 0 - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %4 - %6 = load i64, i64* %n.addr - store i64 %6, i64* %tmp.this - %7 = load i64, i64* %tmp.this - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %5, i64 %7) - call void @"=.200"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %"$tmpC") + %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 0 + %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 0 + %3 = load i64, i64* %n.addr + store i64 %3, i64* %tmp.this + %4 = load i64, i64* %tmp.this + %5 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %2, i64 %4) + store %"RawPtr[Char]" %5, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %"$tmpForRef") ret void } ; Function Attrs: alwaysinline nounwind -define internal void @popBack.430(%"ContiguousMemoryRange[Char]"* %this, i64 %n) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Char]"* - store %"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"** %this.addr +define internal void @popBack.418(%"ContiguousMemoryRange[Char]"* %this, i64 %n) #3 { %n.addr = alloca i64 store i64 %n, i64* %n.addr - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %1, i32 0, i32 1 - %3 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %3, i32 0, i32 1 - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %4 - %6 = load i64, i64* %n.addr - store i64 %6, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = sub i64 0, %7 - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %5, i64 %8) - call void @"=.200"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %"$tmpC") + %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 1 + %3 = load i64, i64* %n.addr + store i64 %3, i64* %tmp.this + %4 = load i64, i64* %tmp.this + %5 = sub i64 0, %4 + %6 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %2, i64 %5) + store %"RawPtr[Char]" %6, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %"$tmpForRef") ret void } ; Function Attrs: inlinehint nounwind -define internal void @remove.431(%"Vector[Char]"* %this, %"ContiguousMemoryRange[Char]" %range) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal void @remove.419(%"Vector[Char]"* %this, %"ContiguousMemoryRange[Char]" %range) #4 { %range.addr = alloca %"ContiguousMemoryRange[Char]" store %"ContiguousMemoryRange[Char]" %range, %"ContiguousMemoryRange[Char]"* %range.addr %rBegin = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %rEnd = alloca %"RawPtr[Char]" + %"$tmpForRef1" = alloca %"RawPtr[Char]" %"$rangeVar" = alloca %"ContiguousMemoryRange[Char]" %el = alloca i8* - %"$tmpC" = alloca %"RawPtr[Char]" - %"$tmpC5" = alloca %"RawPtr[Char]" + %"$tmpForRef6" = alloca %"RawPtr[Char]" + %"$tmpForRef7" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %range.addr - call void @frontPtr(%"RawPtr[Char]"* %rBegin, %"ContiguousMemoryRange[Char]" %1) - %2 = load %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %range.addr - call void @backPtr(%"RawPtr[Char]"* %rEnd, %"ContiguousMemoryRange[Char]" %2) - call void @ctor.432(%"ContiguousMemoryRange[Char]"* %"$rangeVar", %"ContiguousMemoryRange[Char]"* %range.addr) + %1 = call %"RawPtr[Char]" @frontPtr(%"ContiguousMemoryRange[Char]"* %range.addr) + store %"RawPtr[Char]" %1, %"RawPtr[Char]"* %"$tmpForRef" + call void @ctor.178(%"RawPtr[Char]"* %rBegin, %"RawPtr[Char]"* %"$tmpForRef") + %2 = call %"RawPtr[Char]" @backPtr(%"ContiguousMemoryRange[Char]"* %range.addr) + store %"RawPtr[Char]" %2, %"RawPtr[Char]"* %"$tmpForRef1" + call void @ctor.178(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]"* %"$tmpForRef1") + call void @ctor.414(%"ContiguousMemoryRange[Char]"* %"$rangeVar", %"ContiguousMemoryRange[Char]"* %range.addr) br label %while_block while_block: ; preds = %while_step, %code - %3 = load %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %"$rangeVar" - %4 = call i1 @isEmpty.433(%"ContiguousMemoryRange[Char]" %3) - %5 = xor i1 true, %4 - br i1 %5, label %while_body, label %while_end + %3 = call i1 @isEmpty.420(%"ContiguousMemoryRange[Char]"* %"$rangeVar") + %4 = xor i1 true, %3 + br i1 %4, label %while_body, label %while_end while_body: ; preds = %while_block - %6 = load %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %"$rangeVar" - %7 = call i8* @front.434(%"ContiguousMemoryRange[Char]" %6) - store i8* %7, i8** %el + %5 = call i8* @front.421(%"ContiguousMemoryRange[Char]"* %"$rangeVar") + store i8* %5, i8** %el br label %while_step while_step: ; preds = %while_body - call void @popFront.435(%"ContiguousMemoryRange[Char]"* %"$rangeVar") + call void @popFront.422(%"ContiguousMemoryRange[Char]"* %"$rangeVar") br label %while_block while_end: ; preds = %while_block - br label %while_block1 - -while_block1: ; preds = %while_step3, %while_end - %8 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %9 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %8, i32 0, i32 1 - %10 = call i1 @"==.268"(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]"* %9) - %11 = xor i1 true, %10 - br i1 %11, label %while_body2, label %while_end4 - -while_body2: ; preds = %while_block1 - %12 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rEnd - %13 = call i8* @value(%"RawPtr[Char]" %12) - %14 = load i8, i8* %13 - %15 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rBegin - %16 = call i8* @value(%"RawPtr[Char]" %15) - store i8 %14, i8* %16 - %17 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rEnd - %18 = call i8* @value(%"RawPtr[Char]" %17) - %19 = load i8, i8* %18 - %20 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rBegin - call void @advance.269(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %20) - call void @"=.200"(%"RawPtr[Char]"* %rBegin, %"RawPtr[Char]"* %"$tmpC") - %21 = load %"RawPtr[Char]", %"RawPtr[Char]"* %rEnd - call void @advance.269(%"RawPtr[Char]"* %"$tmpC5", %"RawPtr[Char]" %21) - call void @"=.200"(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]"* %"$tmpC5") - br label %while_step3 + br label %while_block2 + +while_block2: ; preds = %while_step4, %while_end + %6 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %7 = call i1 @"==.257"(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]"* %6) + %8 = xor i1 true, %7 + br i1 %8, label %while_body3, label %while_end5 + +while_body3: ; preds = %while_block2 + %9 = call i8* @value(%"RawPtr[Char]"* %rEnd) + %10 = load i8, i8* %9 + %11 = call i8* @value(%"RawPtr[Char]"* %rBegin) + store i8 %10, i8* %11 + %12 = call i8* @value(%"RawPtr[Char]"* %rEnd) + %13 = load i8, i8* %12 + %14 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %rBegin) + store %"RawPtr[Char]" %14, %"RawPtr[Char]"* %"$tmpForRef6" + call void @"=.186"(%"RawPtr[Char]"* %rBegin, %"RawPtr[Char]"* %"$tmpForRef6") + %15 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %rEnd) + store %"RawPtr[Char]" %15, %"RawPtr[Char]"* %"$tmpForRef7" + call void @"=.186"(%"RawPtr[Char]"* %rEnd, %"RawPtr[Char]"* %"$tmpForRef7") + br label %while_step4 -while_step3: ; preds = %while_body2 - br label %while_block1 +while_step4: ; preds = %while_body3 + br label %while_block2 -while_end4: ; preds = %while_block1 - %22 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %23 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %22, i32 0, i32 1 - call void @"=.200"(%"RawPtr[Char]"* %23, %"RawPtr[Char]"* %rBegin) +while_end5: ; preds = %while_block2 + %16 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + call void @"=.186"(%"RawPtr[Char]"* %16, %"RawPtr[Char]"* %rBegin) ret void } ; Function Attrs: inlinehint nounwind -define internal void @frontPtr(%"RawPtr[Char]"* sret %_result, %"ContiguousMemoryRange[Char]" %this) #4 { - %_result.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %_result, %"RawPtr[Char]"** %_result.addr - %this.addr = alloca %"ContiguousMemoryRange[Char]" - store %"ContiguousMemoryRange[Char]" %this, %"ContiguousMemoryRange[Char]"* %this.addr +define internal %"RawPtr[Char]" @frontPtr(%"ContiguousMemoryRange[Char]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %_result.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this.addr, i32 0, i32 0 - call void @ctor.192(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %2) - ret void + %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 0 + %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %1 + ret %"RawPtr[Char]" %2 } ; Function Attrs: inlinehint nounwind -define internal void @backPtr(%"RawPtr[Char]"* sret %_result, %"ContiguousMemoryRange[Char]" %this) #4 { - %_result.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %_result, %"RawPtr[Char]"** %_result.addr - %this.addr = alloca %"ContiguousMemoryRange[Char]" - store %"ContiguousMemoryRange[Char]" %this, %"ContiguousMemoryRange[Char]"* %this.addr - br label %code - -code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %_result.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this.addr, i32 0, i32 1 - call void @ctor.192(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %2) - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.432(%"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"* %other) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Char]"* - store %"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"** %this.addr - %other.addr = alloca %"ContiguousMemoryRange[Char]"* - store %"ContiguousMemoryRange[Char]"* %other, %"ContiguousMemoryRange[Char]"** %other.addr +define internal %"RawPtr[Char]" @backPtr(%"ContiguousMemoryRange[Char]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %other.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %3, i32 0, i32 0 - call void @ctor.192(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) - %5 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %6 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %5, i32 0, i32 1 - %7 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %other.addr - %8 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %7, i32 0, i32 1 - call void @ctor.192(%"RawPtr[Char]"* %6, %"RawPtr[Char]"* %8) - ret void + %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 1 + %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %1 + ret %"RawPtr[Char]" %2 } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.433(%"ContiguousMemoryRange[Char]" %this) #4 { - %this.addr = alloca %"ContiguousMemoryRange[Char]" - store %"ContiguousMemoryRange[Char]" %this, %"ContiguousMemoryRange[Char]"* %this.addr +define internal i1 @isEmpty.420(%"ContiguousMemoryRange[Char]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this.addr, i32 0, i32 1 - %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %1 - %3 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this.addr, i32 0, i32 0 - %4 = load %"RawPtr[Char]", %"RawPtr[Char]"* %3 - %5 = call i64 @diff(%"RawPtr[Char]" %2, %"RawPtr[Char]" %4) + %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 0 + %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 + %4 = call i64 @diff(%"RawPtr[Char]"* %1, %"RawPtr[Char]" %3) store i64 0, i64* %tmp.this - %6 = load i64, i64* %tmp.this - %7 = icmp sle i64 %5, %6 - ret i1 %7 + %5 = load i64, i64* %tmp.this + %6 = icmp sle i64 %4, %5 + ret i1 %6 } ; Function Attrs: inlinehint nounwind -define internal i8* @front.434(%"ContiguousMemoryRange[Char]" %this) #4 { - %this.addr = alloca %"ContiguousMemoryRange[Char]" - store %"ContiguousMemoryRange[Char]" %this, %"ContiguousMemoryRange[Char]"* %this.addr +define internal i8* @front.421(%"ContiguousMemoryRange[Char]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this.addr, i32 0, i32 0 - %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %1 - %3 = call i8* @value(%"RawPtr[Char]" %2) - ret i8* %3 + %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 0 + %2 = call i8* @value(%"RawPtr[Char]"* %1) + ret i8* %2 } ; Function Attrs: alwaysinline nounwind -define internal void @popFront.435(%"ContiguousMemoryRange[Char]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Char]"* - store %"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"** %this.addr - %"$tmpC" = alloca %"RawPtr[Char]" +define internal void @popFront.422(%"ContiguousMemoryRange[Char]"* %this) #3 { + %"$tmpForRef" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %3, i32 0, i32 0 - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %4 - call void @advance.269(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %5) - call void @"=.200"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %"$tmpC") + %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 0 + %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 0 + %3 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %2) + store %"RawPtr[Char]" %3, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %"$tmpForRef") ret void } ; Function Attrs: inlinehint nounwind -define internal void @advanceIf(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"$lambdaEnclosureData" %pred) #4 { - %range.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %pred.addr = alloca %"$lambdaEnclosureData" - store %"$lambdaEnclosureData" %pred, %"$lambdaEnclosureData"* %pred.addr +define internal void @advanceIf(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"$lambdaEnclosureData"* %pred) #4 { + %"$tmpForRef" = alloca i8 br label %code code: ; preds = %0 br label %while_block while_block: ; preds = %while_step, %code - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %2 = call i1 @isEmpty.414(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) - %3 = xor i1 true, %2 - br i1 %3, label %cond.true, label %cond.false + %1 = call i1 @isEmpty.401(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) + %2 = xor i1 true, %1 + br i1 %2, label %cond.true, label %cond.false while_body: ; preds = %cond.end - %4 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4) + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) br label %while_step while_step: ; preds = %while_body @@ -15185,37 +13439,33 @@ while_end: ; preds = %cond.end ret void cond.true: ; preds = %while_block - %5 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %6 = call i8 @front.419(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) - %7 = call i1 @"().436"(%"$lambdaEnclosureData"* %pred.addr, i8 %6) + %3 = call i8 @front.406(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) + store i8 %3, i8* %"$tmpForRef" + %4 = call i1 @"().423"(%"$lambdaEnclosureData"* %pred, i8* %"$tmpForRef") br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %7, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %4, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end } ; Function Attrs: alwaysinline nounwind -define internal i1 @"().436"(%"$lambdaEnclosureData"* %this, i8 %c) #3 { +define internal i1 @"().423"(%"$lambdaEnclosureData"* %this, i8* %c) #3 { %this.addr = alloca %"$lambdaEnclosureData"* store %"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"** %this.addr - %c.addr = alloca i8 - store i8 %c, i8* %c.addr br label %code code: ; preds = %0 - %1 = load i8, i8* %c.addr + %1 = load i8, i8* %c %2 = icmp ne i8 %1, 10 ret i1 %2 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.437(%"$lambdaEnclosureData"* %this) #3 { - %this.addr = alloca %"$lambdaEnclosureData"* - store %"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"** %this.addr +define internal void @ctor.424(%"$lambdaEnclosureData"* %this) #3 { br label %code code: ; preds = %0 @@ -15223,9 +13473,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.438(%"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"* %other) #3 { - %this.addr = alloca %"$lambdaEnclosureData"* - store %"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"** %this.addr +define internal void @ctor.425(%"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"* %other) #3 { %other.addr = alloca %"$lambdaEnclosureData"* store %"$lambdaEnclosureData"* %other, %"$lambdaEnclosureData"** %other.addr br label %code @@ -15235,9 +13483,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.439(%"$lambdaEnclosureData"* %this) #3 { - %this.addr = alloca %"$lambdaEnclosureData"* - store %"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"** %this.addr +define internal void @dtor.426(%"$lambdaEnclosureData"* %this) #3 { br label %code code: ; preds = %0 @@ -15245,9 +13491,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.440"(%"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"* %other) #3 { - %this.addr = alloca %"$lambdaEnclosureData"* - store %"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"** %this.addr +define internal void @"=.427"(%"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"* %other) #3 { %other.addr = alloca %"$lambdaEnclosureData"* store %"$lambdaEnclosureData"* %other, %"$lambdaEnclosureData"** %other.addr br label %code @@ -15257,7 +13501,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.441"(%"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"* %other) #3 { +define internal i1 @"==.428"(%"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"* %other) #3 { %this.addr = alloca %"$lambdaEnclosureData"* store %"$lambdaEnclosureData"* %this, %"$lambdaEnclosureData"** %this.addr %other.addr = alloca %"$lambdaEnclosureData"* @@ -15269,38 +13513,30 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) #4 { - %r.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr +define internal i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) #4 { br label %code code: ; preds = %0 - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %2 = call i1 @isEmpty.414(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) - %3 = xor i1 true, %2 - ret i1 %3 + %1 = call i1 @isEmpty.401(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + %2 = xor i1 true, %1 + ret i1 %2 } ; Function Attrs: inlinehint nounwind -define internal void @advanceIf.443(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"$lambdaEnclosureData.0" %pred) #4 { - %range.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %pred.addr = alloca %"$lambdaEnclosureData.0" - store %"$lambdaEnclosureData.0" %pred, %"$lambdaEnclosureData.0"* %pred.addr +define internal void @advanceIf.430(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"$lambdaEnclosureData.0"* %pred) #4 { + %"$tmpForRef" = alloca i8 br label %code code: ; preds = %0 br label %while_block while_block: ; preds = %while_step, %code - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %2 = call i1 @isEmpty.414(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) - %3 = xor i1 true, %2 - br i1 %3, label %cond.true, label %cond.false + %1 = call i1 @isEmpty.401(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) + %2 = xor i1 true, %1 + br i1 %2, label %cond.true, label %cond.false while_body: ; preds = %cond.end - %4 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4) + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) br label %while_step while_step: ; preds = %while_body @@ -15310,37 +13546,33 @@ while_end: ; preds = %cond.end ret void cond.true: ; preds = %while_block - %5 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %6 = call i8 @front.419(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) - %7 = call i1 @"().444"(%"$lambdaEnclosureData.0"* %pred.addr, i8 %6) + %3 = call i8 @front.406(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) + store i8 %3, i8* %"$tmpForRef" + %4 = call i1 @"().431"(%"$lambdaEnclosureData.0"* %pred, i8* %"$tmpForRef") br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %7, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %4, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end } ; Function Attrs: alwaysinline nounwind -define internal i1 @"().444"(%"$lambdaEnclosureData.0"* %this, i8 %c) #3 { +define internal i1 @"().431"(%"$lambdaEnclosureData.0"* %this, i8* %c) #3 { %this.addr = alloca %"$lambdaEnclosureData.0"* store %"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"** %this.addr - %c.addr = alloca i8 - store i8 %c, i8* %c.addr br label %code code: ; preds = %0 - %1 = load i8, i8* %c.addr + %1 = load i8, i8* %c %2 = icmp eq i8 %1, 32 ret i1 %2 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.445(%"$lambdaEnclosureData.0"* %this) #3 { - %this.addr = alloca %"$lambdaEnclosureData.0"* - store %"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"** %this.addr +define internal void @ctor.432(%"$lambdaEnclosureData.0"* %this) #3 { br label %code code: ; preds = %0 @@ -15348,9 +13580,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.446(%"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"* %other) #3 { - %this.addr = alloca %"$lambdaEnclosureData.0"* - store %"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"** %this.addr +define internal void @ctor.433(%"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"* %other) #3 { %other.addr = alloca %"$lambdaEnclosureData.0"* store %"$lambdaEnclosureData.0"* %other, %"$lambdaEnclosureData.0"** %other.addr br label %code @@ -15360,9 +13590,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.447(%"$lambdaEnclosureData.0"* %this) #3 { - %this.addr = alloca %"$lambdaEnclosureData.0"* - store %"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"** %this.addr +define internal void @dtor.434(%"$lambdaEnclosureData.0"* %this) #3 { br label %code code: ; preds = %0 @@ -15370,9 +13598,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.448"(%"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"* %other) #3 { - %this.addr = alloca %"$lambdaEnclosureData.0"* - store %"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"** %this.addr +define internal void @"=.435"(%"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"* %other) #3 { %other.addr = alloca %"$lambdaEnclosureData.0"* store %"$lambdaEnclosureData.0"* %other, %"$lambdaEnclosureData.0"** %other.addr br label %code @@ -15382,7 +13608,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.449"(%"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"* %other) #3 { +define internal i1 @"==.436"(%"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"* %other) #3 { %this.addr = alloca %"$lambdaEnclosureData.0"* store %"$lambdaEnclosureData.0"* %this, %"$lambdaEnclosureData.0"** %this.addr %other.addr = alloca %"$lambdaEnclosureData.0"* @@ -15395,346 +13621,307 @@ code: ; preds = %0 ; Function Attrs: inlinehint nounwind define internal void @reportError(%SparrowScanner* %this, %String* %msg) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr - %msg.addr = alloca %String* - store %String* %msg, %String** %msg.addr br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 5 - %3 = load %ErrorReporter, %ErrorReporter* %2 - %4 = load %SparrowScanner*, %SparrowScanner** %this.addr - %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %4, i32 0, i32 2 - %6 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5, i32 0, i32 1 - %7 = load %Location*, %Location** %6 - %8 = load %String*, %String** %msg.addr - call void @reportError.450(%ErrorReporter %3, %Location* %7, %String* %8) + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 5 + %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %3 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2, i32 0, i32 1 + %4 = load %Location*, %Location** %3 + %5 = load %Location, %Location* %4 + call void @reportError.437(%ErrorReporter* %1, %Location %5, %String* %msg) ret void } ; Function Attrs: inlinehint nounwind -define internal void @reportError.450(%ErrorReporter %obj, %Location* %loc, %String* %msg) #4 { - %obj.addr = alloca %ErrorReporter - store %ErrorReporter %obj, %ErrorReporter* %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr - %msg.addr = alloca %String* - store %String* %msg, %String** %msg.addr +define internal void @reportError.437(%ErrorReporter* %obj, %Location %loc, %String* %msg) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr br label %code code: ; preds = %0 - %1 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %obj.addr, i32 0, i32 1 - %2 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %obj.addr, i32 0, i32 0 + %1 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %obj, i32 0, i32 1 + %2 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %obj, i32 0, i32 0 %3 = load %UntypedPtr, %UntypedPtr* %2 - %4 = load %Location*, %Location** %loc.addr - %5 = load %String*, %String** %msg.addr - %6 = call %StringRef @asStringRef(%String* %5) - call void @"().451"(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %1, %UntypedPtr %3, %Location* %4, %StringRef %6) + %4 = call %StringRef @asStringRef(%String* %msg) + call void @"().438"(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4) ret void } ; Function Attrs: inlinehint nounwind -define internal void @"().451"(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %this.addr +define internal void @"().438"(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %StringRef store %StringRef %p3, %StringRef* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %StringRef, %StringRef* %p3.addr - %5 = bitcast %"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %1 to void (%UntypedPtr, %Location*, %StringRef)** - %6 = load void (%UntypedPtr, %Location*, %StringRef)*, void (%UntypedPtr, %Location*, %StringRef)** %5 - call void %6(%UntypedPtr %2, %Location* %3, %StringRef %4) + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %StringRef, %StringRef* %p3.addr + %3 = bitcast %"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %this to void (%UntypedPtr, %Location*, %StringRef)** + %4 = load void (%UntypedPtr, %Location*, %StringRef)*, void (%UntypedPtr, %Location*, %StringRef)** %3 + call void %4(%UntypedPtr %1, %Location* %p2, %StringRef %2) ret void } ; Function Attrs: inlinehint nounwind define internal %StringRef @asStringRef(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr %tmp.this = alloca %StringRef br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = call i8* @bytePtr(%"RawPtr[Char]" %3) - %5 = load %String*, %String** %this.addr - %6 = getelementptr inbounds %String, %String* %5, i32 0, i32 1 - %7 = load %"RawPtr[Char]", %"RawPtr[Char]"* %6 - %8 = call i8* @bytePtr(%"RawPtr[Char]" %7) - call void @ctor.57(%StringRef* %tmp.this, i8* %4, i8* %8) - %9 = load %StringRef, %StringRef* %tmp.this - ret %StringRef %9 + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %2 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %1) + %3 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %4 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %3) + call void @ctor.60(%StringRef* %tmp.this, %UntypedPtr %2, %UntypedPtr %4) + %5 = load %StringRef, %StringRef* %tmp.this + %6 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %6) + ret %StringRef %5 + +dumy_block: ; No predecessors! + %7 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %7) + unreachable } ; Function Attrs: inlinehint nounwind -define internal void @toString(%String* sret %_result, %StringRef %a1) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %a1.addr = alloca %StringRef - store %StringRef %a1, %StringRef* %a1.addr +define internal void @toString(%String* sret %_result, %StringRef* %a1) #4 { %s = alloca %StringOutputStream + %"$tmpC" = alloca %StringOutputStream br label %code code: ; preds = %0 - call void @ctor.452(%StringOutputStream* %s) - %1 = call %StringOutputStream* @"<<"(%StringOutputStream* %s, %StringRef* %a1.addr) - %2 = load %String*, %String** %_result.addr - %3 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %s, i32 0, i32 0 - call void @ctor.189(%String* %2, %String* %3) - call void @dtor.454(%StringOutputStream* %s) + call void @ctor.439(%StringOutputStream* %s) + call void @"<<"(%StringOutputStream* %"$tmpC", %StringOutputStream* %s, %StringRef* %a1) + call void @dtor.442(%StringOutputStream* %"$tmpC") + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %s, i32 0, i32 0 + call void @ctor.175(%String* %_result, %String* %1) + call void @dtor.442(%StringOutputStream* %s) ret void dumy_block: ; No predecessors! - call void @dtor.454(%StringOutputStream* %s) + call void @dtor.442(%StringOutputStream* %s) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.452(%StringOutputStream* %this) #3 { - %this.addr = alloca %StringOutputStream* - store %StringOutputStream* %this, %StringOutputStream** %this.addr +define internal void @ctor.439(%StringOutputStream* %this) #3 { br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %this.addr - %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 - call void @ctor.137(%String* %2) + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %this, i32 0, i32 0 + call void @ctor.124(%String* %1) ret void } ; Function Attrs: inlinehint nounwind -define internal %StringOutputStream* @"<<"(%StringOutputStream* %s, %StringRef* %x) #4 { - %s.addr = alloca %StringOutputStream* - store %StringOutputStream* %s, %StringOutputStream** %s.addr - %x.addr = alloca %StringRef* - store %StringRef* %x, %StringRef** %x.addr +define internal void @"<<"(%StringOutputStream* sret %_result, %StringOutputStream* %s, %StringRef* %x) #4 { br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %s.addr - %2 = load %StringRef*, %StringRef** %x.addr - %3 = load %StringRef, %StringRef* %2 - call void @"<<<.453"(%StringOutputStream* %1, %StringRef %3) - %4 = load %StringOutputStream*, %StringOutputStream** %s.addr - ret %StringOutputStream* %4 + %1 = load %StringRef, %StringRef* %x + call void @"<<<.440"(%StringOutputStream* %s, %StringRef %1) + call void @ctor.441(%StringOutputStream* %_result, %StringOutputStream* %s) + ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"<<<.453"(%StringOutputStream* %this, %StringRef %s) #3 { - %this.addr = alloca %StringOutputStream* - store %StringOutputStream* %this, %StringOutputStream** %this.addr +define internal void @"<<<.440"(%StringOutputStream* %this, %StringRef %s) #3 { %s.addr = alloca %StringRef store %StringRef %s, %StringRef* %s.addr br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %this.addr - %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 - %3 = load %StringRef, %StringRef* %s.addr - call void @append(%String* %2, %StringRef %3) + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %this, i32 0, i32 0 + call void @append(%String* %1, %StringRef* %s.addr) ret void } ; Function Attrs: inlinehint nounwind -define internal void @append(%String* %this, %StringRef %range) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %range.addr = alloca %StringRef - store %StringRef %range, %StringRef* %range.addr +define internal void @append(%String* %this, %StringRef* %range) #4 { %tmp.this = alloca %StringRef br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = load %StringRef, %StringRef* %range.addr - %3 = load %String*, %String** %this.addr - %4 = getelementptr inbounds %String, %String* %3, i32 0, i32 1 - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %4 - %6 = call i8* @bytePtr(%"RawPtr[Char]" %5) - %7 = load %String*, %String** %this.addr - %8 = getelementptr inbounds %String, %String* %7, i32 0, i32 1 - %9 = load %"RawPtr[Char]", %"RawPtr[Char]"* %8 - %10 = call i8* @bytePtr(%"RawPtr[Char]" %9) - call void @ctor.57(%StringRef* %tmp.this, i8* %6, i8* %10) - %11 = load %StringRef, %StringRef* %tmp.this - call void @insertBefore(%String* %1, %StringRef %2, %StringRef %11) + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %2 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %1) + %3 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %4 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %3) + call void @ctor.60(%StringRef* %tmp.this, %UntypedPtr %2, %UntypedPtr %4) + %5 = load %StringRef, %StringRef* %tmp.this + call void @insertBefore(%String* %this, %StringRef* %range, %StringRef %5) + %6 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %6) ret void } ; Function Attrs: inlinehint nounwind -define internal void @insertBefore(%String* %this, %StringRef %range, %StringRef %pos) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %range.addr = alloca %StringRef - store %StringRef %range, %StringRef* %range.addr +define internal void @insertBefore(%String* %this, %StringRef* %range, %StringRef %pos) #4 { %pos.addr = alloca %StringRef store %StringRef %pos, %StringRef* %pos.addr + %rc = alloca %StringRef %n = alloca i64 %index = alloca i64 - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %p = alloca %"RawPtr[Char]" + %"$tmpForRef1" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 %q = alloca %"RawPtr[Char]" - %tmp.this1 = alloca i64 - %"$tmpC2" = alloca %"RawPtr[Char]" + %"$tmpForRef2" = alloca %"RawPtr[Char]" %tmp.this3 = alloca i64 - %"$tmpC4" = alloca %"RawPtr[Char]" + %"$tmpForRef4" = alloca %"RawPtr[Char]" %tmp.this5 = alloca i64 - %"$tmpC6" = alloca %"RawPtr[Char]" - %"$tmpC11" = alloca %"RawPtr[Char]" - %"$tmpC12" = alloca %"RawPtr[Char]" - %tmp.this13 = alloca i64 - br label %code - -code: ; preds = %0 - %1 = call i64 @size(%StringRef* %range.addr) - store i64 %1, i64* %n - %2 = load %StringRef, %StringRef* %pos.addr - call void @_frontPtr(%"RawPtr[Char]"* %"$tmpC", %StringRef %2) - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %4 = load %String*, %String** %this.addr - %5 = getelementptr inbounds %String, %String* %4, i32 0, i32 0 - %6 = load %"RawPtr[Char]", %"RawPtr[Char]"* %5 - %7 = call i64 @diff(%"RawPtr[Char]" %3, %"RawPtr[Char]" %6) - store i64 %7, i64* %index - %8 = load %String*, %String** %this.addr - %9 = load %String*, %String** %this.addr - %10 = call i64 @size.190(%String* %9) - %11 = load i64, i64* %n - %12 = add i64 %10, %11 - call void @reserve(%String* %8, i64 %12) - %13 = load %String*, %String** %this.addr - %14 = getelementptr inbounds %String, %String* %13, i32 0, i32 1 - %15 = load %"RawPtr[Char]", %"RawPtr[Char]"* %14 + %"$tmpForRef6" = alloca %"RawPtr[Char]" + %tmp.this7 = alloca i64 + %"$tmpForRef8" = alloca %"RawPtr[Char]" + %"$tmpForRef13" = alloca %"RawPtr[Char]" + %"$tmpForRef14" = alloca %"RawPtr[Char]" + %tmp.this15 = alloca i64 + br label %code + +code: ; preds = %0 + %1 = load %StringRef, %StringRef* %range + call void @ctor.59(%StringRef* %rc, %StringRef %1) + %2 = load %StringRef, %StringRef* %range + %3 = call i64 @size(%StringRef %2) + store i64 %3, i64* %n + %4 = load %StringRef, %StringRef* %pos.addr + %5 = call %"RawPtr[Char]" @_frontPtr(%StringRef %4) + store %"RawPtr[Char]" %5, %"RawPtr[Char]"* %"$tmpForRef" + %6 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %7 = load %"RawPtr[Char]", %"RawPtr[Char]"* %6 + %8 = call i64 @diff(%"RawPtr[Char]"* %"$tmpForRef", %"RawPtr[Char]" %7) + store i64 %8, i64* %index + %9 = call i64 @size.176(%String* %this) + %10 = load i64, i64* %n + %11 = add i64 %9, %10 + call void @reserve(%String* %this, i64 %11) + %12 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 store i64 -1, i64* %tmp.this - %16 = load i64, i64* %tmp.this - call void @advance(%"RawPtr[Char]"* %p, %"RawPtr[Char]" %15, i64 %16) - %17 = load %String*, %String** %this.addr - %18 = getelementptr inbounds %String, %String* %17, i32 0, i32 0 - %19 = load %"RawPtr[Char]", %"RawPtr[Char]"* %18 - %20 = load i64, i64* %index - store i64 1, i64* %tmp.this1 - %21 = load i64, i64* %tmp.this1 - %22 = call i64 @_DiffType_opMinus(i64 %20, i64 %21) - call void @advance(%"RawPtr[Char]"* %q, %"RawPtr[Char]" %19, i64 %22) + %13 = load i64, i64* %tmp.this + %14 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %12, i64 %13) + store %"RawPtr[Char]" %14, %"RawPtr[Char]"* %"$tmpForRef1" + call void @ctor.178(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpForRef1") + %15 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %16 = load i64, i64* %index + store i64 1, i64* %tmp.this3 + %17 = load i64, i64* %tmp.this3 + %18 = call i64 @_DiffType_opMinus(i64 %16, i64 %17) + %19 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %15, i64 %18) + store %"RawPtr[Char]" %19, %"RawPtr[Char]"* %"$tmpForRef2" + call void @ctor.178(%"RawPtr[Char]"* %q, %"RawPtr[Char]"* %"$tmpForRef2") br label %while_block while_block: ; preds = %while_step, %code - %23 = call i1 @"==.268"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %q) - %24 = xor i1 true, %23 - br i1 %24, label %while_body, label %while_end + %20 = call i1 @"==.257"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %q) + %21 = xor i1 true, %20 + br i1 %21, label %while_body, label %while_end while_body: ; preds = %while_block - %25 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - %26 = call i8* @value(%"RawPtr[Char]" %25) - %27 = load i8, i8* %26 - %28 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - %29 = load i64, i64* %n - store i64 %29, i64* %tmp.this3 - %30 = load i64, i64* %tmp.this3 - call void @advance(%"RawPtr[Char]"* %"$tmpC2", %"RawPtr[Char]" %28, i64 %30) - %31 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC2" - %32 = call i8* @value(%"RawPtr[Char]" %31) - store i8 %27, i8* %32 - %33 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - %34 = call i8* @value(%"RawPtr[Char]" %33) - %35 = load i8, i8* %34 + %22 = call i8* @value(%"RawPtr[Char]"* %p) + %23 = load i8, i8* %22 + %24 = load i64, i64* %n + store i64 %24, i64* %tmp.this5 + %25 = load i64, i64* %tmp.this5 + %26 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %p, i64 %25) + store %"RawPtr[Char]" %26, %"RawPtr[Char]"* %"$tmpForRef4" + %27 = call i8* @value(%"RawPtr[Char]"* %"$tmpForRef4") + store i8 %23, i8* %27 + %28 = call i8* @value(%"RawPtr[Char]"* %p) + %29 = load i8, i8* %28 br label %while_step while_step: ; preds = %while_body - %36 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - store i64 -1, i64* %tmp.this5 - %37 = load i64, i64* %tmp.this5 - call void @advance(%"RawPtr[Char]"* %"$tmpC4", %"RawPtr[Char]" %36, i64 %37) - call void @"=.200"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpC4") + store i64 -1, i64* %tmp.this7 + %30 = load i64, i64* %tmp.this7 + %31 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %p, i64 %30) + store %"RawPtr[Char]" %31, %"RawPtr[Char]"* %"$tmpForRef6" + call void @"=.186"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpForRef6") br label %while_block while_end: ; preds = %while_block - %38 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - call void @advance.269(%"RawPtr[Char]"* %"$tmpC6", %"RawPtr[Char]" %38) - call void @"=.200"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpC6") - br label %while_block7 + %32 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %p) + store %"RawPtr[Char]" %32, %"RawPtr[Char]"* %"$tmpForRef8" + call void @"=.186"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpForRef8") + br label %while_block9 -while_block7: ; preds = %while_step9, %while_end - %39 = call i1 @isEmpty(%StringRef* %range.addr) - %40 = xor i1 true, %39 - br i1 %40, label %while_body8, label %while_end10 - -while_body8: ; preds = %while_block7 - %41 = call i8* @front(%StringRef* %range.addr) - %42 = load i8, i8* %41 - %43 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - %44 = call i8* @value(%"RawPtr[Char]" %43) - store i8 %42, i8* %44 - %45 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - call void @advance.269(%"RawPtr[Char]"* %"$tmpC11", %"RawPtr[Char]" %45) - call void @"=.200"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpC11") - call void @popFront(%StringRef* %range.addr) - br label %while_step9 - -while_step9: ; preds = %while_body8 - br label %while_block7 - -while_end10: ; preds = %while_block7 - %46 = load %String*, %String** %this.addr - %47 = getelementptr inbounds %String, %String* %46, i32 0, i32 1 - %48 = load %String*, %String** %this.addr - %49 = getelementptr inbounds %String, %String* %48, i32 0, i32 1 - %50 = load %"RawPtr[Char]", %"RawPtr[Char]"* %49 - %51 = load i64, i64* %n - store i64 %51, i64* %tmp.this13 - %52 = load i64, i64* %tmp.this13 - call void @advance(%"RawPtr[Char]"* %"$tmpC12", %"RawPtr[Char]" %50, i64 %52) - call void @"=.200"(%"RawPtr[Char]"* %47, %"RawPtr[Char]"* %"$tmpC12") - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @dtor.454(%StringOutputStream* %this) #3 { - %this.addr = alloca %StringOutputStream* - store %StringOutputStream* %this, %StringOutputStream** %this.addr +while_block9: ; preds = %while_step11, %while_end + %33 = load %StringRef, %StringRef* %rc + %34 = call i1 @isEmpty(%StringRef %33) + %35 = xor i1 true, %34 + br i1 %35, label %while_body10, label %while_end12 + +while_body10: ; preds = %while_block9 + %36 = load %StringRef, %StringRef* %rc + %37 = call i8* @front(%StringRef %36) + %38 = load i8, i8* %37 + %39 = call i8* @value(%"RawPtr[Char]"* %p) + store i8 %38, i8* %39 + %40 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %p) + store %"RawPtr[Char]" %40, %"RawPtr[Char]"* %"$tmpForRef13" + call void @"=.186"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpForRef13") + call void @popFront(%StringRef* %rc) + br label %while_step11 + +while_step11: ; preds = %while_body10 + br label %while_block9 + +while_end12: ; preds = %while_block9 + %41 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %42 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %43 = load i64, i64* %n + store i64 %43, i64* %tmp.this15 + %44 = load i64, i64* %tmp.this15 + %45 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %42, i64 %44) + store %"RawPtr[Char]" %45, %"RawPtr[Char]"* %"$tmpForRef14" + call void @"=.186"(%"RawPtr[Char]"* %41, %"RawPtr[Char]"* %"$tmpForRef14") + %46 = load %StringRef, %StringRef* %rc + call void @dtor.61(%StringRef %46) + ret void +} + +; Function Attrs: alwaysinline nounwind +define internal void @ctor.441(%StringOutputStream* %this, %StringOutputStream* %other) #3 { + %other.addr = alloca %StringOutputStream* + store %StringOutputStream* %other, %StringOutputStream** %other.addr br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %this.addr - %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 - call void @dtor.261(%String* %2) + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %this, i32 0, i32 0 + %2 = load %StringOutputStream*, %StringOutputStream** %other.addr + %3 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %2, i32 0, i32 0 + call void @ctor.175(%String* %1, %String* %3) + ret void +} + +; Function Attrs: alwaysinline nounwind +define internal void @dtor.442(%StringOutputStream* %this) #3 { + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %this, i32 0, i32 0 + call void @dtor.250(%String* %1) ret void } ; Function Attrs: inlinehint nounwind -define internal void @advanceIf.455(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"$lambdaEnclosureData.1" %pred) #4 { - %range.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %pred.addr = alloca %"$lambdaEnclosureData.1" - store %"$lambdaEnclosureData.1" %pred, %"$lambdaEnclosureData.1"* %pred.addr +define internal void @advanceIf.443(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"$lambdaEnclosureData.1"* %pred) #4 { + %"$tmpForRef" = alloca i8 br label %code code: ; preds = %0 br label %while_block while_block: ; preds = %while_step, %code - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %2 = call i1 @isEmpty.414(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) - %3 = xor i1 true, %2 - br i1 %3, label %cond.true, label %cond.false + %1 = call i1 @isEmpty.401(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) + %2 = xor i1 true, %1 + br i1 %2, label %cond.true, label %cond.false while_body: ; preds = %cond.end - %4 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4) + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) br label %while_step while_step: ; preds = %while_body @@ -15744,37 +13931,33 @@ while_end: ; preds = %cond.end ret void cond.true: ; preds = %while_block - %5 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %6 = call i8 @front.419(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) - %7 = call i1 @"().456"(%"$lambdaEnclosureData.1"* %pred.addr, i8 %6) + %3 = call i8 @front.406(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) + store i8 %3, i8* %"$tmpForRef" + %4 = call i1 @"().444"(%"$lambdaEnclosureData.1"* %pred, i8* %"$tmpForRef") br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %7, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %4, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end } ; Function Attrs: alwaysinline nounwind -define internal i1 @"().456"(%"$lambdaEnclosureData.1"* %this, i8 %c) #3 { +define internal i1 @"().444"(%"$lambdaEnclosureData.1"* %this, i8* %c) #3 { %this.addr = alloca %"$lambdaEnclosureData.1"* store %"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"** %this.addr - %c.addr = alloca i8 - store i8 %c, i8* %c.addr br label %code code: ; preds = %0 - %1 = load i8, i8* %c.addr + %1 = load i8, i8* %c %2 = icmp eq i8 %1, 9 ret i1 %2 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.457(%"$lambdaEnclosureData.1"* %this) #3 { - %this.addr = alloca %"$lambdaEnclosureData.1"* - store %"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"** %this.addr +define internal void @ctor.445(%"$lambdaEnclosureData.1"* %this) #3 { br label %code code: ; preds = %0 @@ -15782,9 +13965,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.458(%"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"* %other) #3 { - %this.addr = alloca %"$lambdaEnclosureData.1"* - store %"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"** %this.addr +define internal void @ctor.446(%"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"* %other) #3 { %other.addr = alloca %"$lambdaEnclosureData.1"* store %"$lambdaEnclosureData.1"* %other, %"$lambdaEnclosureData.1"** %other.addr br label %code @@ -15794,9 +13975,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.459(%"$lambdaEnclosureData.1"* %this) #3 { - %this.addr = alloca %"$lambdaEnclosureData.1"* - store %"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"** %this.addr +define internal void @dtor.447(%"$lambdaEnclosureData.1"* %this) #3 { br label %code code: ; preds = %0 @@ -15804,9 +13983,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.460"(%"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"* %other) #3 { - %this.addr = alloca %"$lambdaEnclosureData.1"* - store %"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"** %this.addr +define internal void @"=.448"(%"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"* %other) #3 { %other.addr = alloca %"$lambdaEnclosureData.1"* store %"$lambdaEnclosureData.1"* %other, %"$lambdaEnclosureData.1"** %other.addr br label %code @@ -15816,7 +13993,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.461"(%"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"* %other) #3 { +define internal i1 @"==.449"(%"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"* %other) #3 { %this.addr = alloca %"$lambdaEnclosureData.1"* store %"$lambdaEnclosureData.1"* %this, %"$lambdaEnclosureData.1"** %this.addr %other.addr = alloca %"$lambdaEnclosureData.1"* @@ -15828,25 +14005,20 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @advanceIf.462(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"$lambdaEnclosureData.2" %pred) #4 { - %range.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %pred.addr = alloca %"$lambdaEnclosureData.2" - store %"$lambdaEnclosureData.2" %pred, %"$lambdaEnclosureData.2"* %pred.addr +define internal void @advanceIf.450(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"$lambdaEnclosureData.2"* %pred) #4 { + %"$tmpForRef" = alloca i8 br label %code code: ; preds = %0 br label %while_block while_block: ; preds = %while_step, %code - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %2 = call i1 @isEmpty.414(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) - %3 = xor i1 true, %2 - br i1 %3, label %cond.true, label %cond.false + %1 = call i1 @isEmpty.401(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) + %2 = xor i1 true, %1 + br i1 %2, label %cond.true, label %cond.false while_body: ; preds = %cond.end - %4 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4) + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) br label %while_step while_step: ; preds = %while_body @@ -15856,37 +14028,33 @@ while_end: ; preds = %cond.end ret void cond.true: ; preds = %while_block - %5 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - %6 = call i8 @front.419(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) - %7 = call i1 @"().463"(%"$lambdaEnclosureData.2"* %pred.addr, i8 %6) + %3 = call i8 @front.406(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) + store i8 %3, i8* %"$tmpForRef" + %4 = call i1 @"().451"(%"$lambdaEnclosureData.2"* %pred, i8* %"$tmpForRef") br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %7, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %4, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end } ; Function Attrs: alwaysinline nounwind -define internal i1 @"().463"(%"$lambdaEnclosureData.2"* %this, i8 %c) #3 { +define internal i1 @"().451"(%"$lambdaEnclosureData.2"* %this, i8* %c) #3 { %this.addr = alloca %"$lambdaEnclosureData.2"* store %"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"** %this.addr - %c.addr = alloca i8 - store i8 %c, i8* %c.addr br label %code code: ; preds = %0 - %1 = load i8, i8* %c.addr + %1 = load i8, i8* %c %2 = icmp ne i8 %1, 10 ret i1 %2 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.464(%"$lambdaEnclosureData.2"* %this) #3 { - %this.addr = alloca %"$lambdaEnclosureData.2"* - store %"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"** %this.addr +define internal void @ctor.452(%"$lambdaEnclosureData.2"* %this) #3 { br label %code code: ; preds = %0 @@ -15894,9 +14062,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.465(%"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"* %other) #3 { - %this.addr = alloca %"$lambdaEnclosureData.2"* - store %"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"** %this.addr +define internal void @ctor.453(%"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"* %other) #3 { %other.addr = alloca %"$lambdaEnclosureData.2"* store %"$lambdaEnclosureData.2"* %other, %"$lambdaEnclosureData.2"** %other.addr br label %code @@ -15906,9 +14072,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.466(%"$lambdaEnclosureData.2"* %this) #3 { - %this.addr = alloca %"$lambdaEnclosureData.2"* - store %"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"** %this.addr +define internal void @dtor.454(%"$lambdaEnclosureData.2"* %this) #3 { br label %code code: ; preds = %0 @@ -15916,9 +14080,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.467"(%"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"* %other) #3 { - %this.addr = alloca %"$lambdaEnclosureData.2"* - store %"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"** %this.addr +define internal void @"=.455"(%"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"* %other) #3 { %other.addr = alloca %"$lambdaEnclosureData.2"* store %"$lambdaEnclosureData.2"* %other, %"$lambdaEnclosureData.2"** %other.addr br label %code @@ -15928,7 +14090,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.468"(%"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"* %other) #3 { +define internal i1 @"==.456"(%"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"* %other) #3 { %this.addr = alloca %"$lambdaEnclosureData.2"* store %"$lambdaEnclosureData.2"* %this, %"$lambdaEnclosureData.2"** %this.addr %other.addr = alloca %"$lambdaEnclosureData.2"* @@ -15940,9 +14102,7 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @advance.469(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, i64 %n) #4 { - %range.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr +define internal void @advance.457(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr %tmp.this = alloca i64 @@ -15959,8 +14119,7 @@ while_block: ; preds = %while_step, %code br i1 %3, label %while_body, label %while_end while_body: ; preds = %while_block - %4 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %range.addr - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4) + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %range) br label %while_step while_step: ; preds = %while_body @@ -15971,102 +14130,83 @@ while_end: ; preds = %while_block } ; Function Attrs: inlinehint nounwind -define internal i8 @"pre_++.470"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) #4 { - %r.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr +define internal i8 @"pre_++.458"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) #4 { br label %code code: ; preds = %0 - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) - %2 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %3 = call i8 @front.419(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2) - ret i8 %3 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + %1 = call i8 @front.406(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + ret i8 %1 } ; Function Attrs: inlinehint nounwind define internal i1 @"pre_!"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) #4 { - %r.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr br label %code code: ; preds = %0 - %1 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %2 = call i1 @isEmpty.414(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) - ret i1 %2 + %1 = call i1 @isEmpty.401(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + ret i1 %1 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.471(%String* %this, %StringRef* %other) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %other.addr = alloca %StringRef* - store %StringRef* %other, %StringRef** %other.addr +define internal void @ctor.459(%String* %this, %StringRef %other) #4 { + %other.addr = alloca %StringRef + store %StringRef %other, %StringRef* %other.addr %size = alloca i64 + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %StringRef*, %StringRef** %other.addr - %2 = call i64 @size(%StringRef* %1) + %1 = load %StringRef, %StringRef* %other.addr + %2 = call i64 @size(%StringRef %1) store i64 %2, i64* %size - %3 = load %String*, %String** %this.addr - %4 = load i64, i64* %size - call void @ctor.191(%String* %3, i64 %4) - %5 = load %String*, %String** %this.addr - %6 = getelementptr inbounds %String, %String* %5, i32 0, i32 0 - %7 = load %"RawPtr[Char]", %"RawPtr[Char]"* %6 - %8 = call i8* @bytePtr(%"RawPtr[Char]" %7) - %9 = load %StringRef*, %StringRef** %other.addr - %10 = getelementptr inbounds %StringRef, %StringRef* %9, i32 0, i32 0 - %11 = load i8*, i8** %10 - %12 = load i64, i64* %size - call void @_spr_memcpy(i8* %8, i8* %11, i64 %12) + %3 = load i64, i64* %size + call void @ctor.177(%String* %this, i64 %3) + %4 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %5 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %4) + %6 = getelementptr inbounds %StringRef, %StringRef* %other.addr, i32 0, i32 0 + %7 = load %UntypedPtr, %UntypedPtr* %6 + call void @ctor.55(%UntypedPtr* %tmp.this, %UntypedPtr %7) + %8 = load %UntypedPtr, %UntypedPtr* %tmp.this + %9 = load i64, i64* %size + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %5, %UntypedPtr %8, i64 %9) ret void } ; Function Attrs: inlinehint nounwind define internal void @parseString(%TokenType* sret %_result, %SparrowScanner* %this, i8 %endChar) #4 { - %_result.addr = alloca %TokenType* - store %TokenType* %_result, %TokenType** %_result.addr - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr %endChar.addr = alloca i8 store i8 %endChar, i8* %endChar.addr %tmp.this = alloca i32 %tmp.this1 = alloca %String - %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef %tmp.this8 = alloca %String - %"$tmpForRef9" = alloca %StringRef - %tmp.StringRef10 = alloca %StringRef + %tmp.StringRef9 = alloca %StringRef br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2) + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) br label %if_block if_block: ; preds = %code - %3 = load %SparrowScanner*, %SparrowScanner** %this.addr store i32 1, i32* %tmp.this - %4 = load i32, i32* %tmp.this - %5 = call i1 @hasLessThan(%SparrowScanner* %3, i32 %4) - br i1 %5, label %if_then, label %if_end + %2 = load i32, i32* %tmp.this + %3 = call i1 @hasLessThan(%SparrowScanner* %this, i32 %2) + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block - %6 = load %SparrowScanner*, %SparrowScanner** %this.addr - %7 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %8 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.10, i32 0, i32 0), i8** %7 - store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.10, i32 0, i32 39), i8** %8 - %9 = load %StringRef, %StringRef* %tmp.StringRef - store %StringRef %9, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %tmp.this1, %StringRef* %"$tmpForRef") - call void @reportError(%SparrowScanner* %6, %String* %tmp.this1) - call void @dtor.261(%String* %tmp.this1) - %10 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %10, i32 0) + %4 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %5 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %6 = bitcast %UntypedPtr* %4 to i8** + %7 = bitcast %UntypedPtr* %5 to i8** + store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.10, i32 0, i32 0), i8** %6 + store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.10, i32 0, i32 39), i8** %7 + %8 = load %StringRef, %StringRef* %tmp.StringRef + call void @ctor.459(%String* %tmp.this1, %StringRef %8) + call void @reportError(%SparrowScanner* %this, %String* %tmp.this1) + call void @dtor.250(%String* %tmp.this1) + call void @ctor.404(%TokenType* %_result, i32 0) ret void if_end: ; preds = %dumy_block, %if_block @@ -16076,10 +14216,9 @@ dumy_block: ; No predecessors! br label %if_end while_block: ; preds = %while_step, %if_end - %11 = load %SparrowScanner*, %SparrowScanner** %this.addr - %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %11, i32 0, i32 2 - %13 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %12) - br i1 %13, label %cond.true, label %cond.false + %9 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %10 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %9) + br i1 %10, label %cond.true, label %cond.false while_body: ; preds = %cond.end br label %if_block2 @@ -16091,92 +14230,79 @@ while_end: ; preds = %cond.end br label %if_block5 cond.true: ; preds = %while_block - %14 = load %SparrowScanner*, %SparrowScanner** %this.addr - %15 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %14, i32 0, i32 2 - %16 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %15) - %17 = load i8, i8* %endChar.addr - %18 = icmp ne i8 %16, %17 + %11 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %12 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %11) + %13 = load i8, i8* %endChar.addr + %14 = icmp ne i8 %12, %13 br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %18, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %14, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end if_block2: ; preds = %while_body - %19 = load %SparrowScanner*, %SparrowScanner** %this.addr - %20 = call i1 @checkEscapeChar(%SparrowScanner* %19) - %21 = xor i1 true, %20 - br i1 %21, label %if_then3, label %if_end4 + %15 = call i1 @checkEscapeChar(%SparrowScanner* %this) + %16 = xor i1 true, %15 + br i1 %16, label %if_then3, label %if_end4 if_then3: ; preds = %if_block2 - %22 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @advanceAndCapture1(%SparrowScanner* %22) + call void @advanceAndCapture1(%SparrowScanner* %this) br label %if_end4 if_end4: ; preds = %if_then3, %if_block2 br label %while_step if_block5: ; preds = %while_end - %23 = load %SparrowScanner*, %SparrowScanner** %this.addr - %24 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %23, i32 0, i32 2 - %25 = call i1 @"pre_!"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %24) - br i1 %25, label %if_then6, label %if_end7 + %17 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %18 = call i1 @"pre_!"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %17) + br i1 %18, label %if_then6, label %if_end7 if_then6: ; preds = %if_block5 - %26 = load %SparrowScanner*, %SparrowScanner** %this.addr - %27 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef10, i32 0, i32 0 - %28 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef10, i32 0, i32 1 - store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.12, i32 0, i32 0), i8** %27 - store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.12, i32 0, i32 39), i8** %28 - %29 = load %StringRef, %StringRef* %tmp.StringRef10 - store %StringRef %29, %StringRef* %"$tmpForRef9" - call void @ctor.471(%String* %tmp.this8, %StringRef* %"$tmpForRef9") - call void @reportError(%SparrowScanner* %26, %String* %tmp.this8) - call void @dtor.261(%String* %tmp.this8) - %30 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %30, i32 0) - ret void - -if_end7: ; preds = %dumy_block11, %if_block5 - %31 = load %SparrowScanner*, %SparrowScanner** %this.addr - %32 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %31, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %32) - %33 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %33, i32 39) + %19 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef9, i32 0, i32 0 + %20 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef9, i32 0, i32 1 + %21 = bitcast %UntypedPtr* %19 to i8** + %22 = bitcast %UntypedPtr* %20 to i8** + store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.12, i32 0, i32 0), i8** %21 + store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.12, i32 0, i32 39), i8** %22 + %23 = load %StringRef, %StringRef* %tmp.StringRef9 + call void @ctor.459(%String* %tmp.this8, %StringRef %23) + call void @reportError(%SparrowScanner* %this, %String* %tmp.this8) + call void @dtor.250(%String* %tmp.this8) + call void @ctor.404(%TokenType* %_result, i32 0) ret void -dumy_block11: ; No predecessors! +if_end7: ; preds = %dumy_block10, %if_block5 + %24 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %24) + call void @ctor.404(%TokenType* %_result, i32 40) + ret void + +dumy_block10: ; No predecessors! br label %if_end7 } ; Function Attrs: inlinehint nounwind define internal i1 @hasLessThan(%SparrowScanner* %this, i32 %n) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr %n.addr = alloca i32 store i32 %n, i32* %n.addr br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - %3 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2, i32 0, i32 0 - %4 = load i32, i32* %n.addr - %5 = call i1 @hasLessThan.472(%"RangeWithLookahead[BufferedCharSourceRange]"* %3, i32 %4) - ret i1 %5 + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 + %3 = load i32, i32* %n.addr + %4 = call i1 @hasLessThan.460(%"RangeWithLookahead[BufferedCharSourceRange]"* %2, i32 %3) + ret i1 %4 } ; Function Attrs: inlinehint nounwind -define internal i1 @hasLessThan.472(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 %n) #4 { - %this.addr = alloca %"RangeWithLookahead[BufferedCharSourceRange]"* - store %"RangeWithLookahead[BufferedCharSourceRange]"* %this, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr +define internal i1 @hasLessThan.460(%"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 %n) #4 { %n.addr = alloca i32 store i32 %n, i32* %n.addr %tmp.this = alloca i64 - %"$tmpForRef" = alloca i8 %tmp.this1 = alloca i64 br label %code @@ -16188,116 +14314,102 @@ while_block: ; preds = %while_step, %code %2 = zext i32 %1 to i64 store i64 %2, i64* %tmp.this %3 = load i64, i64* %tmp.this - %4 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %5 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %4, i32 0, i32 1 - %6 = call i64 @size.199(%"Vector[Char]"* %5) - %7 = icmp sge i64 %3, %6 - br i1 %7, label %cond.true, label %cond.false + %4 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %5 = call i64 @size.185(%"Vector[Char]"* %4) + %6 = icmp sge i64 %3, %5 + br i1 %6, label %cond.true, label %cond.false while_body: ; preds = %cond.end - %8 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %9 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %8, i32 0, i32 1 - %10 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %11 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %10, i32 0, i32 0 - %12 = call i8 @"post_++.398"(%BufferedCharSourceRange* %11) - store i8 %12, i8* %"$tmpForRef" - call void @"+="(%"Vector[Char]"* %9, i8* %"$tmpForRef") + %7 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %8 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + %9 = call i8 @"post_++.385"(%BufferedCharSourceRange* %8) + call void @"+="(%"Vector[Char]"* %7, i8 %9) br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %cond.end - %13 = load i32, i32* %n.addr - %14 = zext i32 %13 to i64 - store i64 %14, i64* %tmp.this1 - %15 = load i64, i64* %tmp.this1 - %16 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %17 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %16, i32 0, i32 1 - %18 = call i64 @size.199(%"Vector[Char]"* %17) - %19 = icmp sge i64 %15, %18 - ret i1 %19 + %10 = load i32, i32* %n.addr + %11 = zext i32 %10 to i64 + store i64 %11, i64* %tmp.this1 + %12 = load i64, i64* %tmp.this1 + %13 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 1 + %14 = call i64 @size.185(%"Vector[Char]"* %13) + %15 = icmp sge i64 %12, %14 + ret i1 %15 cond.true: ; preds = %while_block - %20 = load %"RangeWithLookahead[BufferedCharSourceRange]"*, %"RangeWithLookahead[BufferedCharSourceRange]"** %this.addr - %21 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %20, i32 0, i32 0 - %22 = call i1 @"pre_!!"(%BufferedCharSourceRange* %21) + %16 = getelementptr inbounds %"RangeWithLookahead[BufferedCharSourceRange]", %"RangeWithLookahead[BufferedCharSourceRange]"* %this, i32 0, i32 0 + %17 = call i1 @"pre_!!"(%BufferedCharSourceRange* %16) br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %22, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %17, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end } ; Function Attrs: noinline nounwind define i1 @checkEscapeChar(%SparrowScanner* %this) #5 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr %ch = alloca i8 %tmp.this = alloca i32 %tmp.this39 = alloca %String - %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef %charVal = alloca i32 %tmp.this40 = alloca i8 br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - %3 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2) - store i8 %3, i8* %ch + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %2 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) + store i8 %2, i8* %ch br label %if_block if_block: ; preds = %code - %4 = load i8, i8* %ch - %5 = icmp eq i8 %4, 92 - br i1 %5, label %if_then, label %if_end + %3 = load i8, i8* %ch + %4 = icmp eq i8 %3, 92 + br i1 %4, label %if_then, label %if_end if_then: ; preds = %if_block - %6 = load %SparrowScanner*, %SparrowScanner** %this.addr - %7 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %6, i32 0, i32 2 - %8 = call i8 @"pre_++.470"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %7) - store i8 %8, i8* %ch + %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %6 = call i8 @"pre_++.458"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) + store i8 %6, i8* %ch br label %if_block1 if_end: ; preds = %dumy_block41, %if_block ret i1 false if_block1: ; preds = %if_then - %9 = load i8, i8* %ch - %10 = icmp eq i8 %9, 114 - br i1 %10, label %if_then2, label %if_else + %7 = load i8, i8* %ch + %8 = icmp eq i8 %7, 114 + br i1 %8, label %if_then2, label %if_else if_then2: ; preds = %if_block1 - %11 = load %SparrowScanner*, %SparrowScanner** %this.addr - %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %11, i32 0, i32 3 - %13 = getelementptr inbounds %Token, %Token* %12, i32 0, i32 2 - call void @"+=.473"(%String* %13, i8 13) + %9 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %10 = getelementptr inbounds %Token, %Token* %9, i32 0, i32 2 + call void @"+=.461"(%String* %10, i8 13) br label %if_end3 if_else: ; preds = %if_block1 br label %if_block4 if_end3: ; preds = %if_end7, %if_then2 - %14 = load %SparrowScanner*, %SparrowScanner** %this.addr - %15 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %14, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %15) + %11 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %11) ret i1 true if_block4: ; preds = %if_else - %16 = load i8, i8* %ch - %17 = icmp eq i8 %16, 110 - br i1 %17, label %if_then5, label %if_else6 + %12 = load i8, i8* %ch + %13 = icmp eq i8 %12, 110 + br i1 %13, label %if_then5, label %if_else6 if_then5: ; preds = %if_block4 - %18 = load %SparrowScanner*, %SparrowScanner** %this.addr - %19 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %18, i32 0, i32 3 - %20 = getelementptr inbounds %Token, %Token* %19, i32 0, i32 2 - call void @"+=.473"(%String* %20, i8 10) + %14 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %15 = getelementptr inbounds %Token, %Token* %14, i32 0, i32 2 + call void @"+=.461"(%String* %15, i8 10) br label %if_end7 if_else6: ; preds = %if_block4 @@ -16307,15 +14419,14 @@ if_end7: ; preds = %if_end11, %if_then5 br label %if_end3 if_block8: ; preds = %if_else6 - %21 = load i8, i8* %ch - %22 = icmp eq i8 %21, 98 - br i1 %22, label %if_then9, label %if_else10 + %16 = load i8, i8* %ch + %17 = icmp eq i8 %16, 98 + br i1 %17, label %if_then9, label %if_else10 if_then9: ; preds = %if_block8 - %23 = load %SparrowScanner*, %SparrowScanner** %this.addr - %24 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %23, i32 0, i32 3 - %25 = getelementptr inbounds %Token, %Token* %24, i32 0, i32 2 - call void @"+=.473"(%String* %25, i8 8) + %18 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %19 = getelementptr inbounds %Token, %Token* %18, i32 0, i32 2 + call void @"+=.461"(%String* %19, i8 8) br label %if_end11 if_else10: ; preds = %if_block8 @@ -16325,15 +14436,14 @@ if_end11: ; preds = %if_end15, %if_then9 br label %if_end7 if_block12: ; preds = %if_else10 - %26 = load i8, i8* %ch - %27 = icmp eq i8 %26, 102 - br i1 %27, label %if_then13, label %if_else14 + %20 = load i8, i8* %ch + %21 = icmp eq i8 %20, 102 + br i1 %21, label %if_then13, label %if_else14 if_then13: ; preds = %if_block12 - %28 = load %SparrowScanner*, %SparrowScanner** %this.addr - %29 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %28, i32 0, i32 3 - %30 = getelementptr inbounds %Token, %Token* %29, i32 0, i32 2 - call void @"+=.473"(%String* %30, i8 12) + %22 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %23 = getelementptr inbounds %Token, %Token* %22, i32 0, i32 2 + call void @"+=.461"(%String* %23, i8 12) br label %if_end15 if_else14: ; preds = %if_block12 @@ -16343,15 +14453,14 @@ if_end15: ; preds = %if_end19, %if_then1 br label %if_end11 if_block16: ; preds = %if_else14 - %31 = load i8, i8* %ch - %32 = icmp eq i8 %31, 116 - br i1 %32, label %if_then17, label %if_else18 + %24 = load i8, i8* %ch + %25 = icmp eq i8 %24, 116 + br i1 %25, label %if_then17, label %if_else18 if_then17: ; preds = %if_block16 - %33 = load %SparrowScanner*, %SparrowScanner** %this.addr - %34 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %33, i32 0, i32 3 - %35 = getelementptr inbounds %Token, %Token* %34, i32 0, i32 2 - call void @"+=.473"(%String* %35, i8 9) + %26 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %27 = getelementptr inbounds %Token, %Token* %26, i32 0, i32 2 + call void @"+=.461"(%String* %27, i8 9) br label %if_end19 if_else18: ; preds = %if_block16 @@ -16361,15 +14470,14 @@ if_end19: ; preds = %if_end23, %if_then1 br label %if_end15 if_block20: ; preds = %if_else18 - %36 = load i8, i8* %ch - %37 = icmp eq i8 %36, 92 - br i1 %37, label %if_then21, label %if_else22 + %28 = load i8, i8* %ch + %29 = icmp eq i8 %28, 92 + br i1 %29, label %if_then21, label %if_else22 if_then21: ; preds = %if_block20 - %38 = load %SparrowScanner*, %SparrowScanner** %this.addr - %39 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %38, i32 0, i32 3 - %40 = getelementptr inbounds %Token, %Token* %39, i32 0, i32 2 - call void @"+=.473"(%String* %40, i8 92) + %30 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %31 = getelementptr inbounds %Token, %Token* %30, i32 0, i32 2 + call void @"+=.461"(%String* %31, i8 92) br label %if_end23 if_else22: ; preds = %if_block20 @@ -16379,15 +14487,14 @@ if_end23: ; preds = %if_end27, %if_then2 br label %if_end19 if_block24: ; preds = %if_else22 - %41 = load i8, i8* %ch - %42 = icmp eq i8 %41, 39 - br i1 %42, label %if_then25, label %if_else26 + %32 = load i8, i8* %ch + %33 = icmp eq i8 %32, 39 + br i1 %33, label %if_then25, label %if_else26 if_then25: ; preds = %if_block24 - %43 = load %SparrowScanner*, %SparrowScanner** %this.addr - %44 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %43, i32 0, i32 3 - %45 = getelementptr inbounds %Token, %Token* %44, i32 0, i32 2 - call void @"+=.473"(%String* %45, i8 39) + %34 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %35 = getelementptr inbounds %Token, %Token* %34, i32 0, i32 2 + call void @"+=.461"(%String* %35, i8 39) br label %if_end27 if_else26: ; preds = %if_block24 @@ -16397,15 +14504,14 @@ if_end27: ; preds = %if_end31, %if_then2 br label %if_end23 if_block28: ; preds = %if_else26 - %46 = load i8, i8* %ch - %47 = icmp eq i8 %46, 34 - br i1 %47, label %if_then29, label %if_else30 + %36 = load i8, i8* %ch + %37 = icmp eq i8 %36, 34 + br i1 %37, label %if_then29, label %if_else30 if_then29: ; preds = %if_block28 - %48 = load %SparrowScanner*, %SparrowScanner** %this.addr - %49 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %48, i32 0, i32 3 - %50 = getelementptr inbounds %Token, %Token* %49, i32 0, i32 2 - call void @"+=.473"(%String* %50, i8 34) + %38 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %39 = getelementptr inbounds %Token, %Token* %38, i32 0, i32 2 + call void @"+=.461"(%String* %39, i8 34) br label %if_end31 if_else30: ; preds = %if_block28 @@ -16415,21 +14521,19 @@ if_end31: ; preds = %if_end35, %if_then2 br label %if_end27 if_block32: ; preds = %if_else30 - %51 = load i8, i8* %ch - %52 = icmp eq i8 %51, 120 - br i1 %52, label %cond.true, label %cond.false + %40 = load i8, i8* %ch + %41 = icmp eq i8 %40, 120 + br i1 %41, label %cond.true, label %cond.false if_then33: ; preds = %cond.end br label %if_block36 if_else34: ; preds = %cond.end - %53 = load %SparrowScanner*, %SparrowScanner** %this.addr - %54 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %53, i32 0, i32 3 - %55 = getelementptr inbounds %Token, %Token* %54, i32 0, i32 2 - %56 = load %SparrowScanner*, %SparrowScanner** %this.addr - %57 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %56, i32 0, i32 2 - %58 = call i8 @"pre_++.470"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %57) - call void @"+=.473"(%String* %55, i8 %58) + %42 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %43 = getelementptr inbounds %Token, %Token* %42, i32 0, i32 2 + %44 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %45 = call i8 @"pre_++.458"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %44) + call void @"+=.461"(%String* %43, i8 %45) br label %if_end35 if_end35: ; preds = %if_else34, %if_end38 @@ -16439,56 +14543,52 @@ cond.true: ; preds = %if_block32 br label %cond.end cond.false: ; preds = %if_block32 - %59 = load i8, i8* %ch - %60 = icmp eq i8 %59, 88 + %46 = load i8, i8* %ch + %47 = icmp eq i8 %46, 88 br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ true, %cond.true ], [ %60, %cond.false ] + %cond.res = phi i1 [ true, %cond.true ], [ %47, %cond.false ] br i1 %cond.res, label %if_then33, label %if_else34 if_block36: ; preds = %if_then33 - %61 = load %SparrowScanner*, %SparrowScanner** %this.addr store i32 2, i32* %tmp.this - %62 = load i32, i32* %tmp.this - %63 = call i1 @hasLessThan(%SparrowScanner* %61, i32 %62) - br i1 %63, label %if_then37, label %if_end38 + %48 = load i32, i32* %tmp.this + %49 = call i1 @hasLessThan(%SparrowScanner* %this, i32 %48) + br i1 %49, label %if_then37, label %if_end38 if_then37: ; preds = %if_block36 - %64 = load %SparrowScanner*, %SparrowScanner** %this.addr - %65 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %66 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @str.11, i32 0, i32 0), i8** %65 - store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @str.11, i32 0, i32 36), i8** %66 - %67 = load %StringRef, %StringRef* %tmp.StringRef - store %StringRef %67, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %tmp.this39, %StringRef* %"$tmpForRef") - call void @reportError(%SparrowScanner* %64, %String* %tmp.this39) - call void @dtor.261(%String* %tmp.this39) + %50 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %51 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %52 = bitcast %UntypedPtr* %50 to i8** + %53 = bitcast %UntypedPtr* %51 to i8** + store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @str.11, i32 0, i32 0), i8** %52 + store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @str.11, i32 0, i32 36), i8** %53 + %54 = load %StringRef, %StringRef* %tmp.StringRef + call void @ctor.459(%String* %tmp.this39, %StringRef %54) + call void @reportError(%SparrowScanner* %this, %String* %tmp.this39) + call void @dtor.250(%String* %tmp.this39) ret i1 true if_end38: ; preds = %dumy_block, %if_block36 - %68 = load %SparrowScanner*, %SparrowScanner** %this.addr - %69 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %68, i32 0, i32 2 - %70 = call i8 @"pre_++.470"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %69) - %71 = call i32 @getXdigitVal(i8 %70) - %72 = mul i32 16, %71 - store i32 %72, i32* %charVal - %73 = load i32, i32* %charVal - %74 = load %SparrowScanner*, %SparrowScanner** %this.addr - %75 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %74, i32 0, i32 2 - %76 = call i8 @"pre_++.470"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %75) - %77 = call i32 @getXdigitVal(i8 %76) - %78 = add i32 %73, %77 - store i32 %78, i32* %charVal - %79 = load %SparrowScanner*, %SparrowScanner** %this.addr - %80 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %79, i32 0, i32 3 - %81 = getelementptr inbounds %Token, %Token* %80, i32 0, i32 2 - %82 = load i32, i32* %charVal - %83 = trunc i32 %82 to i8 - store i8 %83, i8* %tmp.this40 - %84 = load i8, i8* %tmp.this40 - call void @"+=.473"(%String* %81, i8 %84) + %55 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %56 = call i8 @"pre_++.458"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %55) + %57 = call i32 @getXdigitVal(i8 %56) + %58 = mul i32 16, %57 + store i32 %58, i32* %charVal + %59 = load i32, i32* %charVal + %60 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %61 = call i8 @"pre_++.458"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %60) + %62 = call i32 @getXdigitVal(i8 %61) + %63 = add i32 %59, %62 + store i32 %63, i32* %charVal + %64 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %65 = getelementptr inbounds %Token, %Token* %64, i32 0, i32 2 + %66 = load i32, i32* %charVal + %67 = trunc i32 %66 to i8 + store i8 %67, i8* %tmp.this40 + %68 = load i8, i8* %tmp.this40 + call void @"+=.461"(%String* %65, i8 %68) br label %if_end35 dumy_block: ; No predecessors! @@ -16499,86 +14599,73 @@ dumy_block41: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal void @"+=.473"(%String* %this, i8 %value) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal void @"+=.461"(%String* %this, i8 %value) #4 { %value.addr = alloca i8 store i8 %value, i8* %value.addr br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = load i8, i8* %value.addr - call void @pushBack.474(%String* %1, i8 %2) + %1 = load i8, i8* %value.addr + call void @pushBack.462(%String* %this, i8 %1) ret void } ; Function Attrs: inlinehint nounwind -define internal void @pushBack.474(%String* %this, i8 %value) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal void @pushBack.462(%String* %this, i8 %value) #4 { %value.addr = alloca i8 store i8 %value, i8* %value.addr %t = alloca i64 %tmp.this = alloca i64 %tmp.this4 = alloca i64 %tmp.this5 = alloca i64 - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 1 - %3 = load %String*, %String** %this.addr - %4 = getelementptr inbounds %String, %String* %3, i32 0, i32 2 - %5 = call i1 @"==.268"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) - br i1 %5, label %if_then, label %if_end + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %2 = getelementptr inbounds %String, %String* %this, i32 0, i32 2 + %3 = call i1 @"==.257"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %2) + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block store i64 2, i64* %tmp.this - %6 = load i64, i64* %tmp.this - %7 = load %String*, %String** %this.addr - %8 = call i64 @capacity(%String* %7) - %9 = mul i64 %6, %8 - store i64 %9, i64* %t + %4 = load i64, i64* %tmp.this + %5 = call i64 @capacity(%String* %this) + %6 = mul i64 %4, %5 + store i64 %6, i64* %t br label %if_block1 if_end: ; preds = %if_end3, %if_block - %10 = load i8, i8* %value.addr - %11 = load %String*, %String** %this.addr - %12 = getelementptr inbounds %String, %String* %11, i32 0, i32 1 - %13 = load %"RawPtr[Char]", %"RawPtr[Char]"* %12 - %14 = call i8* @value(%"RawPtr[Char]" %13) - store i8 %10, i8* %14 - %15 = load %String*, %String** %this.addr - %16 = getelementptr inbounds %String, %String* %15, i32 0, i32 1 - %17 = load %String*, %String** %this.addr - %18 = getelementptr inbounds %String, %String* %17, i32 0, i32 1 - %19 = load %"RawPtr[Char]", %"RawPtr[Char]"* %18 - call void @advance.269(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %19) - call void @"=.200"(%"RawPtr[Char]"* %16, %"RawPtr[Char]"* %"$tmpC") + %7 = load i8, i8* %value.addr + %8 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %9 = call i8* @value(%"RawPtr[Char]"* %8) + store i8 %7, i8* %9 + %10 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %11 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %12 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %11) + store %"RawPtr[Char]" %12, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %10, %"RawPtr[Char]"* %"$tmpForRef") ret void if_block1: ; preds = %if_then - %20 = load i64, i64* %t + %13 = load i64, i64* %t store i64 2, i64* %tmp.this4 - %21 = load i64, i64* %tmp.this4 - %22 = icmp slt i64 %20, %21 - br i1 %22, label %if_then2, label %if_end3 + %14 = load i64, i64* %tmp.this4 + %15 = icmp slt i64 %13, %14 + br i1 %15, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i64 2, i64* %tmp.this5 - %23 = load i64, i64* %tmp.this5 - store i64 %23, i64* %t + %16 = load i64, i64* %tmp.this5 + store i64 %16, i64* %t br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 - %24 = load %String*, %String** %this.addr - %25 = load i64, i64* %t - call void @reserve(%String* %24, i64 %25) + %17 = load i64, i64* %t + call void @reserve(%String* %this, i64 %17) br label %if_end } @@ -16684,54 +14771,41 @@ declare i32 @tolower(i32) ; Function Attrs: inlinehint nounwind define internal void @advanceAndCapture1(%SparrowScanner* %this) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 3 - %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 2 - %4 = load %SparrowScanner*, %SparrowScanner** %this.addr - %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %4, i32 0, i32 2 - %6 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) - call void @"+=.473"(%String* %3, i8 %6) - %7 = load %SparrowScanner*, %SparrowScanner** %this.addr - %8 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %7, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %8) + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %2 = getelementptr inbounds %Token, %Token* %1, i32 0, i32 2 + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %4 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %3) + call void @"+=.461"(%String* %2, i8 %4) + %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) ret void } ; Function Attrs: inlinehint nounwind define internal void @parseStringNE(%TokenType* sret %_result, %SparrowScanner* %this) #4 { - %_result.addr = alloca %TokenType* - store %TokenType* %_result, %TokenType** %_result.addr - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr %tmp.this = alloca i64 %tmp.this5 = alloca %String - %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef %tmp.this6 = alloca i64 br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 2, i64* %tmp.this - %3 = load i64, i64* %tmp.this - call void @advance.469(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2, i64 %3) + %2 = load i64, i64* %tmp.this + call void @advance.457(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i64 %2) br label %while_block while_block: ; preds = %while_step, %code - %4 = load %SparrowScanner*, %SparrowScanner** %this.addr - %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %4, i32 0, i32 2 - %6 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) - br i1 %6, label %cond.true, label %cond.false + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %4 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %3) + br i1 %4, label %cond.true, label %cond.false while_body: ; preds = %cond.end - %7 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @advanceAndCapture1(%SparrowScanner* %7) + call void @advanceAndCapture1(%SparrowScanner* %this) br label %while_step while_step: ; preds = %while_body @@ -16741,62 +14815,56 @@ while_end: ; preds = %cond.end br label %if_block cond.true: ; preds = %while_block - %8 = load %SparrowScanner*, %SparrowScanner** %this.addr - %9 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %8, i32 0, i32 2 - %10 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %9) - %11 = icmp eq i8 %10, 125 - br i1 %11, label %cond.true1, label %cond.false2 + %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %6 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) + %7 = icmp eq i8 %6, 125 + br i1 %7, label %cond.true1, label %cond.false2 cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.end3 - %cond.res4 = phi i1 [ %15, %cond.end3 ], [ false, %cond.false ] + %cond.res4 = phi i1 [ %10, %cond.end3 ], [ false, %cond.false ] br i1 %cond.res4, label %while_body, label %while_end cond.true1: ; preds = %cond.true - %12 = load %SparrowScanner*, %SparrowScanner** %this.addr - %13 = call i8 @peekChar(%SparrowScanner* %12) - %14 = icmp eq i8 %13, 62 + %8 = call i8 @peekChar(%SparrowScanner* %this) + %9 = icmp eq i8 %8, 62 br label %cond.end3 cond.false2: ; preds = %cond.true br label %cond.end3 cond.end3: ; preds = %cond.false2, %cond.true1 - %cond.res = phi i1 [ %14, %cond.true1 ], [ false, %cond.false2 ] - %15 = xor i1 true, %cond.res + %cond.res = phi i1 [ %9, %cond.true1 ], [ false, %cond.false2 ] + %10 = xor i1 true, %cond.res br label %cond.end if_block: ; preds = %while_end - %16 = load %SparrowScanner*, %SparrowScanner** %this.addr - %17 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %16, i32 0, i32 2 - %18 = call i1 @"pre_!"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %17) - br i1 %18, label %if_then, label %if_end + %11 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %12 = call i1 @"pre_!"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %11) + br i1 %12, label %if_then, label %if_end if_then: ; preds = %if_block - %19 = load %SparrowScanner*, %SparrowScanner** %this.addr - %20 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %21 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.13, i32 0, i32 0), i8** %20 - store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.13, i32 0, i32 39), i8** %21 - %22 = load %StringRef, %StringRef* %tmp.StringRef - store %StringRef %22, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %tmp.this5, %StringRef* %"$tmpForRef") - call void @reportError(%SparrowScanner* %19, %String* %tmp.this5) - call void @dtor.261(%String* %tmp.this5) - %23 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %23, i32 0) + %13 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %14 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %15 = bitcast %UntypedPtr* %13 to i8** + %16 = bitcast %UntypedPtr* %14 to i8** + store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.13, i32 0, i32 0), i8** %15 + store i8* getelementptr inbounds ([40 x i8], [40 x i8]* @str.13, i32 0, i32 39), i8** %16 + %17 = load %StringRef, %StringRef* %tmp.StringRef + call void @ctor.459(%String* %tmp.this5, %StringRef %17) + call void @reportError(%SparrowScanner* %this, %String* %tmp.this5) + call void @dtor.250(%String* %tmp.this5) + call void @ctor.404(%TokenType* %_result, i32 0) ret void if_end: ; preds = %dumy_block, %if_block - %24 = load %SparrowScanner*, %SparrowScanner** %this.addr - %25 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %24, i32 0, i32 2 + %18 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 2, i64* %tmp.this6 - %26 = load i64, i64* %tmp.this6 - call void @advance.469(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %25, i64 %26) - %27 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %27, i32 39) + %19 = load i64, i64* %tmp.this6 + call void @advance.457(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %18, i64 %19) + call void @ctor.404(%TokenType* %_result, i32 40) ret void dumy_block: ; No predecessors! @@ -17057,36 +15125,35 @@ cond.end: ; preds = %cond.false, %cond.t ; Function Attrs: inlinehint nounwind define internal i1 @parseOperator(%SparrowScanner* %this) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr %ch = alloca i8 + %"$tmpForRef" = alloca %"FunctionPtr1[Bool, Char]" %funptr = alloca i1 (i8)* %i = alloca i32 %c = alloca i8 %tmp.this = alloca i32 %tmp.this4 = alloca i32 %hasOtherDot = alloca i1 - %funptr8 = alloca i1 (i8)* + %"$tmpForRef8" = alloca %"FunctionPtr1[Bool, Char]" + %funptr9 = alloca i1 (i8)* br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - %3 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2) - store i8 %3, i8* %ch + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %2 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) + store i8 %2, i8* %ch br label %if_block if_block: ; preds = %code - %4 = load i8, i8* %ch - %5 = call i1 @isOpChar(i8 %4) - br i1 %5, label %if_then, label %if_end + %3 = load i8, i8* %ch + %4 = call i1 @isOpChar(i8 %3) + br i1 %4, label %if_then, label %if_end if_then: ; preds = %if_block - %6 = load %SparrowScanner*, %SparrowScanner** %this.addr store i1 (i8)* @isOpCharDot, i1 (i8)** %funptr - %7 = bitcast i1 (i8)** %funptr to %"FunctionPtr1[Bool, Char]"* - %8 = load %"FunctionPtr1[Bool, Char]", %"FunctionPtr1[Bool, Char]"* %7 - call void @advanceAndCapture(%SparrowScanner* %6, %"FunctionPtr1[Bool, Char]" %8) + %5 = bitcast i1 (i8)** %funptr to %"FunctionPtr1[Bool, Char]"* + %6 = load %"FunctionPtr1[Bool, Char]", %"FunctionPtr1[Bool, Char]"* %5 + store %"FunctionPtr1[Bool, Char]" %6, %"FunctionPtr1[Bool, Char]"* %"$tmpForRef" + call void @advanceAndCapture(%SparrowScanner* %this, %"FunctionPtr1[Bool, Char]"* %"$tmpForRef") ret i1 true if_end: ; preds = %dumy_block, %if_block @@ -17096,148 +15163,131 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %9 = load i8, i8* %ch - %10 = icmp eq i8 %9, 46 - br i1 %10, label %if_then2, label %if_end3 + %7 = load i8, i8* %ch + %8 = icmp eq i8 %7, 46 + br i1 %8, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i32 1, i32* %i - %11 = load %SparrowScanner*, %SparrowScanner** %this.addr - %12 = load i32, i32* %i - store i32 %12, i32* %tmp.this - %13 = load i32, i32* %tmp.this - %14 = call i8 @peekChar.476(%SparrowScanner* %11, i32 %13) - store i8 %14, i8* %c + %9 = load i32, i32* %i + store i32 %9, i32* %tmp.this + %10 = load i32, i32* %tmp.this + %11 = call i8 @peekChar.464(%SparrowScanner* %this, i32 %10) + store i8 %11, i8* %c br label %while_block if_end3: ; preds = %if_end7, %if_block1 ret i1 false while_block: ; preds = %while_step, %if_then2 - %15 = load i8, i8* %c - %16 = call i1 @isOpChar(i8 %15) - br i1 %16, label %while_body, label %while_end + %12 = load i8, i8* %c + %13 = call i1 @isOpChar(i8 %12) + br i1 %13, label %while_body, label %while_end while_body: ; preds = %while_block - %17 = load %SparrowScanner*, %SparrowScanner** %this.addr - %18 = call i32 @"pre_++.21"(i32* %i) - store i32 %18, i32* %tmp.this4 - %19 = load i32, i32* %tmp.this4 - %20 = call i8 @peekChar.476(%SparrowScanner* %17, i32 %19) - store i8 %20, i8* %c + %14 = call i32 @"pre_++.21"(i32* %i) + store i32 %14, i32* %tmp.this4 + %15 = load i32, i32* %tmp.this4 + %16 = call i8 @peekChar.464(%SparrowScanner* %this, i32 %15) + store i8 %16, i8* %c br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - %21 = load i8, i8* %c - %22 = icmp eq i8 %21, 46 - store i1 %22, i1* %hasOtherDot + %17 = load i8, i8* %c + %18 = icmp eq i8 %17, 46 + store i1 %18, i1* %hasOtherDot br label %if_block5 if_block5: ; preds = %while_end - %23 = load i1, i1* %hasOtherDot - br i1 %23, label %if_then6, label %if_end7 + %19 = load i1, i1* %hasOtherDot + br i1 %19, label %if_then6, label %if_end7 if_then6: ; preds = %if_block5 - %24 = load %SparrowScanner*, %SparrowScanner** %this.addr - store i1 (i8)* @isOpCharDot, i1 (i8)** %funptr8 - %25 = bitcast i1 (i8)** %funptr8 to %"FunctionPtr1[Bool, Char]"* - %26 = load %"FunctionPtr1[Bool, Char]", %"FunctionPtr1[Bool, Char]"* %25 - call void @advanceAndCapture(%SparrowScanner* %24, %"FunctionPtr1[Bool, Char]" %26) + store i1 (i8)* @isOpCharDot, i1 (i8)** %funptr9 + %20 = bitcast i1 (i8)** %funptr9 to %"FunctionPtr1[Bool, Char]"* + %21 = load %"FunctionPtr1[Bool, Char]", %"FunctionPtr1[Bool, Char]"* %20 + store %"FunctionPtr1[Bool, Char]" %21, %"FunctionPtr1[Bool, Char]"* %"$tmpForRef8" + call void @advanceAndCapture(%SparrowScanner* %this, %"FunctionPtr1[Bool, Char]"* %"$tmpForRef8") ret i1 true -if_end7: ; preds = %dumy_block9, %if_block5 +if_end7: ; preds = %dumy_block10, %if_block5 br label %if_end3 -dumy_block9: ; No predecessors! +dumy_block10: ; No predecessors! br label %if_end7 } ; Function Attrs: inlinehint nounwind -define internal void @advanceAndCapture(%SparrowScanner* %this, %"FunctionPtr1[Bool, Char]" %pred) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr - %pred.addr = alloca %"FunctionPtr1[Bool, Char]" - store %"FunctionPtr1[Bool, Char]" %pred, %"FunctionPtr1[Bool, Char]"* %pred.addr +define internal void @advanceAndCapture(%SparrowScanner* %this, %"FunctionPtr1[Bool, Char]"* %pred) #4 { br label %code code: ; preds = %0 br label %while_block while_block: ; preds = %while_step, %code - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - %3 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2) - br i1 %3, label %cond.true, label %cond.false + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %2 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) + br i1 %2, label %cond.true, label %cond.false while_body: ; preds = %cond.end - %4 = load %SparrowScanner*, %SparrowScanner** %this.addr - %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %4, i32 0, i32 3 - %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 2 - %7 = load %SparrowScanner*, %SparrowScanner** %this.addr - %8 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %7, i32 0, i32 2 - %9 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %8) - call void @"+=.473"(%String* %6, i8 %9) + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 2 + %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %6 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) + call void @"+=.461"(%String* %4, i8 %6) br label %while_step while_step: ; preds = %while_body - %10 = load %SparrowScanner*, %SparrowScanner** %this.addr - %11 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %10, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %11) + %7 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %7) br label %while_block while_end: ; preds = %cond.end ret void cond.true: ; preds = %while_block - %12 = load %SparrowScanner*, %SparrowScanner** %this.addr - %13 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %12, i32 0, i32 2 - %14 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %13) - %15 = call i1 @"().475"(%"FunctionPtr1[Bool, Char]"* %pred.addr, i8 %14) + %8 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %9 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %8) + %10 = call i1 @"().463"(%"FunctionPtr1[Bool, Char]"* %pred, i8 %9) br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %15, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %10, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end } ; Function Attrs: inlinehint nounwind -define internal i1 @"().475"(%"FunctionPtr1[Bool, Char]"* %this, i8 %p1) #4 { - %this.addr = alloca %"FunctionPtr1[Bool, Char]"* - store %"FunctionPtr1[Bool, Char]"* %this, %"FunctionPtr1[Bool, Char]"** %this.addr +define internal i1 @"().463"(%"FunctionPtr1[Bool, Char]"* %this, i8 %p1) #4 { %p1.addr = alloca i8 store i8 %p1, i8* %p1.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr1[Bool, Char]"*, %"FunctionPtr1[Bool, Char]"** %this.addr - %2 = load i8, i8* %p1.addr - %3 = bitcast %"FunctionPtr1[Bool, Char]"* %1 to i1 (i8)** - %4 = load i1 (i8)*, i1 (i8)** %3 - %5 = call i1 %4(i8 %2) - ret i1 %5 + %1 = load i8, i8* %p1.addr + %2 = bitcast %"FunctionPtr1[Bool, Char]"* %this to i1 (i8)** + %3 = load i1 (i8)*, i1 (i8)** %2 + %4 = call i1 %3(i8 %1) + ret i1 %4 } ; Function Attrs: inlinehint nounwind -define internal i8 @peekChar.476(%SparrowScanner* %this, i32 %n) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr +define internal i8 @peekChar.464(%SparrowScanner* %this, i32 %n) #4 { %n.addr = alloca i32 store i32 %n, i32* %n.addr br label %code code: ; preds = %0 - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - %3 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2, i32 0, i32 0 - %4 = load i32, i32* %n.addr - %5 = call i8 @peek(%"RangeWithLookahead[BufferedCharSourceRange]"* %3, i32 %4) - ret i8 %5 + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %2 = getelementptr inbounds %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]", %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1, i32 0, i32 0 + %3 = load i32, i32* %n.addr + %4 = call i8 @peek(%"RangeWithLookahead[BufferedCharSourceRange]"* %2, i32 %3) + ret i8 %4 } ; Function Attrs: inlinehint nounwind @@ -17260,10 +15310,6 @@ declare i32 @isalpha(i32) ; Function Attrs: noinline nounwind define void @parseIdentifer(%TokenType* sret %_result, %SparrowScanner* %this) #5 { - %_result.addr = alloca %TokenType* - store %TokenType* %_result, %TokenType** %_result.addr - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr %allowSymbolChars = alloca i1 %firstDot = alloca i1 %ch = alloca i8 @@ -17290,130 +15336,119 @@ define void @parseIdentifer(%TokenType* sret %_result, %SparrowScanner* %this) # %tmp.StringRef132 = alloca %StringRef %tmp.StringRef138 = alloca %StringRef %tmp.StringRef144 = alloca %StringRef + %tmp.StringRef150 = alloca %StringRef br label %code code: ; preds = %0 store i1 false, i1* %allowSymbolChars - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 3 - %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 2 - %4 = load %SparrowScanner*, %SparrowScanner** %this.addr - %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %4, i32 0, i32 2 - %6 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) - call void @"+=.473"(%String* %3, i8 %6) - %7 = load %SparrowScanner*, %SparrowScanner** %this.addr - %8 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %7, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %8) + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %2 = getelementptr inbounds %Token, %Token* %1, i32 0, i32 2 + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %4 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %3) + call void @"+=.461"(%String* %2, i8 %4) + %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) store i1 true, i1* %firstDot br label %while_block while_block: ; preds = %while_step, %code - %9 = load %SparrowScanner*, %SparrowScanner** %this.addr - %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %9, i32 0, i32 2 - %11 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %10) - br i1 %11, label %while_body, label %while_end + %6 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %7 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %6) + br i1 %7, label %while_body, label %while_end while_body: ; preds = %while_block - %12 = load %SparrowScanner*, %SparrowScanner** %this.addr - %13 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %12, i32 0, i32 2 - %14 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %13) - store i8 %14, i8* %ch + %8 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %9 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %8) + store i8 %9, i8* %ch br label %if_block while_step: ; preds = %if_end7 - %15 = load %SparrowScanner*, %SparrowScanner** %this.addr - %16 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %15, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %16) + %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %10) br label %while_block while_end: ; preds = %if_then, %while_block - %17 = load %SparrowScanner*, %SparrowScanner** %this.addr - %18 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %17, i32 0, i32 3 - %19 = getelementptr inbounds %Token, %Token* %18, i32 0, i32 2 - %20 = call %StringRef @asStringRef(%String* %19) - call void @ctor.56(%StringRef* %data, %StringRef %20) + %11 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %12 = getelementptr inbounds %Token, %Token* %11, i32 0, i32 2 + %13 = call %StringRef @asStringRef(%String* %12) + call void @ctor.59(%StringRef* %data, %StringRef %13) br label %if_block16 if_block: ; preds = %while_body - %21 = load i8, i8* %ch - %22 = call i1 @isAlpha(i8 %21) - %23 = xor i1 true, %22 - br i1 %23, label %cond.true1, label %cond.false2 + %14 = load i8, i8* %ch + %15 = call i1 @isAlpha(i8 %14) + %16 = xor i1 true, %15 + br i1 %16, label %cond.true1, label %cond.false2 if_then: ; preds = %cond.end br label %while_end if_end: ; preds = %dumy_block, %cond.end - %24 = load %SparrowScanner*, %SparrowScanner** %this.addr - %25 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %24, i32 0, i32 3 - %26 = getelementptr inbounds %Token, %Token* %25, i32 0, i32 2 - %27 = load i8, i8* %ch - call void @"+=.473"(%String* %26, i8 %27) + %17 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %18 = getelementptr inbounds %Token, %Token* %17, i32 0, i32 2 + %19 = load i8, i8* %ch + call void @"+=.461"(%String* %18, i8 %19) br label %if_block5 cond.true: ; preds = %cond.end3 - %28 = load i8, i8* %ch - %29 = call i1 @isDigit(i8 %28) - %30 = xor i1 true, %29 + %20 = load i8, i8* %ch + %21 = call i1 @isDigit(i8 %20) + %22 = xor i1 true, %21 br label %cond.end cond.false: ; preds = %cond.end3 br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res4 = phi i1 [ %30, %cond.true ], [ false, %cond.false ] + %cond.res4 = phi i1 [ %22, %cond.true ], [ false, %cond.false ] br i1 %cond.res4, label %if_then, label %if_end cond.true1: ; preds = %if_block - %31 = load i8, i8* %ch - %32 = icmp ne i8 %31, 95 + %23 = load i8, i8* %ch + %24 = icmp ne i8 %23, 95 br label %cond.end3 cond.false2: ; preds = %if_block br label %cond.end3 cond.end3: ; preds = %cond.false2, %cond.true1 - %cond.res = phi i1 [ %32, %cond.true1 ], [ false, %cond.false2 ] + %cond.res = phi i1 [ %24, %cond.true1 ], [ false, %cond.false2 ] br i1 %cond.res, label %cond.true, label %cond.false dumy_block: ; No predecessors! br label %if_end if_block5: ; preds = %if_end - %33 = load i8, i8* %ch - %34 = icmp eq i8 %33, 95 - br i1 %34, label %cond.true8, label %cond.false9 + %25 = load i8, i8* %ch + %26 = icmp eq i8 %25, 95 + br i1 %26, label %cond.true8, label %cond.false9 if_then6: ; preds = %cond.end10 - %35 = load %SparrowScanner*, %SparrowScanner** %this.addr - %36 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %35, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %36) + %27 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %27) br label %if_block12 if_end7: ; preds = %if_end14, %cond.end10 br label %while_step cond.true8: ; preds = %if_block5 - %37 = load %SparrowScanner*, %SparrowScanner** %this.addr - %38 = call i8 @peekChar(%SparrowScanner* %37) - %39 = call i1 @isOpCharDot(i8 %38) + %28 = call i8 @peekChar(%SparrowScanner* %this) + %29 = call i1 @isOpCharDot(i8 %28) br label %cond.end10 cond.false9: ; preds = %if_block5 br label %cond.end10 cond.end10: ; preds = %cond.false9, %cond.true8 - %cond.res11 = phi i1 [ %39, %cond.true8 ], [ false, %cond.false9 ] + %cond.res11 = phi i1 [ %29, %cond.true8 ], [ false, %cond.false9 ] br i1 %cond.res11, label %if_then6, label %if_end7 if_block12: ; preds = %if_then6 - %40 = load %SparrowScanner*, %SparrowScanner** %this.addr - %41 = call i1 @parseOperator(%SparrowScanner* %40) - br i1 %41, label %if_then13, label %if_end14 + %30 = call i1 @parseOperator(%SparrowScanner* %this) + br i1 %30, label %if_then13, label %if_end14 if_then13: ; preds = %if_block12 - %42 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %42, i32 36) + call void @ctor.404(%TokenType* %_result, i32 37) ret void if_end14: ; preds = %dumy_block15, %if_block12 @@ -17423,42 +15458,50 @@ dumy_block15: ; No predecessors! br label %if_end14 if_block16: ; preds = %while_end - %43 = load %StringRef, %StringRef* %data - %44 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %45 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.14, i32 0, i32 0), i8** %44 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.14, i32 0, i32 5), i8** %45 - %46 = load %StringRef, %StringRef* %tmp.StringRef - %47 = call i1 @"=="(%StringRef %43, %StringRef %46) - br i1 %47, label %if_then17, label %if_else + %31 = load %StringRef, %StringRef* %data + %32 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %33 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %34 = bitcast %UntypedPtr* %32 to i8** + %35 = bitcast %UntypedPtr* %33 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.14, i32 0, i32 0), i8** %34 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.14, i32 0, i32 5), i8** %35 + %36 = load %StringRef, %StringRef* %tmp.StringRef + %37 = call i1 @"=="(%StringRef %31, %StringRef %36) + br i1 %37, label %if_then17, label %if_else if_then17: ; preds = %if_block16 - %48 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %48, i32 10) + call void @ctor.404(%TokenType* %_result, i32 11) + %38 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %38) ret void if_else: ; preds = %if_block16 br label %if_block20 if_end18: ; preds = %if_end23, %dumy_block19 + %39 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %39) ret void dumy_block19: ; No predecessors! br label %if_end18 if_block20: ; preds = %if_else - %49 = load %StringRef, %StringRef* %data - %50 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef24, i32 0, i32 0 - %51 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef24, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.15, i32 0, i32 0), i8** %50 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.15, i32 0, i32 5), i8** %51 - %52 = load %StringRef, %StringRef* %tmp.StringRef24 - %53 = call i1 @"=="(%StringRef %49, %StringRef %52) - br i1 %53, label %if_then21, label %if_else22 + %40 = load %StringRef, %StringRef* %data + %41 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef24, i32 0, i32 0 + %42 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef24, i32 0, i32 1 + %43 = bitcast %UntypedPtr* %41 to i8** + %44 = bitcast %UntypedPtr* %42 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.15, i32 0, i32 0), i8** %43 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.15, i32 0, i32 5), i8** %44 + %45 = load %StringRef, %StringRef* %tmp.StringRef24 + %46 = call i1 @"=="(%StringRef %40, %StringRef %45) + br i1 %46, label %if_then21, label %if_else22 if_then21: ; preds = %if_block20 - %54 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %54, i32 11) + call void @ctor.404(%TokenType* %_result, i32 12) + %47 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %47) ret void if_else22: ; preds = %if_block20 @@ -17471,18 +15514,21 @@ dumy_block25: ; No predecessors! br label %if_end23 if_block26: ; preds = %if_else22 - %55 = load %StringRef, %StringRef* %data - %56 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef30, i32 0, i32 0 - %57 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef30, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.16, i32 0, i32 0), i8** %56 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.16, i32 0, i32 7), i8** %57 - %58 = load %StringRef, %StringRef* %tmp.StringRef30 - %59 = call i1 @"=="(%StringRef %55, %StringRef %58) - br i1 %59, label %if_then27, label %if_else28 + %48 = load %StringRef, %StringRef* %data + %49 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef30, i32 0, i32 0 + %50 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef30, i32 0, i32 1 + %51 = bitcast %UntypedPtr* %49 to i8** + %52 = bitcast %UntypedPtr* %50 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.16, i32 0, i32 0), i8** %51 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.16, i32 0, i32 7), i8** %52 + %53 = load %StringRef, %StringRef* %tmp.StringRef30 + %54 = call i1 @"=="(%StringRef %48, %StringRef %53) + br i1 %54, label %if_then27, label %if_else28 if_then27: ; preds = %if_block26 - %60 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %60, i32 4) + call void @ctor.404(%TokenType* %_result, i32 4) + %55 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %55) ret void if_else28: ; preds = %if_block26 @@ -17495,18 +15541,21 @@ dumy_block31: ; No predecessors! br label %if_end29 if_block32: ; preds = %if_else28 - %61 = load %StringRef, %StringRef* %data - %62 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef36, i32 0, i32 0 - %63 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef36, i32 0, i32 1 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.17, i32 0, i32 0), i8** %62 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.17, i32 0, i32 8), i8** %63 - %64 = load %StringRef, %StringRef* %tmp.StringRef36 - %65 = call i1 @"=="(%StringRef %61, %StringRef %64) - br i1 %65, label %if_then33, label %if_else34 + %56 = load %StringRef, %StringRef* %data + %57 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef36, i32 0, i32 0 + %58 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef36, i32 0, i32 1 + %59 = bitcast %UntypedPtr* %57 to i8** + %60 = bitcast %UntypedPtr* %58 to i8** + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.17, i32 0, i32 0), i8** %59 + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.17, i32 0, i32 8), i8** %60 + %61 = load %StringRef, %StringRef* %tmp.StringRef36 + %62 = call i1 @"=="(%StringRef %56, %StringRef %61) + br i1 %62, label %if_then33, label %if_else34 if_then33: ; preds = %if_block32 - %66 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %66, i32 12) + call void @ctor.404(%TokenType* %_result, i32 13) + %63 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %63) ret void if_else34: ; preds = %if_block32 @@ -17519,18 +15568,21 @@ dumy_block37: ; No predecessors! br label %if_end35 if_block38: ; preds = %if_else34 - %67 = load %StringRef, %StringRef* %data - %68 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef42, i32 0, i32 0 - %69 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef42, i32 0, i32 1 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.18, i32 0, i32 0), i8** %68 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.18, i32 0, i32 8), i8** %69 - %70 = load %StringRef, %StringRef* %tmp.StringRef42 - %71 = call i1 @"=="(%StringRef %67, %StringRef %70) - br i1 %71, label %if_then39, label %if_else40 + %64 = load %StringRef, %StringRef* %data + %65 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef42, i32 0, i32 0 + %66 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef42, i32 0, i32 1 + %67 = bitcast %UntypedPtr* %65 to i8** + %68 = bitcast %UntypedPtr* %66 to i8** + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.18, i32 0, i32 0), i8** %67 + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.18, i32 0, i32 8), i8** %68 + %69 = load %StringRef, %StringRef* %tmp.StringRef42 + %70 = call i1 @"=="(%StringRef %64, %StringRef %69) + br i1 %70, label %if_then39, label %if_else40 if_then39: ; preds = %if_block38 - %72 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %72, i32 5) + call void @ctor.404(%TokenType* %_result, i32 5) + %71 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %71) ret void if_else40: ; preds = %if_block38 @@ -17543,18 +15595,21 @@ dumy_block43: ; No predecessors! br label %if_end41 if_block44: ; preds = %if_else40 - %73 = load %StringRef, %StringRef* %data - %74 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef48, i32 0, i32 0 - %75 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef48, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.19, i32 0, i32 0), i8** %74 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.19, i32 0, i32 3), i8** %75 - %76 = load %StringRef, %StringRef* %tmp.StringRef48 - %77 = call i1 @"=="(%StringRef %73, %StringRef %76) - br i1 %77, label %if_then45, label %if_else46 + %72 = load %StringRef, %StringRef* %data + %73 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef48, i32 0, i32 0 + %74 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef48, i32 0, i32 1 + %75 = bitcast %UntypedPtr* %73 to i8** + %76 = bitcast %UntypedPtr* %74 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.19, i32 0, i32 0), i8** %75 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.19, i32 0, i32 3), i8** %76 + %77 = load %StringRef, %StringRef* %tmp.StringRef48 + %78 = call i1 @"=="(%StringRef %72, %StringRef %77) + br i1 %78, label %if_then45, label %if_else46 if_then45: ; preds = %if_block44 - %78 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %78, i32 6) + call void @ctor.404(%TokenType* %_result, i32 6) + %79 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %79) ret void if_else46: ; preds = %if_block44 @@ -17567,18 +15622,21 @@ dumy_block49: ; No predecessors! br label %if_end47 if_block50: ; preds = %if_else46 - %79 = load %StringRef, %StringRef* %data - %80 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef54, i32 0, i32 0 - %81 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef54, i32 0, i32 1 - store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.20, i32 0, i32 0), i8** %80 - store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.20, i32 0, i32 2), i8** %81 - %82 = load %StringRef, %StringRef* %tmp.StringRef54 - %83 = call i1 @"=="(%StringRef %79, %StringRef %82) - br i1 %83, label %if_then51, label %if_else52 + %80 = load %StringRef, %StringRef* %data + %81 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef54, i32 0, i32 0 + %82 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef54, i32 0, i32 1 + %83 = bitcast %UntypedPtr* %81 to i8** + %84 = bitcast %UntypedPtr* %82 to i8** + store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.20, i32 0, i32 0), i8** %83 + store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.20, i32 0, i32 2), i8** %84 + %85 = load %StringRef, %StringRef* %tmp.StringRef54 + %86 = call i1 @"=="(%StringRef %80, %StringRef %85) + br i1 %86, label %if_then51, label %if_else52 if_then51: ; preds = %if_block50 - %84 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %84, i32 15) + call void @ctor.404(%TokenType* %_result, i32 16) + %87 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %87) ret void if_else52: ; preds = %if_block50 @@ -17591,18 +15649,21 @@ dumy_block55: ; No predecessors! br label %if_end53 if_block56: ; preds = %if_else52 - %85 = load %StringRef, %StringRef* %data - %86 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef60, i32 0, i32 0 - %87 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef60, i32 0, i32 1 - store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.21, i32 0, i32 0), i8** %86 - store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.21, i32 0, i32 4), i8** %87 - %88 = load %StringRef, %StringRef* %tmp.StringRef60 - %89 = call i1 @"=="(%StringRef %85, %StringRef %88) - br i1 %89, label %if_then57, label %if_else58 + %88 = load %StringRef, %StringRef* %data + %89 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef60, i32 0, i32 0 + %90 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef60, i32 0, i32 1 + %91 = bitcast %UntypedPtr* %89 to i8** + %92 = bitcast %UntypedPtr* %90 to i8** + store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.21, i32 0, i32 0), i8** %91 + store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.21, i32 0, i32 4), i8** %92 + %93 = load %StringRef, %StringRef* %tmp.StringRef60 + %94 = call i1 @"=="(%StringRef %88, %StringRef %93) + br i1 %94, label %if_then57, label %if_else58 if_then57: ; preds = %if_block56 - %90 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %90, i32 23) + call void @ctor.404(%TokenType* %_result, i32 24) + %95 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %95) ret void if_else58: ; preds = %if_block56 @@ -17615,18 +15676,21 @@ dumy_block61: ; No predecessors! br label %if_end59 if_block62: ; preds = %if_else58 - %91 = load %StringRef, %StringRef* %data - %92 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef66, i32 0, i32 0 - %93 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef66, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.22, i32 0, i32 0), i8** %92 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.22, i32 0, i32 5), i8** %93 - %94 = load %StringRef, %StringRef* %tmp.StringRef66 - %95 = call i1 @"=="(%StringRef %91, %StringRef %94) - br i1 %95, label %if_then63, label %if_else64 + %96 = load %StringRef, %StringRef* %data + %97 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef66, i32 0, i32 0 + %98 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef66, i32 0, i32 1 + %99 = bitcast %UntypedPtr* %97 to i8** + %100 = bitcast %UntypedPtr* %98 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.22, i32 0, i32 0), i8** %99 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.22, i32 0, i32 5), i8** %100 + %101 = load %StringRef, %StringRef* %tmp.StringRef66 + %102 = call i1 @"=="(%StringRef %96, %StringRef %101) + br i1 %102, label %if_then63, label %if_else64 if_then63: ; preds = %if_block62 - %96 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %96, i32 20) + call void @ctor.404(%TokenType* %_result, i32 21) + %103 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %103) ret void if_else64: ; preds = %if_block62 @@ -17639,18 +15703,21 @@ dumy_block67: ; No predecessors! br label %if_end65 if_block68: ; preds = %if_else64 - %97 = load %StringRef, %StringRef* %data - %98 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef72, i32 0, i32 0 - %99 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef72, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.23, i32 0, i32 0), i8** %98 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.23, i32 0, i32 7), i8** %99 - %100 = load %StringRef, %StringRef* %tmp.StringRef72 - %101 = call i1 @"=="(%StringRef %97, %StringRef %100) - br i1 %101, label %if_then69, label %if_else70 + %104 = load %StringRef, %StringRef* %data + %105 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef72, i32 0, i32 0 + %106 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef72, i32 0, i32 1 + %107 = bitcast %UntypedPtr* %105 to i8** + %108 = bitcast %UntypedPtr* %106 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.23, i32 0, i32 0), i8** %107 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.23, i32 0, i32 7), i8** %108 + %109 = load %StringRef, %StringRef* %tmp.StringRef72 + %110 = call i1 @"=="(%StringRef %104, %StringRef %109) + br i1 %110, label %if_then69, label %if_else70 if_then69: ; preds = %if_block68 - %102 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %102, i32 13) + call void @ctor.404(%TokenType* %_result, i32 14) + %111 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %111) ret void if_else70: ; preds = %if_block68 @@ -17663,18 +15730,21 @@ dumy_block73: ; No predecessors! br label %if_end71 if_block74: ; preds = %if_else70 - %103 = load %StringRef, %StringRef* %data - %104 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef78, i32 0, i32 0 - %105 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef78, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.24, i32 0, i32 0), i8** %104 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.24, i32 0, i32 3), i8** %105 - %106 = load %StringRef, %StringRef* %tmp.StringRef78 - %107 = call i1 @"=="(%StringRef %103, %StringRef %106) - br i1 %107, label %if_then75, label %if_else76 + %112 = load %StringRef, %StringRef* %data + %113 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef78, i32 0, i32 0 + %114 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef78, i32 0, i32 1 + %115 = bitcast %UntypedPtr* %113 to i8** + %116 = bitcast %UntypedPtr* %114 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.24, i32 0, i32 0), i8** %115 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.24, i32 0, i32 3), i8** %116 + %117 = load %StringRef, %StringRef* %tmp.StringRef78 + %118 = call i1 @"=="(%StringRef %112, %StringRef %117) + br i1 %118, label %if_then75, label %if_else76 if_then75: ; preds = %if_block74 - %108 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %108, i32 14) + call void @ctor.404(%TokenType* %_result, i32 15) + %119 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %119) ret void if_else76: ; preds = %if_block74 @@ -17687,18 +15757,21 @@ dumy_block79: ; No predecessors! br label %if_end77 if_block80: ; preds = %if_else76 - %109 = load %StringRef, %StringRef* %data - %110 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef84, i32 0, i32 0 - %111 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef84, i32 0, i32 1 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.25, i32 0, i32 0), i8** %110 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.25, i32 0, i32 6), i8** %111 - %112 = load %StringRef, %StringRef* %tmp.StringRef84 - %113 = call i1 @"=="(%StringRef %109, %StringRef %112) - br i1 %113, label %if_then81, label %if_else82 + %120 = load %StringRef, %StringRef* %data + %121 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef84, i32 0, i32 0 + %122 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef84, i32 0, i32 1 + %123 = bitcast %UntypedPtr* %121 to i8** + %124 = bitcast %UntypedPtr* %122 to i8** + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.25, i32 0, i32 0), i8** %123 + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.25, i32 0, i32 6), i8** %124 + %125 = load %StringRef, %StringRef* %tmp.StringRef84 + %126 = call i1 @"=="(%StringRef %120, %StringRef %125) + br i1 %126, label %if_then81, label %if_else82 if_then81: ; preds = %if_block80 - %114 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %114, i32 3) + call void @ctor.404(%TokenType* %_result, i32 3) + %127 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %127) ret void if_else82: ; preds = %if_block80 @@ -17711,18 +15784,21 @@ dumy_block85: ; No predecessors! br label %if_end83 if_block86: ; preds = %if_else82 - %115 = load %StringRef, %StringRef* %data - %116 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef90, i32 0, i32 0 - %117 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef90, i32 0, i32 1 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.26, i32 0, i32 0), i8** %116 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.26, i32 0, i32 6), i8** %117 - %118 = load %StringRef, %StringRef* %tmp.StringRef90 - %119 = call i1 @"=="(%StringRef %115, %StringRef %118) - br i1 %119, label %if_then87, label %if_else88 + %128 = load %StringRef, %StringRef* %data + %129 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef90, i32 0, i32 0 + %130 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef90, i32 0, i32 1 + %131 = bitcast %UntypedPtr* %129 to i8** + %132 = bitcast %UntypedPtr* %130 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.26, i32 0, i32 0), i8** %131 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.26, i32 0, i32 3), i8** %132 + %133 = load %StringRef, %StringRef* %tmp.StringRef90 + %134 = call i1 @"=="(%StringRef %128, %StringRef %133) + br i1 %134, label %if_then87, label %if_else88 if_then87: ; preds = %if_block86 - %120 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %120, i32 2) + call void @ctor.404(%TokenType* %_result, i32 7) + %135 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %135) ret void if_else88: ; preds = %if_block86 @@ -17735,18 +15811,21 @@ dumy_block91: ; No predecessors! br label %if_end89 if_block92: ; preds = %if_else88 - %121 = load %StringRef, %StringRef* %data - %122 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef96, i32 0, i32 0 - %123 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef96, i32 0, i32 1 - store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.27, i32 0, i32 0), i8** %122 - store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.27, i32 0, i32 4), i8** %123 - %124 = load %StringRef, %StringRef* %tmp.StringRef96 - %125 = call i1 @"=="(%StringRef %121, %StringRef %124) - br i1 %125, label %if_then93, label %if_else94 + %136 = load %StringRef, %StringRef* %data + %137 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef96, i32 0, i32 0 + %138 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef96, i32 0, i32 1 + %139 = bitcast %UntypedPtr* %137 to i8** + %140 = bitcast %UntypedPtr* %138 to i8** + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.27, i32 0, i32 0), i8** %139 + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.27, i32 0, i32 6), i8** %140 + %141 = load %StringRef, %StringRef* %tmp.StringRef96 + %142 = call i1 @"=="(%StringRef %136, %StringRef %141) + br i1 %142, label %if_then93, label %if_else94 if_then93: ; preds = %if_block92 - %126 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %126, i32 21) + call void @ctor.404(%TokenType* %_result, i32 2) + %143 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %143) ret void if_else94: ; preds = %if_block92 @@ -17759,18 +15838,21 @@ dumy_block97: ; No predecessors! br label %if_end95 if_block98: ; preds = %if_else94 - %127 = load %StringRef, %StringRef* %data - %128 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef102, i32 0, i32 0 - %129 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef102, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i32 0, i32 0), i8** %128 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i32 0, i32 7), i8** %129 - %130 = load %StringRef, %StringRef* %tmp.StringRef102 - %131 = call i1 @"=="(%StringRef %127, %StringRef %130) - br i1 %131, label %if_then99, label %if_else100 + %144 = load %StringRef, %StringRef* %data + %145 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef102, i32 0, i32 0 + %146 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef102, i32 0, i32 1 + %147 = bitcast %UntypedPtr* %145 to i8** + %148 = bitcast %UntypedPtr* %146 to i8** + store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.28, i32 0, i32 0), i8** %147 + store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.28, i32 0, i32 4), i8** %148 + %149 = load %StringRef, %StringRef* %tmp.StringRef102 + %150 = call i1 @"=="(%StringRef %144, %StringRef %149) + br i1 %150, label %if_then99, label %if_else100 if_then99: ; preds = %if_block98 - %132 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %132, i32 7) + call void @ctor.404(%TokenType* %_result, i32 22) + %151 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %151) ret void if_else100: ; preds = %if_block98 @@ -17783,18 +15865,21 @@ dumy_block103: ; No predecessors! br label %if_end101 if_block104: ; preds = %if_else100 - %133 = load %StringRef, %StringRef* %data - %134 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef108, i32 0, i32 0 - %135 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef108, i32 0, i32 1 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i32 0, i32 0), i8** %134 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i32 0, i32 6), i8** %135 - %136 = load %StringRef, %StringRef* %tmp.StringRef108 - %137 = call i1 @"=="(%StringRef %133, %StringRef %136) - br i1 %137, label %if_then105, label %if_else106 + %152 = load %StringRef, %StringRef* %data + %153 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef108, i32 0, i32 0 + %154 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef108, i32 0, i32 1 + %155 = bitcast %UntypedPtr* %153 to i8** + %156 = bitcast %UntypedPtr* %154 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.29, i32 0, i32 0), i8** %155 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.29, i32 0, i32 7), i8** %156 + %157 = load %StringRef, %StringRef* %tmp.StringRef108 + %158 = call i1 @"=="(%StringRef %152, %StringRef %157) + br i1 %158, label %if_then105, label %if_else106 if_then105: ; preds = %if_block104 - %138 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %138, i32 16) + call void @ctor.404(%TokenType* %_result, i32 8) + %159 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %159) ret void if_else106: ; preds = %if_block104 @@ -17807,18 +15892,21 @@ dumy_block109: ; No predecessors! br label %if_end107 if_block110: ; preds = %if_else106 - %139 = load %StringRef, %StringRef* %data - %140 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef114, i32 0, i32 0 - %141 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef114, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.30, i32 0, i32 0), i8** %140 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.30, i32 0, i32 5), i8** %141 - %142 = load %StringRef, %StringRef* %tmp.StringRef114 - %143 = call i1 @"=="(%StringRef %139, %StringRef %142) - br i1 %143, label %if_then111, label %if_else112 + %160 = load %StringRef, %StringRef* %data + %161 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef114, i32 0, i32 0 + %162 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef114, i32 0, i32 1 + %163 = bitcast %UntypedPtr* %161 to i8** + %164 = bitcast %UntypedPtr* %162 to i8** + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.30, i32 0, i32 0), i8** %163 + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.30, i32 0, i32 6), i8** %164 + %165 = load %StringRef, %StringRef* %tmp.StringRef114 + %166 = call i1 @"=="(%StringRef %160, %StringRef %165) + br i1 %166, label %if_then111, label %if_else112 if_then111: ; preds = %if_block110 - %144 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %144, i32 17) + call void @ctor.404(%TokenType* %_result, i32 17) + %167 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %167) ret void if_else112: ; preds = %if_block110 @@ -17831,18 +15919,21 @@ dumy_block115: ; No predecessors! br label %if_end113 if_block116: ; preds = %if_else112 - %145 = load %StringRef, %StringRef* %data - %146 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef120, i32 0, i32 0 - %147 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef120, i32 0, i32 1 - store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.31, i32 0, i32 0), i8** %146 - store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.31, i32 0, i32 4), i8** %147 - %148 = load %StringRef, %StringRef* %tmp.StringRef120 - %149 = call i1 @"=="(%StringRef %145, %StringRef %148) - br i1 %149, label %if_then117, label %if_else118 + %168 = load %StringRef, %StringRef* %data + %169 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef120, i32 0, i32 0 + %170 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef120, i32 0, i32 1 + %171 = bitcast %UntypedPtr* %169 to i8** + %172 = bitcast %UntypedPtr* %170 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.31, i32 0, i32 0), i8** %171 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.31, i32 0, i32 5), i8** %172 + %173 = load %StringRef, %StringRef* %tmp.StringRef120 + %174 = call i1 @"=="(%StringRef %168, %StringRef %173) + br i1 %174, label %if_then117, label %if_else118 if_then117: ; preds = %if_block116 - %150 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %150, i32 22) + call void @ctor.404(%TokenType* %_result, i32 18) + %175 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %175) ret void if_else118: ; preds = %if_block116 @@ -17855,18 +15946,21 @@ dumy_block121: ; No predecessors! br label %if_end119 if_block122: ; preds = %if_else118 - %151 = load %StringRef, %StringRef* %data - %152 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef126, i32 0, i32 0 - %153 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef126, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.32, i32 0, i32 0), i8** %152 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.32, i32 0, i32 3), i8** %153 - %154 = load %StringRef, %StringRef* %tmp.StringRef126 - %155 = call i1 @"=="(%StringRef %151, %StringRef %154) - br i1 %155, label %if_then123, label %if_else124 + %176 = load %StringRef, %StringRef* %data + %177 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef126, i32 0, i32 0 + %178 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef126, i32 0, i32 1 + %179 = bitcast %UntypedPtr* %177 to i8** + %180 = bitcast %UntypedPtr* %178 to i8** + store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.32, i32 0, i32 0), i8** %179 + store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.32, i32 0, i32 4), i8** %180 + %181 = load %StringRef, %StringRef* %tmp.StringRef126 + %182 = call i1 @"=="(%StringRef %176, %StringRef %181) + br i1 %182, label %if_then123, label %if_else124 if_then123: ; preds = %if_block122 - %156 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %156, i32 18) + call void @ctor.404(%TokenType* %_result, i32 23) + %183 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %183) ret void if_else124: ; preds = %if_block122 @@ -17879,18 +15973,21 @@ dumy_block127: ; No predecessors! br label %if_end125 if_block128: ; preds = %if_else124 - %157 = load %StringRef, %StringRef* %data - %158 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef132, i32 0, i32 0 - %159 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef132, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.33, i32 0, i32 0), i8** %158 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.33, i32 0, i32 5), i8** %159 - %160 = load %StringRef, %StringRef* %tmp.StringRef132 - %161 = call i1 @"=="(%StringRef %157, %StringRef %160) - br i1 %161, label %if_then129, label %if_else130 + %184 = load %StringRef, %StringRef* %data + %185 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef132, i32 0, i32 0 + %186 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef132, i32 0, i32 1 + %187 = bitcast %UntypedPtr* %185 to i8** + %188 = bitcast %UntypedPtr* %186 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.33, i32 0, i32 0), i8** %187 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.33, i32 0, i32 3), i8** %188 + %189 = load %StringRef, %StringRef* %tmp.StringRef132 + %190 = call i1 @"=="(%StringRef %184, %StringRef %189) + br i1 %190, label %if_then129, label %if_else130 if_then129: ; preds = %if_block128 - %162 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %162, i32 8) + call void @ctor.404(%TokenType* %_result, i32 19) + %191 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %191) ret void if_else130: ; preds = %if_block128 @@ -17903,18 +16000,21 @@ dumy_block133: ; No predecessors! br label %if_end131 if_block134: ; preds = %if_else130 - %163 = load %StringRef, %StringRef* %data - %164 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef138, i32 0, i32 0 - %165 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef138, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.34, i32 0, i32 0), i8** %164 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.34, i32 0, i32 3), i8** %165 - %166 = load %StringRef, %StringRef* %tmp.StringRef138 - %167 = call i1 @"=="(%StringRef %163, %StringRef %166) - br i1 %167, label %if_then135, label %if_else136 + %192 = load %StringRef, %StringRef* %data + %193 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef138, i32 0, i32 0 + %194 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef138, i32 0, i32 1 + %195 = bitcast %UntypedPtr* %193 to i8** + %196 = bitcast %UntypedPtr* %194 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.34, i32 0, i32 0), i8** %195 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.34, i32 0, i32 5), i8** %196 + %197 = load %StringRef, %StringRef* %tmp.StringRef138 + %198 = call i1 @"=="(%StringRef %192, %StringRef %197) + br i1 %198, label %if_then135, label %if_else136 if_then135: ; preds = %if_block134 - %168 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %168, i32 9) + call void @ctor.404(%TokenType* %_result, i32 9) + %199 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %199) ret void if_else136: ; preds = %if_block134 @@ -17927,41 +16027,68 @@ dumy_block139: ; No predecessors! br label %if_end137 if_block140: ; preds = %if_else136 - %169 = load %StringRef, %StringRef* %data - %170 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef144, i32 0, i32 0 - %171 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef144, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.35, i32 0, i32 0), i8** %170 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.35, i32 0, i32 5), i8** %171 - %172 = load %StringRef, %StringRef* %tmp.StringRef144 - %173 = call i1 @"=="(%StringRef %169, %StringRef %172) - br i1 %173, label %if_then141, label %if_else142 + %200 = load %StringRef, %StringRef* %data + %201 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef144, i32 0, i32 0 + %202 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef144, i32 0, i32 1 + %203 = bitcast %UntypedPtr* %201 to i8** + %204 = bitcast %UntypedPtr* %202 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.35, i32 0, i32 0), i8** %203 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.35, i32 0, i32 3), i8** %204 + %205 = load %StringRef, %StringRef* %tmp.StringRef144 + %206 = call i1 @"=="(%StringRef %200, %StringRef %205) + br i1 %206, label %if_then141, label %if_else142 if_then141: ; preds = %if_block140 - %174 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %174, i32 19) + call void @ctor.404(%TokenType* %_result, i32 10) + %207 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %207) ret void if_else142: ; preds = %if_block140 - %175 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %175, i32 36) - ret void + br label %if_block146 -if_end143: ; preds = %dumy_block146, %dumy_block145 +if_end143: ; preds = %if_end149, %dumy_block145 br label %if_end137 dumy_block145: ; No predecessors! br label %if_end143 -dumy_block146: ; No predecessors! +if_block146: ; preds = %if_else142 + %208 = load %StringRef, %StringRef* %data + %209 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef150, i32 0, i32 0 + %210 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef150, i32 0, i32 1 + %211 = bitcast %UntypedPtr* %209 to i8** + %212 = bitcast %UntypedPtr* %210 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.36, i32 0, i32 0), i8** %211 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.36, i32 0, i32 5), i8** %212 + %213 = load %StringRef, %StringRef* %tmp.StringRef150 + %214 = call i1 @"=="(%StringRef %208, %StringRef %213) + br i1 %214, label %if_then147, label %if_else148 + +if_then147: ; preds = %if_block146 + call void @ctor.404(%TokenType* %_result, i32 20) + %215 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %215) + ret void + +if_else148: ; preds = %if_block146 + call void @ctor.404(%TokenType* %_result, i32 37) + %216 = load %StringRef, %StringRef* %data + call void @dtor.61(%StringRef %216) + ret void + +if_end149: ; preds = %dumy_block152, %dumy_block151 br label %if_end143 + +dumy_block151: ; No predecessors! + br label %if_end149 + +dumy_block152: ; No predecessors! + br label %if_end149 } ; Function Attrs: noinline nounwind define void @parseNumeric(%TokenType* sret %_result, %SparrowScanner* %this) #5 { - %_result.addr = alloca %TokenType* - store %TokenType* %_result, %TokenType** %_result.addr - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr %isLong = alloca i1 %isUnsigned = alloca i1 %isFloating = alloca i1 @@ -17977,18 +16104,19 @@ define void @parseNumeric(%TokenType* sret %_result, %SparrowScanner* %this) #5 %tmp.this21 = alloca i64 %tmp.this22 = alloca i64 %tmp.this23 = alloca i64 + %"$tmpForRef" = alloca %"FunctionPtr1[Bool, Char]" %funptr = alloca i1 (i8)* - %funptr55 = alloca i1 (i8)* - %tmp.this69 = alloca %String - %"$tmpForRef" = alloca %StringRef + %"$tmpForRef55" = alloca %"FunctionPtr1[Bool, Char]" + %funptr56 = alloca i1 (i8)* + %tmp.this70 = alloca %String %tmp.StringRef = alloca %StringRef - %tmp.this90 = alloca i8 - %tmp.this91 = alloca %TokenType + %tmp.this91 = alloca i8 %tmp.this92 = alloca %TokenType - %tmp.this104 = alloca %TokenType + %tmp.this93 = alloca %TokenType %tmp.this105 = alloca %TokenType - %tmp.this117 = alloca %TokenType + %tmp.this106 = alloca %TokenType %tmp.this118 = alloca %TokenType + %tmp.this119 = alloca %TokenType br label %code code: ; preds = %0 @@ -17996,88 +16124,77 @@ code: ; preds = %0 store i1 false, i1* %isUnsigned store i1 false, i1* %isFloating store i32 0, i32* %type - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - %3 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2) - store i8 %3, i8* %ch - %4 = load %SparrowScanner*, %SparrowScanner** %this.addr - %5 = call i8 @peekChar(%SparrowScanner* %4) - %6 = call i8 @toLower(i8 %5) - store i8 %6, i8* %ch2 - %7 = load %SparrowScanner*, %SparrowScanner** %this.addr + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %2 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) + store i8 %2, i8* %ch + %3 = call i8 @peekChar(%SparrowScanner* %this) + %4 = call i8 @toLower(i8 %3) + store i8 %4, i8* %ch2 store i32 2, i32* %tmp.this - %8 = load i32, i32* %tmp.this - %9 = call i8 @peekChar.476(%SparrowScanner* %7, i32 %8) - %10 = call i8 @toLower(i8 %9) - store i8 %10, i8* %ch3 + %5 = load i32, i32* %tmp.this + %6 = call i8 @peekChar.464(%SparrowScanner* %this, i32 %5) + %7 = call i8 @toLower(i8 %6) + store i8 %7, i8* %ch3 br label %if_block if_block: ; preds = %code - %11 = load i8, i8* %ch - %12 = icmp eq i8 %11, 48 - br i1 %12, label %cond.true, label %cond.false + %8 = load i8, i8* %ch + %9 = icmp eq i8 %8, 48 + br i1 %9, label %cond.true, label %cond.false if_then: ; preds = %cond.end - %13 = load %SparrowScanner*, %SparrowScanner** %this.addr - %14 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %13, i32 0, i32 2 + %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 2, i64* %tmp.this1 - %15 = load i64, i64* %tmp.this1 - call void @advance.469(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %14, i64 %15) - %16 = load %SparrowScanner*, %SparrowScanner** %this.addr - %17 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %16, i32 0, i32 2 + %11 = load i64, i64* %tmp.this1 + call void @advance.457(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %10, i64 %11) + %12 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 16, i64* %tmp.this2 - %18 = load i64, i64* %tmp.this2 - %19 = load %SparrowScanner*, %SparrowScanner** %this.addr - %20 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %19, i32 0, i32 3 - %21 = getelementptr inbounds %Token, %Token* %20, i32 0, i32 2 - %22 = call i64 @consumeDigits(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %17, i64 %18, %String* %21) - %23 = load %SparrowScanner*, %SparrowScanner** %this.addr - %24 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %23, i32 0, i32 3 - %25 = getelementptr inbounds %Token, %Token* %24, i32 0, i32 3 - store i64 %22, i64* %25 + %13 = load i64, i64* %tmp.this2 + %14 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %15 = getelementptr inbounds %Token, %Token* %14, i32 0, i32 2 + %16 = call i64 @consumeDigits(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %12, i64 %13, %String* %15) + %17 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %18 = getelementptr inbounds %Token, %Token* %17, i32 0, i32 3 + store i64 %16, i64* %18 br label %if_end if_else: ; preds = %cond.end br label %if_block3 if_end: ; preds = %if_end6, %if_then - br label %if_block66 + br label %if_block67 cond.true: ; preds = %if_block - %26 = load i8, i8* %ch2 - %27 = icmp eq i8 %26, 120 + %19 = load i8, i8* %ch2 + %20 = icmp eq i8 %19, 120 br label %cond.end cond.false: ; preds = %if_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %27, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %20, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then, label %if_else if_block3: ; preds = %if_else - %28 = load i8, i8* %ch - %29 = icmp eq i8 %28, 48 - br i1 %29, label %cond.true7, label %cond.false8 + %21 = load i8, i8* %ch + %22 = icmp eq i8 %21, 48 + br i1 %22, label %cond.true7, label %cond.false8 if_then4: ; preds = %cond.end9 - %30 = load %SparrowScanner*, %SparrowScanner** %this.addr - %31 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %30, i32 0, i32 2 + %23 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 2, i64* %tmp.this11 - %32 = load i64, i64* %tmp.this11 - call void @advance.469(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %31, i64 %32) - %33 = load %SparrowScanner*, %SparrowScanner** %this.addr - %34 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %33, i32 0, i32 2 + %24 = load i64, i64* %tmp.this11 + call void @advance.457(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %23, i64 %24) + %25 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 2, i64* %tmp.this12 - %35 = load i64, i64* %tmp.this12 - %36 = load %SparrowScanner*, %SparrowScanner** %this.addr - %37 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %36, i32 0, i32 3 - %38 = getelementptr inbounds %Token, %Token* %37, i32 0, i32 2 - %39 = call i64 @consumeDigits(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %34, i64 %35, %String* %38) - %40 = load %SparrowScanner*, %SparrowScanner** %this.addr - %41 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %40, i32 0, i32 3 - %42 = getelementptr inbounds %Token, %Token* %41, i32 0, i32 3 - store i64 %39, i64* %42 + %26 = load i64, i64* %tmp.this12 + %27 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %28 = getelementptr inbounds %Token, %Token* %27, i32 0, i32 2 + %29 = call i64 @consumeDigits(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %25, i64 %26, %String* %28) + %30 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %31 = getelementptr inbounds %Token, %Token* %30, i32 0, i32 3 + store i64 %29, i64* %31 br label %if_end6 if_else5: ; preds = %cond.end9 @@ -18087,398 +16204,367 @@ if_end6: ; preds = %if_end16, %if_then4 br label %if_end cond.true7: ; preds = %if_block3 - %43 = load i8, i8* %ch2 - %44 = icmp eq i8 %43, 98 + %32 = load i8, i8* %ch2 + %33 = icmp eq i8 %32, 98 br label %cond.end9 cond.false8: ; preds = %if_block3 br label %cond.end9 cond.end9: ; preds = %cond.false8, %cond.true7 - %cond.res10 = phi i1 [ %44, %cond.true7 ], [ false, %cond.false8 ] + %cond.res10 = phi i1 [ %33, %cond.true7 ], [ false, %cond.false8 ] br i1 %cond.res10, label %if_then4, label %if_else5 if_block13: ; preds = %if_else5 - %45 = load i8, i8* %ch - %46 = icmp eq i8 %45, 48 - br i1 %46, label %cond.true17, label %cond.false18 + %34 = load i8, i8* %ch + %35 = icmp eq i8 %34, 48 + br i1 %35, label %cond.true17, label %cond.false18 if_then14: ; preds = %cond.end19 - %47 = load %SparrowScanner*, %SparrowScanner** %this.addr - %48 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %47, i32 0, i32 2 + %36 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 1, i64* %tmp.this21 - %49 = load i64, i64* %tmp.this21 - call void @advance.469(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %48, i64 %49) - %50 = load %SparrowScanner*, %SparrowScanner** %this.addr - %51 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %50, i32 0, i32 2 + %37 = load i64, i64* %tmp.this21 + call void @advance.457(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %36, i64 %37) + %38 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 8, i64* %tmp.this22 - %52 = load i64, i64* %tmp.this22 - %53 = load %SparrowScanner*, %SparrowScanner** %this.addr - %54 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %53, i32 0, i32 3 - %55 = getelementptr inbounds %Token, %Token* %54, i32 0, i32 2 - %56 = call i64 @consumeDigits(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %51, i64 %52, %String* %55) - %57 = load %SparrowScanner*, %SparrowScanner** %this.addr - %58 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %57, i32 0, i32 3 - %59 = getelementptr inbounds %Token, %Token* %58, i32 0, i32 3 - store i64 %56, i64* %59 + %39 = load i64, i64* %tmp.this22 + %40 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %41 = getelementptr inbounds %Token, %Token* %40, i32 0, i32 2 + %42 = call i64 @consumeDigits(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %38, i64 %39, %String* %41) + %43 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %44 = getelementptr inbounds %Token, %Token* %43, i32 0, i32 3 + store i64 %42, i64* %44 br label %if_end16 if_else15: ; preds = %cond.end19 - %60 = load %SparrowScanner*, %SparrowScanner** %this.addr - %61 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %60, i32 0, i32 2 + %45 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 store i64 10, i64* %tmp.this23 - %62 = load i64, i64* %tmp.this23 - %63 = load %SparrowScanner*, %SparrowScanner** %this.addr - %64 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %63, i32 0, i32 3 - %65 = getelementptr inbounds %Token, %Token* %64, i32 0, i32 2 - %66 = call i64 @consumeDigits(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %61, i64 %62, %String* %65) - %67 = load %SparrowScanner*, %SparrowScanner** %this.addr - %68 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %67, i32 0, i32 3 - %69 = getelementptr inbounds %Token, %Token* %68, i32 0, i32 3 - store i64 %66, i64* %69 + %46 = load i64, i64* %tmp.this23 + %47 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %48 = getelementptr inbounds %Token, %Token* %47, i32 0, i32 2 + %49 = call i64 @consumeDigits(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %45, i64 %46, %String* %48) + %50 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %51 = getelementptr inbounds %Token, %Token* %50, i32 0, i32 3 + store i64 %49, i64* %51 br label %if_block24 if_end16: ; preds = %if_end26, %if_then14 br label %if_end6 cond.true17: ; preds = %if_block13 - %70 = load i8, i8* %ch2 - %71 = icmp eq i8 %70, 111 + %52 = load i8, i8* %ch2 + %53 = icmp eq i8 %52, 111 br label %cond.end19 cond.false18: ; preds = %if_block13 br label %cond.end19 cond.end19: ; preds = %cond.false18, %cond.true17 - %cond.res20 = phi i1 [ %71, %cond.true17 ], [ false, %cond.false18 ] + %cond.res20 = phi i1 [ %53, %cond.true17 ], [ false, %cond.false18 ] br i1 %cond.res20, label %if_then14, label %if_else15 if_block24: ; preds = %if_else15 - %72 = load %SparrowScanner*, %SparrowScanner** %this.addr - %73 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %72, i32 0, i32 2 - %74 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %73) - br i1 %74, label %if_then25, label %if_end26 + %54 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %55 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %54) + br i1 %55, label %if_then25, label %if_end26 if_then25: ; preds = %if_block24 - %75 = load %SparrowScanner*, %SparrowScanner** %this.addr - %76 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %75, i32 0, i32 2 - %77 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %76) - %78 = call i8 @toLower(i8 %77) - store i8 %78, i8* %ch + %56 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %57 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %56) + %58 = call i8 @toLower(i8 %57) + store i8 %58, i8* %ch br label %if_block27 if_end26: ; preds = %if_end29, %if_block24 br label %if_end16 if_block27: ; preds = %if_then25 - %79 = load i8, i8* %ch - %80 = icmp eq i8 %79, 46 - br i1 %80, label %cond.true39, label %cond.false40 + %59 = load i8, i8* %ch + %60 = icmp eq i8 %59, 46 + br i1 %60, label %cond.true39, label %cond.false40 if_then28: ; preds = %cond.end32 store i1 true, i1* %isFloating br label %if_block46 -if_end29: ; preds = %if_end58, %cond.end32 +if_end29: ; preds = %if_end59, %cond.end32 br label %if_end26 cond.true30: ; preds = %cond.end35 br label %cond.end32 cond.false31: ; preds = %cond.end35 - %81 = load i8, i8* %ch - %82 = icmp eq i8 %81, 100 + %61 = load i8, i8* %ch + %62 = icmp eq i8 %61, 100 br label %cond.end32 cond.end32: ; preds = %cond.false31, %cond.true30 - %cond.res45 = phi i1 [ true, %cond.true30 ], [ %82, %cond.false31 ] + %cond.res45 = phi i1 [ true, %cond.true30 ], [ %62, %cond.false31 ] br i1 %cond.res45, label %if_then28, label %if_end29 cond.true33: ; preds = %cond.end38 br label %cond.end35 cond.false34: ; preds = %cond.end38 - %83 = load i8, i8* %ch - %84 = icmp eq i8 %83, 102 + %63 = load i8, i8* %ch + %64 = icmp eq i8 %63, 102 br label %cond.end35 cond.end35: ; preds = %cond.false34, %cond.true33 - %cond.res44 = phi i1 [ true, %cond.true33 ], [ %84, %cond.false34 ] + %cond.res44 = phi i1 [ true, %cond.true33 ], [ %64, %cond.false34 ] br i1 %cond.res44, label %cond.true30, label %cond.false31 cond.true36: ; preds = %cond.end41 br label %cond.end38 cond.false37: ; preds = %cond.end41 - %85 = load i8, i8* %ch - %86 = icmp eq i8 %85, 101 + %65 = load i8, i8* %ch + %66 = icmp eq i8 %65, 101 br label %cond.end38 cond.end38: ; preds = %cond.false37, %cond.true36 - %cond.res43 = phi i1 [ true, %cond.true36 ], [ %86, %cond.false37 ] + %cond.res43 = phi i1 [ true, %cond.true36 ], [ %66, %cond.false37 ] br i1 %cond.res43, label %cond.true33, label %cond.false34 cond.true39: ; preds = %if_block27 - %87 = load %SparrowScanner*, %SparrowScanner** %this.addr - %88 = call i8 @peekChar(%SparrowScanner* %87) - %89 = call i1 @isOpCharDot(i8 %88) - %90 = xor i1 true, %89 + %67 = call i8 @peekChar(%SparrowScanner* %this) + %68 = call i1 @isOpCharDot(i8 %67) + %69 = xor i1 true, %68 br label %cond.end41 cond.false40: ; preds = %if_block27 br label %cond.end41 cond.end41: ; preds = %cond.false40, %cond.true39 - %cond.res42 = phi i1 [ %90, %cond.true39 ], [ false, %cond.false40 ] + %cond.res42 = phi i1 [ %69, %cond.true39 ], [ false, %cond.false40 ] br i1 %cond.res42, label %cond.true36, label %cond.false37 if_block46: ; preds = %if_then28 - %91 = load i8, i8* %ch - %92 = icmp eq i8 %91, 46 - br i1 %92, label %if_then47, label %if_end48 + %70 = load i8, i8* %ch + %71 = icmp eq i8 %70, 46 + br i1 %71, label %if_then47, label %if_end48 if_then47: ; preds = %if_block46 - %93 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @advanceAndCapture1(%SparrowScanner* %93) - %94 = load %SparrowScanner*, %SparrowScanner** %this.addr + call void @advanceAndCapture1(%SparrowScanner* %this) store i1 (i8)* @isDigit, i1 (i8)** %funptr - %95 = bitcast i1 (i8)** %funptr to %"FunctionPtr1[Bool, Char]"* - %96 = load %"FunctionPtr1[Bool, Char]", %"FunctionPtr1[Bool, Char]"* %95 - call void @advanceAndCaptureDigit(%SparrowScanner* %94, %"FunctionPtr1[Bool, Char]" %96) + %72 = bitcast i1 (i8)** %funptr to %"FunctionPtr1[Bool, Char]"* + %73 = load %"FunctionPtr1[Bool, Char]", %"FunctionPtr1[Bool, Char]"* %72 + store %"FunctionPtr1[Bool, Char]" %73, %"FunctionPtr1[Bool, Char]"* %"$tmpForRef" + call void @advanceAndCaptureDigit(%SparrowScanner* %this, %"FunctionPtr1[Bool, Char]"* %"$tmpForRef") br label %if_end48 if_end48: ; preds = %if_then47, %if_block46 br label %if_block49 if_block49: ; preds = %if_end48 - %97 = load %SparrowScanner*, %SparrowScanner** %this.addr - %98 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %97, i32 0, i32 2 - %99 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %98) - br i1 %99, label %if_then50, label %if_end51 + %74 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %75 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %74) + br i1 %75, label %if_then50, label %if_end51 if_then50: ; preds = %if_block49 - %100 = load %SparrowScanner*, %SparrowScanner** %this.addr - %101 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %100, i32 0, i32 2 - %102 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %101) - %103 = call i8 @toLower(i8 %102) - store i8 %103, i8* %ch + %76 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %77 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %76) + %78 = call i8 @toLower(i8 %77) + store i8 %78, i8* %ch br label %if_block52 if_end51: ; preds = %if_end54, %if_block49 - br label %if_block56 + br label %if_block57 if_block52: ; preds = %if_then50 - %104 = load i8, i8* %ch - %105 = icmp eq i8 %104, 101 - br i1 %105, label %if_then53, label %if_end54 + %79 = load i8, i8* %ch + %80 = icmp eq i8 %79, 101 + br i1 %80, label %if_then53, label %if_end54 if_then53: ; preds = %if_block52 - %106 = load %SparrowScanner*, %SparrowScanner** %this.addr - call void @advanceAndCapture1(%SparrowScanner* %106) - %107 = load %SparrowScanner*, %SparrowScanner** %this.addr - store i1 (i8)* @isDigit, i1 (i8)** %funptr55 - %108 = bitcast i1 (i8)** %funptr55 to %"FunctionPtr1[Bool, Char]"* - %109 = load %"FunctionPtr1[Bool, Char]", %"FunctionPtr1[Bool, Char]"* %108 - call void @advanceAndCaptureDigit(%SparrowScanner* %107, %"FunctionPtr1[Bool, Char]" %109) + call void @advanceAndCapture1(%SparrowScanner* %this) + store i1 (i8)* @isDigit, i1 (i8)** %funptr56 + %81 = bitcast i1 (i8)** %funptr56 to %"FunctionPtr1[Bool, Char]"* + %82 = load %"FunctionPtr1[Bool, Char]", %"FunctionPtr1[Bool, Char]"* %81 + store %"FunctionPtr1[Bool, Char]" %82, %"FunctionPtr1[Bool, Char]"* %"$tmpForRef55" + call void @advanceAndCaptureDigit(%SparrowScanner* %this, %"FunctionPtr1[Bool, Char]"* %"$tmpForRef55") br label %if_end54 if_end54: ; preds = %if_then53, %if_block52 br label %if_end51 -if_block56: ; preds = %if_end51 - %110 = load %SparrowScanner*, %SparrowScanner** %this.addr - %111 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %110, i32 0, i32 2 - %112 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %111) - br i1 %112, label %if_then57, label %if_end58 +if_block57: ; preds = %if_end51 + %83 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %84 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %83) + br i1 %84, label %if_then58, label %if_end59 -if_then57: ; preds = %if_block56 +if_then58: ; preds = %if_block57 store i1 true, i1* %isLong - %113 = load %SparrowScanner*, %SparrowScanner** %this.addr - %114 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %113, i32 0, i32 2 - %115 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %114) - %116 = call i8 @toLower(i8 %115) - store i8 %116, i8* %ch - br label %if_block59 + %85 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %86 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %85) + %87 = call i8 @toLower(i8 %86) + store i8 %87, i8* %ch + br label %if_block60 -if_end58: ; preds = %if_end62, %if_block56 +if_end59: ; preds = %if_end63, %if_block57 br label %if_end29 -if_block59: ; preds = %if_then57 - %117 = load i8, i8* %ch - %118 = icmp eq i8 %117, 102 - br i1 %118, label %if_then60, label %if_else61 +if_block60: ; preds = %if_then58 + %88 = load i8, i8* %ch + %89 = icmp eq i8 %88, 102 + br i1 %89, label %if_then61, label %if_else62 -if_then60: ; preds = %if_block59 +if_then61: ; preds = %if_block60 store i1 false, i1* %isLong - %119 = load %SparrowScanner*, %SparrowScanner** %this.addr - %120 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %119, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %120) - br label %if_end62 - -if_else61: ; preds = %if_block59 - br label %if_block63 - -if_end62: ; preds = %if_end65, %if_then60 - br label %if_end58 + %90 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %90) + br label %if_end63 -if_block63: ; preds = %if_else61 - %121 = load i8, i8* %ch - %122 = icmp eq i8 %121, 100 - br i1 %122, label %if_then64, label %if_end65 +if_else62: ; preds = %if_block60 + br label %if_block64 -if_then64: ; preds = %if_block63 - %123 = load %SparrowScanner*, %SparrowScanner** %this.addr - %124 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %123, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %124) - br label %if_end65 +if_end63: ; preds = %if_end66, %if_then61 + br label %if_end59 -if_end65: ; preds = %if_then64, %if_block63 - br label %if_end62 - -if_block66: ; preds = %if_end - %125 = load %SparrowScanner*, %SparrowScanner** %this.addr - %126 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %125, i32 0, i32 3 - %127 = getelementptr inbounds %Token, %Token* %126, i32 0, i32 2 - %128 = call i1 @isEmpty.397(%String* %127) - br i1 %128, label %if_then67, label %if_end68 - -if_then67: ; preds = %if_block66 - %129 = load %SparrowScanner*, %SparrowScanner** %this.addr - %130 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %131 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.36, i32 0, i32 0), i8** %130 - store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.36, i32 0, i32 23), i8** %131 - %132 = load %StringRef, %StringRef* %tmp.StringRef - store %StringRef %132, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %tmp.this69, %StringRef* %"$tmpForRef") - call void @reportError(%SparrowScanner* %129, %String* %tmp.this69) - call void @dtor.261(%String* %tmp.this69) - %133 = load %TokenType*, %TokenType** %_result.addr - call void @ctor.417(%TokenType* %133, i32 0) - ret void - -if_end68: ; preds = %dumy_block, %if_block66 - br label %if_block70 +if_block64: ; preds = %if_else62 + %91 = load i8, i8* %ch + %92 = icmp eq i8 %91, 100 + br i1 %92, label %if_then65, label %if_end66 + +if_then65: ; preds = %if_block64 + %93 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %93) + br label %if_end66 + +if_end66: ; preds = %if_then65, %if_block64 + br label %if_end63 + +if_block67: ; preds = %if_end + %94 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %95 = getelementptr inbounds %Token, %Token* %94, i32 0, i32 2 + %96 = call i1 @isEmpty.384(%String* %95) + br i1 %96, label %if_then68, label %if_end69 + +if_then68: ; preds = %if_block67 + %97 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %98 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %99 = bitcast %UntypedPtr* %97 to i8** + %100 = bitcast %UntypedPtr* %98 to i8** + store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.37, i32 0, i32 0), i8** %99 + store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.37, i32 0, i32 23), i8** %100 + %101 = load %StringRef, %StringRef* %tmp.StringRef + call void @ctor.459(%String* %tmp.this70, %StringRef %101) + call void @reportError(%SparrowScanner* %this, %String* %tmp.this70) + call void @dtor.250(%String* %tmp.this70) + call void @ctor.404(%TokenType* %_result, i32 0) + ret void + +if_end69: ; preds = %dumy_block, %if_block67 + br label %if_block71 dumy_block: ; No predecessors! - br label %if_end68 + br label %if_end69 -if_block70: ; preds = %if_end68 - %134 = load i1, i1* %isFloating - %135 = xor i1 true, %134 - br i1 %135, label %if_then71, label %if_end72 +if_block71: ; preds = %if_end69 + %102 = load i1, i1* %isFloating + %103 = xor i1 true, %102 + br i1 %103, label %if_then72, label %if_end73 -if_then71: ; preds = %if_block70 - br label %if_block73 +if_then72: ; preds = %if_block71 + br label %if_block74 -if_end72: ; preds = %if_end82, %if_block70 - br label %if_block87 +if_end73: ; preds = %if_end83, %if_block71 + br label %if_block88 -if_block73: ; preds = %if_then71 - %136 = load %SparrowScanner*, %SparrowScanner** %this.addr - %137 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %136, i32 0, i32 2 - %138 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %137) - br i1 %138, label %cond.true76, label %cond.false77 +if_block74: ; preds = %if_then72 + %104 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %105 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %104) + br i1 %105, label %cond.true77, label %cond.false78 -if_then74: ; preds = %cond.end78 +if_then75: ; preds = %cond.end79 store i1 true, i1* %isUnsigned - %139 = load %SparrowScanner*, %SparrowScanner** %this.addr - %140 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %139, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %140) - br label %if_end75 + %106 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %106) + br label %if_end76 -if_end75: ; preds = %if_then74, %cond.end78 - br label %if_block80 +if_end76: ; preds = %if_then75, %cond.end79 + br label %if_block81 -cond.true76: ; preds = %if_block73 - %141 = load %SparrowScanner*, %SparrowScanner** %this.addr - %142 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %141, i32 0, i32 2 - %143 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %142) - %144 = call i8 @toLower(i8 %143) - %145 = icmp eq i8 %144, 117 - br label %cond.end78 +cond.true77: ; preds = %if_block74 + %107 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %108 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %107) + %109 = call i8 @toLower(i8 %108) + %110 = icmp eq i8 %109, 117 + br label %cond.end79 -cond.false77: ; preds = %if_block73 - br label %cond.end78 +cond.false78: ; preds = %if_block74 + br label %cond.end79 -cond.end78: ; preds = %cond.false77, %cond.true76 - %cond.res79 = phi i1 [ %145, %cond.true76 ], [ false, %cond.false77 ] - br i1 %cond.res79, label %if_then74, label %if_end75 +cond.end79: ; preds = %cond.false78, %cond.true77 + %cond.res80 = phi i1 [ %110, %cond.true77 ], [ false, %cond.false78 ] + br i1 %cond.res80, label %if_then75, label %if_end76 -if_block80: ; preds = %if_end75 - %146 = load %SparrowScanner*, %SparrowScanner** %this.addr - %147 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %146, i32 0, i32 2 - %148 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %147) - br i1 %148, label %cond.true83, label %cond.false84 +if_block81: ; preds = %if_end76 + %111 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %112 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %111) + br i1 %112, label %cond.true84, label %cond.false85 -if_then81: ; preds = %cond.end85 +if_then82: ; preds = %cond.end86 store i1 true, i1* %isLong - %149 = load %SparrowScanner*, %SparrowScanner** %this.addr - %150 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %149, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %150) - br label %if_end82 + %113 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %113) + br label %if_end83 -if_end82: ; preds = %if_then81, %cond.end85 - br label %if_end72 +if_end83: ; preds = %if_then82, %cond.end86 + br label %if_end73 -cond.true83: ; preds = %if_block80 - %151 = load %SparrowScanner*, %SparrowScanner** %this.addr - %152 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %151, i32 0, i32 2 - %153 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %152) - %154 = call i8 @toLower(i8 %153) - %155 = icmp eq i8 %154, 108 - br label %cond.end85 - -cond.false84: ; preds = %if_block80 - br label %cond.end85 - -cond.end85: ; preds = %cond.false84, %cond.true83 - %cond.res86 = phi i1 [ %155, %cond.true83 ], [ false, %cond.false84 ] - br i1 %cond.res86, label %if_then81, label %if_end82 - -if_block87: ; preds = %if_end72 - %156 = load i1, i1* %isFloating - br i1 %156, label %if_then88, label %if_end89 - -if_then88: ; preds = %if_block87 - %157 = load %SparrowScanner*, %SparrowScanner** %this.addr - %158 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %157, i32 0, i32 3 - %159 = getelementptr inbounds %Token, %Token* %158, i32 0, i32 2 - store i8 0, i8* %tmp.this90 - %160 = load i8, i8* %tmp.this90 - call void @"+=.473"(%String* %159, i8 %160) - %161 = load %SparrowScanner*, %SparrowScanner** %this.addr - %162 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %161, i32 0, i32 3 - %163 = getelementptr inbounds %Token, %Token* %162, i32 0, i32 2 - %164 = call %StringRef @asStringRef(%String* %163) - %165 = call double @asDouble(%StringRef %164) - %166 = load %SparrowScanner*, %SparrowScanner** %this.addr - %167 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %166, i32 0, i32 3 - %168 = getelementptr inbounds %Token, %Token* %167, i32 0, i32 4 - store double %165, double* %168 - %169 = load %SparrowScanner*, %SparrowScanner** %this.addr - %170 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %169, i32 0, i32 3 - %171 = getelementptr inbounds %Token, %Token* %170, i32 0, i32 2 - call void @popBack.477(%String* %171) - %172 = load %TokenType*, %TokenType** %_result.addr - %173 = load i1, i1* %isLong - br i1 %173, label %cond_alt1, label %cond_alt2 - -if_end89: ; preds = %cond_destruct_end95, %if_block87 - br label %if_block97 +cond.true84: ; preds = %if_block81 + %114 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %115 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %114) + %116 = call i8 @toLower(i8 %115) + %117 = icmp eq i8 %116, 108 + br label %cond.end86 + +cond.false85: ; preds = %if_block81 + br label %cond.end86 + +cond.end86: ; preds = %cond.false85, %cond.true84 + %cond.res87 = phi i1 [ %117, %cond.true84 ], [ false, %cond.false85 ] + br i1 %cond.res87, label %if_then82, label %if_end83 + +if_block88: ; preds = %if_end73 + %118 = load i1, i1* %isFloating + br i1 %118, label %if_then89, label %if_end90 + +if_then89: ; preds = %if_block88 + %119 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %120 = getelementptr inbounds %Token, %Token* %119, i32 0, i32 2 + store i8 0, i8* %tmp.this91 + %121 = load i8, i8* %tmp.this91 + call void @"+=.461"(%String* %120, i8 %121) + %122 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %123 = getelementptr inbounds %Token, %Token* %122, i32 0, i32 2 + %124 = call %StringRef @asStringRef(%String* %123) + %125 = call double @asDouble(%StringRef %124) + %126 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %127 = getelementptr inbounds %Token, %Token* %126, i32 0, i32 4 + store double %125, double* %127 + %128 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %129 = getelementptr inbounds %Token, %Token* %128, i32 0, i32 2 + call void @popBack.465(%String* %129) + %130 = load i1, i1* %isLong + br i1 %130, label %cond_alt1, label %cond_alt2 + +if_end90: ; preds = %cond_destruct_end96, %if_block88 + br label %if_block98 -cond_alt1: ; preds = %if_then88 - call void @ctor.417(%TokenType* %tmp.this91, i32 45) +cond_alt1: ; preds = %if_then89 + call void @ctor.404(%TokenType* %tmp.this92, i32 46) br label %cond_end -cond_alt2: ; preds = %if_then88 - call void @ctor.417(%TokenType* %tmp.this92, i32 44) +cond_alt2: ; preds = %if_then89 + call void @ctor.404(%TokenType* %tmp.this93, i32 45) br label %cond_end cond_end: ; preds = %cond_alt2, %cond_alt1 - %cond = phi %TokenType* [ %tmp.this91, %cond_alt1 ], [ %tmp.this92, %cond_alt2 ] - call void @ctor.203(%TokenType* %172, %TokenType* %cond) - br i1 %173, label %cond_destruct_alt1, label %cond_destruct_alt2 + %cond = phi %TokenType* [ %tmp.this92, %cond_alt1 ], [ %tmp.this93, %cond_alt2 ] + call void @ctor.189(%TokenType* %_result, %TokenType* %cond) + br i1 %130, label %cond_destruct_alt1, label %cond_destruct_alt2 cond_destruct_alt1: ; preds = %cond_end br label %cond_destruct_end @@ -18489,112 +16575,106 @@ cond_destruct_alt2: ; preds = %cond_end cond_destruct_end: ; preds = %cond_destruct_alt2, %cond_destruct_alt1 ret void -cond_destruct_alt193: ; preds = %dumy_block96 - br label %cond_destruct_end95 +cond_destruct_alt194: ; preds = %dumy_block97 + br label %cond_destruct_end96 -cond_destruct_alt294: ; preds = %dumy_block96 - br label %cond_destruct_end95 +cond_destruct_alt295: ; preds = %dumy_block97 + br label %cond_destruct_end96 -cond_destruct_end95: ; preds = %cond_destruct_alt294, %cond_destruct_alt193 - br label %if_end89 +cond_destruct_end96: ; preds = %cond_destruct_alt295, %cond_destruct_alt194 + br label %if_end90 -dumy_block96: ; No predecessors! - br i1 %173, label %cond_destruct_alt193, label %cond_destruct_alt294 +dumy_block97: ; No predecessors! + br i1 %130, label %cond_destruct_alt194, label %cond_destruct_alt295 -if_block97: ; preds = %if_end89 - %174 = load i1, i1* %isUnsigned - br i1 %174, label %if_then98, label %if_else99 +if_block98: ; preds = %if_end90 + %131 = load i1, i1* %isUnsigned + br i1 %131, label %if_then99, label %if_else100 -if_then98: ; preds = %if_block97 - %175 = load %TokenType*, %TokenType** %_result.addr - %176 = load i1, i1* %isLong - br i1 %176, label %cond_alt1101, label %cond_alt2102 +if_then99: ; preds = %if_block98 + %132 = load i1, i1* %isLong + br i1 %132, label %cond_alt1102, label %cond_alt2103 -if_else99: ; preds = %if_block97 - %177 = load %TokenType*, %TokenType** %_result.addr - %178 = load i1, i1* %isLong - br i1 %178, label %cond_alt1114, label %cond_alt2115 +if_else100: ; preds = %if_block98 + %133 = load i1, i1* %isLong + br i1 %133, label %cond_alt1115, label %cond_alt2116 -if_end100: ; preds = %cond_destruct_end125, %cond_destruct_end112 +if_end101: ; preds = %cond_destruct_end126, %cond_destruct_end113 ret void -cond_alt1101: ; preds = %if_then98 - call void @ctor.417(%TokenType* %tmp.this104, i32 43) - br label %cond_end103 +cond_alt1102: ; preds = %if_then99 + call void @ctor.404(%TokenType* %tmp.this105, i32 44) + br label %cond_end104 -cond_alt2102: ; preds = %if_then98 - call void @ctor.417(%TokenType* %tmp.this105, i32 42) - br label %cond_end103 +cond_alt2103: ; preds = %if_then99 + call void @ctor.404(%TokenType* %tmp.this106, i32 43) + br label %cond_end104 -cond_end103: ; preds = %cond_alt2102, %cond_alt1101 - %cond106 = phi %TokenType* [ %tmp.this104, %cond_alt1101 ], [ %tmp.this105, %cond_alt2102 ] - call void @ctor.203(%TokenType* %175, %TokenType* %cond106) - br i1 %176, label %cond_destruct_alt1107, label %cond_destruct_alt2108 +cond_end104: ; preds = %cond_alt2103, %cond_alt1102 + %cond107 = phi %TokenType* [ %tmp.this105, %cond_alt1102 ], [ %tmp.this106, %cond_alt2103 ] + call void @ctor.189(%TokenType* %_result, %TokenType* %cond107) + br i1 %132, label %cond_destruct_alt1108, label %cond_destruct_alt2109 -cond_destruct_alt1107: ; preds = %cond_end103 - br label %cond_destruct_end109 +cond_destruct_alt1108: ; preds = %cond_end104 + br label %cond_destruct_end110 -cond_destruct_alt2108: ; preds = %cond_end103 - br label %cond_destruct_end109 +cond_destruct_alt2109: ; preds = %cond_end104 + br label %cond_destruct_end110 -cond_destruct_end109: ; preds = %cond_destruct_alt2108, %cond_destruct_alt1107 +cond_destruct_end110: ; preds = %cond_destruct_alt2109, %cond_destruct_alt1108 ret void -cond_destruct_alt1110: ; preds = %dumy_block113 - br label %cond_destruct_end112 +cond_destruct_alt1111: ; preds = %dumy_block114 + br label %cond_destruct_end113 -cond_destruct_alt2111: ; preds = %dumy_block113 - br label %cond_destruct_end112 +cond_destruct_alt2112: ; preds = %dumy_block114 + br label %cond_destruct_end113 -cond_destruct_end112: ; preds = %cond_destruct_alt2111, %cond_destruct_alt1110 - br label %if_end100 +cond_destruct_end113: ; preds = %cond_destruct_alt2112, %cond_destruct_alt1111 + br label %if_end101 -dumy_block113: ; No predecessors! - br i1 %176, label %cond_destruct_alt1110, label %cond_destruct_alt2111 +dumy_block114: ; No predecessors! + br i1 %132, label %cond_destruct_alt1111, label %cond_destruct_alt2112 -cond_alt1114: ; preds = %if_else99 - call void @ctor.417(%TokenType* %tmp.this117, i32 41) - br label %cond_end116 +cond_alt1115: ; preds = %if_else100 + call void @ctor.404(%TokenType* %tmp.this118, i32 42) + br label %cond_end117 -cond_alt2115: ; preds = %if_else99 - call void @ctor.417(%TokenType* %tmp.this118, i32 40) - br label %cond_end116 +cond_alt2116: ; preds = %if_else100 + call void @ctor.404(%TokenType* %tmp.this119, i32 41) + br label %cond_end117 -cond_end116: ; preds = %cond_alt2115, %cond_alt1114 - %cond119 = phi %TokenType* [ %tmp.this117, %cond_alt1114 ], [ %tmp.this118, %cond_alt2115 ] - call void @ctor.203(%TokenType* %177, %TokenType* %cond119) - br i1 %178, label %cond_destruct_alt1120, label %cond_destruct_alt2121 +cond_end117: ; preds = %cond_alt2116, %cond_alt1115 + %cond120 = phi %TokenType* [ %tmp.this118, %cond_alt1115 ], [ %tmp.this119, %cond_alt2116 ] + call void @ctor.189(%TokenType* %_result, %TokenType* %cond120) + br i1 %133, label %cond_destruct_alt1121, label %cond_destruct_alt2122 -cond_destruct_alt1120: ; preds = %cond_end116 - br label %cond_destruct_end122 +cond_destruct_alt1121: ; preds = %cond_end117 + br label %cond_destruct_end123 -cond_destruct_alt2121: ; preds = %cond_end116 - br label %cond_destruct_end122 +cond_destruct_alt2122: ; preds = %cond_end117 + br label %cond_destruct_end123 -cond_destruct_end122: ; preds = %cond_destruct_alt2121, %cond_destruct_alt1120 +cond_destruct_end123: ; preds = %cond_destruct_alt2122, %cond_destruct_alt1121 ret void -cond_destruct_alt1123: ; preds = %dumy_block126 - br label %cond_destruct_end125 +cond_destruct_alt1124: ; preds = %dumy_block127 + br label %cond_destruct_end126 -cond_destruct_alt2124: ; preds = %dumy_block126 - br label %cond_destruct_end125 +cond_destruct_alt2125: ; preds = %dumy_block127 + br label %cond_destruct_end126 -cond_destruct_end125: ; preds = %cond_destruct_alt2124, %cond_destruct_alt1123 - br label %if_end100 +cond_destruct_end126: ; preds = %cond_destruct_alt2125, %cond_destruct_alt1124 + br label %if_end101 -dumy_block126: ; No predecessors! - br i1 %178, label %cond_destruct_alt1123, label %cond_destruct_alt2124 +dumy_block127: ; No predecessors! + br i1 %133, label %cond_destruct_alt1124, label %cond_destruct_alt2125 } ; Function Attrs: inlinehint nounwind define internal i64 @consumeDigits(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r, i64 %base, %String* %capture) #4 { - %r.addr = alloca %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* - store %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr %base.addr = alloca i64 store i64 %base, i64* %base.addr - %capture.addr = alloca %String* - store %String* %capture, %String** %capture.addr %res = alloca i64 %tmp.this = alloca i64 %tmp.this8 = alloca i64 @@ -18623,26 +16703,23 @@ if_end: ; preds = %while_end12, %while ret i64 %4 while_block: ; preds = %while_step, %if_then - %5 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %6 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) - br i1 %6, label %cond.true, label %cond.false + %5 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + br i1 %5, label %cond.true, label %cond.false while_body: ; preds = %cond.end br label %if_block5 while_step: ; preds = %if_end7 - %7 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %7) + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) br label %while_block while_end: ; preds = %cond.end br label %if_end cond.true: ; preds = %while_block - %8 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %9 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %8) - %10 = call i1 @isXdigit(i8 %9) - br i1 %10, label %cond.true1, label %cond.false2 + %6 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + %7 = call i1 @isXdigit(i8 %6) + br i1 %7, label %cond.true1, label %cond.false2 cond.false: ; preds = %while_block br label %cond.end @@ -18655,65 +16732,57 @@ cond.true1: ; preds = %cond.true br label %cond.end3 cond.false2: ; preds = %cond.true - %11 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %12 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %11) - %13 = icmp eq i8 %12, 95 + %8 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + %9 = icmp eq i8 %8, 95 br label %cond.end3 cond.end3: ; preds = %cond.false2, %cond.true1 - %cond.res = phi i1 [ true, %cond.true1 ], [ %13, %cond.false2 ] + %cond.res = phi i1 [ true, %cond.true1 ], [ %9, %cond.false2 ] br label %cond.end if_block5: ; preds = %while_body - %14 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %15 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %14) - %16 = icmp ne i8 %15, 95 - br i1 %16, label %if_then6, label %if_end7 + %10 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + %11 = icmp ne i8 %10, 95 + br i1 %11, label %if_then6, label %if_end7 if_then6: ; preds = %if_block5 - %17 = load %String*, %String** %capture.addr - %18 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %19 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %18) - call void @"+=.473"(%String* %17, i8 %19) - %20 = load i64, i64* %res - %21 = load i64, i64* %base.addr - %22 = mul i64 %20, %21 - store i64 %22, i64* %res - %23 = load i64, i64* %res - %24 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %25 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %24) - %26 = call i32 @getXdigitVal(i8 %25) - %27 = zext i32 %26 to i64 - store i64 %27, i64* %tmp.this8 - %28 = load i64, i64* %tmp.this8 - %29 = add i64 %23, %28 - store i64 %29, i64* %res + %12 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + call void @"+=.461"(%String* %capture, i8 %12) + %13 = load i64, i64* %res + %14 = load i64, i64* %base.addr + %15 = mul i64 %13, %14 + store i64 %15, i64* %res + %16 = load i64, i64* %res + %17 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + %18 = call i32 @getXdigitVal(i8 %17) + %19 = zext i32 %18 to i64 + store i64 %19, i64* %tmp.this8 + %20 = load i64, i64* %tmp.this8 + %21 = add i64 %16, %20 + store i64 %21, i64* %res br label %if_end7 if_end7: ; preds = %if_then6, %if_block5 br label %while_step while_block9: ; preds = %while_step11, %if_else - %30 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %31 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %30) - br i1 %31, label %cond.true13, label %cond.false14 + %22 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + br i1 %22, label %cond.true13, label %cond.false14 while_body10: ; preds = %cond.end15 br label %if_block21 while_step11: ; preds = %if_end23 - %32 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %32) + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) br label %while_block9 while_end12: ; preds = %cond.end15 br label %if_end cond.true13: ; preds = %while_block9 - %33 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %34 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %33) - %35 = call i1 @isXdigit(i8 %34) - br i1 %35, label %cond.true16, label %cond.false17 + %23 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + %24 = call i1 @isXdigit(i8 %23) + br i1 %24, label %cond.true16, label %cond.false17 cond.false14: ; preds = %while_block9 br label %cond.end15 @@ -18726,39 +16795,34 @@ cond.true16: ; preds = %cond.true13 br label %cond.end18 cond.false17: ; preds = %cond.true13 - %36 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %37 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %36) - %38 = icmp eq i8 %37, 95 + %25 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + %26 = icmp eq i8 %25, 95 br label %cond.end18 cond.end18: ; preds = %cond.false17, %cond.true16 - %cond.res19 = phi i1 [ true, %cond.true16 ], [ %38, %cond.false17 ] + %cond.res19 = phi i1 [ true, %cond.true16 ], [ %26, %cond.false17 ] br label %cond.end15 if_block21: ; preds = %while_body10 - %39 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %40 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %39) - %41 = icmp ne i8 %40, 95 - br i1 %41, label %if_then22, label %if_end23 + %27 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + %28 = icmp ne i8 %27, 95 + br i1 %28, label %if_then22, label %if_end23 if_then22: ; preds = %if_block21 - %42 = load %String*, %String** %capture.addr - %43 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %44 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %43) - call void @"+=.473"(%String* %42, i8 %44) - %45 = load i64, i64* %res - %46 = load i64, i64* %base.addr - %47 = mul i64 %45, %46 - store i64 %47, i64* %res - %48 = load i64, i64* %res - %49 = load %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"*, %"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"** %r.addr - %50 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %49) - %51 = call i32 @getDigitVal(i8 %50) - %52 = zext i32 %51 to i64 - store i64 %52, i64* %tmp.this24 - %53 = load i64, i64* %tmp.this24 - %54 = add i64 %48, %53 - store i64 %54, i64* %res + %29 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + call void @"+=.461"(%String* %capture, i8 %29) + %30 = load i64, i64* %res + %31 = load i64, i64* %base.addr + %32 = mul i64 %30, %31 + store i64 %32, i64* %res + %33 = load i64, i64* %res + %34 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %r) + %35 = call i32 @getDigitVal(i8 %34) + %36 = zext i32 %35 to i64 + store i64 %36, i64* %tmp.this24 + %37 = load i64, i64* %tmp.this24 + %38 = add i64 %33, %37 + store i64 %38, i64* %res br label %if_end23 if_end23: ; preds = %if_then22, %if_block21 @@ -18802,40 +16866,33 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @advanceAndCaptureDigit(%SparrowScanner* %this, %"FunctionPtr1[Bool, Char]" %pred) #4 { - %this.addr = alloca %SparrowScanner* - store %SparrowScanner* %this, %SparrowScanner** %this.addr - %pred.addr = alloca %"FunctionPtr1[Bool, Char]" - store %"FunctionPtr1[Bool, Char]" %pred, %"FunctionPtr1[Bool, Char]"* %pred.addr +define internal void @advanceAndCaptureDigit(%SparrowScanner* %this, %"FunctionPtr1[Bool, Char]"* %pred) #4 { br label %code code: ; preds = %0 br label %while_block while_block: ; preds = %while_step, %code - %1 = load %SparrowScanner*, %SparrowScanner** %this.addr - %2 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %1, i32 0, i32 2 - %3 = call i1 @"pre_!!.442"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %2) - br i1 %3, label %cond.true, label %cond.false + %1 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %2 = call i1 @"pre_!!.429"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %1) + br i1 %2, label %cond.true, label %cond.false while_body: ; preds = %cond.end br label %if_block while_step: ; preds = %if_end - %4 = load %SparrowScanner*, %SparrowScanner** %this.addr - %5 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %4, i32 0, i32 2 - call void @popFront.423(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %5) + %3 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + call void @popFront.410(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %3) br label %while_block while_end: ; preds = %cond.end ret void cond.true: ; preds = %while_block - %6 = load %SparrowScanner*, %SparrowScanner** %this.addr - %7 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %6, i32 0, i32 2 - %8 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %7) - %9 = call i1 @"().475"(%"FunctionPtr1[Bool, Char]"* %pred.addr, i8 %8) - br i1 %9, label %cond.true1, label %cond.false2 + %4 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %5 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %4) + %6 = call i1 @"().463"(%"FunctionPtr1[Bool, Char]"* %pred, i8 %5) + br i1 %6, label %cond.true1, label %cond.false2 cond.false: ; preds = %while_block br label %cond.end @@ -18848,31 +16905,27 @@ cond.true1: ; preds = %cond.true br label %cond.end3 cond.false2: ; preds = %cond.true - %10 = load %SparrowScanner*, %SparrowScanner** %this.addr - %11 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %10, i32 0, i32 2 - %12 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %11) - %13 = icmp eq i8 %12, 95 + %7 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %8 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %7) + %9 = icmp eq i8 %8, 95 br label %cond.end3 cond.end3: ; preds = %cond.false2, %cond.true1 - %cond.res = phi i1 [ true, %cond.true1 ], [ %13, %cond.false2 ] + %cond.res = phi i1 [ true, %cond.true1 ], [ %9, %cond.false2 ] br label %cond.end if_block: ; preds = %while_body - %14 = load %SparrowScanner*, %SparrowScanner** %this.addr - %15 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %14, i32 0, i32 2 - %16 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %15) - %17 = icmp ne i8 %16, 95 - br i1 %17, label %if_then, label %if_end + %10 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %11 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %10) + %12 = icmp ne i8 %11, 95 + br i1 %12, label %if_then, label %if_end if_then: ; preds = %if_block - %18 = load %SparrowScanner*, %SparrowScanner** %this.addr - %19 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %18, i32 0, i32 3 - %20 = getelementptr inbounds %Token, %Token* %19, i32 0, i32 2 - %21 = load %SparrowScanner*, %SparrowScanner** %this.addr - %22 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %21, i32 0, i32 2 - %23 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %22) - call void @"+=.473"(%String* %20, i8 %23) + %13 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 3 + %14 = getelementptr inbounds %Token, %Token* %13, i32 0, i32 2 + %15 = getelementptr inbounds %SparrowScanner, %SparrowScanner* %this, i32 0, i32 2 + %16 = call i8 @"pre_*"(%"LocationSyncCharRange[RangeWithLookahead[BufferedCharSourceRange]]"* %15) + call void @"+=.461"(%String* %14, i8 %16) br label %if_end if_end: ; preds = %if_then, %if_block @@ -18880,412 +16933,348 @@ if_end: ; preds = %if_then, %if_block } ; Function Attrs: inlinehint nounwind -define internal void @popBack.477(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %"$tmpC" = alloca %"RawPtr[Char]" +define internal void @popBack.465(%String* %this) #4 { + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 1 - %3 = load %String*, %String** %this.addr - %4 = getelementptr inbounds %String, %String* %3, i32 0, i32 1 - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %4 + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %2 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 store i64 -1, i64* %tmp.this - %6 = load i64, i64* %tmp.this - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %5, i64 %6) - call void @"=.200"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %"$tmpC") - %7 = load %String*, %String** %this.addr - %8 = getelementptr inbounds %String, %String* %7, i32 0, i32 1 - %9 = load %"RawPtr[Char]", %"RawPtr[Char]"* %8 - %10 = call i8* @value(%"RawPtr[Char]" %9) - %11 = load i8, i8* %10 + %3 = load i64, i64* %tmp.this + %4 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %2, i64 %3) + store %"RawPtr[Char]" %4, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %"$tmpForRef") + %5 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %6 = call i8* @value(%"RawPtr[Char]"* %5) + %7 = load i8, i8* %6 ret void } ; Function Attrs: inlinehint nounwind -define internal void @toString.478(%String* sret %_result, %StringRef %a1, i8 %a2, %StringRef %a3, i32 %a4, i8 %a5) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %a1.addr = alloca %StringRef - store %StringRef %a1, %StringRef* %a1.addr - %a2.addr = alloca i8 - store i8 %a2, i8* %a2.addr - %a3.addr = alloca %StringRef - store %StringRef %a3, %StringRef* %a3.addr - %a4.addr = alloca i32 - store i32 %a4, i32* %a4.addr - %a5.addr = alloca i8 - store i8 %a5, i8* %a5.addr +define internal void @toString.466(%String* sret %_result, %StringRef* %a1, i8* %a2, %StringRef* %a3, i32* %a4, i8* %a5) #4 { %s = alloca %StringOutputStream - br label %code - -code: ; preds = %0 - call void @ctor.452(%StringOutputStream* %s) - %1 = call %StringOutputStream* @"<<"(%StringOutputStream* %s, %StringRef* %a1.addr) - %2 = call %StringOutputStream* @"<<.479"(%StringOutputStream* %1, i8* %a2.addr) - %3 = call %StringOutputStream* @"<<"(%StringOutputStream* %2, %StringRef* %a3.addr) - %4 = call %StringOutputStream* @"<<.483"(%StringOutputStream* %3, i32* %a4.addr) - %5 = call %StringOutputStream* @"<<.479"(%StringOutputStream* %4, i8* %a5.addr) - %6 = load %String*, %String** %_result.addr - %7 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %s, i32 0, i32 0 - call void @ctor.189(%String* %6, %String* %7) - call void @dtor.454(%StringOutputStream* %s) + %"$tmpC" = alloca %StringOutputStream + %"$tmpC1" = alloca %StringOutputStream + %"$tmpC2" = alloca %StringOutputStream + %"$tmpC3" = alloca %StringOutputStream + %"$tmpC4" = alloca %StringOutputStream + br label %code + +code: ; preds = %0 + call void @ctor.439(%StringOutputStream* %s) + call void @"<<"(%StringOutputStream* %"$tmpC4", %StringOutputStream* %s, %StringRef* %a1) + call void @"<<.467"(%StringOutputStream* %"$tmpC3", %StringOutputStream* %"$tmpC4", i8* %a2) + call void @"<<"(%StringOutputStream* %"$tmpC2", %StringOutputStream* %"$tmpC3", %StringRef* %a3) + call void @"<<.471"(%StringOutputStream* %"$tmpC1", %StringOutputStream* %"$tmpC2", i32* %a4) + call void @"<<.467"(%StringOutputStream* %"$tmpC", %StringOutputStream* %"$tmpC1", i8* %a5) + call void @dtor.442(%StringOutputStream* %"$tmpC") + call void @dtor.442(%StringOutputStream* %"$tmpC1") + call void @dtor.442(%StringOutputStream* %"$tmpC2") + call void @dtor.442(%StringOutputStream* %"$tmpC3") + call void @dtor.442(%StringOutputStream* %"$tmpC4") + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %s, i32 0, i32 0 + call void @ctor.175(%String* %_result, %String* %1) + call void @dtor.442(%StringOutputStream* %s) ret void dumy_block: ; No predecessors! - call void @dtor.454(%StringOutputStream* %s) + call void @dtor.442(%StringOutputStream* %s) ret void } ; Function Attrs: inlinehint nounwind -define internal %StringOutputStream* @"<<.479"(%StringOutputStream* %s, i8* %x) #4 { - %s.addr = alloca %StringOutputStream* - store %StringOutputStream* %s, %StringOutputStream** %s.addr - %x.addr = alloca i8* - store i8* %x, i8** %x.addr +define internal void @"<<.467"(%StringOutputStream* sret %_result, %StringOutputStream* %s, i8* %x) #4 { br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %s.addr - %2 = load i8*, i8** %x.addr - %3 = load i8, i8* %2 - call void @"<<<.480"(%StringOutputStream* %1, i8 %3) - %4 = load %StringOutputStream*, %StringOutputStream** %s.addr - ret %StringOutputStream* %4 + %1 = load i8, i8* %x + call void @"<<<.468"(%StringOutputStream* %s, i8 %1) + call void @ctor.441(%StringOutputStream* %_result, %StringOutputStream* %s) + ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"<<<.480"(%StringOutputStream* %this, i8 %x) #3 { - %this.addr = alloca %StringOutputStream* - store %StringOutputStream* %this, %StringOutputStream** %this.addr +define internal void @"<<<.468"(%StringOutputStream* %this, i8 %x) #3 { %x.addr = alloca i8 store i8 %x, i8* %x.addr br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %this.addr - %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 - %3 = load i8, i8* %x.addr - call void @append.481(%String* %2, i8 %3) + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %this, i32 0, i32 0 + %2 = load i8, i8* %x.addr + call void @append.469(%String* %1, i8 %2) ret void } ; Function Attrs: inlinehint nounwind -define internal void @append.481(%String* %this, i8 %value) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal void @append.469(%String* %this, i8 %value) #4 { %value.addr = alloca i8 store i8 %value, i8* %value.addr %tmp.this = alloca %StringRef br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = load i8, i8* %value.addr - %3 = load %String*, %String** %this.addr - %4 = getelementptr inbounds %String, %String* %3, i32 0, i32 1 - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %4 - %6 = call i8* @bytePtr(%"RawPtr[Char]" %5) - %7 = load %String*, %String** %this.addr - %8 = getelementptr inbounds %String, %String* %7, i32 0, i32 1 - %9 = load %"RawPtr[Char]", %"RawPtr[Char]"* %8 - %10 = call i8* @bytePtr(%"RawPtr[Char]" %9) - call void @ctor.57(%StringRef* %tmp.this, i8* %6, i8* %10) - %11 = load %StringRef, %StringRef* %tmp.this - call void @insertBefore.482(%String* %1, i8 %2, %StringRef %11) + %1 = load i8, i8* %value.addr + %2 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %3 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %2) + %4 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %5 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %4) + call void @ctor.60(%StringRef* %tmp.this, %UntypedPtr %3, %UntypedPtr %5) + %6 = load %StringRef, %StringRef* %tmp.this + call void @insertBefore.470(%String* %this, i8 %1, %StringRef %6) + %7 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %7) ret void } ; Function Attrs: inlinehint nounwind -define internal void @insertBefore.482(%String* %this, i8 %value, %StringRef %pos) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal void @insertBefore.470(%String* %this, i8 %value, %StringRef %pos) #4 { %value.addr = alloca i8 store i8 %value, i8* %value.addr %pos.addr = alloca %StringRef store %StringRef %pos, %StringRef* %pos.addr %posCount = alloca i64 - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 %p = alloca %"RawPtr[Char]" - %tmp.this1 = alloca i64 - %q = alloca %"RawPtr[Char]" + %"$tmpForRef1" = alloca %"RawPtr[Char]" %tmp.this2 = alloca i64 - %"$tmpC3" = alloca %"RawPtr[Char]" - %"$tmpC4" = alloca %"RawPtr[Char]" - %tmp.this5 = alloca i64 - %"$tmpC6" = alloca %"RawPtr[Char]" - %"$tmpC7" = alloca %"RawPtr[Char]" + %q = alloca %"RawPtr[Char]" + %"$tmpForRef3" = alloca %"RawPtr[Char]" + %tmp.this4 = alloca i64 + %"$tmpForRef5" = alloca %"RawPtr[Char]" + %"$tmpForRef6" = alloca %"RawPtr[Char]" + %tmp.this7 = alloca i64 + %"$tmpForRef8" = alloca %"RawPtr[Char]" + %"$tmpForRef9" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 %1 = load %StringRef, %StringRef* %pos.addr - call void @_frontPtr(%"RawPtr[Char]"* %"$tmpC", %StringRef %1) - %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %3 = load %String*, %String** %this.addr - %4 = getelementptr inbounds %String, %String* %3, i32 0, i32 0 - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %4 - %6 = call i64 @diff(%"RawPtr[Char]" %2, %"RawPtr[Char]" %5) - store i64 %6, i64* %posCount - %7 = load %String*, %String** %this.addr - %8 = load %String*, %String** %this.addr - %9 = call i64 @size.190(%String* %8) + %2 = call %"RawPtr[Char]" @_frontPtr(%StringRef %1) + store %"RawPtr[Char]" %2, %"RawPtr[Char]"* %"$tmpForRef" + %3 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %4 = load %"RawPtr[Char]", %"RawPtr[Char]"* %3 + %5 = call i64 @diff(%"RawPtr[Char]"* %"$tmpForRef", %"RawPtr[Char]" %4) + store i64 %5, i64* %posCount + %6 = call i64 @size.176(%String* %this) store i64 1, i64* %tmp.this - %10 = load i64, i64* %tmp.this - %11 = add i64 %9, %10 - call void @reserve(%String* %7, i64 %11) - %12 = load %String*, %String** %this.addr - %13 = getelementptr inbounds %String, %String* %12, i32 0, i32 1 - %14 = load %"RawPtr[Char]", %"RawPtr[Char]"* %13 - store i64 -1, i64* %tmp.this1 - %15 = load i64, i64* %tmp.this1 - call void @advance(%"RawPtr[Char]"* %p, %"RawPtr[Char]" %14, i64 %15) - %16 = load %String*, %String** %this.addr - %17 = getelementptr inbounds %String, %String* %16, i32 0, i32 0 - %18 = load %"RawPtr[Char]", %"RawPtr[Char]"* %17 - %19 = load i64, i64* %posCount - store i64 1, i64* %tmp.this2 - %20 = load i64, i64* %tmp.this2 - %21 = call i64 @_DiffType_opMinus(i64 %19, i64 %20) - call void @advance(%"RawPtr[Char]"* %q, %"RawPtr[Char]" %18, i64 %21) + %7 = load i64, i64* %tmp.this + %8 = add i64 %6, %7 + call void @reserve(%String* %this, i64 %8) + %9 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + store i64 -1, i64* %tmp.this2 + %10 = load i64, i64* %tmp.this2 + %11 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %9, i64 %10) + store %"RawPtr[Char]" %11, %"RawPtr[Char]"* %"$tmpForRef1" + call void @ctor.178(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpForRef1") + %12 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %13 = load i64, i64* %posCount + store i64 1, i64* %tmp.this4 + %14 = load i64, i64* %tmp.this4 + %15 = call i64 @_DiffType_opMinus(i64 %13, i64 %14) + %16 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %12, i64 %15) + store %"RawPtr[Char]" %16, %"RawPtr[Char]"* %"$tmpForRef3" + call void @ctor.178(%"RawPtr[Char]"* %q, %"RawPtr[Char]"* %"$tmpForRef3") br label %while_block while_block: ; preds = %while_step, %code - %22 = call i1 @"==.268"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %q) - %23 = xor i1 true, %22 - br i1 %23, label %while_body, label %while_end + %17 = call i1 @"==.257"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %q) + %18 = xor i1 true, %17 + br i1 %18, label %while_body, label %while_end while_body: ; preds = %while_block - %24 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - %25 = call i8* @value(%"RawPtr[Char]" %24) - %26 = load i8, i8* %25 - %27 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - call void @advance.269(%"RawPtr[Char]"* %"$tmpC3", %"RawPtr[Char]" %27) - %28 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC3" - %29 = call i8* @value(%"RawPtr[Char]" %28) - store i8 %26, i8* %29 - %30 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - %31 = call i8* @value(%"RawPtr[Char]" %30) - %32 = load i8, i8* %31 + %19 = call i8* @value(%"RawPtr[Char]"* %p) + %20 = load i8, i8* %19 + %21 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %p) + store %"RawPtr[Char]" %21, %"RawPtr[Char]"* %"$tmpForRef5" + %22 = call i8* @value(%"RawPtr[Char]"* %"$tmpForRef5") + store i8 %20, i8* %22 + %23 = call i8* @value(%"RawPtr[Char]"* %p) + %24 = load i8, i8* %23 br label %while_step while_step: ; preds = %while_body - %33 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - store i64 -1, i64* %tmp.this5 - %34 = load i64, i64* %tmp.this5 - call void @advance(%"RawPtr[Char]"* %"$tmpC4", %"RawPtr[Char]" %33, i64 %34) - call void @"=.200"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpC4") + store i64 -1, i64* %tmp.this7 + %25 = load i64, i64* %tmp.this7 + %26 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %p, i64 %25) + store %"RawPtr[Char]" %26, %"RawPtr[Char]"* %"$tmpForRef6" + call void @"=.186"(%"RawPtr[Char]"* %p, %"RawPtr[Char]"* %"$tmpForRef6") br label %while_block while_end: ; preds = %while_block - %35 = load i8, i8* %value.addr - %36 = load %"RawPtr[Char]", %"RawPtr[Char]"* %p - call void @advance.269(%"RawPtr[Char]"* %"$tmpC6", %"RawPtr[Char]" %36) - %37 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC6" - %38 = call i8* @value(%"RawPtr[Char]" %37) - store i8 %35, i8* %38 - %39 = load %String*, %String** %this.addr - %40 = getelementptr inbounds %String, %String* %39, i32 0, i32 1 - %41 = load %String*, %String** %this.addr - %42 = getelementptr inbounds %String, %String* %41, i32 0, i32 1 - %43 = load %"RawPtr[Char]", %"RawPtr[Char]"* %42 - call void @advance.269(%"RawPtr[Char]"* %"$tmpC7", %"RawPtr[Char]" %43) - call void @"=.200"(%"RawPtr[Char]"* %40, %"RawPtr[Char]"* %"$tmpC7") + %27 = load i8, i8* %value.addr + %28 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %p) + store %"RawPtr[Char]" %28, %"RawPtr[Char]"* %"$tmpForRef8" + %29 = call i8* @value(%"RawPtr[Char]"* %"$tmpForRef8") + store i8 %27, i8* %29 + %30 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %31 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %32 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %31) + store %"RawPtr[Char]" %32, %"RawPtr[Char]"* %"$tmpForRef9" + call void @"=.186"(%"RawPtr[Char]"* %30, %"RawPtr[Char]"* %"$tmpForRef9") ret void } ; Function Attrs: inlinehint nounwind -define internal %StringOutputStream* @"<<.483"(%StringOutputStream* %s, i32* %x) #4 { - %s.addr = alloca %StringOutputStream* - store %StringOutputStream* %s, %StringOutputStream** %s.addr - %x.addr = alloca i32* - store i32* %x, i32** %x.addr +define internal void @"<<.471"(%StringOutputStream* sret %_result, %StringOutputStream* %s, i32* %x) #4 { br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %s.addr - %2 = load i32*, i32** %x.addr - %3 = load i32, i32* %2 - call void @"<<<.484"(%StringOutputStream* %1, i32 %3) - %4 = load %StringOutputStream*, %StringOutputStream** %s.addr - ret %StringOutputStream* %4 + %1 = load i32, i32* %x + call void @"<<<.472"(%StringOutputStream* %s, i32 %1) + call void @ctor.441(%StringOutputStream* %_result, %StringOutputStream* %s) + ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"<<<.484"(%StringOutputStream* %this, i32 %x) #3 { - %this.addr = alloca %StringOutputStream* - store %StringOutputStream* %this, %StringOutputStream** %this.addr +define internal void @"<<<.472"(%StringOutputStream* %this, i32 %x) #3 { %x.addr = alloca i32 store i32 %x, i32* %x.addr + %"$tmpForRef" = alloca %StringRef %"$tmpC" = alloca %String br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %this.addr - %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 - %3 = load i32, i32* %x.addr - call void @intToString(%String* %"$tmpC", i32 %3) - %4 = call %StringRef @all.485(%String* %"$tmpC") - call void @append(%String* %2, %StringRef %4) - call void @dtor.261(%String* %"$tmpC") + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %this, i32 0, i32 0 + %2 = load i32, i32* %x.addr + call void @intToString(%String* %"$tmpC", i32 %2) + %3 = call %StringRef @all.473(%String* %"$tmpC") + store %StringRef %3, %StringRef* %"$tmpForRef" + call void @append(%String* %1, %StringRef* %"$tmpForRef") + call void @dtor.250(%String* %"$tmpC") ret void } ; Function Attrs: inlinehint nounwind -define internal %StringRef @all.485(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal %StringRef @all.473(%String* %this) #4 { %tmp.this = alloca %StringRef br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = call i8* @bytePtr(%"RawPtr[Char]" %3) - %5 = load %String*, %String** %this.addr - %6 = getelementptr inbounds %String, %String* %5, i32 0, i32 1 - %7 = load %"RawPtr[Char]", %"RawPtr[Char]"* %6 - %8 = call i8* @bytePtr(%"RawPtr[Char]" %7) - call void @ctor.57(%StringRef* %tmp.this, i8* %4, i8* %8) - %9 = load %StringRef, %StringRef* %tmp.this - ret %StringRef %9 -} + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %2 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %1) + %3 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %4 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %3) + call void @ctor.60(%StringRef* %tmp.this, %UntypedPtr %2, %UntypedPtr %4) + %5 = load %StringRef, %StringRef* %tmp.this + %6 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %6) + ret %StringRef %5 + +dumy_block: ; No predecessors! + %7 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %7) + unreachable +} ; Function Attrs: inlinehint nounwind define internal void @intToString(%String* sret %_result, i32 %x) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr %x.addr = alloca i32 store i32 %x, i32* %x.addr %buf = alloca [12 x i8] - %"$tmpForRef" = alloca %StringRef br label %code code: ; preds = %0 %1 = load i32, i32* %x.addr %2 = bitcast [12 x i8]* %buf to i8* call void @_Int_to_CString(i32 %1, i8* %2) - %3 = load %String*, %String** %_result.addr - %4 = bitcast [12 x i8]* %buf to i8* - %5 = call %StringRef @_String_fromCString(i8* %4) - store %StringRef %5, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %3, %StringRef* %"$tmpForRef") + %3 = bitcast [12 x i8]* %buf to i8* + %4 = call %StringRef @_String_fromCString(i8* %3) + call void @ctor.459(%String* %_result, %StringRef %4) ret void } ; Function Attrs: inlinehint nounwind -define internal void @"+=.486"(%"Vector[UInt]"* %this, i32* %value) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr - %value.addr = alloca i32* - store i32* %value, i32** %value.addr +define internal void @"+=.474"(%"Vector[UInt]"* %this, i32 %value) #4 { + %value.addr = alloca i32 + store i32 %value, i32* %value.addr br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = load i32*, i32** %value.addr - call void @pushBack.487(%"Vector[UInt]"* %1, i32* %2) + %1 = load i32, i32* %value.addr + call void @pushBack.475(%"Vector[UInt]"* %this, i32 %1) ret void } ; Function Attrs: inlinehint nounwind -define internal void @pushBack.487(%"Vector[UInt]"* %this, i32* %value) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr - %value.addr = alloca i32* - store i32* %value, i32** %value.addr +define internal void @pushBack.475(%"Vector[UInt]"* %this, i32 %value) #4 { + %value.addr = alloca i32 + store i32 %value, i32* %value.addr %t = alloca i64 %tmp.this = alloca i64 %tmp.this4 = alloca i64 %tmp.this5 = alloca i64 - %"$tmpC" = alloca %"RawPtr[UInt]" + %"$tmpForRef" = alloca %"RawPtr[UInt]" br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 1 - %3 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %3, i32 0, i32 2 - %5 = call i1 @"==.271"(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %4) - br i1 %5, label %if_then, label %if_end + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 2 + %3 = call i1 @"==.260"(%"RawPtr[UInt]"* %1, %"RawPtr[UInt]"* %2) + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block store i64 2, i64* %tmp.this - %6 = load i64, i64* %tmp.this - %7 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %8 = call i64 @capacity.488(%"Vector[UInt]"* %7) - %9 = mul i64 %6, %8 - store i64 %9, i64* %t + %4 = load i64, i64* %tmp.this + %5 = call i64 @capacity.476(%"Vector[UInt]"* %this) + %6 = mul i64 %4, %5 + store i64 %6, i64* %t br label %if_block1 if_end: ; preds = %if_end3, %if_block - %10 = load i32*, i32** %value.addr - %11 = load i32, i32* %10 - %12 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %13 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %12, i32 0, i32 1 - %14 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %13 - %15 = call i32* @value.272(%"RawPtr[UInt]" %14) - store i32 %11, i32* %15 - %16 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %17 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %16, i32 0, i32 1 - %18 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %19 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %18, i32 0, i32 1 - %20 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %19 - call void @advance.273(%"RawPtr[UInt]"* %"$tmpC", %"RawPtr[UInt]" %20) - call void @"=.225"(%"RawPtr[UInt]"* %17, %"RawPtr[UInt]"* %"$tmpC") + %7 = load i32, i32* %value.addr + %8 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %9 = call i32* @value.261(%"RawPtr[UInt]"* %8) + store i32 %7, i32* %9 + %10 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %11 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %12 = call %"RawPtr[UInt]" @advance.262(%"RawPtr[UInt]"* %11) + store %"RawPtr[UInt]" %12, %"RawPtr[UInt]"* %"$tmpForRef" + call void @"=.212"(%"RawPtr[UInt]"* %10, %"RawPtr[UInt]"* %"$tmpForRef") ret void if_block1: ; preds = %if_then - %21 = load i64, i64* %t + %13 = load i64, i64* %t store i64 2, i64* %tmp.this4 - %22 = load i64, i64* %tmp.this4 - %23 = icmp slt i64 %21, %22 - br i1 %23, label %if_then2, label %if_end3 + %14 = load i64, i64* %tmp.this4 + %15 = icmp slt i64 %13, %14 + br i1 %15, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i64 2, i64* %tmp.this5 - %24 = load i64, i64* %tmp.this5 - store i64 %24, i64* %t + %16 = load i64, i64* %tmp.this5 + store i64 %16, i64* %t br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 - %25 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %26 = load i64, i64* %t - call void @reserve.489(%"Vector[UInt]"* %25, i64 %26) + %17 = load i64, i64* %t + call void @reserve.477(%"Vector[UInt]"* %this, i64 %17) br label %if_end } ; Function Attrs: inlinehint nounwind -define internal i64 @capacity.488(%"Vector[UInt]"* %this) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr +define internal i64 @capacity.476(%"Vector[UInt]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 2 + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 2 + %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 %3 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %2 - %4 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %5 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %4, i32 0, i32 0 - %6 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %5 - %7 = call i64 @diff.223(%"RawPtr[UInt]" %3, %"RawPtr[UInt]" %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = call i64 @diff.210(%"RawPtr[UInt]"* %1, %"RawPtr[UInt]" %3) + store i64 %4, i64* %tmp.this + %5 = load i64, i64* %tmp.this + ret i64 %5 } ; Function Attrs: inlinehint nounwind -define internal void @reserve.489(%"Vector[UInt]"* %this, i64 %n) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr +define internal void @reserve.477(%"Vector[UInt]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr %curCapacity = alloca i64 @@ -19296,21 +17285,20 @@ define internal void @reserve.489(%"Vector[UInt]"* %this, i64 %n) #4 { %tmp.this10 = alloca i64 %tmp.this11 = alloca double %curSize = alloca i64 - %"$tmpC" = alloca %"RawPtr[UInt]" - %"$tmpC12" = alloca %"RawPtr[UInt]" + %"$tmpForRef" = alloca %"RawPtr[UInt]" + %"$tmpForRef12" = alloca %"RawPtr[UInt]" br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = call i64 @capacity.488(%"Vector[UInt]"* %1) - store i64 %2, i64* %curCapacity + %1 = call i64 @capacity.476(%"Vector[UInt]"* %this) + store i64 %1, i64* %curCapacity br label %if_block if_block: ; preds = %code - %3 = load i64, i64* %n.addr - %4 = load i64, i64* %curCapacity - %5 = icmp sle i64 %3, %4 - br i1 %5, label %if_then, label %if_end + %2 = load i64, i64* %n.addr + %3 = load i64, i64* %curCapacity + %4 = icmp sle i64 %2, %3 + br i1 %4, label %if_then, label %if_end if_then: ; preds = %if_block ret void @@ -19322,158 +17310,132 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %6 = load i64, i64* %n.addr + %5 = load i64, i64* %n.addr store i64 8, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = icmp slt i64 %6, %7 - br i1 %8, label %if_then2, label %if_end3 + %6 = load i64, i64* %tmp.this + %7 = icmp slt i64 %5, %6 + br i1 %7, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i64 8, i64* %tmp.this4 - %9 = load i64, i64* %tmp.this4 - store i64 %9, i64* %n.addr + %8 = load i64, i64* %tmp.this4 + store i64 %8, i64* %n.addr br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 br label %if_block5 if_block5: ; preds = %if_end3 - %10 = load i64, i64* %n.addr - %11 = sitofp i64 %10 to double - store double %11, double* %tmp.this8 - %12 = load double, double* %tmp.this8 - %13 = load i64, i64* %curCapacity - %14 = sitofp i64 %13 to double - store double %14, double* %tmp.this9 - %15 = load double, double* %tmp.this9 - %16 = call double @_Double_opMul(double 2.000000e+00, double %15) - %17 = call i1 @_Double_opLT(double %12, double %16) - br i1 %17, label %if_then6, label %if_end7 + %9 = load i64, i64* %n.addr + %10 = sitofp i64 %9 to double + store double %10, double* %tmp.this8 + %11 = load double, double* %tmp.this8 + %12 = load i64, i64* %curCapacity + %13 = sitofp i64 %12 to double + store double %13, double* %tmp.this9 + %14 = load double, double* %tmp.this9 + %15 = call double @_Double_opMul(double 2.000000e+00, double %14) + %16 = call i1 @_Double_opLT(double %11, double %15) + br i1 %16, label %if_then6, label %if_end7 if_then6: ; preds = %if_block5 - %18 = load i64, i64* %curCapacity - %19 = sitofp i64 %18 to double - store double %19, double* %tmp.this11 - %20 = load double, double* %tmp.this11 - %21 = call double @_Double_opMul(double 2.000000e+00, double %20) - %22 = fptoui double %21 to i64 - store i64 %22, i64* %tmp.this10 - %23 = load i64, i64* %tmp.this10 - store i64 %23, i64* %n.addr + %17 = load i64, i64* %curCapacity + %18 = sitofp i64 %17 to double + store double %18, double* %tmp.this11 + %19 = load double, double* %tmp.this11 + %20 = call double @_Double_opMul(double 2.000000e+00, double %19) + %21 = fptoui double %20 to i64 + store i64 %21, i64* %tmp.this10 + %22 = load i64, i64* %tmp.this10 + store i64 %22, i64* %n.addr br label %if_end7 if_end7: ; preds = %if_then6, %if_block5 - %24 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %25 = call i64 @size.222(%"Vector[UInt]"* %24) - store i64 %25, i64* %curSize - %26 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %27 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %26, i32 0, i32 0 - %28 = load i64, i64* %n.addr - call void @reallocPtr.490(%"RawPtr[UInt]"* %27, i64 %28) - %29 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %30 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %29, i32 0, i32 1 - %31 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %32 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %31, i32 0, i32 0 - %33 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %32 - %34 = load i64, i64* %curSize - call void @advance.228(%"RawPtr[UInt]"* %"$tmpC", %"RawPtr[UInt]" %33, i64 %34) - call void @"=.225"(%"RawPtr[UInt]"* %30, %"RawPtr[UInt]"* %"$tmpC") - %35 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %36 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %35, i32 0, i32 2 - %37 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %38 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %37, i32 0, i32 0 - %39 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %38 - %40 = load i64, i64* %n.addr - call void @advance.228(%"RawPtr[UInt]"* %"$tmpC12", %"RawPtr[UInt]" %39, i64 %40) - call void @"=.225"(%"RawPtr[UInt]"* %36, %"RawPtr[UInt]"* %"$tmpC12") - ret void -} - -; Function Attrs: inlinehint nounwind -define internal void @reallocPtr.490(%"RawPtr[UInt]"* %this, i64 %n) #4 { - %this.addr = alloca %"RawPtr[UInt]"* - store %"RawPtr[UInt]"* %this, %"RawPtr[UInt]"** %this.addr + %23 = call i64 @size.209(%"Vector[UInt]"* %this) + store i64 %23, i64* %curSize + %24 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + %25 = load i64, i64* %n.addr + call void @reallocPtr.478(%"RawPtr[UInt]"* %24, i64 %25) + %26 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %27 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + %28 = load i64, i64* %curSize + %29 = call %"RawPtr[UInt]" @advance.215(%"RawPtr[UInt]"* %27, i64 %28) + store %"RawPtr[UInt]" %29, %"RawPtr[UInt]"* %"$tmpForRef" + call void @"=.212"(%"RawPtr[UInt]"* %26, %"RawPtr[UInt]"* %"$tmpForRef") + %30 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 2 + %31 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + %32 = load i64, i64* %n.addr + %33 = call %"RawPtr[UInt]" @advance.215(%"RawPtr[UInt]"* %31, i64 %32) + store %"RawPtr[UInt]" %33, %"RawPtr[UInt]"* %"$tmpForRef12" + call void @"=.212"(%"RawPtr[UInt]"* %30, %"RawPtr[UInt]"* %"$tmpForRef12") + ret void +} + +; Function Attrs: inlinehint nounwind +define internal void @reallocPtr.478(%"RawPtr[UInt]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %this.addr - %2 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %1 - %3 = call i8* @bytePtr.224(%"RawPtr[UInt]" %2) + %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + %2 = load i32*, i32** %1 + call void @ctor.211(%UntypedPtr* %tmp.this, i32* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this %4 = load i64, i64* %n.addr %5 = mul i64 %4, 4 - %6 = call i8* @realloc(i8* %3, i64 %5) - %7 = bitcast i8* %6 to i32* - %8 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %this.addr - %9 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %8, i32 0, i32 0 - store i32* %7, i32** %9 + %6 = call %UntypedPtr @realloc(%UntypedPtr %3, i64 %5) + %7 = call i32* @asRefOf.217(%UntypedPtr %6) + %8 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + store i32* %7, i32** %8 ret void } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.491(%"RangeWithLookahead[SparrowScanner]"* %this) #4 { - %this.addr = alloca %"RangeWithLookahead[SparrowScanner]"* - store %"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"** %this.addr +define internal i1 @isEmpty.479(%"RangeWithLookahead[SparrowScanner]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %1, i32 0, i32 1 - %3 = call i1 @isEmpty.492(%"Vector[Token]"* %2) - ret i1 %3 + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 + %2 = call i1 @isEmpty.480(%"Vector[Token]"* %1) + ret i1 %2 } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.492(%"Vector[Token]"* %this) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal i1 @isEmpty.480(%"Vector[Token]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 - %3 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %3, i32 0, i32 1 - %5 = call i1 @"==.218"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %4) - ret i1 %5 + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %3 = call i1 @"==.205"(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %2) + ret i1 %3 } ; Function Attrs: inlinehint nounwind -define internal void @front.493(%Token* sret %_result, %"RangeWithLookahead[SparrowScanner]"* %this) #4 { - %_result.addr = alloca %Token* - store %Token* %_result, %Token** %_result.addr - %this.addr = alloca %"RangeWithLookahead[SparrowScanner]"* - store %"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"** %this.addr +define internal void @front.481(%Token* sret %_result, %"RangeWithLookahead[SparrowScanner]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %Token*, %Token** %_result.addr - %2 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %3 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %2, i32 0, i32 1 - %4 = call %Token* @front.494(%"Vector[Token]"* %3) - call void @ctor.202(%Token* %1, %Token* %4) + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 + %2 = call %Token* @front.482(%"Vector[Token]"* %1) + call void @ctor.188(%Token* %_result, %Token* %2) ret void } ; Function Attrs: inlinehint nounwind -define internal %Token* @front.494(%"Vector[Token]"* %this) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal %Token* @front.482(%"Vector[Token]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 - %3 = load %"RawPtr[Token]", %"RawPtr[Token]"* %2 - %4 = call %Token* @value.219(%"RawPtr[Token]" %3) - ret %Token* %4 + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %2 = call %Token* @value.206(%"RawPtr[Token]"* %1) + ret %Token* %2 } ; Function Attrs: noinline nounwind -define void @popFront.495(%"SparrowLayoutDecoder[SparrowScanner]"* %this) #5 { - %this.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* - store %"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr +define void @popFront.483(%"SparrowLayoutDecoder[SparrowScanner]"* %this) #5 { %tmp.this = alloca %TokenType %oldType = alloca %TokenType %"$tmpC" = alloca %Token @@ -19500,55 +17462,48 @@ define void @popFront.495(%"SparrowLayoutDecoder[SparrowScanner]"* %this) #5 { %numDedents = alloca i32 %tmp.this75 = alloca %TokenType %"$tmpC79" = alloca %String + %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef - %tmp.StringRef80 = alloca %StringRef - %tmp.this87 = alloca %TokenType - %"$tmpForRef" = alloca i8 - %tmp.this92 = alloca %TokenType - %"$tmpForRef93" = alloca i8 + %"$tmpForRef80" = alloca %StringRef + %tmp.StringRef81 = alloca %StringRef + %tmp.this88 = alloca %TokenType + %tmp.this93 = alloca %TokenType %tmp.this98 = alloca %TokenType - %"$tmpForRef99" = alloca i8 - %tmp.this107 = alloca %TokenType - %tmp.this116 = alloca %TokenType - %tmp.this124 = alloca %TokenType + %tmp.this106 = alloca %TokenType + %tmp.this115 = alloca %TokenType + %tmp.this123 = alloca %TokenType br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %1, i32 0, i32 5 - %3 = load i32, i32* %2 - %4 = icmp sgt i32 %3, 0 - br i1 %4, label %if_then, label %if_end + %1 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + %2 = load i32, i32* %1 + %3 = icmp sgt i32 %2, 0 + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block - %5 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %5, i32 0, i32 5 - %7 = call i32 @post_--.48(i32* %6) - %8 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %9 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %8, i32 0, i32 4 - call void @ctor.417(%TokenType* %tmp.this, i32 25) - call void @"=.298"(%TokenType* %9, %TokenType* %tmp.this) + %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + %5 = call i32 @post_--.48(i32* %4) + %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 4 + call void @ctor.404(%TokenType* %tmp.this, i32 26) + call void @"=.286"(%TokenType* %6, %TokenType* %tmp.this) ret void if_end: ; preds = %dumy_block, %if_block - %10 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - call void @front.496(%Token* %"$tmpC", %"SparrowLayoutDecoder[SparrowScanner]"* %10) - %11 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 - call void @ctor.203(%TokenType* %oldType, %TokenType* %11) - call void @dtor.260(%Token* %"$tmpC") - %12 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %13 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %12, i32 0, i32 0 - call void @popFront.497(%"RangeWithLookahead[SparrowScanner]"* %13) - %14 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %15 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %14, i32 0, i32 0 - call void @front.493(%Token* %"$tmpC1", %"RangeWithLookahead[SparrowScanner]"* %15) - %16 = getelementptr inbounds %Token, %Token* %"$tmpC1", i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this2, i32 1) - %17 = call i1 @"==.352"(%TokenType* %16, %TokenType* %tmp.this2) - br i1 %17, label %cond.true, label %cond.false + call void @front.484(%Token* %"$tmpC", %"SparrowLayoutDecoder[SparrowScanner]"* %this) + %7 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 + call void @ctor.189(%TokenType* %oldType, %TokenType* %7) + call void @dtor.249(%Token* %"$tmpC") + %8 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @popFront.485(%"RangeWithLookahead[SparrowScanner]"* %8) + %9 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @front.481(%Token* %"$tmpC1", %"RangeWithLookahead[SparrowScanner]"* %9) + %10 = getelementptr inbounds %Token, %Token* %"$tmpC1", i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this2, i32 1) + %11 = call i1 @"==.339"(%TokenType* %10, %TokenType* %tmp.this2) + br i1 %11, label %cond.true, label %cond.false dumy_block: ; No predecessors! br label %if_end @@ -19557,177 +17512,168 @@ cond.true: ; preds = %if_end br label %cond.end cond.false: ; preds = %if_end - %18 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %19 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %18, i32 0, i32 0 - call void @front.493(%Token* %"$tmpC3", %"RangeWithLookahead[SparrowScanner]"* %19) - %20 = getelementptr inbounds %Token, %Token* %"$tmpC3", i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this4, i32 0) - %21 = call i1 @"==.352"(%TokenType* %20, %TokenType* %tmp.this4) + %12 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @front.481(%Token* %"$tmpC3", %"RangeWithLookahead[SparrowScanner]"* %12) + %13 = getelementptr inbounds %Token, %Token* %"$tmpC3", i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this4, i32 0) + %14 = call i1 @"==.339"(%TokenType* %13, %TokenType* %tmp.this4) br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ true, %cond.true ], [ %21, %cond.false ] + %cond.res = phi i1 [ true, %cond.true ], [ %14, %cond.false ] store i1 %cond.res, i1* %changeLine - br i1 %17, label %cond_destruct_alt1, label %cond_destruct_alt2 + br i1 %11, label %cond_destruct_alt1, label %cond_destruct_alt2 cond_destruct_alt1: ; preds = %cond.end br label %cond_destruct_end cond_destruct_alt2: ; preds = %cond.end - call void @dtor.260(%Token* %"$tmpC3") + call void @dtor.249(%Token* %"$tmpC3") br label %cond_destruct_end cond_destruct_end: ; preds = %cond_destruct_alt2, %cond_destruct_alt1 - call void @dtor.260(%Token* %"$tmpC1") + call void @dtor.249(%Token* %"$tmpC1") br label %while_block while_block: ; preds = %while_step, %cond_destruct_end - %22 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %23 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %22, i32 0, i32 0 - call void @front.493(%Token* %"$tmpC5", %"RangeWithLookahead[SparrowScanner]"* %23) - %24 = getelementptr inbounds %Token, %Token* %"$tmpC5", i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this6, i32 1) - %25 = call i1 @"==.352"(%TokenType* %24, %TokenType* %tmp.this6) - br i1 %25, label %while_body, label %while_end + %15 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @front.481(%Token* %"$tmpC5", %"RangeWithLookahead[SparrowScanner]"* %15) + %16 = getelementptr inbounds %Token, %Token* %"$tmpC5", i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this6, i32 1) + %17 = call i1 @"==.339"(%TokenType* %16, %TokenType* %tmp.this6) + br i1 %17, label %while_body, label %while_end while_body: ; preds = %while_block - %26 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %27 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %26, i32 0, i32 0 - call void @popFront.497(%"RangeWithLookahead[SparrowScanner]"* %27) + %18 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @popFront.485(%"RangeWithLookahead[SparrowScanner]"* %18) br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - call void @dtor.260(%Token* %"$tmpC5") - %28 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %29 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %28, i32 0, i32 0 - call void @front.493(%Token* %tk, %"RangeWithLookahead[SparrowScanner]"* %29) - %30 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %31 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %30, i32 0, i32 3 - %32 = call i1 @isEmpty.416(%"Vector[Char]"* %31) - br i1 %32, label %cond.true7, label %cond.false8 + call void @dtor.249(%Token* %"$tmpC5") + %19 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @front.481(%Token* %tk, %"RangeWithLookahead[SparrowScanner]"* %19) + %20 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + %21 = call i1 @isEmpty.403(%"Vector[Char]"* %20) + br i1 %21, label %cond.true7, label %cond.false8 cond.true7: ; preds = %while_end br label %cond.end9 cond.false8: ; preds = %while_end - %33 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %34 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %33, i32 0, i32 3 - %35 = call i8* @back.511(%"Vector[Char]"* %34) - %36 = load i8, i8* %35 - %37 = icmp eq i8 %36, 123 + %22 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + %23 = call i8* @back.499(%"Vector[Char]"* %22) + %24 = load i8, i8* %23 + %25 = icmp eq i8 %24, 123 br label %cond.end9 cond.end9: ; preds = %cond.false8, %cond.true7 - %cond.res10 = phi i1 [ true, %cond.true7 ], [ %37, %cond.false8 ] + %cond.res10 = phi i1 [ true, %cond.true7 ], [ %25, %cond.false8 ] store i1 %cond.res10, i1* %outsideParens br label %if_block11 if_block11: ; preds = %cond.end9 - %38 = load i1, i1* %changeLine - br i1 %38, label %cond.true14, label %cond.false15 + %26 = load i1, i1* %changeLine + br i1 %26, label %cond.true14, label %cond.false15 if_then12: ; preds = %cond.end16 - %39 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 0 - %40 = getelementptr inbounds %Location, %Location* %39, i32 0, i32 1 - %41 = getelementptr inbounds %LineCol, %LineCol* %40, i32 0, i32 1 - %42 = load i32, i32* %41 - store i32 %42, i32* %newCol - %43 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %44 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %43, i32 0, i32 2 - %45 = call i32* @back.512(%"Vector[UInt]"* %44) - %46 = load i32, i32* %45 - store i32 %46, i32* %oldCol + %27 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 0 + %28 = getelementptr inbounds %Location, %Location* %27, i32 0, i32 1 + %29 = getelementptr inbounds %LineCol, %LineCol* %28, i32 0, i32 1 + %30 = load i32, i32* %29 + store i32 %30, i32* %newCol + %31 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + %32 = call i32* @back.500(%"Vector[UInt]"* %31) + %33 = load i32, i32* %32 + store i32 %33, i32* %oldCol br label %if_block18 -if_end13: ; preds = %cond_destruct_end83, %cond.end16 - br label %if_block84 +if_end13: ; preds = %cond_destruct_end84, %cond.end16 + br label %if_block85 cond.true14: ; preds = %if_block11 - %47 = load i1, i1* %outsideParens + %34 = load i1, i1* %outsideParens br label %cond.end16 cond.false15: ; preds = %if_block11 br label %cond.end16 cond.end16: ; preds = %cond.false15, %cond.true14 - %cond.res17 = phi i1 [ %47, %cond.true14 ], [ false, %cond.false15 ] + %cond.res17 = phi i1 [ %34, %cond.true14 ], [ false, %cond.false15 ] br i1 %cond.res17, label %if_then12, label %if_end13 if_block18: ; preds = %if_then12 - %48 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this21, i32 0) - %49 = call i1 @"==.352"(%TokenType* %48, %TokenType* %tmp.this21) - br i1 %49, label %if_then19, label %if_end20 + %35 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this21, i32 0) + %36 = call i1 @"==.339"(%TokenType* %35, %TokenType* %tmp.this21) + br i1 %36, label %if_then19, label %if_end20 if_then19: ; preds = %if_block18 store i32 1, i32* %tmp.this22 - %50 = load i32, i32* %tmp.this22 - store i32 %50, i32* %newCol + %37 = load i32, i32* %tmp.this22 + store i32 %37, i32* %newCol br label %if_end20 if_end20: ; preds = %if_then19, %if_block18 br label %if_block23 if_block23: ; preds = %if_end20 - %51 = load i32, i32* %newCol - %52 = load i32, i32* %oldCol - %53 = icmp eq i32 %51, %52 - br i1 %53, label %cond.true32, label %cond.false33 + %38 = load i32, i32* %newCol + %39 = load i32, i32* %oldCol + %40 = icmp eq i32 %38, %39 + br i1 %40, label %cond.true32, label %cond.false33 if_then24: ; preds = %cond.end28 - %54 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %55 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %54, i32 0, i32 4 - call void @ctor.417(%TokenType* %tmp.this41, i32 31) - call void @"=.298"(%TokenType* %55, %TokenType* %tmp.this41) - %56 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %57 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %56, i32 0, i32 5 - store i32 1, i32* %57 + %41 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 4 + call void @ctor.404(%TokenType* %tmp.this41, i32 32) + call void @"=.286"(%TokenType* %41, %TokenType* %tmp.this41) + %42 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + store i32 1, i32* %42 br label %if_end25 if_end25: ; preds = %if_then24, %cond.end28 br i1 %cond.res38, label %cond_destruct_alt142, label %cond_destruct_alt243 cond.true26: ; preds = %cond.end31 - call void @ctor.417(%TokenType* %tmp.this39, i32 25) - %58 = call i1 @"==.352"(%TokenType* %oldType, %TokenType* %tmp.this39) - %59 = xor i1 true, %58 + call void @ctor.404(%TokenType* %tmp.this39, i32 26) + %43 = call i1 @"==.339"(%TokenType* %oldType, %TokenType* %tmp.this39) + %44 = xor i1 true, %43 br label %cond.end28 cond.false27: ; preds = %cond.end31 br label %cond.end28 cond.end28: ; preds = %cond.false27, %cond.true26 - %cond.res40 = phi i1 [ %59, %cond.true26 ], [ false, %cond.false27 ] + %cond.res40 = phi i1 [ %44, %cond.true26 ], [ false, %cond.false27 ] br i1 %cond.res40, label %if_then24, label %if_end25 cond.true29: ; preds = %cond.end34 - call void @ctor.417(%TokenType* %tmp.this37, i32 31) - %60 = call i1 @"==.352"(%TokenType* %oldType, %TokenType* %tmp.this37) - %61 = xor i1 true, %60 + call void @ctor.404(%TokenType* %tmp.this37, i32 32) + %45 = call i1 @"==.339"(%TokenType* %oldType, %TokenType* %tmp.this37) + %46 = xor i1 true, %45 br label %cond.end31 cond.false30: ; preds = %cond.end34 br label %cond.end31 cond.end31: ; preds = %cond.false30, %cond.true29 - %cond.res38 = phi i1 [ %61, %cond.true29 ], [ false, %cond.false30 ] + %cond.res38 = phi i1 [ %46, %cond.true29 ], [ false, %cond.false30 ] br i1 %cond.res38, label %cond.true26, label %cond.false27 cond.true32: ; preds = %if_block23 - %62 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this35, i32 24) - %63 = call i1 @"==.352"(%TokenType* %62, %TokenType* %tmp.this35) - %64 = xor i1 true, %63 + %47 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this35, i32 25) + %48 = call i1 @"==.339"(%TokenType* %47, %TokenType* %tmp.this35) + %49 = xor i1 true, %48 br label %cond.end34 cond.false33: ; preds = %if_block23 br label %cond.end34 cond.end34: ; preds = %cond.false33, %cond.true32 - %cond.res36 = phi i1 [ %64, %cond.true32 ], [ false, %cond.false33 ] + %cond.res36 = phi i1 [ %49, %cond.true32 ], [ false, %cond.false33 ] br i1 %cond.res36, label %cond.true29, label %cond.false30 cond_destruct_alt142: ; preds = %if_end25 @@ -19746,7 +17692,7 @@ cond_destruct_alt246: ; preds = %cond_destruct_end44 br label %cond_destruct_end47 cond_destruct_end47: ; preds = %cond_destruct_alt246, %cond_destruct_alt145 - br i1 %53, label %cond_destruct_alt148, label %cond_destruct_alt249 + br i1 %40, label %cond_destruct_alt148, label %cond_destruct_alt249 cond_destruct_alt148: ; preds = %cond_destruct_end47 br label %cond_destruct_end50 @@ -19758,39 +17704,37 @@ cond_destruct_end50: ; preds = %cond_destruct_alt24 br label %if_block51 if_block51: ; preds = %cond_destruct_end50 - %65 = load i32, i32* %newCol - %66 = load i32, i32* %oldCol - %67 = icmp sgt i32 %65, %66 - br i1 %67, label %cond.true54, label %cond.false55 + %50 = load i32, i32* %newCol + %51 = load i32, i32* %oldCol + %52 = icmp sgt i32 %50, %51 + br i1 %52, label %cond.true54, label %cond.false55 if_then52: ; preds = %cond.end56 - %68 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %69 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %68, i32 0, i32 4 - call void @ctor.417(%TokenType* %tmp.this59, i32 24) - call void @"=.298"(%TokenType* %69, %TokenType* %tmp.this59) - %70 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %71 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %70, i32 0, i32 5 - store i32 1, i32* %71 - %72 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %73 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %72, i32 0, i32 2 - call void @"+=.486"(%"Vector[UInt]"* %73, i32* %newCol) + %53 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 4 + call void @ctor.404(%TokenType* %tmp.this59, i32 25) + call void @"=.286"(%TokenType* %53, %TokenType* %tmp.this59) + %54 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + store i32 1, i32* %54 + %55 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + %56 = load i32, i32* %newCol + call void @"+=.474"(%"Vector[UInt]"* %55, i32 %56) br label %if_end53 if_end53: ; preds = %if_then52, %cond.end56 - br i1 %67, label %cond_destruct_alt160, label %cond_destruct_alt261 + br i1 %52, label %cond_destruct_alt160, label %cond_destruct_alt261 cond.true54: ; preds = %if_block51 - %74 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this57, i32 0) - %75 = call i1 @"==.352"(%TokenType* %74, %TokenType* %tmp.this57) - %76 = xor i1 true, %75 + %57 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this57, i32 0) + %58 = call i1 @"==.339"(%TokenType* %57, %TokenType* %tmp.this57) + %59 = xor i1 true, %58 br label %cond.end56 cond.false55: ; preds = %if_block51 br label %cond.end56 cond.end56: ; preds = %cond.false55, %cond.true54 - %cond.res58 = phi i1 [ %76, %cond.true54 ], [ false, %cond.false55 ] + %cond.res58 = phi i1 [ %59, %cond.true54 ], [ false, %cond.false55 ] br i1 %cond.res58, label %if_then52, label %if_end53 cond_destruct_alt160: ; preds = %if_end53 @@ -19803,404 +17747,385 @@ cond_destruct_end62: ; preds = %cond_destruct_alt26 br label %if_block63 if_block63: ; preds = %cond_destruct_end62 - %77 = load i32, i32* %newCol - %78 = load i32, i32* %oldCol - %79 = icmp slt i32 %77, %78 - br i1 %79, label %cond.true66, label %cond.false67 + %60 = load i32, i32* %newCol + %61 = load i32, i32* %oldCol + %62 = icmp slt i32 %60, %61 + br i1 %62, label %cond.true66, label %cond.false67 if_then64: ; preds = %cond.end68 store i32 0, i32* %numDedents br label %while_block71 if_end65: ; preds = %if_end78, %cond.end68 - br i1 %79, label %cond_destruct_alt181, label %cond_destruct_alt282 + br i1 %62, label %cond_destruct_alt182, label %cond_destruct_alt283 cond.true66: ; preds = %if_block63 - %80 = load i32, i32* %newCol + %63 = load i32, i32* %newCol store i32 1, i32* %tmp.this69 - %81 = load i32, i32* %tmp.this69 - %82 = icmp sge i32 %80, %81 + %64 = load i32, i32* %tmp.this69 + %65 = icmp sge i32 %63, %64 br label %cond.end68 cond.false67: ; preds = %if_block63 br label %cond.end68 cond.end68: ; preds = %cond.false67, %cond.true66 - %cond.res70 = phi i1 [ %82, %cond.true66 ], [ false, %cond.false67 ] + %cond.res70 = phi i1 [ %65, %cond.true66 ], [ false, %cond.false67 ] br i1 %cond.res70, label %if_then64, label %if_end65 while_block71: ; preds = %while_step73, %if_then64 - %83 = load i32, i32* %newCol - %84 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %85 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %84, i32 0, i32 2 - %86 = call i32* @back.512(%"Vector[UInt]"* %85) - %87 = load i32, i32* %86 - %88 = icmp slt i32 %83, %87 - br i1 %88, label %while_body72, label %while_end74 + %66 = load i32, i32* %newCol + %67 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + %68 = call i32* @back.500(%"Vector[UInt]"* %67) + %69 = load i32, i32* %68 + %70 = icmp slt i32 %66, %69 + br i1 %70, label %while_body72, label %while_end74 while_body72: ; preds = %while_block71 - %89 = call i32 @"post_++.39"(i32* %numDedents) - %90 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %91 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %90, i32 0, i32 2 - call void @popBack.514(%"Vector[UInt]"* %91) + %71 = call i32 @"post_++.39"(i32* %numDedents) + %72 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + call void @popBack.502(%"Vector[UInt]"* %72) br label %while_step73 while_step73: ; preds = %while_body72 br label %while_block71 while_end74: ; preds = %while_block71 - %92 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %93 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %92, i32 0, i32 4 - call void @ctor.417(%TokenType* %tmp.this75, i32 31) - call void @"=.298"(%TokenType* %93, %TokenType* %tmp.this75) - %94 = load i32, i32* %numDedents - %95 = add i32 1, %94 - %96 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %97 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %96, i32 0, i32 5 - store i32 %95, i32* %97 + %73 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 4 + call void @ctor.404(%TokenType* %tmp.this75, i32 32) + call void @"=.286"(%TokenType* %73, %TokenType* %tmp.this75) + %74 = load i32, i32* %numDedents + %75 = add i32 1, %74 + %76 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + store i32 %75, i32* %76 br label %if_block76 if_block76: ; preds = %while_end74 - %98 = load i32, i32* %newCol - %99 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %100 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %99, i32 0, i32 2 - %101 = call i32* @back.512(%"Vector[UInt]"* %100) - %102 = load i32, i32* %101 - %103 = icmp ne i32 %98, %102 - br i1 %103, label %if_then77, label %if_end78 + %77 = load i32, i32* %newCol + %78 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + %79 = call i32* @back.500(%"Vector[UInt]"* %78) + %80 = load i32, i32* %79 + %81 = icmp ne i32 %77, %80 + br i1 %81, label %if_then77, label %if_end78 if_then77: ; preds = %if_block76 - %104 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %105 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %104, i32 0, i32 1 - %106 = load %ErrorReporter, %ErrorReporter* %105 - %107 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 0 - %108 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %109 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str.39, i32 0, i32 0), i8** %108 - store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str.39, i32 0, i32 31), i8** %109 - %110 = load %StringRef, %StringRef* %tmp.StringRef - %111 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %112 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %111, i32 0, i32 2 - %113 = call i32* @back.512(%"Vector[UInt]"* %112) - %114 = load i32, i32* %113 - %115 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef80, i32 0, i32 0 - %116 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef80, i32 0, i32 1 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.40, i32 0, i32 0), i8** %115 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.40, i32 0, i32 6), i8** %116 - %117 = load %StringRef, %StringRef* %tmp.StringRef80 - %118 = load i32, i32* %newCol - call void @toString.515(%String* %"$tmpC79", %StringRef %110, i32 %114, %StringRef %117, i32 %118) - call void @reportError.450(%ErrorReporter %106, %Location* %107, %String* %"$tmpC79") - call void @dtor.261(%String* %"$tmpC79") + %82 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 1 + %83 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 0 + %84 = load %Location, %Location* %83 + %85 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %86 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %87 = bitcast %UntypedPtr* %85 to i8** + %88 = bitcast %UntypedPtr* %86 to i8** + store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str.40, i32 0, i32 0), i8** %87 + store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str.40, i32 0, i32 31), i8** %88 + %89 = load %StringRef, %StringRef* %tmp.StringRef + store %StringRef %89, %StringRef* %"$tmpForRef" + %90 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 2 + %91 = call i32* @back.500(%"Vector[UInt]"* %90) + %92 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef81, i32 0, i32 0 + %93 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef81, i32 0, i32 1 + %94 = bitcast %UntypedPtr* %92 to i8** + %95 = bitcast %UntypedPtr* %93 to i8** + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.41, i32 0, i32 0), i8** %94 + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.41, i32 0, i32 6), i8** %95 + %96 = load %StringRef, %StringRef* %tmp.StringRef81 + store %StringRef %96, %StringRef* %"$tmpForRef80" + call void @toString.503(%String* %"$tmpC79", %StringRef* %"$tmpForRef", i32* %91, %StringRef* %"$tmpForRef80", i32* %newCol) + call void @reportError.437(%ErrorReporter* %82, %Location %84, %String* %"$tmpC79") + call void @dtor.250(%String* %"$tmpC79") br label %if_end78 if_end78: ; preds = %if_then77, %if_block76 br label %if_end65 -cond_destruct_alt181: ; preds = %if_end65 - br label %cond_destruct_end83 +cond_destruct_alt182: ; preds = %if_end65 + br label %cond_destruct_end84 -cond_destruct_alt282: ; preds = %if_end65 - br label %cond_destruct_end83 +cond_destruct_alt283: ; preds = %if_end65 + br label %cond_destruct_end84 -cond_destruct_end83: ; preds = %cond_destruct_alt282, %cond_destruct_alt181 +cond_destruct_end84: ; preds = %cond_destruct_alt283, %cond_destruct_alt182 br label %if_end13 -if_block84: ; preds = %if_end13 - %119 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this87, i32 28) - %120 = call i1 @"==.352"(%TokenType* %119, %TokenType* %tmp.this87) - br i1 %120, label %if_then85, label %if_else - -if_then85: ; preds = %if_block84 - %121 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %122 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %121, i32 0, i32 3 - store i8 40, i8* %"$tmpForRef" - call void @"+="(%"Vector[Char]"* %122, i8* %"$tmpForRef") - br label %if_end86 +if_block85: ; preds = %if_end13 + %97 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this88, i32 29) + %98 = call i1 @"==.339"(%TokenType* %97, %TokenType* %tmp.this88) + br i1 %98, label %if_then86, label %if_else -if_else: ; preds = %if_block84 - br label %if_block88 +if_then86: ; preds = %if_block85 + %99 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + call void @"+="(%"Vector[Char]"* %99, i8 40) + br label %if_end87 + +if_else: ; preds = %if_block85 + br label %if_block89 -if_end86: ; preds = %if_end91, %if_then85 - call void @dtor.260(%Token* %tk) +if_end87: ; preds = %if_end92, %if_then86 + call void @dtor.249(%Token* %tk) ret void -if_block88: ; preds = %if_else - %123 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this92, i32 26) - %124 = call i1 @"==.352"(%TokenType* %123, %TokenType* %tmp.this92) - br i1 %124, label %if_then89, label %if_else90 +if_block89: ; preds = %if_else + %100 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this93, i32 27) + %101 = call i1 @"==.339"(%TokenType* %100, %TokenType* %tmp.this93) + br i1 %101, label %if_then90, label %if_else91 -if_then89: ; preds = %if_block88 - %125 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %126 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %125, i32 0, i32 3 - store i8 91, i8* %"$tmpForRef93" - call void @"+="(%"Vector[Char]"* %126, i8* %"$tmpForRef93") - br label %if_end91 +if_then90: ; preds = %if_block89 + %102 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + call void @"+="(%"Vector[Char]"* %102, i8 91) + br label %if_end92 -if_else90: ; preds = %if_block88 +if_else91: ; preds = %if_block89 br label %if_block94 -if_end91: ; preds = %if_end97, %if_then89 - br label %if_end86 +if_end92: ; preds = %if_end97, %if_then90 + br label %if_end87 -if_block94: ; preds = %if_else90 - %127 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this98, i32 24) - %128 = call i1 @"==.352"(%TokenType* %127, %TokenType* %tmp.this98) - br i1 %128, label %if_then95, label %if_else96 +if_block94: ; preds = %if_else91 + %103 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this98, i32 25) + %104 = call i1 @"==.339"(%TokenType* %103, %TokenType* %tmp.this98) + br i1 %104, label %if_then95, label %if_else96 if_then95: ; preds = %if_block94 - %129 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %130 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %129, i32 0, i32 3 - store i8 123, i8* %"$tmpForRef99" - call void @"+="(%"Vector[Char]"* %130, i8* %"$tmpForRef99") + %105 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + call void @"+="(%"Vector[Char]"* %105, i8 123) br label %if_end97 if_else96: ; preds = %if_block94 - br label %if_block100 + br label %if_block99 -if_end97: ; preds = %if_end103, %if_then95 - br label %if_end91 +if_end97: ; preds = %if_end102, %if_then95 + br label %if_end92 -if_block100: ; preds = %if_else96 - %131 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this107, i32 29) - %132 = call i1 @"==.352"(%TokenType* %131, %TokenType* %tmp.this107) - br i1 %132, label %cond.true104, label %cond.false105 +if_block99: ; preds = %if_else96 + %106 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this106, i32 30) + %107 = call i1 @"==.339"(%TokenType* %106, %TokenType* %tmp.this106) + br i1 %107, label %cond.true103, label %cond.false104 -if_then101: ; preds = %cond.end106 - %133 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %134 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %133, i32 0, i32 3 - call void @popBack.518(%"Vector[Char]"* %134) - br label %if_end103 +if_then100: ; preds = %cond.end105 + %108 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + call void @popBack.506(%"Vector[Char]"* %108) + br label %if_end102 -if_else102: ; preds = %cond.end106 - br label %if_block109 +if_else101: ; preds = %cond.end105 + br label %if_block108 -if_end103: ; preds = %if_end112, %if_then101 +if_end102: ; preds = %if_end111, %if_then100 br label %if_end97 -cond.true104: ; preds = %if_block100 - %135 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %136 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %135, i32 0, i32 3 - %137 = call i8* @back.511(%"Vector[Char]"* %136) - %138 = load i8, i8* %137 - %139 = icmp eq i8 %138, 40 - br label %cond.end106 - -cond.false105: ; preds = %if_block100 - br label %cond.end106 - -cond.end106: ; preds = %cond.false105, %cond.true104 - %cond.res108 = phi i1 [ %139, %cond.true104 ], [ false, %cond.false105 ] - br i1 %cond.res108, label %if_then101, label %if_else102 - -if_block109: ; preds = %if_else102 - %140 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this116, i32 27) - %141 = call i1 @"==.352"(%TokenType* %140, %TokenType* %tmp.this116) - br i1 %141, label %cond.true113, label %cond.false114 - -if_then110: ; preds = %cond.end115 - %142 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %143 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %142, i32 0, i32 3 - call void @popBack.518(%"Vector[Char]"* %143) - br label %if_end112 +cond.true103: ; preds = %if_block99 + %109 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + %110 = call i8* @back.499(%"Vector[Char]"* %109) + %111 = load i8, i8* %110 + %112 = icmp eq i8 %111, 40 + br label %cond.end105 + +cond.false104: ; preds = %if_block99 + br label %cond.end105 -if_else111: ; preds = %cond.end115 - br label %if_block118 +cond.end105: ; preds = %cond.false104, %cond.true103 + %cond.res107 = phi i1 [ %112, %cond.true103 ], [ false, %cond.false104 ] + br i1 %cond.res107, label %if_then100, label %if_else101 + +if_block108: ; preds = %if_else101 + %113 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this115, i32 28) + %114 = call i1 @"==.339"(%TokenType* %113, %TokenType* %tmp.this115) + br i1 %114, label %cond.true112, label %cond.false113 + +if_then109: ; preds = %cond.end114 + %115 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + call void @popBack.506(%"Vector[Char]"* %115) + br label %if_end111 -if_end112: ; preds = %if_end120, %if_then110 - br label %if_end103 +if_else110: ; preds = %cond.end114 + br label %if_block117 -cond.true113: ; preds = %if_block109 - %144 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %145 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %144, i32 0, i32 3 - %146 = call i8* @back.511(%"Vector[Char]"* %145) - %147 = load i8, i8* %146 - %148 = icmp eq i8 %147, 91 - br label %cond.end115 - -cond.false114: ; preds = %if_block109 - br label %cond.end115 - -cond.end115: ; preds = %cond.false114, %cond.true113 - %cond.res117 = phi i1 [ %148, %cond.true113 ], [ false, %cond.false114 ] - br i1 %cond.res117, label %if_then110, label %if_else111 - -if_block118: ; preds = %if_else111 - %149 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this124, i32 25) - %150 = call i1 @"==.352"(%TokenType* %149, %TokenType* %tmp.this124) - br i1 %150, label %cond.true121, label %cond.false122 - -if_then119: ; preds = %cond.end123 - %151 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %152 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %151, i32 0, i32 3 - call void @popBack.518(%"Vector[Char]"* %152) - br label %if_end120 - -if_end120: ; preds = %if_then119, %cond.end123 - br label %if_end112 +if_end111: ; preds = %if_end119, %if_then109 + br label %if_end102 + +cond.true112: ; preds = %if_block108 + %116 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + %117 = call i8* @back.499(%"Vector[Char]"* %116) + %118 = load i8, i8* %117 + %119 = icmp eq i8 %118, 91 + br label %cond.end114 -cond.true121: ; preds = %if_block118 - %153 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %154 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %153, i32 0, i32 3 - %155 = call i8* @back.511(%"Vector[Char]"* %154) - %156 = load i8, i8* %155 - %157 = icmp eq i8 %156, 123 - br label %cond.end123 +cond.false113: ; preds = %if_block108 + br label %cond.end114 + +cond.end114: ; preds = %cond.false113, %cond.true112 + %cond.res116 = phi i1 [ %119, %cond.true112 ], [ false, %cond.false113 ] + br i1 %cond.res116, label %if_then109, label %if_else110 + +if_block117: ; preds = %if_else110 + %120 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this123, i32 26) + %121 = call i1 @"==.339"(%TokenType* %120, %TokenType* %tmp.this123) + br i1 %121, label %cond.true120, label %cond.false121 + +if_then118: ; preds = %cond.end122 + %122 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + call void @popBack.506(%"Vector[Char]"* %122) + br label %if_end119 -cond.false122: ; preds = %if_block118 - br label %cond.end123 +if_end119: ; preds = %if_then118, %cond.end122 + br label %if_end111 + +cond.true120: ; preds = %if_block117 + %123 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 3 + %124 = call i8* @back.499(%"Vector[Char]"* %123) + %125 = load i8, i8* %124 + %126 = icmp eq i8 %125, 123 + br label %cond.end122 -cond.end123: ; preds = %cond.false122, %cond.true121 - %cond.res125 = phi i1 [ %157, %cond.true121 ], [ false, %cond.false122 ] - br i1 %cond.res125, label %if_then119, label %if_end120 +cond.false121: ; preds = %if_block117 + br label %cond.end122 + +cond.end122: ; preds = %cond.false121, %cond.true120 + %cond.res124 = phi i1 [ %126, %cond.true120 ], [ false, %cond.false121 ] + br i1 %cond.res124, label %if_then118, label %if_end119 } ; Function Attrs: inlinehint nounwind -define internal void @front.496(%Token* sret %_result, %"SparrowLayoutDecoder[SparrowScanner]"* %this) #4 { - %_result.addr = alloca %Token* - store %Token* %_result, %Token** %_result.addr - %this.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* - store %"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr +define internal void @front.484(%Token* sret %_result, %"SparrowLayoutDecoder[SparrowScanner]"* %this) #4 { %tk = alloca %Token br label %code code: ; preds = %0 - %1 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %1, i32 0, i32 0 - call void @front.493(%Token* %tk, %"RangeWithLookahead[SparrowScanner]"* %2) + %1 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + call void @front.481(%Token* %tk, %"RangeWithLookahead[SparrowScanner]"* %1) br label %if_block if_block: ; preds = %code - %3 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %3, i32 0, i32 5 - %5 = load i32, i32* %4 - %6 = icmp sgt i32 %5, 0 - br i1 %6, label %if_then, label %if_end + %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + %3 = load i32, i32* %2 + %4 = icmp sgt i32 %3, 0 + br i1 %4, label %if_then, label %if_end if_then: ; preds = %if_block - %7 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 - %8 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %9 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %8, i32 0, i32 4 - call void @"=.298"(%TokenType* %7, %TokenType* %9) + %5 = getelementptr inbounds %Token, %Token* %tk, i32 0, i32 1 + %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 4 + call void @"=.286"(%TokenType* %5, %TokenType* %6) br label %if_end if_end: ; preds = %if_then, %if_block - %10 = load %Token*, %Token** %_result.addr - call void @ctor.202(%Token* %10, %Token* %tk) - call void @dtor.260(%Token* %tk) + call void @ctor.188(%Token* %_result, %Token* %tk) + call void @dtor.249(%Token* %tk) ret void dumy_block: ; No predecessors! - call void @dtor.260(%Token* %tk) + call void @dtor.249(%Token* %tk) ret void } ; Function Attrs: inlinehint nounwind -define internal void @popFront.497(%"RangeWithLookahead[SparrowScanner]"* %this) #4 { - %this.addr = alloca %"RangeWithLookahead[SparrowScanner]"* - store %"RangeWithLookahead[SparrowScanner]"* %this, %"RangeWithLookahead[SparrowScanner]"** %this.addr +define internal void @popFront.485(%"RangeWithLookahead[SparrowScanner]"* %this) #4 { %tmp.this = alloca i64 %"$tmpC" = alloca %Token br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %1, i32 0, i32 1 + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 store i64 0, i64* %tmp.this - %3 = load i64, i64* %tmp.this - call void @remove.498(%"Vector[Token]"* %2, i64 %3) + %2 = load i64, i64* %tmp.this + call void @remove.486(%"Vector[Token]"* %1, i64 %2) br label %if_block if_block: ; preds = %code - %4 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %5 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %4, i32 0, i32 1 - %6 = call i1 @isEmpty.492(%"Vector[Token]"* %5) - br i1 %6, label %cond.true, label %cond.false + %3 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 + %4 = call i1 @isEmpty.480(%"Vector[Token]"* %3) + br i1 %4, label %cond.true, label %cond.false if_then: ; preds = %cond.end - %7 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %8 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %7, i32 0, i32 1 - %9 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %10 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %9, i32 0, i32 0 - call void @"post_++.411"(%Token* %"$tmpC", %SparrowScanner* %10) - call void @"+=.409"(%"Vector[Token]"* %8, %Token* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC") + %5 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 1 + %6 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 0 + call void @"post_++.398"(%Token* %"$tmpC", %SparrowScanner* %6) + call void @"+=.396"(%"Vector[Token]"* %5, %Token* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC") br label %if_end if_end: ; preds = %if_then, %cond.end ret void cond.true: ; preds = %if_block - %11 = load %"RangeWithLookahead[SparrowScanner]"*, %"RangeWithLookahead[SparrowScanner]"** %this.addr - %12 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %11, i32 0, i32 0 - %13 = call i1 @"pre_!!.407"(%SparrowScanner* %12) + %7 = getelementptr inbounds %"RangeWithLookahead[SparrowScanner]", %"RangeWithLookahead[SparrowScanner]"* %this, i32 0, i32 0 + %8 = call i1 @"pre_!!.394"(%SparrowScanner* %7) br label %cond.end cond.false: ; preds = %if_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %13, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %8, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then, label %if_end } ; Function Attrs: inlinehint nounwind -define internal void @remove.498(%"Vector[Token]"* %this, i64 %index) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal void @remove.486(%"Vector[Token]"* %this, i64 %index) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr %r = alloca %"ContiguousMemoryRange[Token]" + %"$tmpForRef" = alloca %"ContiguousMemoryRange[Token]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - call void @all.499(%"ContiguousMemoryRange[Token]"* %r, %"Vector[Token]"* %1) + %1 = call %"ContiguousMemoryRange[Token]" @all.488(%"Vector[Token]"* %this) + store %"ContiguousMemoryRange[Token]" %1, %"ContiguousMemoryRange[Token]"* %"$tmpForRef" + call void @ctor.487(%"ContiguousMemoryRange[Token]"* %r, %"ContiguousMemoryRange[Token]"* %"$tmpForRef") %2 = load i64, i64* %index.addr - call void @popFront.501(%"ContiguousMemoryRange[Token]"* %r, i64 %2) - %3 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %4 = call i64 @size.209(%"Vector[Token]"* %3) - %5 = load i64, i64* %index.addr - %6 = call i64 @_SizeType_opMinus(i64 %4, i64 %5) + call void @popFront.490(%"ContiguousMemoryRange[Token]"* %r, i64 %2) + %3 = call i64 @size.195(%"Vector[Token]"* %this) + %4 = load i64, i64* %index.addr + %5 = call i64 @_SizeType_opMinus(i64 %3, i64 %4) store i64 1, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = call i64 @_SizeType_opMinus(i64 %6, i64 %7) - call void @popBack.503(%"ContiguousMemoryRange[Token]"* %r, i64 %8) - %9 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %10 = load %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %r - call void @remove.504(%"Vector[Token]"* %9, %"ContiguousMemoryRange[Token]" %10) + %6 = load i64, i64* %tmp.this + %7 = call i64 @_SizeType_opMinus(i64 %5, i64 %6) + call void @popBack.492(%"ContiguousMemoryRange[Token]"* %r, i64 %7) + %8 = load %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %r + call void @remove.493(%"Vector[Token]"* %this, %"ContiguousMemoryRange[Token]" %8) + ret void +} + +; Function Attrs: alwaysinline nounwind +define internal void @ctor.487(%"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"* %other) #3 { + %other.addr = alloca %"ContiguousMemoryRange[Token]"* + store %"ContiguousMemoryRange[Token]"* %other, %"ContiguousMemoryRange[Token]"** %other.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 0 + %2 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %other.addr + %3 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %2, i32 0, i32 0 + call void @ctor.204(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %3) + %4 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 1 + %5 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %other.addr + %6 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %5, i32 0, i32 1 + call void @ctor.204(%"RawPtr[Token]"* %4, %"RawPtr[Token]"* %6) ret void } ; Function Attrs: inlinehint nounwind -define internal void @all.499(%"ContiguousMemoryRange[Token]"* sret %_result, %"Vector[Token]"* %this) #4 { - %_result.addr = alloca %"ContiguousMemoryRange[Token]"* - store %"ContiguousMemoryRange[Token]"* %_result, %"ContiguousMemoryRange[Token]"** %_result.addr - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal %"ContiguousMemoryRange[Token]" @all.488(%"Vector[Token]"* %this) #4 { + %tmp.this = alloca %"ContiguousMemoryRange[Token]" br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %_result.addr - %2 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %3 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %2, i32 0, i32 0 + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %2 = load %"RawPtr[Token]", %"RawPtr[Token]"* %1 + %3 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 %4 = load %"RawPtr[Token]", %"RawPtr[Token]"* %3 - %5 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %6 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %5, i32 0, i32 1 - %7 = load %"RawPtr[Token]", %"RawPtr[Token]"* %6 - call void @ctor.500(%"ContiguousMemoryRange[Token]"* %1, %"RawPtr[Token]" %4, %"RawPtr[Token]" %7) - ret void + call void @ctor.489(%"ContiguousMemoryRange[Token]"* %tmp.this, %"RawPtr[Token]" %2, %"RawPtr[Token]" %4) + %5 = load %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %tmp.this + ret %"ContiguousMemoryRange[Token]" %5 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.500(%"ContiguousMemoryRange[Token]"* %this, %"RawPtr[Token]" %f_begin, %"RawPtr[Token]" %f_end) #3 { +define internal void @ctor.489(%"ContiguousMemoryRange[Token]"* %this, %"RawPtr[Token]" %f_begin, %"RawPtr[Token]" %f_end) #3 { %this.addr = alloca %"ContiguousMemoryRange[Token]"* store %"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"** %this.addr %f_begin.addr = alloca %"RawPtr[Token]" @@ -20212,556 +18137,440 @@ define internal void @ctor.500(%"ContiguousMemoryRange[Token]"* %this, %"RawPtr[ code: ; preds = %0 %1 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %1, i32 0, i32 0 - call void @ctor.217(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %f_begin.addr) + call void @ctor.204(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %f_begin.addr) %3 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr %4 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %3, i32 0, i32 1 - call void @ctor.217(%"RawPtr[Token]"* %4, %"RawPtr[Token]"* %f_end.addr) + call void @ctor.204(%"RawPtr[Token]"* %4, %"RawPtr[Token]"* %f_end.addr) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @popFront.501(%"ContiguousMemoryRange[Token]"* %this, i64 %n) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Token]"* - store %"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"** %this.addr +define internal void @popFront.490(%"ContiguousMemoryRange[Token]"* %this, i64 %n) #3 { %n.addr = alloca i64 store i64 %n, i64* %n.addr - %"$tmpC" = alloca %"RawPtr[Token]" + %"$tmpForRef" = alloca %"RawPtr[Token]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %3, i32 0, i32 0 - %5 = load %"RawPtr[Token]", %"RawPtr[Token]"* %4 - %6 = load i64, i64* %n.addr - store i64 %6, i64* %tmp.this - %7 = load i64, i64* %tmp.this - call void @advance.502(%"RawPtr[Token]"* %"$tmpC", %"RawPtr[Token]" %5, i64 %7) - call void @"=.212"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %"$tmpC") + %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 0 + %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 0 + %3 = load i64, i64* %n.addr + store i64 %3, i64* %tmp.this + %4 = load i64, i64* %tmp.this + %5 = call %"RawPtr[Token]" @advance.491(%"RawPtr[Token]"* %2, i64 %4) + store %"RawPtr[Token]" %5, %"RawPtr[Token]"* %"$tmpForRef" + call void @"=.198"(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %"$tmpForRef") ret void } ; Function Attrs: inlinehint nounwind -define internal void @advance.502(%"RawPtr[Token]"* sret %_result, %"RawPtr[Token]" %this, i64 %n) #4 { - %_result.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %_result, %"RawPtr[Token]"** %_result.addr - %this.addr = alloca %"RawPtr[Token]" - store %"RawPtr[Token]" %this, %"RawPtr[Token]"* %this.addr +define internal %"RawPtr[Token]" @advance.491(%"RawPtr[Token]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr - %tmp.this = alloca i64 - %tmp.this1 = alloca i64 + %tmp.this = alloca %"RawPtr[Token]" + %tmp.this1 = alloca %UntypedPtr + %tmp.this2 = alloca i64 + %tmp.this3 = alloca i64 br label %code code: ; preds = %0 - %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %_result.addr - %2 = load %"RawPtr[Token]", %"RawPtr[Token]"* %this.addr - %3 = call i8* @bytePtr.211(%"RawPtr[Token]" %2) + %1 = getelementptr inbounds %"RawPtr[Token]", %"RawPtr[Token]"* %this, i32 0, i32 0 + %2 = load %Token*, %Token** %1 + call void @ctor.197(%UntypedPtr* %tmp.this1, %Token* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 %4 = load i64, i64* %n.addr - store i64 72, i64* %tmp.this1 - %5 = load i64, i64* %tmp.this1 + store i64 72, i64* %tmp.this3 + %5 = load i64, i64* %tmp.this3 %6 = mul i64 %4, %5 - store i64 %6, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = call i8* @ptrAdd(i8* %3, i64 %7) - call void @ctor.216(%"RawPtr[Token]"* %1, i8* %8) - ret void + store i64 %6, i64* %tmp.this2 + %7 = load i64, i64* %tmp.this2 + %8 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %7) + call void @ctor.202(%"RawPtr[Token]"* %tmp.this, %UntypedPtr %8) + %9 = load %"RawPtr[Token]", %"RawPtr[Token]"* %tmp.this + ret %"RawPtr[Token]" %9 } ; Function Attrs: alwaysinline nounwind -define internal void @popBack.503(%"ContiguousMemoryRange[Token]"* %this, i64 %n) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Token]"* - store %"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"** %this.addr +define internal void @popBack.492(%"ContiguousMemoryRange[Token]"* %this, i64 %n) #3 { %n.addr = alloca i64 store i64 %n, i64* %n.addr - %"$tmpC" = alloca %"RawPtr[Token]" + %"$tmpForRef" = alloca %"RawPtr[Token]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %1, i32 0, i32 1 - %3 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %3, i32 0, i32 1 - %5 = load %"RawPtr[Token]", %"RawPtr[Token]"* %4 - %6 = load i64, i64* %n.addr - store i64 %6, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = sub i64 0, %7 - call void @advance.502(%"RawPtr[Token]"* %"$tmpC", %"RawPtr[Token]" %5, i64 %8) - call void @"=.212"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %"$tmpC") + %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 1 + %3 = load i64, i64* %n.addr + store i64 %3, i64* %tmp.this + %4 = load i64, i64* %tmp.this + %5 = sub i64 0, %4 + %6 = call %"RawPtr[Token]" @advance.491(%"RawPtr[Token]"* %2, i64 %5) + store %"RawPtr[Token]" %6, %"RawPtr[Token]"* %"$tmpForRef" + call void @"=.198"(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %"$tmpForRef") ret void } ; Function Attrs: inlinehint nounwind -define internal void @remove.504(%"Vector[Token]"* %this, %"ContiguousMemoryRange[Token]" %range) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal void @remove.493(%"Vector[Token]"* %this, %"ContiguousMemoryRange[Token]" %range) #4 { %range.addr = alloca %"ContiguousMemoryRange[Token]" store %"ContiguousMemoryRange[Token]" %range, %"ContiguousMemoryRange[Token]"* %range.addr %rBegin = alloca %"RawPtr[Token]" + %"$tmpForRef" = alloca %"RawPtr[Token]" %rEnd = alloca %"RawPtr[Token]" + %"$tmpForRef1" = alloca %"RawPtr[Token]" %"$rangeVar" = alloca %"ContiguousMemoryRange[Token]" %el = alloca %Token* - %"$tmpC" = alloca %"RawPtr[Token]" - %"$tmpC5" = alloca %"RawPtr[Token]" + %"$tmpForRef6" = alloca %"RawPtr[Token]" + %"$tmpForRef7" = alloca %"RawPtr[Token]" br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %range.addr - call void @frontPtr.505(%"RawPtr[Token]"* %rBegin, %"ContiguousMemoryRange[Token]" %1) - %2 = load %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %range.addr - call void @backPtr.506(%"RawPtr[Token]"* %rEnd, %"ContiguousMemoryRange[Token]" %2) - call void @ctor.507(%"ContiguousMemoryRange[Token]"* %"$rangeVar", %"ContiguousMemoryRange[Token]"* %range.addr) + %1 = call %"RawPtr[Token]" @frontPtr.494(%"ContiguousMemoryRange[Token]"* %range.addr) + store %"RawPtr[Token]" %1, %"RawPtr[Token]"* %"$tmpForRef" + call void @ctor.204(%"RawPtr[Token]"* %rBegin, %"RawPtr[Token]"* %"$tmpForRef") + %2 = call %"RawPtr[Token]" @backPtr.495(%"ContiguousMemoryRange[Token]"* %range.addr) + store %"RawPtr[Token]" %2, %"RawPtr[Token]"* %"$tmpForRef1" + call void @ctor.204(%"RawPtr[Token]"* %rEnd, %"RawPtr[Token]"* %"$tmpForRef1") + call void @ctor.487(%"ContiguousMemoryRange[Token]"* %"$rangeVar", %"ContiguousMemoryRange[Token]"* %range.addr) br label %while_block while_block: ; preds = %while_step, %code - %3 = load %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %"$rangeVar" - %4 = call i1 @isEmpty.508(%"ContiguousMemoryRange[Token]" %3) - %5 = xor i1 true, %4 - br i1 %5, label %while_body, label %while_end + %3 = call i1 @isEmpty.496(%"ContiguousMemoryRange[Token]"* %"$rangeVar") + %4 = xor i1 true, %3 + br i1 %4, label %while_body, label %while_end while_body: ; preds = %while_block - %6 = load %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %"$rangeVar" - %7 = call %Token* @front.509(%"ContiguousMemoryRange[Token]" %6) - store %Token* %7, %Token** %el - %8 = load %Token*, %Token** %el - call void @dtor.260(%Token* %8) + %5 = call %Token* @front.497(%"ContiguousMemoryRange[Token]"* %"$rangeVar") + store %Token* %5, %Token** %el + %6 = load %Token*, %Token** %el + call void @dtor.249(%Token* %6) br label %while_step while_step: ; preds = %while_body - call void @popFront.510(%"ContiguousMemoryRange[Token]"* %"$rangeVar") + call void @popFront.498(%"ContiguousMemoryRange[Token]"* %"$rangeVar") br label %while_block while_end: ; preds = %while_block - br label %while_block1 + br label %while_block2 -while_block1: ; preds = %while_step3, %while_end - %9 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %10 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %9, i32 0, i32 1 - %11 = call i1 @"==.218"(%"RawPtr[Token]"* %rEnd, %"RawPtr[Token]"* %10) - %12 = xor i1 true, %11 - br i1 %12, label %while_body2, label %while_end4 +while_block2: ; preds = %while_step4, %while_end + %7 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %8 = call i1 @"==.205"(%"RawPtr[Token]"* %rEnd, %"RawPtr[Token]"* %7) + %9 = xor i1 true, %8 + br i1 %9, label %while_body3, label %while_end5 -while_body2: ; preds = %while_block1 - %13 = load %"RawPtr[Token]", %"RawPtr[Token]"* %rBegin - %14 = call %Token* @value.219(%"RawPtr[Token]" %13) - %15 = load %"RawPtr[Token]", %"RawPtr[Token]"* %rEnd - %16 = call %Token* @value.219(%"RawPtr[Token]" %15) - call void @ctor.202(%Token* %14, %Token* %16) - %17 = load %"RawPtr[Token]", %"RawPtr[Token]"* %rEnd - %18 = call %Token* @value.219(%"RawPtr[Token]" %17) - call void @dtor.260(%Token* %18) - %19 = load %"RawPtr[Token]", %"RawPtr[Token]"* %rBegin - call void @advance.220(%"RawPtr[Token]"* %"$tmpC", %"RawPtr[Token]" %19) - call void @"=.212"(%"RawPtr[Token]"* %rBegin, %"RawPtr[Token]"* %"$tmpC") - %20 = load %"RawPtr[Token]", %"RawPtr[Token]"* %rEnd - call void @advance.220(%"RawPtr[Token]"* %"$tmpC5", %"RawPtr[Token]" %20) - call void @"=.212"(%"RawPtr[Token]"* %rEnd, %"RawPtr[Token]"* %"$tmpC5") - br label %while_step3 +while_body3: ; preds = %while_block2 + %10 = call %Token* @value.206(%"RawPtr[Token]"* %rBegin) + %11 = call %Token* @value.206(%"RawPtr[Token]"* %rEnd) + call void @ctor.188(%Token* %10, %Token* %11) + %12 = call %Token* @value.206(%"RawPtr[Token]"* %rEnd) + call void @dtor.249(%Token* %12) + %13 = call %"RawPtr[Token]" @advance.207(%"RawPtr[Token]"* %rBegin) + store %"RawPtr[Token]" %13, %"RawPtr[Token]"* %"$tmpForRef6" + call void @"=.198"(%"RawPtr[Token]"* %rBegin, %"RawPtr[Token]"* %"$tmpForRef6") + %14 = call %"RawPtr[Token]" @advance.207(%"RawPtr[Token]"* %rEnd) + store %"RawPtr[Token]" %14, %"RawPtr[Token]"* %"$tmpForRef7" + call void @"=.198"(%"RawPtr[Token]"* %rEnd, %"RawPtr[Token]"* %"$tmpForRef7") + br label %while_step4 -while_step3: ; preds = %while_body2 - br label %while_block1 +while_step4: ; preds = %while_body3 + br label %while_block2 -while_end4: ; preds = %while_block1 - %21 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %22 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %21, i32 0, i32 1 - call void @"=.212"(%"RawPtr[Token]"* %22, %"RawPtr[Token]"* %rBegin) +while_end5: ; preds = %while_block2 + %15 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + call void @"=.198"(%"RawPtr[Token]"* %15, %"RawPtr[Token]"* %rBegin) ret void } ; Function Attrs: inlinehint nounwind -define internal void @frontPtr.505(%"RawPtr[Token]"* sret %_result, %"ContiguousMemoryRange[Token]" %this) #4 { - %_result.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %_result, %"RawPtr[Token]"** %_result.addr - %this.addr = alloca %"ContiguousMemoryRange[Token]" - store %"ContiguousMemoryRange[Token]" %this, %"ContiguousMemoryRange[Token]"* %this.addr +define internal %"RawPtr[Token]" @frontPtr.494(%"ContiguousMemoryRange[Token]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %_result.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this.addr, i32 0, i32 0 - call void @ctor.217(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %2) - ret void + %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 0 + %2 = load %"RawPtr[Token]", %"RawPtr[Token]"* %1 + ret %"RawPtr[Token]" %2 } ; Function Attrs: inlinehint nounwind -define internal void @backPtr.506(%"RawPtr[Token]"* sret %_result, %"ContiguousMemoryRange[Token]" %this) #4 { - %_result.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %_result, %"RawPtr[Token]"** %_result.addr - %this.addr = alloca %"ContiguousMemoryRange[Token]" - store %"ContiguousMemoryRange[Token]" %this, %"ContiguousMemoryRange[Token]"* %this.addr - br label %code - -code: ; preds = %0 - %1 = load %"RawPtr[Token]"*, %"RawPtr[Token]"** %_result.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this.addr, i32 0, i32 1 - call void @ctor.217(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %2) - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.507(%"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"* %other) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Token]"* - store %"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"** %this.addr - %other.addr = alloca %"ContiguousMemoryRange[Token]"* - store %"ContiguousMemoryRange[Token]"* %other, %"ContiguousMemoryRange[Token]"** %other.addr +define internal %"RawPtr[Token]" @backPtr.495(%"ContiguousMemoryRange[Token]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %other.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %3, i32 0, i32 0 - call void @ctor.217(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %4) - %5 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %6 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %5, i32 0, i32 1 - %7 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %other.addr - %8 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %7, i32 0, i32 1 - call void @ctor.217(%"RawPtr[Token]"* %6, %"RawPtr[Token]"* %8) - ret void + %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 1 + %2 = load %"RawPtr[Token]", %"RawPtr[Token]"* %1 + ret %"RawPtr[Token]" %2 } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.508(%"ContiguousMemoryRange[Token]" %this) #4 { - %this.addr = alloca %"ContiguousMemoryRange[Token]" - store %"ContiguousMemoryRange[Token]" %this, %"ContiguousMemoryRange[Token]"* %this.addr +define internal i1 @isEmpty.496(%"ContiguousMemoryRange[Token]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this.addr, i32 0, i32 1 - %2 = load %"RawPtr[Token]", %"RawPtr[Token]"* %1 - %3 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this.addr, i32 0, i32 0 - %4 = load %"RawPtr[Token]", %"RawPtr[Token]"* %3 - %5 = call i64 @diff.210(%"RawPtr[Token]" %2, %"RawPtr[Token]" %4) + %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 0 + %3 = load %"RawPtr[Token]", %"RawPtr[Token]"* %2 + %4 = call i64 @diff.196(%"RawPtr[Token]"* %1, %"RawPtr[Token]" %3) store i64 0, i64* %tmp.this - %6 = load i64, i64* %tmp.this - %7 = icmp sle i64 %5, %6 - ret i1 %7 + %5 = load i64, i64* %tmp.this + %6 = icmp sle i64 %4, %5 + ret i1 %6 } ; Function Attrs: inlinehint nounwind -define internal %Token* @front.509(%"ContiguousMemoryRange[Token]" %this) #4 { - %this.addr = alloca %"ContiguousMemoryRange[Token]" - store %"ContiguousMemoryRange[Token]" %this, %"ContiguousMemoryRange[Token]"* %this.addr +define internal %Token* @front.497(%"ContiguousMemoryRange[Token]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this.addr, i32 0, i32 0 - %2 = load %"RawPtr[Token]", %"RawPtr[Token]"* %1 - %3 = call %Token* @value.219(%"RawPtr[Token]" %2) - ret %Token* %3 + %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 0 + %2 = call %Token* @value.206(%"RawPtr[Token]"* %1) + ret %Token* %2 } ; Function Attrs: alwaysinline nounwind -define internal void @popFront.510(%"ContiguousMemoryRange[Token]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Token]"* - store %"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"** %this.addr - %"$tmpC" = alloca %"RawPtr[Token]" +define internal void @popFront.498(%"ContiguousMemoryRange[Token]"* %this) #3 { + %"$tmpForRef" = alloca %"RawPtr[Token]" br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %3, i32 0, i32 0 - %5 = load %"RawPtr[Token]", %"RawPtr[Token]"* %4 - call void @advance.220(%"RawPtr[Token]"* %"$tmpC", %"RawPtr[Token]" %5) - call void @"=.212"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %"$tmpC") + %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 0 + %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 0 + %3 = call %"RawPtr[Token]" @advance.207(%"RawPtr[Token]"* %2) + store %"RawPtr[Token]" %3, %"RawPtr[Token]"* %"$tmpForRef" + call void @"=.198"(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %"$tmpForRef") ret void } ; Function Attrs: inlinehint nounwind -define internal i8* @back.511(%"Vector[Char]"* %this) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr - %"$tmpC" = alloca %"RawPtr[Char]" +define internal i8* @back.499(%"Vector[Char]"* %this) #4 { + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 1 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 store i64 -1, i64* %tmp.this - %4 = load i64, i64* %tmp.this - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %3, i64 %4) - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %6 = call i8* @value(%"RawPtr[Char]" %5) - ret i8* %6 + %2 = load i64, i64* %tmp.this + %3 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %1, i64 %2) + store %"RawPtr[Char]" %3, %"RawPtr[Char]"* %"$tmpForRef" + %4 = call i8* @value(%"RawPtr[Char]"* %"$tmpForRef") + ret i8* %4 } ; Function Attrs: inlinehint nounwind -define internal i32* @back.512(%"Vector[UInt]"* %this) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr - %"$tmpC" = alloca %"RawPtr[UInt]" +define internal i32* @back.500(%"Vector[UInt]"* %this) #4 { + %"$tmpForRef" = alloca %"RawPtr[UInt]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 1 - %3 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %2 + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 store i64 -1, i64* %tmp.this - %4 = load i64, i64* %tmp.this - call void @advance.513(%"RawPtr[UInt]"* %"$tmpC", %"RawPtr[UInt]" %3, i64 %4) - %5 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %"$tmpC" - %6 = call i32* @value.272(%"RawPtr[UInt]" %5) - ret i32* %6 + %2 = load i64, i64* %tmp.this + %3 = call %"RawPtr[UInt]" @advance.501(%"RawPtr[UInt]"* %1, i64 %2) + store %"RawPtr[UInt]" %3, %"RawPtr[UInt]"* %"$tmpForRef" + %4 = call i32* @value.261(%"RawPtr[UInt]"* %"$tmpForRef") + ret i32* %4 } ; Function Attrs: inlinehint nounwind -define internal void @advance.513(%"RawPtr[UInt]"* sret %_result, %"RawPtr[UInt]" %this, i64 %n) #4 { - %_result.addr = alloca %"RawPtr[UInt]"* - store %"RawPtr[UInt]"* %_result, %"RawPtr[UInt]"** %_result.addr - %this.addr = alloca %"RawPtr[UInt]" - store %"RawPtr[UInt]" %this, %"RawPtr[UInt]"* %this.addr +define internal %"RawPtr[UInt]" @advance.501(%"RawPtr[UInt]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr - %tmp.this = alloca i64 - %tmp.this1 = alloca i64 + %tmp.this = alloca %"RawPtr[UInt]" + %tmp.this1 = alloca %UntypedPtr + %tmp.this2 = alloca i64 + %tmp.this3 = alloca i64 br label %code code: ; preds = %0 - %1 = load %"RawPtr[UInt]"*, %"RawPtr[UInt]"** %_result.addr - %2 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %this.addr - %3 = call i8* @bytePtr.224(%"RawPtr[UInt]" %2) + %1 = getelementptr inbounds %"RawPtr[UInt]", %"RawPtr[UInt]"* %this, i32 0, i32 0 + %2 = load i32*, i32** %1 + call void @ctor.211(%UntypedPtr* %tmp.this1, i32* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 %4 = load i64, i64* %n.addr - store i64 4, i64* %tmp.this1 - %5 = load i64, i64* %tmp.this1 + store i64 4, i64* %tmp.this3 + %5 = load i64, i64* %tmp.this3 %6 = mul i64 %4, %5 - store i64 %6, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = call i8* @ptrAdd(i8* %3, i64 %7) - call void @ctor.229(%"RawPtr[UInt]"* %1, i8* %8) - ret void + store i64 %6, i64* %tmp.this2 + %7 = load i64, i64* %tmp.this2 + %8 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %7) + call void @ctor.216(%"RawPtr[UInt]"* %tmp.this, %UntypedPtr %8) + %9 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %tmp.this + ret %"RawPtr[UInt]" %9 } ; Function Attrs: inlinehint nounwind -define internal void @popBack.514(%"Vector[UInt]"* %this) #4 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr - %"$tmpC" = alloca %"RawPtr[UInt]" +define internal void @popBack.502(%"Vector[UInt]"* %this) #4 { + %"$tmpForRef" = alloca %"RawPtr[UInt]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 1 - %3 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %3, i32 0, i32 1 - %5 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %4 + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 store i64 -1, i64* %tmp.this - %6 = load i64, i64* %tmp.this - call void @advance.513(%"RawPtr[UInt]"* %"$tmpC", %"RawPtr[UInt]" %5, i64 %6) - call void @"=.225"(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %"$tmpC") - %7 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %8 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %7, i32 0, i32 1 - %9 = load %"RawPtr[UInt]", %"RawPtr[UInt]"* %8 - %10 = call i32* @value.272(%"RawPtr[UInt]" %9) - %11 = load i32, i32* %10 + %3 = load i64, i64* %tmp.this + %4 = call %"RawPtr[UInt]" @advance.501(%"RawPtr[UInt]"* %2, i64 %3) + store %"RawPtr[UInt]" %4, %"RawPtr[UInt]"* %"$tmpForRef" + call void @"=.212"(%"RawPtr[UInt]"* %1, %"RawPtr[UInt]"* %"$tmpForRef") + %5 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %6 = call i32* @value.261(%"RawPtr[UInt]"* %5) + %7 = load i32, i32* %6 ret void } ; Function Attrs: inlinehint nounwind -define internal void @toString.515(%String* sret %_result, %StringRef %a1, i32 %a2, %StringRef %a3, i32 %a4) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %a1.addr = alloca %StringRef - store %StringRef %a1, %StringRef* %a1.addr - %a2.addr = alloca i32 - store i32 %a2, i32* %a2.addr - %a3.addr = alloca %StringRef - store %StringRef %a3, %StringRef* %a3.addr - %a4.addr = alloca i32 - store i32 %a4, i32* %a4.addr +define internal void @toString.503(%String* sret %_result, %StringRef* %a1, i32* %a2, %StringRef* %a3, i32* %a4) #4 { %s = alloca %StringOutputStream + %"$tmpC" = alloca %StringOutputStream + %"$tmpC1" = alloca %StringOutputStream + %"$tmpC2" = alloca %StringOutputStream + %"$tmpC3" = alloca %StringOutputStream br label %code code: ; preds = %0 - call void @ctor.452(%StringOutputStream* %s) - %1 = call %StringOutputStream* @"<<"(%StringOutputStream* %s, %StringRef* %a1.addr) - %2 = call %StringOutputStream* @"<<.516"(%StringOutputStream* %1, i32* %a2.addr) - %3 = call %StringOutputStream* @"<<"(%StringOutputStream* %2, %StringRef* %a3.addr) - %4 = call %StringOutputStream* @"<<.516"(%StringOutputStream* %3, i32* %a4.addr) - %5 = load %String*, %String** %_result.addr - %6 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %s, i32 0, i32 0 - call void @ctor.189(%String* %5, %String* %6) - call void @dtor.454(%StringOutputStream* %s) + call void @ctor.439(%StringOutputStream* %s) + call void @"<<"(%StringOutputStream* %"$tmpC3", %StringOutputStream* %s, %StringRef* %a1) + call void @"<<.504"(%StringOutputStream* %"$tmpC2", %StringOutputStream* %"$tmpC3", i32* %a2) + call void @"<<"(%StringOutputStream* %"$tmpC1", %StringOutputStream* %"$tmpC2", %StringRef* %a3) + call void @"<<.504"(%StringOutputStream* %"$tmpC", %StringOutputStream* %"$tmpC1", i32* %a4) + call void @dtor.442(%StringOutputStream* %"$tmpC") + call void @dtor.442(%StringOutputStream* %"$tmpC1") + call void @dtor.442(%StringOutputStream* %"$tmpC2") + call void @dtor.442(%StringOutputStream* %"$tmpC3") + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %s, i32 0, i32 0 + call void @ctor.175(%String* %_result, %String* %1) + call void @dtor.442(%StringOutputStream* %s) ret void dumy_block: ; No predecessors! - call void @dtor.454(%StringOutputStream* %s) + call void @dtor.442(%StringOutputStream* %s) ret void } ; Function Attrs: inlinehint nounwind -define internal %StringOutputStream* @"<<.516"(%StringOutputStream* %s, i32* %x) #4 { - %s.addr = alloca %StringOutputStream* - store %StringOutputStream* %s, %StringOutputStream** %s.addr - %x.addr = alloca i32* - store i32* %x, i32** %x.addr +define internal void @"<<.504"(%StringOutputStream* sret %_result, %StringOutputStream* %s, i32* %x) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %s.addr - %2 = load i32*, i32** %x.addr - %3 = load i32, i32* %2 - %4 = zext i32 %3 to i64 - store i64 %4, i64* %tmp.this - %5 = load i64, i64* %tmp.this - call void @"<<<.517"(%StringOutputStream* %1, i64 %5) - %6 = load %StringOutputStream*, %StringOutputStream** %s.addr - ret %StringOutputStream* %6 + %1 = load i32, i32* %x + %2 = zext i32 %1 to i64 + store i64 %2, i64* %tmp.this + %3 = load i64, i64* %tmp.this + call void @"<<<.505"(%StringOutputStream* %s, i64 %3) + call void @ctor.441(%StringOutputStream* %_result, %StringOutputStream* %s) + ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"<<<.517"(%StringOutputStream* %this, i64 %x) #3 { - %this.addr = alloca %StringOutputStream* - store %StringOutputStream* %this, %StringOutputStream** %this.addr +define internal void @"<<<.505"(%StringOutputStream* %this, i64 %x) #3 { %x.addr = alloca i64 store i64 %x, i64* %x.addr + %"$tmpForRef" = alloca %StringRef %"$tmpC" = alloca %String br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %this.addr - %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 - %3 = load i64, i64* %x.addr - call void @ulongToString(%String* %"$tmpC", i64 %3) - %4 = call %StringRef @all.485(%String* %"$tmpC") - call void @append(%String* %2, %StringRef %4) - call void @dtor.261(%String* %"$tmpC") + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %this, i32 0, i32 0 + %2 = load i64, i64* %x.addr + call void @ulongToString(%String* %"$tmpC", i64 %2) + %3 = call %StringRef @all.473(%String* %"$tmpC") + store %StringRef %3, %StringRef* %"$tmpForRef" + call void @append(%String* %1, %StringRef* %"$tmpForRef") + call void @dtor.250(%String* %"$tmpC") ret void } ; Function Attrs: inlinehint nounwind define internal void @ulongToString(%String* sret %_result, i64 %x) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr %x.addr = alloca i64 store i64 %x, i64* %x.addr %buf = alloca [16 x i8] - %"$tmpForRef" = alloca %StringRef br label %code code: ; preds = %0 %1 = load i64, i64* %x.addr %2 = bitcast [16 x i8]* %buf to i8* call void @_ULong_to_CString(i64 %1, i8* %2) - %3 = load %String*, %String** %_result.addr - %4 = bitcast [16 x i8]* %buf to i8* - %5 = call %StringRef @_String_fromCString(i8* %4) - store %StringRef %5, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %3, %StringRef* %"$tmpForRef") + %3 = bitcast [16 x i8]* %buf to i8* + %4 = call %StringRef @_String_fromCString(i8* %3) + call void @ctor.459(%String* %_result, %StringRef %4) ret void } ; Function Attrs: inlinehint nounwind -define internal void @popBack.518(%"Vector[Char]"* %this) #4 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr - %"$tmpC" = alloca %"RawPtr[Char]" +define internal void @popBack.506(%"Vector[Char]"* %this) #4 { + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 1 - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %3, i32 0, i32 1 - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %4 + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 store i64 -1, i64* %tmp.this - %6 = load i64, i64* %tmp.this - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %5, i64 %6) - call void @"=.200"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %"$tmpC") - %7 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %8 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %7, i32 0, i32 1 - %9 = load %"RawPtr[Char]", %"RawPtr[Char]"* %8 - %10 = call i8* @value(%"RawPtr[Char]" %9) - %11 = load i8, i8* %10 + %3 = load i64, i64* %tmp.this + %4 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %2, i64 %3) + store %"RawPtr[Char]" %4, %"RawPtr[Char]"* %"$tmpForRef" + call void @"=.186"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %"$tmpForRef") + %5 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %6 = call i8* @value(%"RawPtr[Char]"* %5) + %7 = load i8, i8* %6 ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.519(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowLayoutDecoder[SparrowScanner]" %tokens, %AstBuilder* %astBuilder, %ErrorReporter %errorReporter) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %tokens.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]" - store %"SparrowLayoutDecoder[SparrowScanner]" %tokens, %"SparrowLayoutDecoder[SparrowScanner]"* %tokens.addr - %astBuilder.addr = alloca %AstBuilder* - store %AstBuilder* %astBuilder, %AstBuilder** %astBuilder.addr - %errorReporter.addr = alloca %ErrorReporter - store %ErrorReporter %errorReporter, %ErrorReporter* %errorReporter.addr +define internal void @ctor.507(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"* %tokens, %AstBuilder* %astBuilder, %ErrorReporter* %errorReporter) #4 { br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 1 - call void @ctor.143(%Token* %2) - %3 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 0 - %5 = load %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %tokens.addr - call void @ctor.520(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %4, %"SparrowLayoutDecoder[SparrowScanner]" %5) - %6 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %7 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %6, i32 0, i32 2 - store i1 false, i1* %7 - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8, i32 0, i32 3 - %10 = load %AstBuilder*, %AstBuilder** %astBuilder.addr - call void @ctor.233(%AstBuilder* %9, %AstBuilder* %10) - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, i32 0, i32 4 - call void @ctor.204(%ErrorReporter* %12, %ErrorReporter* %errorReporter.addr) + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + call void @ctor.130(%Token* %1) + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @ctor.508(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2, %"SparrowLayoutDecoder[SparrowScanner]"* %tokens) + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 2 + store i1 false, i1* %3 + %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + call void @ctor.222(%AstBuilder* %4, %AstBuilder* %astBuilder) + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 4 + call void @ctor.190(%ErrorReporter* %5, %ErrorReporter* %errorReporter) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.520(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowLayoutDecoder[SparrowScanner]" %src) #4 { - %this.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* - store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %src.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]" - store %"SparrowLayoutDecoder[SparrowScanner]" %src, %"SparrowLayoutDecoder[SparrowScanner]"* %src.addr +define internal void @ctor.508(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"* %src) #4 { %tmp.this = alloca i64 %"$tmpC" = alloca %Token br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 - call void @ctor.147(%"SparrowLayoutDecoder[SparrowScanner]"* %2) - %3 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %4 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %3, i32 0, i32 0 - call void @"=.301"(%"SparrowLayoutDecoder[SparrowScanner]"* %4, %"SparrowLayoutDecoder[SparrowScanner]"* %src.addr) - %5 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - call void @ctor.149(%"Vector[Token]"* %6) - %7 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 1 + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @ctor.134(%"SparrowLayoutDecoder[SparrowScanner]"* %1) + %2 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"=.289"(%"SparrowLayoutDecoder[SparrowScanner]"* %2, %"SparrowLayoutDecoder[SparrowScanner]"* %src) + %3 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + call void @ctor.136(%"Vector[Token]"* %3) + %4 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 store i64 10, i64* %tmp.this - %9 = load i64, i64* %tmp.this - call void @reserve.404(%"Vector[Token]"* %8, i64 %9) + %5 = load i64, i64* %tmp.this + call void @reserve.391(%"Vector[Token]"* %4, i64 %5) br label %if_block if_block: ; preds = %code - %10 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %10, i32 0, i32 0 - %12 = call i1 @"pre_!!.521"(%"SparrowLayoutDecoder[SparrowScanner]"* %11) - br i1 %12, label %if_then, label %if_end + %6 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + %7 = call i1 @"pre_!!.509"(%"SparrowLayoutDecoder[SparrowScanner]"* %6) + br i1 %7, label %if_then, label %if_end if_then: ; preds = %if_block - %13 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %13, i32 0, i32 1 - %15 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %16 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %15, i32 0, i32 0 - call void @"post_++.523"(%Token* %"$tmpC", %"SparrowLayoutDecoder[SparrowScanner]"* %16) - call void @"+=.409"(%"Vector[Token]"* %14, %Token* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC") + %8 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %9 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"post_++.511"(%Token* %"$tmpC", %"SparrowLayoutDecoder[SparrowScanner]"* %9) + call void @"+=.396"(%"Vector[Token]"* %8, %Token* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC") br label %if_end if_end: ; preds = %if_then, %if_block @@ -20769,360 +18578,292 @@ if_end: ; preds = %if_then, %if_block } ; Function Attrs: inlinehint nounwind -define internal i1 @"pre_!!.521"(%"SparrowLayoutDecoder[SparrowScanner]"* %r) #4 { - %r.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* - store %"SparrowLayoutDecoder[SparrowScanner]"* %r, %"SparrowLayoutDecoder[SparrowScanner]"** %r.addr +define internal i1 @"pre_!!.509"(%"SparrowLayoutDecoder[SparrowScanner]"* %r) #4 { br label %code code: ; preds = %0 - %1 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %r.addr - %2 = call i1 @isEmpty.522(%"SparrowLayoutDecoder[SparrowScanner]"* %1) - %3 = xor i1 true, %2 - ret i1 %3 + %1 = call i1 @isEmpty.510(%"SparrowLayoutDecoder[SparrowScanner]"* %r) + %2 = xor i1 true, %1 + ret i1 %2 } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.522(%"SparrowLayoutDecoder[SparrowScanner]"* %this) #4 { - %this.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* - store %"SparrowLayoutDecoder[SparrowScanner]"* %this, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr +define internal i1 @isEmpty.510(%"SparrowLayoutDecoder[SparrowScanner]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %2 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %1, i32 0, i32 5 - %3 = load i32, i32* %2 - %4 = icmp eq i32 %3, 0 - br i1 %4, label %cond.true, label %cond.false + %1 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 5 + %2 = load i32, i32* %1 + %3 = icmp eq i32 %2, 0 + br i1 %3, label %cond.true, label %cond.false cond.true: ; preds = %code - %5 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %this.addr - %6 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %5, i32 0, i32 0 - %7 = call i1 @isEmpty.491(%"RangeWithLookahead[SparrowScanner]"* %6) + %4 = getelementptr inbounds %"SparrowLayoutDecoder[SparrowScanner]", %"SparrowLayoutDecoder[SparrowScanner]"* %this, i32 0, i32 0 + %5 = call i1 @isEmpty.479(%"RangeWithLookahead[SparrowScanner]"* %4) br label %cond.end cond.false: ; preds = %code br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %7, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %5, %cond.true ], [ false, %cond.false ] ret i1 %cond.res } ; Function Attrs: inlinehint nounwind -define internal void @"post_++.523"(%Token* sret %_result, %"SparrowLayoutDecoder[SparrowScanner]"* %r) #4 { - %_result.addr = alloca %Token* - store %Token* %_result, %Token** %_result.addr - %r.addr = alloca %"SparrowLayoutDecoder[SparrowScanner]"* - store %"SparrowLayoutDecoder[SparrowScanner]"* %r, %"SparrowLayoutDecoder[SparrowScanner]"** %r.addr +define internal void @"post_++.511"(%Token* sret %_result, %"SparrowLayoutDecoder[SparrowScanner]"* %r) #4 { %res = alloca %Token br label %code code: ; preds = %0 - %1 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %r.addr - call void @front.496(%Token* %res, %"SparrowLayoutDecoder[SparrowScanner]"* %1) - %2 = load %"SparrowLayoutDecoder[SparrowScanner]"*, %"SparrowLayoutDecoder[SparrowScanner]"** %r.addr - call void @popFront.495(%"SparrowLayoutDecoder[SparrowScanner]"* %2) - %3 = load %Token*, %Token** %_result.addr - call void @ctor.202(%Token* %3, %Token* %res) - call void @dtor.260(%Token* %res) + call void @front.484(%Token* %res, %"SparrowLayoutDecoder[SparrowScanner]"* %r) + call void @popFront.483(%"SparrowLayoutDecoder[SparrowScanner]"* %r) + call void @ctor.188(%Token* %_result, %Token* %res) + call void @dtor.249(%Token* %res) ret void dumy_block: ; No predecessors! - call void @dtor.260(%Token* %res) + call void @dtor.249(%Token* %res) ret void } ; Function Attrs: noinline nounwind -define %ParserContext* @spr_parserIf_createParser(%CharSource %chars, %Location* %loc, %AstBuilder* %astBuilder, %ErrorReporter %reporter) #5 { - %chars.addr = alloca %CharSource - store %CharSource %chars, %CharSource* %chars.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr - %astBuilder.addr = alloca %AstBuilder* - store %AstBuilder* %astBuilder, %AstBuilder** %astBuilder.addr - %reporter.addr = alloca %ErrorReporter - store %ErrorReporter %reporter, %ErrorReporter* %reporter.addr +define %ParserContext* @spr_parserIf_createParser(%CharSource* %chars, %Location* %loc, %AstBuilder* %astBuilder, %ErrorReporter* %reporter) #5 { %res = alloca %ParserContext* br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %loc.addr - %2 = load %AstBuilder*, %AstBuilder** %astBuilder.addr - %3 = call %ParserContext* @new(%CharSource* %chars.addr, %Location* %1, %AstBuilder* %2, %ErrorReporter* %reporter.addr) - store %ParserContext* %3, %ParserContext** %res - %4 = load %ParserContext*, %ParserContext** %res - ret %ParserContext* %4 + %1 = call %ParserContext* @new(%CharSource* %chars, %Location* %loc, %AstBuilder* %astBuilder, %ErrorReporter* %reporter) + store %ParserContext* %1, %ParserContext** %res + %2 = load %ParserContext*, %ParserContext** %res + ret %ParserContext* %2 } ; Function Attrs: inlinehint nounwind define internal %ParserContext* @new(%CharSource* %arg1, %Location* %arg2, %AstBuilder* %arg3, %ErrorReporter* %arg4) #4 { - %arg1.addr = alloca %CharSource* - store %CharSource* %arg1, %CharSource** %arg1.addr - %arg2.addr = alloca %Location* - store %Location* %arg2, %Location** %arg2.addr - %arg3.addr = alloca %AstBuilder* - store %AstBuilder* %arg3, %AstBuilder** %arg3.addr - %arg4.addr = alloca %ErrorReporter* - store %ErrorReporter* %arg4, %ErrorReporter** %arg4.addr %res = alloca %ParserContext* + %"$tmpForRef" = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = call i8* @malloc(i64 1280) - %2 = bitcast i8* %1 to %ParserContext* - store %ParserContext* %2, %ParserContext** %res - %3 = load %ParserContext*, %ParserContext** %res - %4 = load %CharSource*, %CharSource** %arg1.addr - %5 = load %CharSource, %CharSource* %4 - %6 = load %Location*, %Location** %arg2.addr - %7 = load %Location, %Location* %6 - %8 = load %AstBuilder*, %AstBuilder** %arg3.addr - %9 = load %ErrorReporter*, %ErrorReporter** %arg4.addr - %10 = load %ErrorReporter, %ErrorReporter* %9 - call void @ctor.388(%ParserContext* %3, %CharSource %5, %Location %7, %AstBuilder* %8, %ErrorReporter %10) - %11 = load %ParserContext*, %ParserContext** %res - ret %ParserContext* %11 + %1 = call %UntypedPtr @malloc(i64 1288) + store %UntypedPtr %1, %UntypedPtr* %"$tmpForRef" + %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %"$tmpForRef", i32 0, i32 0 + %3 = load i8*, i8** %2 + %4 = bitcast i8* %3 to %ParserContext* + store %ParserContext* %4, %ParserContext** %res + %5 = load %ParserContext*, %ParserContext** %res + %6 = load %Location, %Location* %arg2 + call void @ctor.375(%ParserContext* %5, %CharSource* %arg1, %Location %6, %AstBuilder* %arg3, %ErrorReporter* %arg4) + %7 = load %ParserContext*, %ParserContext** %res + ret %ParserContext* %7 } ; Function Attrs: noinline nounwind -define %ParserContext* @spr_parserIf_createParserFile(%StringRef %filename, %Location* %loc, %AstBuilder* %astBuilder, %ErrorReporter %reporter) #5 { +define %ParserContext* @spr_parserIf_createParserFile(%StringRef %filename, %Location* %loc, %AstBuilder* %astBuilder, %ErrorReporter* %reporter) #5 { %filename.addr = alloca %StringRef store %StringRef %filename, %StringRef* %filename.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr - %astBuilder.addr = alloca %AstBuilder* - store %AstBuilder* %astBuilder, %AstBuilder** %astBuilder.addr - %reporter.addr = alloca %ErrorReporter - store %ErrorReporter %reporter, %ErrorReporter* %reporter.addr %fileCharSource = alloca %FileCharSource* %"$tmpC" = alloca %CharSource br label %code code: ; preds = %0 - %1 = call %FileCharSource* @new.524(%StringRef* %filename.addr) + %1 = call %FileCharSource* @new.512(%StringRef* %filename.addr) store %FileCharSource* %1, %FileCharSource** %fileCharSource %2 = load %FileCharSource*, %FileCharSource** %fileCharSource call void @mkCharSource(%CharSource* %"$tmpC", %FileCharSource* %2) - %3 = load %CharSource, %CharSource* %"$tmpC" - %4 = load %Location*, %Location** %loc.addr - %5 = load %AstBuilder*, %AstBuilder** %astBuilder.addr - %6 = load %ErrorReporter, %ErrorReporter* %reporter.addr - %7 = call %ParserContext* @spr_parserIf_createParser(%CharSource %3, %Location* %4, %AstBuilder* %5, %ErrorReporter %6) - ret %ParserContext* %7 + %3 = call %ParserContext* @spr_parserIf_createParser(%CharSource* %"$tmpC", %Location* %loc, %AstBuilder* %astBuilder, %ErrorReporter* %reporter) + ret %ParserContext* %3 } ; Function Attrs: inlinehint nounwind -define internal %FileCharSource* @new.524(%StringRef* %arg1) #4 { - %arg1.addr = alloca %StringRef* - store %StringRef* %arg1, %StringRef** %arg1.addr +define internal %FileCharSource* @new.512(%StringRef* %arg1) #4 { %res = alloca %FileCharSource* + %"$tmpForRef" = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = call i8* @malloc(i64 8) - %2 = bitcast i8* %1 to %FileCharSource* - store %FileCharSource* %2, %FileCharSource** %res - %3 = load %FileCharSource*, %FileCharSource** %res - %4 = load %StringRef*, %StringRef** %arg1.addr - %5 = load %StringRef, %StringRef* %4 - call void @ctor.525(%FileCharSource* %3, %StringRef %5) - %6 = load %FileCharSource*, %FileCharSource** %res - ret %FileCharSource* %6 + %1 = call %UntypedPtr @malloc(i64 8) + store %UntypedPtr %1, %UntypedPtr* %"$tmpForRef" + %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %"$tmpForRef", i32 0, i32 0 + %3 = load i8*, i8** %2 + %4 = bitcast i8* %3 to %FileCharSource* + store %FileCharSource* %4, %FileCharSource** %res + %5 = load %FileCharSource*, %FileCharSource** %res + %6 = load %StringRef, %StringRef* %arg1 + call void @ctor.513(%FileCharSource* %5, %StringRef %6) + %7 = load %FileCharSource*, %FileCharSource** %res + ret %FileCharSource* %7 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.525(%FileCharSource* %this, %StringRef %filename) #4 { - %this.addr = alloca %FileCharSource* - store %FileCharSource* %this, %FileCharSource** %this.addr +define internal void @ctor.513(%FileCharSource* %this, %StringRef %filename) #4 { %filename.addr = alloca %StringRef store %StringRef %filename, %StringRef* %filename.addr %tmp.StringRef = alloca %StringRef br label %code code: ; preds = %0 - %1 = load %FileCharSource*, %FileCharSource** %this.addr - %2 = getelementptr inbounds %FileCharSource, %FileCharSource* %1, i32 0, i32 0 - %3 = load %StringRef, %StringRef* %filename.addr - %4 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %5 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.41, i32 0, i32 0), i8** %4 - store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.41, i32 0, i32 1), i8** %5 - %6 = load %StringRef, %StringRef* %tmp.StringRef - call void @ctor.526(%File* %2, %StringRef %3, %StringRef %6) + %1 = getelementptr inbounds %FileCharSource, %FileCharSource* %this, i32 0, i32 0 + %2 = load %StringRef, %StringRef* %filename.addr + %3 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %4 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %5 = bitcast %UntypedPtr* %3 to i8** + %6 = bitcast %UntypedPtr* %4 to i8** + store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.42, i32 0, i32 0), i8** %5 + store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.42, i32 0, i32 1), i8** %6 + %7 = load %StringRef, %StringRef* %tmp.StringRef + call void @ctor.514(%File* %1, %StringRef %2, %StringRef %7) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.526(%File* %this, %StringRef %filename, %StringRef %mode) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr +define internal void @ctor.514(%File* %this, %StringRef %filename, %StringRef %mode) #4 { %filename.addr = alloca %StringRef store %StringRef %filename, %StringRef* %filename.addr %mode.addr = alloca %StringRef store %StringRef %mode, %StringRef* %mode.addr + %"$tmpForRef" = alloca %File br label %code code: ; preds = %0 - %1 = load %File*, %File** %this.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - store i8* null, i8** %2 - %3 = call i8* @cStr(%StringRef* %filename.addr) - %4 = call i8* @cStr(%StringRef* %mode.addr) - %5 = call i8* @fopen(i8* %3, i8* %4) - %6 = load %File*, %File** %this.addr - %7 = getelementptr inbounds %File, %File* %6, i32 0, i32 0 - store i8* %5, i8** %7 + %1 = getelementptr inbounds %File, %File* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) + %2 = getelementptr inbounds %File, %File* %this, i32 0, i32 0 + %3 = load %StringRef, %StringRef* %filename.addr + %4 = call i8* @cStr(%StringRef %3) + %5 = load %StringRef, %StringRef* %mode.addr + %6 = call i8* @cStr(%StringRef %5) + %7 = call %File @fopen(i8* %4, i8* %6) + store %File %7, %File* %"$tmpForRef" + %8 = getelementptr inbounds %File, %File* %"$tmpForRef", i32 0, i32 0 + call void @"="(%UntypedPtr* %2, %UntypedPtr* %8) ret void } -declare i8* @fopen(i8*, i8*) +declare %File @fopen(i8*, i8*) ; Function Attrs: inlinehint nounwind define internal void @mkCharSource(%CharSource* sret %_result, %FileCharSource* %obj) #4 { - %_result.addr = alloca %CharSource* - store %CharSource* %_result, %CharSource** %_result.addr - %obj.addr = alloca %FileCharSource* - store %FileCharSource* %obj, %FileCharSource** %obj.addr %res = alloca %CharSource %"$tmpForRef" = alloca %UntypedPtr + %"$tmpForRef1" = alloca %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]" %funptr = alloca void (%FileCharSource*, %String*, i32)* br label %code code: ; preds = %0 - call void @ctor.134(%CharSource* %res) + call void @ctor.122(%CharSource* %res) %1 = getelementptr inbounds %CharSource, %CharSource* %res, i32 0, i32 0 - %2 = load %FileCharSource*, %FileCharSource** %obj.addr - %3 = call %UntypedPtr @_eraseType(%FileCharSource* %2) - store %UntypedPtr %3, %UntypedPtr* %"$tmpForRef" - call void @"=.288"(%UntypedPtr* %1, %UntypedPtr* %"$tmpForRef") - %4 = getelementptr inbounds %CharSource, %CharSource* %res, i32 0, i32 1 - store void (%FileCharSource*, %String*, i32)* @readChars.529, void (%FileCharSource*, %String*, i32)** %funptr - %5 = bitcast void (%FileCharSource*, %String*, i32)** %funptr to %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* - %6 = load %"FunctionPtr3[Void, @FileCharSource, @String, Int]", %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* %5 - call void @_reinterpretAssign(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %4, %"FunctionPtr3[Void, @FileCharSource, @String, Int]" %6) - %7 = load %CharSource*, %CharSource** %_result.addr - call void @ctor.186(%CharSource* %7, %CharSource* %res) + %2 = call %UntypedPtr @_eraseType(%FileCharSource* %obj) + store %UntypedPtr %2, %UntypedPtr* %"$tmpForRef" + call void @"="(%UntypedPtr* %1, %UntypedPtr* %"$tmpForRef") + %3 = getelementptr inbounds %CharSource, %CharSource* %res, i32 0, i32 1 + store void (%FileCharSource*, %String*, i32)* @readChars.517, void (%FileCharSource*, %String*, i32)** %funptr + %4 = bitcast void (%FileCharSource*, %String*, i32)** %funptr to %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* + %5 = load %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]", %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %4 + store %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]" %5, %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %"$tmpForRef1" + call void @_reinterpretAssign(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %3, %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %"$tmpForRef1") + call void @ctor.173(%CharSource* %_result, %CharSource* %res) ret void } ; Function Attrs: inlinehint nounwind define internal %UntypedPtr @_eraseType(%FileCharSource* %obj) #4 { - %obj.addr = alloca %FileCharSource* - store %FileCharSource* %obj, %FileCharSource** %obj.addr %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %FileCharSource*, %FileCharSource** %obj.addr - %2 = bitcast %FileCharSource* %1 to i8* - call void @ctor.527(%UntypedPtr* %tmp.this, i8* %2) - %3 = load %UntypedPtr, %UntypedPtr* %tmp.this - ret %UntypedPtr %3 + call void @ctor.515(%UntypedPtr* %tmp.this, %FileCharSource* %obj) + %1 = load %UntypedPtr, %UntypedPtr* %tmp.this + ret %UntypedPtr %1 } -; Function Attrs: alwaysinline nounwind -define internal void @ctor.527(%UntypedPtr* %this, i8* %fdata) #3 { - %this.addr = alloca %UntypedPtr* - store %UntypedPtr* %this, %UntypedPtr** %this.addr - %fdata.addr = alloca i8* - store i8* %fdata, i8** %fdata.addr +; Function Attrs: inlinehint nounwind +define internal void @ctor.515(%UntypedPtr* %this, %FileCharSource* %val) #4 { + %val.addr = alloca %FileCharSource* + store %FileCharSource* %val, %FileCharSource** %val.addr br label %code code: ; preds = %0 - %1 = load i8*, i8** %fdata.addr - %2 = load %UntypedPtr*, %UntypedPtr** %this.addr - %3 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %2, i32 0, i32 0 - store i8* %1, i8** %3 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = load %FileCharSource*, %FileCharSource** %val.addr + %3 = bitcast %FileCharSource* %2 to i8* + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* %3, i8** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal void @_reinterpretAssign(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %dest, %"FunctionPtr3[Void, @FileCharSource, @String, Int]" %src) #4 { - %dest.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* - store %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %dest, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %dest.addr - %src.addr = alloca %"FunctionPtr3[Void, @FileCharSource, @String, Int]" - store %"FunctionPtr3[Void, @FileCharSource, @String, Int]" %src, %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* %src.addr +define internal void @_reinterpretAssign(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %dest, %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %src) #4 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @String, Int]"*, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %dest.addr - %2 = bitcast %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %1 to %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* - call void @"=.528"(%"FunctionPtr3[Void, @FileCharSource, @String, Int]"* %2, %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* %src.addr) + %1 = bitcast %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %dest to %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* + call void @"=.516"(%"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %1, %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %src) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.528"(%"FunctionPtr3[Void, @FileCharSource, @String, Int]"* %this, %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* - store %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* %this, %"FunctionPtr3[Void, @FileCharSource, @String, Int]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* - store %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* %other, %"FunctionPtr3[Void, @FileCharSource, @String, Int]"** %other.addr +define internal void @"=.516"(%"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %this, %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* + store %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %other, %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, @FileCharSource, @String, Int]"*, %"FunctionPtr3[Void, @FileCharSource, @String, Int]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Void, @FileCharSource, @String, Int]", %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Void, @FileCharSource, @String, Int]"*, %"FunctionPtr3[Void, @FileCharSource, @String, Int]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Void, @FileCharSource, @String, Int]", %"FunctionPtr3[Void, @FileCharSource, @String, Int]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]", %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"*, %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]", %"FunctionPtr3[Void, FileCharSource mut, String mut, Int]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: inlinehint nounwind -define internal void @readChars.529(%FileCharSource* %this, %String* %dest, i32 %numChars) #4 { - %this.addr = alloca %FileCharSource* - store %FileCharSource* %this, %FileCharSource** %this.addr - %dest.addr = alloca %String* - store %String* %dest, %String** %dest.addr +define internal void @readChars.517(%FileCharSource* %this, %String* %dest, i32 %numChars) #4 { %numChars.addr = alloca i32 store i32 %numChars, i32* %numChars.addr %"$rangeVar" = alloca %"NumericRangeInc[Int]" + %"$tmpForRef" = alloca i32 %i = alloca i32 %ch = alloca i8 br label %code code: ; preds = %0 - %1 = load i32, i32* %numChars.addr - call void @..(%"NumericRangeInc[Int]"* %"$rangeVar", i32 0, i32 %1) + store i32 0, i32* %"$tmpForRef" + call void @..(%"NumericRangeInc[Int]"* %"$rangeVar", i32* %"$tmpForRef", i32* %numChars.addr) br label %while_block while_block: ; preds = %while_step, %code - %2 = load %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %"$rangeVar" - %3 = call i1 @isEmpty.531(%"NumericRangeInc[Int]" %2) - %4 = xor i1 true, %3 - br i1 %4, label %while_body, label %while_end + %1 = call i1 @isEmpty.519(%"NumericRangeInc[Int]"* %"$rangeVar") + %2 = xor i1 true, %1 + br i1 %2, label %while_body, label %while_end while_body: ; preds = %while_block - %5 = load %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %"$rangeVar" - %6 = call i32 @front.532(%"NumericRangeInc[Int]" %5) - store i32 %6, i32* %i - %7 = load %FileCharSource*, %FileCharSource** %this.addr - %8 = getelementptr inbounds %FileCharSource, %FileCharSource* %7, i32 0, i32 0 - %9 = call i8 @readChar(%File* %8) - store i8 %9, i8* %ch + %3 = call i32 @front.520(%"NumericRangeInc[Int]"* %"$rangeVar") + store i32 %3, i32* %i + %4 = getelementptr inbounds %FileCharSource, %FileCharSource* %this, i32 0, i32 0 + %5 = call i8 @readChar(%File* %4) + store i8 %5, i8* %ch br label %if_block while_step: ; preds = %if_end - call void @popFront.533(%"NumericRangeInc[Int]"* %"$rangeVar") + call void @popFront.521(%"NumericRangeInc[Int]"* %"$rangeVar") br label %while_block while_end: ; preds = %if_then, %while_block ret void if_block: ; preds = %while_body - %10 = load %FileCharSource*, %FileCharSource** %this.addr - %11 = getelementptr inbounds %FileCharSource, %FileCharSource* %10, i32 0, i32 0 - %12 = call i1 @isEof(%File* %11) - br i1 %12, label %if_then, label %if_end + %6 = getelementptr inbounds %FileCharSource, %FileCharSource* %this, i32 0, i32 0 + %7 = call i1 @isEof(%File* %6) + br i1 %7, label %if_then, label %if_end if_then: ; preds = %if_block br label %while_end if_end: ; preds = %dumy_block, %if_block - %13 = load %String*, %String** %dest.addr - %14 = load i8, i8* %ch - call void @"+=.473"(%String* %13, i8 %14) + %8 = load i8, i8* %ch + call void @"+=.461"(%String* %dest, i8 %8) br label %while_step dumy_block: ; No predecessors! @@ -21130,27 +18871,18 @@ dumy_block: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal void @..(%"NumericRangeInc[Int]"* sret %_result, i32 %start, i32 %end) #4 { - %_result.addr = alloca %"NumericRangeInc[Int]"* - store %"NumericRangeInc[Int]"* %_result, %"NumericRangeInc[Int]"** %_result.addr - %start.addr = alloca i32 - store i32 %start, i32* %start.addr - %end.addr = alloca i32 - store i32 %end, i32* %end.addr +define internal void @..(%"NumericRangeInc[Int]"* sret %_result, i32* %start, i32* %end) #4 { br label %code code: ; preds = %0 - %1 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %_result.addr - %2 = load i32, i32* %start.addr - %3 = load i32, i32* %end.addr - call void @ctor.530(%"NumericRangeInc[Int]"* %1, i32 %2, i32 %3) + %1 = load i32, i32* %start + %2 = load i32, i32* %end + call void @ctor.518(%"NumericRangeInc[Int]"* %_result, i32 %1, i32 %2) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.530(%"NumericRangeInc[Int]"* %this, i32 %start, i32 %end) #4 { - %this.addr = alloca %"NumericRangeInc[Int]"* - store %"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"** %this.addr +define internal void @ctor.518(%"NumericRangeInc[Int]"* %this, i32 %start, i32 %end) #4 { %start.addr = alloca i32 store i32 %start, i32* %start.addr %end.addr = alloca i32 @@ -21159,42 +18891,37 @@ define internal void @ctor.530(%"NumericRangeInc[Int]"* %this, i32 %start, i32 % code: ; preds = %0 %1 = load i32, i32* %start.addr - %2 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %3 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %2, i32 0, i32 0 - store i32 %1, i32* %3 - %4 = load i32, i32* %end.addr - %5 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %6 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %5, i32 0, i32 1 - store i32 %4, i32* %6 - %7 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %8 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %7, i32 0, i32 2 - store i1 false, i1* %8 + %2 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 0 + store i32 %1, i32* %2 + %3 = load i32, i32* %end.addr + %4 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 1 + store i32 %3, i32* %4 + %5 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 2 + store i1 false, i1* %5 ret void } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.531(%"NumericRangeInc[Int]" %this) #4 { - %this.addr = alloca %"NumericRangeInc[Int]" - store %"NumericRangeInc[Int]" %this, %"NumericRangeInc[Int]"* %this.addr +define internal i1 @isEmpty.519(%"NumericRangeInc[Int]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this.addr, i32 0, i32 2 + %1 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 2 %2 = load i1, i1* %1 br i1 %2, label %cond_alt1, label %cond_alt2 cond_alt1: ; preds = %code - %3 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this.addr, i32 0, i32 0 + %3 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 0 %4 = load i32, i32* %3 - %5 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this.addr, i32 0, i32 1 + %5 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 1 %6 = load i32, i32* %5 %7 = icmp sgt i32 %4, %6 br label %cond_end cond_alt2: ; preds = %code - %8 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this.addr, i32 0, i32 0 + %8 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 0 %9 = load i32, i32* %8 - %10 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this.addr, i32 0, i32 1 + %10 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 1 %11 = load i32, i32* %10 %12 = icmp sge i32 %9, %11 br label %cond_end @@ -21205,78 +18932,62 @@ cond_end: ; preds = %cond_alt2, %cond_al } ; Function Attrs: inlinehint nounwind -define internal i32 @front.532(%"NumericRangeInc[Int]" %this) #4 { - %this.addr = alloca %"NumericRangeInc[Int]" - store %"NumericRangeInc[Int]" %this, %"NumericRangeInc[Int]"* %this.addr +define internal i32 @front.520(%"NumericRangeInc[Int]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 0 %2 = load i32, i32* %1 ret i32 %2 } ; Function Attrs: inlinehint nounwind define internal i8 @readChar(%File* %this) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr %tmp.this = alloca i8 br label %code code: ; preds = %0 - %1 = load %File*, %File** %this.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = call i32 @fgetc(i8* %3) - %5 = trunc i32 %4 to i8 - store i8 %5, i8* %tmp.this - %6 = load i8, i8* %tmp.this - ret i8 %6 + %1 = load %File, %File* %this + %2 = call i32 @fgetc(%File %1) + %3 = trunc i32 %2 to i8 + store i8 %3, i8* %tmp.this + %4 = load i8, i8* %tmp.this + ret i8 %4 } -declare i32 @fgetc(i8*) +declare i32 @fgetc(%File) ; Function Attrs: inlinehint nounwind define internal i1 @isEof(%File* %this) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr br label %code code: ; preds = %0 - %1 = load %File*, %File** %this.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = call i32 @feof(i8* %3) - %5 = icmp ne i32 0, %4 - ret i1 %5 + %1 = load %File, %File* %this + %2 = call i32 @feof(%File %1) + %3 = icmp ne i32 0, %2 + ret i1 %3 } -declare i32 @feof(i8*) +declare i32 @feof(%File) ; Function Attrs: alwaysinline nounwind -define internal void @popFront.533(%"NumericRangeInc[Int]"* %this) #3 { - %this.addr = alloca %"NumericRangeInc[Int]"* - store %"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"** %this.addr +define internal void @popFront.521(%"NumericRangeInc[Int]"* %this) #3 { %tmp.this = alloca i32 br label %code code: ; preds = %0 - %1 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %2 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %1, i32 0, i32 0 - %3 = load i32, i32* %2 + %1 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 0 + %2 = load i32, i32* %1 store i32 1, i32* %tmp.this - %4 = load i32, i32* %tmp.this - %5 = add i32 %3, %4 - %6 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %7 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %6, i32 0, i32 0 - store i32 %5, i32* %7 + %3 = load i32, i32* %tmp.this + %4 = add i32 %2, %3 + %5 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 0 + store i32 %4, i32* %5 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.534(%"NumericRangeInc[Int]"* %this) #3 { - %this.addr = alloca %"NumericRangeInc[Int]"* - store %"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"** %this.addr +define internal void @dtor.522(%"NumericRangeInc[Int]"* %this) #3 { br label %code code: ; preds = %0 @@ -21284,9 +18995,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.535(%CharSource* %this) #3 { - %this.addr = alloca %CharSource* - store %CharSource* %this, %CharSource** %this.addr +define internal void @dtor.523(%CharSource* %this) #3 { br label %code code: ; preds = %0 @@ -21294,53 +19003,44 @@ code: ; preds = %0 } ; Function Attrs: noinline nounwind -define %ParserContext* @spr_parserIf_createParserStringRef(%StringRef %code, %Location* %loc, %AstBuilder* %astBuilder, %ErrorReporter %reporter) #5 { +define %ParserContext* @spr_parserIf_createParserStringRef(%StringRef %code, %Location* %loc, %AstBuilder* %astBuilder, %ErrorReporter* %reporter) #5 { %code.addr = alloca %StringRef store %StringRef %code, %StringRef* %code.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr - %astBuilder.addr = alloca %AstBuilder* - store %AstBuilder* %astBuilder, %AstBuilder** %astBuilder.addr - %reporter.addr = alloca %ErrorReporter - store %ErrorReporter %reporter, %ErrorReporter* %reporter.addr %stringCharSource = alloca %StringCharSource* %"$tmpC" = alloca %CharSource br label %code1 code1: ; preds = %0 - %1 = call %StringCharSource* @new.536(%StringRef* %code.addr) + %1 = call %StringCharSource* @new.524(%StringRef* %code.addr) store %StringCharSource* %1, %StringCharSource** %stringCharSource %2 = load %StringCharSource*, %StringCharSource** %stringCharSource - call void @mkCharSource.538(%CharSource* %"$tmpC", %StringCharSource* %2) - %3 = load %CharSource, %CharSource* %"$tmpC" - %4 = load %Location*, %Location** %loc.addr - %5 = load %AstBuilder*, %AstBuilder** %astBuilder.addr - %6 = load %ErrorReporter, %ErrorReporter* %reporter.addr - %7 = call %ParserContext* @spr_parserIf_createParser(%CharSource %3, %Location* %4, %AstBuilder* %5, %ErrorReporter %6) - ret %ParserContext* %7 + call void @mkCharSource.526(%CharSource* %"$tmpC", %StringCharSource* %2) + %3 = call %ParserContext* @spr_parserIf_createParser(%CharSource* %"$tmpC", %Location* %loc, %AstBuilder* %astBuilder, %ErrorReporter* %reporter) + ret %ParserContext* %3 } ; Function Attrs: inlinehint nounwind -define internal %StringCharSource* @new.536(%StringRef* %arg1) #4 { - %arg1.addr = alloca %StringRef* - store %StringRef* %arg1, %StringRef** %arg1.addr +define internal %StringCharSource* @new.524(%StringRef* %arg1) #4 { %res = alloca %StringCharSource* + %"$tmpForRef" = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = call i8* @malloc(i64 16) - %2 = bitcast i8* %1 to %StringCharSource* - store %StringCharSource* %2, %StringCharSource** %res - %3 = load %StringCharSource*, %StringCharSource** %res - %4 = load %StringRef*, %StringRef** %arg1.addr - %5 = load %StringRef, %StringRef* %4 - call void @ctor.537(%StringCharSource* %3, %StringRef %5) - %6 = load %StringCharSource*, %StringCharSource** %res - ret %StringCharSource* %6 + %1 = call %UntypedPtr @malloc(i64 16) + store %UntypedPtr %1, %UntypedPtr* %"$tmpForRef" + %2 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %"$tmpForRef", i32 0, i32 0 + %3 = load i8*, i8** %2 + %4 = bitcast i8* %3 to %StringCharSource* + store %StringCharSource* %4, %StringCharSource** %res + %5 = load %StringCharSource*, %StringCharSource** %res + %6 = load %StringRef, %StringRef* %arg1 + call void @ctor.525(%StringCharSource* %5, %StringRef %6) + %7 = load %StringCharSource*, %StringCharSource** %res + ret %StringCharSource* %7 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.537(%StringCharSource* %this, %StringRef %f_content) #3 { +define internal void @ctor.525(%StringCharSource* %this, %StringRef %f_content) #3 { %this.addr = alloca %StringCharSource* store %StringCharSource* %this, %StringCharSource** %this.addr %f_content.addr = alloca %StringRef @@ -21351,104 +19051,100 @@ code: ; preds = %0 %1 = load %StringCharSource*, %StringCharSource** %this.addr %2 = getelementptr inbounds %StringCharSource, %StringCharSource* %1, i32 0, i32 0 %3 = load %StringRef, %StringRef* %f_content.addr - call void @ctor.56(%StringRef* %2, %StringRef %3) + call void @ctor.59(%StringRef* %2, %StringRef %3) ret void } ; Function Attrs: inlinehint nounwind -define internal void @mkCharSource.538(%CharSource* sret %_result, %StringCharSource* %obj) #4 { - %_result.addr = alloca %CharSource* - store %CharSource* %_result, %CharSource** %_result.addr - %obj.addr = alloca %StringCharSource* - store %StringCharSource* %obj, %StringCharSource** %obj.addr +define internal void @mkCharSource.526(%CharSource* sret %_result, %StringCharSource* %obj) #4 { %res = alloca %CharSource %"$tmpForRef" = alloca %UntypedPtr + %"$tmpForRef1" = alloca %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]" %funptr = alloca void (%StringCharSource*, %String*, i32)* br label %code code: ; preds = %0 - call void @ctor.134(%CharSource* %res) + call void @ctor.122(%CharSource* %res) %1 = getelementptr inbounds %CharSource, %CharSource* %res, i32 0, i32 0 - %2 = load %StringCharSource*, %StringCharSource** %obj.addr - %3 = call %UntypedPtr @_eraseType.539(%StringCharSource* %2) - store %UntypedPtr %3, %UntypedPtr* %"$tmpForRef" - call void @"=.288"(%UntypedPtr* %1, %UntypedPtr* %"$tmpForRef") - %4 = getelementptr inbounds %CharSource, %CharSource* %res, i32 0, i32 1 - store void (%StringCharSource*, %String*, i32)* @readChars.542, void (%StringCharSource*, %String*, i32)** %funptr - %5 = bitcast void (%StringCharSource*, %String*, i32)** %funptr to %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* - %6 = load %"FunctionPtr3[Void, @StringCharSource, @String, Int]", %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* %5 - call void @_reinterpretAssign.540(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %4, %"FunctionPtr3[Void, @StringCharSource, @String, Int]" %6) - %7 = load %CharSource*, %CharSource** %_result.addr - call void @ctor.186(%CharSource* %7, %CharSource* %res) + %2 = call %UntypedPtr @_eraseType.527(%StringCharSource* %obj) + store %UntypedPtr %2, %UntypedPtr* %"$tmpForRef" + call void @"="(%UntypedPtr* %1, %UntypedPtr* %"$tmpForRef") + %3 = getelementptr inbounds %CharSource, %CharSource* %res, i32 0, i32 1 + store void (%StringCharSource*, %String*, i32)* @readChars.531, void (%StringCharSource*, %String*, i32)** %funptr + %4 = bitcast void (%StringCharSource*, %String*, i32)** %funptr to %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* + %5 = load %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]", %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %4 + store %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]" %5, %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %"$tmpForRef1" + call void @_reinterpretAssign.529(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %3, %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %"$tmpForRef1") + call void @ctor.173(%CharSource* %_result, %CharSource* %res) ret void } ; Function Attrs: inlinehint nounwind -define internal %UntypedPtr @_eraseType.539(%StringCharSource* %obj) #4 { - %obj.addr = alloca %StringCharSource* - store %StringCharSource* %obj, %StringCharSource** %obj.addr +define internal %UntypedPtr @_eraseType.527(%StringCharSource* %obj) #4 { %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %StringCharSource*, %StringCharSource** %obj.addr - %2 = bitcast %StringCharSource* %1 to i8* - call void @ctor.527(%UntypedPtr* %tmp.this, i8* %2) - %3 = load %UntypedPtr, %UntypedPtr* %tmp.this - ret %UntypedPtr %3 + call void @ctor.528(%UntypedPtr* %tmp.this, %StringCharSource* %obj) + %1 = load %UntypedPtr, %UntypedPtr* %tmp.this + ret %UntypedPtr %1 +} + +; Function Attrs: inlinehint nounwind +define internal void @ctor.528(%UntypedPtr* %this, %StringCharSource* %val) #4 { + %val.addr = alloca %StringCharSource* + store %StringCharSource* %val, %StringCharSource** %val.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = load %StringCharSource*, %StringCharSource** %val.addr + %3 = bitcast %StringCharSource* %2 to i8* + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* %3, i8** %4 + ret void } ; Function Attrs: inlinehint nounwind -define internal void @_reinterpretAssign.540(%"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %dest, %"FunctionPtr3[Void, @StringCharSource, @String, Int]" %src) #4 { - %dest.addr = alloca %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* - store %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %dest, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %dest.addr - %src.addr = alloca %"FunctionPtr3[Void, @StringCharSource, @String, Int]" - store %"FunctionPtr3[Void, @StringCharSource, @String, Int]" %src, %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* %src.addr +define internal void @_reinterpretAssign.529(%"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %dest, %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %src) #4 { br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, UntypedPtr, @String, Int]"*, %"FunctionPtr3[Void, UntypedPtr, @String, Int]"** %dest.addr - %2 = bitcast %"FunctionPtr3[Void, UntypedPtr, @String, Int]"* %1 to %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* - call void @"=.541"(%"FunctionPtr3[Void, @StringCharSource, @String, Int]"* %2, %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* %src.addr) + %1 = bitcast %"FunctionPtr3[Void, UntypedPtr, String mut, Int]"* %dest to %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* + call void @"=.530"(%"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %1, %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %src) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.541"(%"FunctionPtr3[Void, @StringCharSource, @String, Int]"* %this, %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* %other) #3 { - %this.addr = alloca %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* - store %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* %this, %"FunctionPtr3[Void, @StringCharSource, @String, Int]"** %this.addr - %other.addr = alloca %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* - store %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* %other, %"FunctionPtr3[Void, @StringCharSource, @String, Int]"** %other.addr +define internal void @"=.530"(%"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %this, %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %other) #3 { + %other.addr = alloca %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* + store %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %other, %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Void, @StringCharSource, @String, Int]"*, %"FunctionPtr3[Void, @StringCharSource, @String, Int]"** %other.addr - %2 = getelementptr inbounds %"FunctionPtr3[Void, @StringCharSource, @String, Int]", %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %"FunctionPtr3[Void, @StringCharSource, @String, Int]"*, %"FunctionPtr3[Void, @StringCharSource, @String, Int]"** %this.addr - %5 = getelementptr inbounds %"FunctionPtr3[Void, @StringCharSource, @String, Int]", %"FunctionPtr3[Void, @StringCharSource, @String, Int]"* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]", %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %this, i32 0, i32 0 + %2 = load %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"*, %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"** %other.addr + %3 = getelementptr inbounds %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]", %"FunctionPtr3[Void, StringCharSource mut, String mut, Int]"* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: inlinehint nounwind -define internal void @readChars.542(%StringCharSource* %this, %String* %dest, i32 %numChars) #4 { - %this.addr = alloca %StringCharSource* - store %StringCharSource* %this, %StringCharSource** %this.addr - %dest.addr = alloca %String* - store %String* %dest, %String** %dest.addr +define internal void @readChars.531(%StringCharSource* %this, %String* %dest, i32 %numChars) #4 { %numChars.addr = alloca i32 store i32 %numChars, i32* %numChars.addr %sz = alloca i32 %toRead = alloca i32 %"$rangeVar" = alloca %"NumericRangeInc[Int]" + %"$tmpForRef" = alloca i32 %i = alloca i32 br label %code code: ; preds = %0 - %1 = load %StringCharSource*, %StringCharSource** %this.addr - %2 = getelementptr inbounds %StringCharSource, %StringCharSource* %1, i32 0, i32 0 - %3 = call i64 @size(%StringRef* %2) + %1 = getelementptr inbounds %StringCharSource, %StringCharSource* %this, i32 0, i32 0 + %2 = load %StringRef, %StringRef* %1 + %3 = call i64 @size(%StringRef %2) %4 = trunc i64 %3 to i32 store i32 %4, i32* %sz %5 = load i32, i32* %numChars.addr @@ -21466,33 +19162,29 @@ cond_end: ; preds = %cond_alt2, %cond_al %cond = phi i32* [ %numChars.addr, %cond_alt1 ], [ %sz, %cond_alt2 ] %8 = load i32, i32* %cond store i32 %8, i32* %toRead - %9 = load i32, i32* %sz - call void @..(%"NumericRangeInc[Int]"* %"$rangeVar", i32 0, i32 %9) + store i32 0, i32* %"$tmpForRef" + call void @..(%"NumericRangeInc[Int]"* %"$rangeVar", i32* %"$tmpForRef", i32* %sz) br label %while_block while_block: ; preds = %while_step, %cond_end - %10 = load %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %"$rangeVar" - %11 = call i1 @isEmpty.531(%"NumericRangeInc[Int]" %10) - %12 = xor i1 true, %11 - br i1 %12, label %while_body, label %while_end + %9 = call i1 @isEmpty.519(%"NumericRangeInc[Int]"* %"$rangeVar") + %10 = xor i1 true, %9 + br i1 %10, label %while_body, label %while_end while_body: ; preds = %while_block - %13 = load %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %"$rangeVar" - %14 = call i32 @front.532(%"NumericRangeInc[Int]" %13) - store i32 %14, i32* %i - %15 = load %String*, %String** %dest.addr - %16 = load %StringCharSource*, %StringCharSource** %this.addr - %17 = getelementptr inbounds %StringCharSource, %StringCharSource* %16, i32 0, i32 0 - %18 = call i8* @front(%StringRef* %17) - %19 = load i8, i8* %18 - call void @"+=.473"(%String* %15, i8 %19) - %20 = load %StringCharSource*, %StringCharSource** %this.addr - %21 = getelementptr inbounds %StringCharSource, %StringCharSource* %20, i32 0, i32 0 - call void @popFront(%StringRef* %21) + %11 = call i32 @front.520(%"NumericRangeInc[Int]"* %"$rangeVar") + store i32 %11, i32* %i + %12 = getelementptr inbounds %StringCharSource, %StringCharSource* %this, i32 0, i32 0 + %13 = load %StringRef, %StringRef* %12 + %14 = call i8* @front(%StringRef %13) + %15 = load i8, i8* %14 + call void @"+=.461"(%String* %dest, i8 %15) + %16 = getelementptr inbounds %StringCharSource, %StringCharSource* %this, i32 0, i32 0 + call void @popFront(%StringRef* %16) br label %while_step while_step: ; preds = %while_body - call void @popFront.533(%"NumericRangeInc[Int]"* %"$rangeVar") + call void @popFront.521(%"NumericRangeInc[Int]"* %"$rangeVar") br label %while_block while_end: ; preds = %while_block @@ -21501,13 +19193,10 @@ while_end: ; preds = %while_block ; Function Attrs: noinline nounwind define void @spr_parserIf_destroyParser(%ParserContext* %ctx) #5 { - %ctx.addr = alloca %ParserContext* - store %ParserContext* %ctx, %ParserContext** %ctx.addr br label %code code: ; preds = %0 - %1 = load %ParserContext*, %ParserContext** %ctx.addr - call void @delete(%ParserContext* %1) + call void @delete(%ParserContext* %ctx) ret void } @@ -21515,6 +19204,7 @@ code: ; preds = %0 define internal void @delete(%ParserContext* %obj) #4 { %obj.addr = alloca %ParserContext* store %ParserContext* %obj, %ParserContext** %obj.addr + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 @@ -21528,163 +19218,142 @@ if_block: ; preds = %code if_then: ; preds = %if_block %4 = load %ParserContext*, %ParserContext** %obj.addr - call void @dtor.258(%ParserContext* %4) + call void @dtor.247(%ParserContext* %4) %5 = load %ParserContext*, %ParserContext** %obj.addr - %6 = bitcast %ParserContext* %5 to i8* - call void @free(i8* %6) + call void @ctor.532(%UntypedPtr* %tmp.this, %ParserContext* %5) + %6 = load %UntypedPtr, %UntypedPtr* %tmp.this + call void @free(%UntypedPtr %6) br label %if_end if_end: ; preds = %if_then, %if_block ret void } +; Function Attrs: inlinehint nounwind +define internal void @ctor.532(%UntypedPtr* %this, %ParserContext* %val) #4 { + %val.addr = alloca %ParserContext* + store %ParserContext* %val, %ParserContext** %val.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = load %ParserContext*, %ParserContext** %val.addr + %3 = bitcast %ParserContext* %2 to i8* + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* %3, i8** %4 + ret void +} + ; Function Attrs: noinline nounwind define void @spr_parserIf_nextToken(%ParserContext* %ctx, %Token* %outToken) #5 { - %ctx.addr = alloca %ParserContext* - store %ParserContext* %ctx, %ParserContext** %ctx.addr - %outToken.addr = alloca %Token* - store %Token* %outToken, %Token** %outToken.addr %"$tmpC" = alloca %Token br label %code code: ; preds = %0 - %1 = load %Token*, %Token** %outToken.addr - %2 = load %ParserContext*, %ParserContext** %ctx.addr - %3 = getelementptr inbounds %ParserContext, %ParserContext* %2, i32 0, i32 0 - call void @"post_++.411"(%Token* %"$tmpC", %SparrowScanner* %3) - call void @"=.297"(%Token* %1, %Token* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC") + %1 = getelementptr inbounds %ParserContext, %ParserContext* %ctx, i32 0, i32 0 + call void @"post_++.398"(%Token* %"$tmpC", %SparrowScanner* %1) + call void @"=.285"(%Token* %outToken, %Token* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC") ret void } ; Function Attrs: noinline nounwind define %Node @spr_parserIf_parseModule(%ParserContext* %ctx) #5 { - %ctx.addr = alloca %ParserContext* - store %ParserContext* %ctx, %ParserContext** %ctx.addr br label %code code: ; preds = %0 - %1 = load %ParserContext*, %ParserContext** %ctx.addr - %2 = getelementptr inbounds %ParserContext, %ParserContext* %1, i32 0, i32 2 - %3 = call %Node @parseModule(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2) - ret %Node %3 + %1 = getelementptr inbounds %ParserContext, %ParserContext* %ctx, i32 0, i32 2 + %2 = call %Node @parseModule(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) + ret %Node %2 } ; Function Attrs: inlinehint nounwind define internal %Node @parseModule(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %loc = alloca %Location + %"$tmpForRef" = alloca %Location %moduleName = alloca %Node - %"$tmpForRef" = alloca %Node + %"$tmpForRef1" = alloca %Node %decls = alloca %Node %tmp.this = alloca %TokenType - %"$tmpC" = alloca %Location - %"$tmpC1" = alloca %Location br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %3 = call %Node @parseModuleName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2) - store %Node %3, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %moduleName, %Node* %"$tmpForRef") - call void @ctor.556(%Node* %decls) - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseStmts(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i1 true, %Node* %decls) - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 0) - %6 = load %TokenType, %TokenType* %tmp.this - %7 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, %TokenType %6) - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8, i32 0, i32 3 - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC1", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10) - call void @span(%Location* %"$tmpC", %Location* %loc, %Location* %"$tmpC1") - %11 = load %Node, %Node* %moduleName - %12 = load %Node, %Node* %decls - %13 = call %Node @mkModule(%AstBuilder* %9, %Location* %"$tmpC", %Node %11, %Node %12) - ret %Node %13 -} - -; Function Attrs: inlinehint nounwind -define internal void @curLoc(%Location* sret %_result, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %_result.addr = alloca %Location* - store %Location* %_result, %Location** %_result.addr - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") + %2 = call %Node @parseModuleName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %2, %Node* %"$tmpForRef1" + call void @ctor.535(%Node* %moduleName, %Node* %"$tmpForRef1") + call void @ctor.546(%Node* %decls) + call void @parseStmts(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true, %Node* %decls) + call void @ctor.404(%TokenType* %tmp.this, i32 0) + %3 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %5 = load %Location, %Location* %loc + %6 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %7 = call %Location @span(%Location %5, %Location %6) + %8 = load %Node, %Node* %moduleName + %9 = load %Node, %Node* %decls + %10 = call %Node @mkModule(%AstBuilder* %4, %Location %7, %Node %8, %Node %9) + ret %Node %10 +} + +; Function Attrs: inlinehint nounwind +define internal %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { %"$tmpC" = alloca %Token br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %_result.addr - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %3) - %4 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 0 - call void @ctor.182(%Location* %1, %Location* %4) - call void @dtor.260(%Token* %"$tmpC") - ret void + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1) + %2 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 0 + %3 = load %Location, %Location* %2 + call void @dtor.249(%Token* %"$tmpC") + ret %Location %3 dumy_block: ; No predecessors! - call void @dtor.260(%Token* %"$tmpC") - ret void + call void @dtor.249(%Token* %"$tmpC") + unreachable } ; Function Attrs: inlinehint nounwind -define internal void @"pre_*.543"(%Token* sret %_result, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %r) #4 { - %_result.addr = alloca %Token* - store %Token* %_result, %Token** %_result.addr - %r.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* - store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %r, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %r.addr +define internal void @"pre_*.533"(%Token* sret %_result, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %r) #4 { br label %code code: ; preds = %0 - %1 = load %Token*, %Token** %_result.addr - %2 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %r.addr - call void @front.544(%Token* %1, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2) + call void @front.534(%Token* %_result, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %r) ret void } ; Function Attrs: inlinehint nounwind -define internal void @front.544(%Token* sret %_result, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %_result.addr = alloca %Token* - store %Token* %_result, %Token** %_result.addr - %this.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* - store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal void @front.534(%Token* sret %_result, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %Token*, %Token** %_result.addr - %2 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %3 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 0, i32 1 - %4 = call %Token* @front.494(%"Vector[Token]"* %3) - call void @ctor.202(%Token* %1, %Token* %4) + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %2 = call %Token* @front.482(%"Vector[Token]"* %1) + call void @ctor.188(%Token* %_result, %Token* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.545(%Node* %this, %Node* %other) #3 { - %this.addr = alloca %Node* - store %Node* %this, %Node** %this.addr +define internal void @ctor.535(%Node* %this, %Node* %other) #3 { %other.addr = alloca %Node* store %Node* %other, %Node** %other.addr br label %code code: ; preds = %0 - %1 = load %Node*, %Node** %this.addr - %2 = getelementptr inbounds %Node, %Node* %1, i32 0, i32 0 - %3 = load %Node*, %Node** %other.addr - %4 = getelementptr inbounds %Node, %Node* %3, i32 0, i32 0 - call void @ctor.187(%UntypedPtr* %2, %UntypedPtr* %4) + %1 = getelementptr inbounds %Node, %Node* %this, i32 0, i32 0 + %2 = load %Node*, %Node** %other.addr + %3 = getelementptr inbounds %Node, %Node* %2, i32 0, i32 0 + %4 = load %UntypedPtr, %UntypedPtr* %3 + call void @ctor.55(%UntypedPtr* %1, %UntypedPtr %4) ret void } ; Function Attrs: inlinehint nounwind define internal %Node @parseModuleName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %tmp.this = alloca %TokenType %tmp.this1 = alloca %TokenType %qid = alloca %Node @@ -21697,11 +19366,9 @@ code: ; preds = %0 br label %while_block while_block: ; preds = %while_step, %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 31) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %while_body, label %while_end + call void @ctor.404(%TokenType* %tmp.this, i32 32) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %while_body, label %while_end while_body: ; preds = %while_block br label %while_step @@ -21713,39 +19380,30 @@ while_end: ; preds = %while_block br label %if_block if_block: ; preds = %while_end - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 2) - %5 = load %TokenType, %TokenType* %tmp.this1 - %6 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, %TokenType %5) - br i1 %6, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this1, i32 2) + %2 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = call %Node @parseQualifiedName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i1 false) - store %Node %8, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %qid, %Node* %"$tmpForRef") - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this2, i32 31) - %10 = load %TokenType, %TokenType* %tmp.this2 - %11 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, %TokenType %10) - %12 = load %Node, %Node* %qid - ret %Node %12 + %3 = call %Node @parseQualifiedName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 false) + store %Node %3, %Node* %"$tmpForRef" + call void @ctor.535(%Node* %qid, %Node* %"$tmpForRef") + call void @ctor.404(%TokenType* %tmp.this2, i32 32) + %4 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this2) + %5 = load %Node, %Node* %qid + ret %Node %5 if_end: ; preds = %dumy_block, %if_block - call void @ctor.556(%Node* %tmp.this3) - %13 = load %Node, %Node* %tmp.this3 - ret %Node %13 + call void @ctor.546(%Node* %tmp.this3) + %6 = load %Node, %Node* %tmp.this3 + ret %Node %6 dumy_block: ; No predecessors! br label %if_end } ; Function Attrs: inlinehint nounwind -define internal i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType %t) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %t.addr = alloca %TokenType - store %TokenType %t, %TokenType* %t.addr +define internal i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %t) #4 { %"$tmpC" = alloca %Token %"$tmpC1" = alloca %Token br label %code @@ -21754,26 +19412,23 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2) - %3 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 - %4 = call i1 @"==.352"(%TokenType* %3, %TokenType* %t.addr) - br i1 %4, label %if_then, label %if_end + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1) + %2 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 + %3 = call i1 @"==.339"(%TokenType* %2, %TokenType* %t) + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 0 - call void @"post_++.546"(%Token* %"$tmpC1", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %8) - call void @"=.297"(%Token* %6, %Token* %"$tmpC1") - call void @dtor.260(%Token* %"$tmpC1") - call void @dtor.260(%Token* %"$tmpC") + %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"post_++.536"(%Token* %"$tmpC1", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %5) + call void @"=.285"(%Token* %4, %Token* %"$tmpC1") + call void @dtor.249(%Token* %"$tmpC1") + call void @dtor.249(%Token* %"$tmpC") ret i1 true if_end: ; preds = %dumy_block, %if_block - call void @dtor.260(%Token* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC") ret i1 false dumy_block: ; No predecessors! @@ -21781,128 +19436,104 @@ dumy_block: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal void @"post_++.546"(%Token* sret %_result, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %r) #4 { - %_result.addr = alloca %Token* - store %Token* %_result, %Token** %_result.addr - %r.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* - store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %r, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %r.addr +define internal void @"post_++.536"(%Token* sret %_result, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %r) #4 { %res = alloca %Token br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %r.addr - call void @front.544(%Token* %res, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %r.addr - call void @popFront.547(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2) - %3 = load %Token*, %Token** %_result.addr - call void @ctor.202(%Token* %3, %Token* %res) - call void @dtor.260(%Token* %res) + call void @front.534(%Token* %res, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %r) + call void @popFront.537(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %r) + call void @ctor.188(%Token* %_result, %Token* %res) + call void @dtor.249(%Token* %res) ret void dumy_block: ; No predecessors! - call void @dtor.260(%Token* %res) + call void @dtor.249(%Token* %res) ret void } ; Function Attrs: inlinehint nounwind -define internal void @popFront.547(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* - store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal void @popFront.537(%"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { %tmp.this = alloca i64 %"$tmpC" = alloca %Token br label %code code: ; preds = %0 - %1 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 1 + %1 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 store i64 0, i64* %tmp.this - %3 = load i64, i64* %tmp.this - call void @remove.498(%"Vector[Token]"* %2, i64 %3) + %2 = load i64, i64* %tmp.this + call void @remove.486(%"Vector[Token]"* %1, i64 %2) br label %if_block if_block: ; preds = %code - %4 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %4, i32 0, i32 1 - %6 = call i1 @isEmpty.492(%"Vector[Token]"* %5) - br i1 %6, label %cond.true, label %cond.false + %3 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %4 = call i1 @isEmpty.480(%"Vector[Token]"* %3) + br i1 %4, label %cond.true, label %cond.false if_then: ; preds = %cond.end - %7 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 1 - %9 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %10 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %9, i32 0, i32 0 - call void @"post_++.523"(%Token* %"$tmpC", %"SparrowLayoutDecoder[SparrowScanner]"* %10) - call void @"+=.409"(%"Vector[Token]"* %8, %Token* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC") + %5 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %6 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"post_++.511"(%Token* %"$tmpC", %"SparrowLayoutDecoder[SparrowScanner]"* %6) + call void @"+=.396"(%"Vector[Token]"* %5, %Token* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC") br label %if_end if_end: ; preds = %if_then, %cond.end ret void cond.true: ; preds = %if_block - %11 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %12 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %11, i32 0, i32 0 - %13 = call i1 @"pre_!!.521"(%"SparrowLayoutDecoder[SparrowScanner]"* %12) + %7 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + %8 = call i1 @"pre_!!.509"(%"SparrowLayoutDecoder[SparrowScanner]"* %7) br label %cond.end cond.false: ; preds = %if_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %13, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %8, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then, label %if_end } ; Function Attrs: inlinehint nounwind define internal %Node @parseQualifiedName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %allowStar) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %allowStar.addr = alloca i1 store i1 %allowStar, i1* %allowStar.addr %loc = alloca %Location + %"$tmpForRef" = alloca %Location %tmp.this = alloca %TokenType %base = alloca %Node - %"$tmpForRef" = alloca %Node + %"$tmpForRef1" = alloca %Node %lastId = alloca %String - %tmp.this1 = alloca %TokenType %tmp.this2 = alloca %TokenType - %"$tmpForRef3" = alloca %Node - %"$tmpC" = alloca %Location - %"$tmpC4" = alloca %Location + %tmp.this3 = alloca %TokenType + %"$tmpForRef4" = alloca %Node %tmp.this8 = alloca %TokenType %"$tmpForRef9" = alloca %Node - %"$tmpC10" = alloca %Location - %"$tmpC11" = alloca %Location br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 36) - %3 = load %TokenType, %TokenType* %tmp.this - %4 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, %TokenType %3) - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 3 - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 1 - %9 = getelementptr inbounds %Token, %Token* %8, i32 0, i32 2 - %10 = call %StringRef @asStringRef(%String* %9) - %11 = call %Node @mkIdentifier(%AstBuilder* %6, %Location* %loc, %StringRef %10) - store %Node %11, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %base, %Node* %"$tmpForRef") - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, i32 0, i32 1 - %14 = getelementptr inbounds %Token, %Token* %13, i32 0, i32 2 - call void @ctor.189(%String* %lastId, %String* %14) + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") + call void @ctor.404(%TokenType* %tmp.this, i32 37) + %2 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %4 = load %Location, %Location* %loc + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 2 + %7 = call %StringRef @asStringRef(%String* %6) + %8 = call %Node @mkIdentifier(%AstBuilder* %3, %Location %4, %StringRef %7) + store %Node %8, %Node* %"$tmpForRef1" + call void @ctor.535(%Node* %base, %Node* %"$tmpForRef1") + %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %10 = getelementptr inbounds %Token, %Token* %9, i32 0, i32 2 + call void @ctor.175(%String* %lastId, %String* %10) br label %while_block while_block: ; preds = %while_step, %code - %15 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 33) - %16 = load %TokenType, %TokenType* %tmp.this1 - %17 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %15, %TokenType %16) - br i1 %17, label %while_body, label %while_end + call void @ctor.404(%TokenType* %tmp.this2, i32 34) + %11 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this2) + br i1 %11, label %while_body, label %while_end while_body: ; preds = %while_block br label %if_block @@ -21911,45 +19542,41 @@ while_step: ; preds = %cond_destruct_end7 br label %while_block while_end: ; preds = %cond_destruct_end, %while_block - %18 = load %Node, %Node* %base - call void @dtor.261(%String* %lastId) - ret %Node %18 + %12 = load %Node, %Node* %base + call void @dtor.250(%String* %lastId) + ret %Node %12 if_block: ; preds = %while_body - %19 = load i1, i1* %allowStar.addr - br i1 %19, label %cond.true, label %cond.false + %13 = load i1, i1* %allowStar.addr + br i1 %13, label %cond.true, label %cond.false if_then: ; preds = %cond.end - %20 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %21 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %20, i32 0, i32 3 - %22 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC4", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %22) - call void @span(%Location* %"$tmpC", %Location* %loc, %Location* %"$tmpC4") - %23 = load %Node, %Node* %base - %24 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %25 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %24, i32 0, i32 1 - %26 = getelementptr inbounds %Token, %Token* %25, i32 0, i32 2 - %27 = call %StringRef @asStringRef(%String* %26) - %28 = call %Node @mkStarExpr(%AstBuilder* %21, %Location* %"$tmpC", %Node %23, %StringRef %27) - store %Node %28, %Node* %"$tmpForRef3" - call void @"=.554"(%Node* %base, %Node* %"$tmpForRef3") - br i1 %19, label %cond_destruct_alt1, label %cond_destruct_alt2 + %14 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %15 = load %Location, %Location* %loc + %16 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %17 = call %Location @span(%Location %15, %Location %16) + %18 = load %Node, %Node* %base + %19 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %20 = getelementptr inbounds %Token, %Token* %19, i32 0, i32 2 + %21 = call %StringRef @asStringRef(%String* %20) + %22 = call %Node @mkStarExpr(%AstBuilder* %14, %Location %17, %Node %18, %StringRef %21) + store %Node %22, %Node* %"$tmpForRef4" + call void @"=.544"(%Node* %base, %Node* %"$tmpForRef4") + br i1 %13, label %cond_destruct_alt1, label %cond_destruct_alt2 if_end: ; preds = %dumy_block, %cond.end - br i1 %19, label %cond_destruct_alt15, label %cond_destruct_alt26 + br i1 %13, label %cond_destruct_alt15, label %cond_destruct_alt26 cond.true: ; preds = %if_block - %29 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this2, i32 37) - %30 = load %TokenType, %TokenType* %tmp.this2 - %31 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %29, %TokenType %30) + call void @ctor.404(%TokenType* %tmp.this3, i32 38) + %23 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this3) br label %cond.end cond.false: ; preds = %if_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %31, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %23, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then, label %if_end cond_destruct_alt1: ; preds = %if_then @@ -21971,50 +19598,42 @@ cond_destruct_alt26: ; preds = %if_end br label %cond_destruct_end7 cond_destruct_end7: ; preds = %cond_destruct_alt26, %cond_destruct_alt15 - %32 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this8, i32 36) - %33 = load %TokenType, %TokenType* %tmp.this8 - %34 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %32, %TokenType %33) - %35 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %36 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %35, i32 0, i32 3 - %37 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC11", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %37) - call void @span(%Location* %"$tmpC10", %Location* %loc, %Location* %"$tmpC11") - %38 = load %Node, %Node* %base - %39 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %40 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %39, i32 0, i32 1 - %41 = getelementptr inbounds %Token, %Token* %40, i32 0, i32 2 - %42 = call %StringRef @asStringRef(%String* %41) - %43 = call %Node @mkCompoundExpr(%AstBuilder* %36, %Location* %"$tmpC10", %Node %38, %StringRef %42) - store %Node %43, %Node* %"$tmpForRef9" - call void @"=.554"(%Node* %base, %Node* %"$tmpForRef9") + call void @ctor.404(%TokenType* %tmp.this8, i32 37) + %24 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this8) + %25 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %26 = load %Location, %Location* %loc + %27 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %28 = call %Location @span(%Location %26, %Location %27) + %29 = load %Node, %Node* %base + %30 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %31 = getelementptr inbounds %Token, %Token* %30, i32 0, i32 2 + %32 = call %StringRef @asStringRef(%String* %31) + %33 = call %Node @mkCompoundExpr(%AstBuilder* %25, %Location %28, %Node %29, %StringRef %32) + store %Node %33, %Node* %"$tmpForRef9" + call void @"=.544"(%Node* %base, %Node* %"$tmpForRef9") br label %while_step -dumy_block12: ; No predecessors! - call void @dtor.261(%String* %lastId) +dumy_block10: ; No predecessors! + call void @dtor.250(%String* %lastId) unreachable } ; Function Attrs: inlinehint nounwind -define internal i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType %t) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %t.addr = alloca %TokenType - store %TokenType %t, %TokenType* %t.addr +define internal i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %t) #4 { %"$tmpC" = alloca %String + %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef %"$tmpC5" = alloca %Token - %tmp.StringRef6 = alloca %StringRef + %"$tmpForRef6" = alloca %StringRef + %tmp.StringRef7 = alloca %StringRef br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = load %TokenType, %TokenType* %t.addr - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %t) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 true @@ -22026,48 +19645,45 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i32 0, i32 2 - %6 = load i1, i1* %5 - br i1 %6, label %if_then2, label %if_end3 + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 2 + %3 = load i1, i1* %2 + br i1 %3, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 ret i1 false if_end3: ; preds = %dumy_block4, %if_block1 - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %9 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.91, i32 0, i32 0), i8** %8 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.91, i32 0, i32 25), i8** %9 - %10 = load %StringRef, %StringRef* %tmp.StringRef - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC5", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %12) - %13 = getelementptr inbounds %Token, %Token* %"$tmpC5", i32 0, i32 1 - %14 = load %TokenType, %TokenType* %13 - %15 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef6, i32 0, i32 0 - %16 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef6, i32 0, i32 1 - store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.92, i32 0, i32 0), i8** %15 - store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.92, i32 0, i32 12), i8** %16 - %17 = load %StringRef, %StringRef* %tmp.StringRef6 - %18 = load %TokenType, %TokenType* %t.addr - call void @toString.549(%String* %"$tmpC", %StringRef %10, %TokenType %14, %StringRef %17, %TokenType %18) - call void @reportError.548(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC5") - ret i1 false + %4 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %5 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %6 = bitcast %UntypedPtr* %4 to i8** + %7 = bitcast %UntypedPtr* %5 to i8** + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.93, i32 0, i32 0), i8** %6 + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.93, i32 0, i32 25), i8** %7 + %8 = load %StringRef, %StringRef* %tmp.StringRef + store %StringRef %8, %StringRef* %"$tmpForRef" + %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC5", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %9) + %10 = getelementptr inbounds %Token, %Token* %"$tmpC5", i32 0, i32 1 + %11 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef7, i32 0, i32 0 + %12 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef7, i32 0, i32 1 + %13 = bitcast %UntypedPtr* %11 to i8** + %14 = bitcast %UntypedPtr* %12 to i8** + store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.94, i32 0, i32 0), i8** %13 + store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.94, i32 0, i32 12), i8** %14 + %15 = load %StringRef, %StringRef* %tmp.StringRef7 + store %StringRef %15, %StringRef* %"$tmpForRef6" + call void @toString.539(%String* %"$tmpC", %StringRef* %"$tmpForRef", %TokenType* %10, %StringRef* %"$tmpForRef6", %TokenType* %t) + call void @reportError.538(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC5") + ret i1 false dumy_block4: ; No predecessors! br label %if_end3 } ; Function Attrs: inlinehint nounwind -define internal void @reportError.548(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %String* %msg) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %msg.addr = alloca %String* - store %String* %msg, %String** %msg.addr +define internal void @reportError.538(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %String* %msg) #4 { %"$tmpC" = alloca %Token %"$tmpC1" = alloca %Token %tmp.this = alloca %TokenType @@ -22075,322 +19691,240 @@ define internal void @reportError.548(%"SparrowParser[SparrowLayoutDecoder[Sparr br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 4 - %3 = load %ErrorReporter, %ErrorReporter* %2 - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %5) - %6 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 0 - %7 = load %String*, %String** %msg.addr - call void @reportError.450(%ErrorReporter %3, %Location* %6, %String* %7) - call void @dtor.260(%Token* %"$tmpC") + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 4 + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2) + %3 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 0 + %4 = load %Location, %Location* %3 + call void @reportError.437(%ErrorReporter* %1, %Location %4, %String* %msg) + call void @dtor.249(%Token* %"$tmpC") br label %while_block while_block: ; preds = %while_step, %code - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC1", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %9) - %10 = getelementptr inbounds %Token, %Token* %"$tmpC1", i32 0, i32 1 - call void @ctor.417(%TokenType* %tmp.this, i32 0) - %11 = call i1 @"==.352"(%TokenType* %10, %TokenType* %tmp.this) - %12 = xor i1 true, %11 - br i1 %12, label %while_body, label %while_end + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC1", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %5) + %6 = getelementptr inbounds %Token, %Token* %"$tmpC1", i32 0, i32 1 + call void @ctor.404(%TokenType* %tmp.this, i32 0) + %7 = call i1 @"==.339"(%TokenType* %6, %TokenType* %tmp.this) + %8 = xor i1 true, %7 + br i1 %8, label %while_body, label %while_end while_body: ; preds = %while_block - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, i32 0, i32 1 - %15 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %16 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %15, i32 0, i32 0 - call void @"post_++.546"(%Token* %"$tmpC2", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %16) - call void @"=.297"(%Token* %14, %Token* %"$tmpC2") - call void @dtor.260(%Token* %"$tmpC2") + %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"post_++.536"(%Token* %"$tmpC2", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %10) + call void @"=.285"(%Token* %9, %Token* %"$tmpC2") + call void @dtor.249(%Token* %"$tmpC2") br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - call void @dtor.260(%Token* %"$tmpC1") - %17 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %18 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %17, i32 0, i32 2 - store i1 true, i1* %18 + call void @dtor.249(%Token* %"$tmpC1") + %11 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 2 + store i1 true, i1* %11 ret void } ; Function Attrs: inlinehint nounwind -define internal void @toString.549(%String* sret %_result, %StringRef %a1, %TokenType %a2, %StringRef %a3, %TokenType %a4) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %a1.addr = alloca %StringRef - store %StringRef %a1, %StringRef* %a1.addr - %a2.addr = alloca %TokenType - store %TokenType %a2, %TokenType* %a2.addr - %a3.addr = alloca %StringRef - store %StringRef %a3, %StringRef* %a3.addr - %a4.addr = alloca %TokenType - store %TokenType %a4, %TokenType* %a4.addr +define internal void @toString.539(%String* sret %_result, %StringRef* %a1, %TokenType* %a2, %StringRef* %a3, %TokenType* %a4) #4 { %s = alloca %StringOutputStream + %"$tmpC" = alloca %StringOutputStream + %"$tmpC1" = alloca %StringOutputStream + %"$tmpC2" = alloca %StringOutputStream + %"$tmpC3" = alloca %StringOutputStream br label %code code: ; preds = %0 - call void @ctor.452(%StringOutputStream* %s) - %1 = call %StringOutputStream* @"<<"(%StringOutputStream* %s, %StringRef* %a1.addr) - %2 = call %StringOutputStream* @"<<.550"(%StringOutputStream* %1, %TokenType* %a2.addr) - %3 = call %StringOutputStream* @"<<"(%StringOutputStream* %2, %StringRef* %a3.addr) - %4 = call %StringOutputStream* @"<<.550"(%StringOutputStream* %3, %TokenType* %a4.addr) - %5 = load %String*, %String** %_result.addr - %6 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %s, i32 0, i32 0 - call void @ctor.189(%String* %5, %String* %6) - call void @dtor.454(%StringOutputStream* %s) + call void @ctor.439(%StringOutputStream* %s) + call void @"<<"(%StringOutputStream* %"$tmpC3", %StringOutputStream* %s, %StringRef* %a1) + call void @"<<.540"(%StringOutputStream* %"$tmpC2", %StringOutputStream* %"$tmpC3", %TokenType* %a2) + call void @"<<"(%StringOutputStream* %"$tmpC1", %StringOutputStream* %"$tmpC2", %StringRef* %a3) + call void @"<<.540"(%StringOutputStream* %"$tmpC", %StringOutputStream* %"$tmpC1", %TokenType* %a4) + call void @dtor.442(%StringOutputStream* %"$tmpC") + call void @dtor.442(%StringOutputStream* %"$tmpC1") + call void @dtor.442(%StringOutputStream* %"$tmpC2") + call void @dtor.442(%StringOutputStream* %"$tmpC3") + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %s, i32 0, i32 0 + call void @ctor.175(%String* %_result, %String* %1) + call void @dtor.442(%StringOutputStream* %s) ret void dumy_block: ; No predecessors! - call void @dtor.454(%StringOutputStream* %s) + call void @dtor.442(%StringOutputStream* %s) ret void } ; Function Attrs: inlinehint nounwind -define internal %StringOutputStream* @"<<.550"(%StringOutputStream* %s, %TokenType* %x) #4 { - %s.addr = alloca %StringOutputStream* - store %StringOutputStream* %s, %StringOutputStream** %s.addr - %x.addr = alloca %TokenType* - store %TokenType* %x, %TokenType** %x.addr +define internal void @"<<.540"(%StringOutputStream* sret %_result, %StringOutputStream* %s, %TokenType* %x) #4 { br label %code code: ; preds = %0 - %1 = load %TokenType*, %TokenType** %x.addr - %2 = load %TokenType, %TokenType* %1 - %3 = load %StringOutputStream*, %StringOutputStream** %s.addr - call void @">>"(%TokenType %2, %StringOutputStream* %3) - %4 = load %StringOutputStream*, %StringOutputStream** %s.addr - ret %StringOutputStream* %4 + call void @">>"(%TokenType* %x, %StringOutputStream* %s) + call void @ctor.441(%StringOutputStream* %_result, %StringOutputStream* %s) + ret void } ; Function Attrs: inlinehint nounwind -define internal void @">>"(%TokenType %t, %StringOutputStream* %os) #4 { - %t.addr = alloca %TokenType - store %TokenType %t, %TokenType* %t.addr - %os.addr = alloca %StringOutputStream* - store %StringOutputStream* %os, %StringOutputStream** %os.addr - %"$tmpC" = alloca %String +define internal void @">>"(%TokenType* %t, %StringOutputStream* %os) #4 { + %"$tmpC" = alloca %StringOutputStream + %"$tmpC1" = alloca %String br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %os.addr - %2 = load %TokenType, %TokenType* %t.addr - call void @_asString(%String* %"$tmpC", %TokenType %2) - %3 = call %StringOutputStream* @"<<.551"(%StringOutputStream* %1, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") + call void @_asString(%String* %"$tmpC1", %TokenType* %t) + call void @"<<.541"(%StringOutputStream* %"$tmpC", %StringOutputStream* %os, %String* %"$tmpC1") + call void @dtor.442(%StringOutputStream* %"$tmpC") + call void @dtor.250(%String* %"$tmpC1") ret void } ; Function Attrs: inlinehint nounwind -define internal %StringOutputStream* @"<<.551"(%StringOutputStream* %s, %String* %x) #4 { - %s.addr = alloca %StringOutputStream* - store %StringOutputStream* %s, %StringOutputStream** %s.addr - %x.addr = alloca %String* - store %String* %x, %String** %x.addr +define internal void @"<<.541"(%StringOutputStream* sret %_result, %StringOutputStream* %s, %String* %x) #4 { br label %code code: ; preds = %0 - %1 = load %String*, %String** %x.addr - %2 = load %StringOutputStream*, %StringOutputStream** %s.addr - call void @">>.552"(%String* %1, %StringOutputStream* %2) - %3 = load %StringOutputStream*, %StringOutputStream** %s.addr - ret %StringOutputStream* %3 + call void @">>.542"(%String* %x, %StringOutputStream* %s) + call void @ctor.441(%StringOutputStream* %_result, %StringOutputStream* %s) + ret void } ; Function Attrs: inlinehint nounwind -define internal void @">>.552"(%String* %this, %StringOutputStream* %os) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %os.addr = alloca %StringOutputStream* - store %StringOutputStream* %os, %StringOutputStream** %os.addr +define internal void @">>.542"(%String* %this, %StringOutputStream* %os) #4 { + %"$tmpC" = alloca %StringOutputStream %"$tmpForRef" = alloca %StringRef br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %os.addr - %2 = load %String*, %String** %this.addr - %3 = call %StringRef @asStringRef(%String* %2) - store %StringRef %3, %StringRef* %"$tmpForRef" - %4 = call %StringOutputStream* @"<<"(%StringOutputStream* %1, %StringRef* %"$tmpForRef") + %1 = call %StringRef @asStringRef(%String* %this) + store %StringRef %1, %StringRef* %"$tmpForRef" + call void @"<<"(%StringOutputStream* %"$tmpC", %StringOutputStream* %os, %StringRef* %"$tmpForRef") + call void @dtor.442(%StringOutputStream* %"$tmpC") ret void } ; Function Attrs: noinline nounwind -define void @_asString(%String* sret %_result, %TokenType %t) #5 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %t.addr = alloca %TokenType - store %TokenType %t, %TokenType* %t.addr +define void @_asString(%String* sret %_result, %TokenType* %t) #5 { %tmp.this = alloca %TokenType - %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef %tmp.this5 = alloca %TokenType - %"$tmpForRef6" = alloca %StringRef - %tmp.StringRef7 = alloca %StringRef - %tmp.this13 = alloca %TokenType - %"$tmpForRef14" = alloca %StringRef - %tmp.StringRef15 = alloca %StringRef - %tmp.this21 = alloca %TokenType - %"$tmpForRef22" = alloca %StringRef - %tmp.StringRef23 = alloca %StringRef - %tmp.this29 = alloca %TokenType - %"$tmpForRef30" = alloca %StringRef - %tmp.StringRef31 = alloca %StringRef - %tmp.this37 = alloca %TokenType - %"$tmpForRef38" = alloca %StringRef - %tmp.StringRef39 = alloca %StringRef - %tmp.this45 = alloca %TokenType - %"$tmpForRef46" = alloca %StringRef - %tmp.StringRef47 = alloca %StringRef - %tmp.this53 = alloca %TokenType - %"$tmpForRef54" = alloca %StringRef + %tmp.StringRef6 = alloca %StringRef + %tmp.this12 = alloca %TokenType + %tmp.StringRef13 = alloca %StringRef + %tmp.this19 = alloca %TokenType + %tmp.StringRef20 = alloca %StringRef + %tmp.this26 = alloca %TokenType + %tmp.StringRef27 = alloca %StringRef + %tmp.this33 = alloca %TokenType + %tmp.StringRef34 = alloca %StringRef + %tmp.this40 = alloca %TokenType + %tmp.StringRef41 = alloca %StringRef + %tmp.this47 = alloca %TokenType + %tmp.StringRef48 = alloca %StringRef + %tmp.this54 = alloca %TokenType %tmp.StringRef55 = alloca %StringRef %tmp.this61 = alloca %TokenType - %"$tmpForRef62" = alloca %StringRef - %tmp.StringRef63 = alloca %StringRef - %tmp.this69 = alloca %TokenType - %"$tmpForRef70" = alloca %StringRef - %tmp.StringRef71 = alloca %StringRef - %tmp.this77 = alloca %TokenType - %"$tmpForRef78" = alloca %StringRef - %tmp.StringRef79 = alloca %StringRef - %tmp.this85 = alloca %TokenType - %"$tmpForRef86" = alloca %StringRef - %tmp.StringRef87 = alloca %StringRef - %tmp.this93 = alloca %TokenType - %"$tmpForRef94" = alloca %StringRef - %tmp.StringRef95 = alloca %StringRef - %tmp.this101 = alloca %TokenType - %"$tmpForRef102" = alloca %StringRef - %tmp.StringRef103 = alloca %StringRef - %tmp.this109 = alloca %TokenType - %"$tmpForRef110" = alloca %StringRef + %tmp.StringRef62 = alloca %StringRef + %tmp.this68 = alloca %TokenType + %tmp.StringRef69 = alloca %StringRef + %tmp.this75 = alloca %TokenType + %tmp.StringRef76 = alloca %StringRef + %tmp.this82 = alloca %TokenType + %tmp.StringRef83 = alloca %StringRef + %tmp.this89 = alloca %TokenType + %tmp.StringRef90 = alloca %StringRef + %tmp.this96 = alloca %TokenType + %tmp.StringRef97 = alloca %StringRef + %tmp.this103 = alloca %TokenType + %tmp.StringRef104 = alloca %StringRef + %tmp.this110 = alloca %TokenType %tmp.StringRef111 = alloca %StringRef %tmp.this117 = alloca %TokenType - %"$tmpForRef118" = alloca %StringRef - %tmp.StringRef119 = alloca %StringRef - %tmp.this125 = alloca %TokenType - %"$tmpForRef126" = alloca %StringRef - %tmp.StringRef127 = alloca %StringRef - %tmp.this133 = alloca %TokenType - %"$tmpForRef134" = alloca %StringRef - %tmp.StringRef135 = alloca %StringRef - %tmp.this141 = alloca %TokenType - %"$tmpForRef142" = alloca %StringRef - %tmp.StringRef143 = alloca %StringRef - %tmp.this149 = alloca %TokenType - %"$tmpForRef150" = alloca %StringRef - %tmp.StringRef151 = alloca %StringRef - %tmp.this157 = alloca %TokenType - %"$tmpForRef158" = alloca %StringRef - %tmp.StringRef159 = alloca %StringRef - %tmp.this165 = alloca %TokenType - %"$tmpForRef166" = alloca %StringRef + %tmp.StringRef118 = alloca %StringRef + %tmp.this124 = alloca %TokenType + %tmp.StringRef125 = alloca %StringRef + %tmp.this131 = alloca %TokenType + %tmp.StringRef132 = alloca %StringRef + %tmp.this138 = alloca %TokenType + %tmp.StringRef139 = alloca %StringRef + %tmp.this145 = alloca %TokenType + %tmp.StringRef146 = alloca %StringRef + %tmp.this152 = alloca %TokenType + %tmp.StringRef153 = alloca %StringRef + %tmp.this159 = alloca %TokenType + %tmp.StringRef160 = alloca %StringRef + %tmp.this166 = alloca %TokenType %tmp.StringRef167 = alloca %StringRef %tmp.this173 = alloca %TokenType - %"$tmpForRef174" = alloca %StringRef - %tmp.StringRef175 = alloca %StringRef - %tmp.this181 = alloca %TokenType - %"$tmpForRef182" = alloca %StringRef - %tmp.StringRef183 = alloca %StringRef - %tmp.this189 = alloca %TokenType - %"$tmpForRef190" = alloca %StringRef - %tmp.StringRef191 = alloca %StringRef - %tmp.this197 = alloca %TokenType - %"$tmpForRef198" = alloca %StringRef - %tmp.StringRef199 = alloca %StringRef - %tmp.this205 = alloca %TokenType - %"$tmpForRef206" = alloca %StringRef - %tmp.StringRef207 = alloca %StringRef - %tmp.this213 = alloca %TokenType - %"$tmpForRef214" = alloca %StringRef - %tmp.StringRef215 = alloca %StringRef - %tmp.this221 = alloca %TokenType - %"$tmpForRef222" = alloca %StringRef + %tmp.StringRef174 = alloca %StringRef + %tmp.this180 = alloca %TokenType + %tmp.StringRef181 = alloca %StringRef + %tmp.this187 = alloca %TokenType + %tmp.StringRef188 = alloca %StringRef + %tmp.this194 = alloca %TokenType + %tmp.StringRef195 = alloca %StringRef + %tmp.this201 = alloca %TokenType + %tmp.StringRef202 = alloca %StringRef + %tmp.this208 = alloca %TokenType + %tmp.StringRef209 = alloca %StringRef + %tmp.this215 = alloca %TokenType + %tmp.StringRef216 = alloca %StringRef + %tmp.this222 = alloca %TokenType %tmp.StringRef223 = alloca %StringRef %tmp.this229 = alloca %TokenType - %"$tmpForRef230" = alloca %StringRef - %tmp.StringRef231 = alloca %StringRef - %tmp.this237 = alloca %TokenType - %"$tmpForRef238" = alloca %StringRef - %tmp.StringRef239 = alloca %StringRef - %tmp.this245 = alloca %TokenType - %"$tmpForRef246" = alloca %StringRef - %tmp.StringRef247 = alloca %StringRef - %tmp.this253 = alloca %TokenType - %"$tmpForRef254" = alloca %StringRef - %tmp.StringRef255 = alloca %StringRef - %tmp.this261 = alloca %TokenType - %"$tmpForRef262" = alloca %StringRef - %tmp.StringRef263 = alloca %StringRef - %tmp.this269 = alloca %TokenType - %"$tmpForRef270" = alloca %StringRef - %tmp.StringRef271 = alloca %StringRef - %tmp.this277 = alloca %TokenType - %"$tmpForRef278" = alloca %StringRef + %tmp.StringRef230 = alloca %StringRef + %tmp.this236 = alloca %TokenType + %tmp.StringRef237 = alloca %StringRef + %tmp.this243 = alloca %TokenType + %tmp.StringRef244 = alloca %StringRef + %tmp.this250 = alloca %TokenType + %tmp.StringRef251 = alloca %StringRef + %tmp.this257 = alloca %TokenType + %tmp.StringRef258 = alloca %StringRef + %tmp.this264 = alloca %TokenType + %tmp.StringRef265 = alloca %StringRef + %tmp.this271 = alloca %TokenType + %tmp.StringRef272 = alloca %StringRef + %tmp.this278 = alloca %TokenType %tmp.StringRef279 = alloca %StringRef %tmp.this285 = alloca %TokenType - %"$tmpForRef286" = alloca %StringRef - %tmp.StringRef287 = alloca %StringRef - %tmp.this293 = alloca %TokenType - %"$tmpForRef294" = alloca %StringRef - %tmp.StringRef295 = alloca %StringRef - %tmp.this301 = alloca %TokenType - %"$tmpForRef302" = alloca %StringRef - %tmp.StringRef303 = alloca %StringRef - %tmp.this309 = alloca %TokenType - %"$tmpForRef310" = alloca %StringRef - %tmp.StringRef311 = alloca %StringRef - %tmp.this317 = alloca %TokenType - %"$tmpForRef318" = alloca %StringRef - %tmp.StringRef319 = alloca %StringRef - %tmp.this325 = alloca %TokenType - %"$tmpForRef326" = alloca %StringRef - %tmp.StringRef327 = alloca %StringRef - %tmp.this333 = alloca %TokenType - %"$tmpForRef334" = alloca %StringRef + %tmp.StringRef286 = alloca %StringRef + %tmp.this292 = alloca %TokenType + %tmp.StringRef293 = alloca %StringRef + %tmp.this299 = alloca %TokenType + %tmp.StringRef300 = alloca %StringRef + %tmp.this306 = alloca %TokenType + %tmp.StringRef307 = alloca %StringRef + %tmp.this313 = alloca %TokenType + %tmp.StringRef314 = alloca %StringRef + %tmp.this320 = alloca %TokenType + %tmp.StringRef321 = alloca %StringRef + %tmp.this327 = alloca %TokenType + %tmp.StringRef328 = alloca %StringRef + %tmp.this334 = alloca %TokenType %tmp.StringRef335 = alloca %StringRef - %tmp.this341 = alloca %TokenType - %"$tmpForRef342" = alloca %StringRef - %tmp.StringRef343 = alloca %StringRef - %tmp.this349 = alloca %TokenType - %"$tmpForRef350" = alloca %StringRef - %tmp.StringRef351 = alloca %StringRef - %tmp.this357 = alloca %TokenType - %"$tmpForRef358" = alloca %StringRef - %tmp.StringRef359 = alloca %StringRef - %tmp.this365 = alloca %TokenType - %"$tmpForRef366" = alloca %StringRef - %tmp.StringRef367 = alloca %StringRef - %tmp.this373 = alloca %TokenType - %"$tmpForRef374" = alloca %StringRef - %tmp.StringRef375 = alloca %StringRef - %tmp.this380 = alloca %TokenType - %"$tmpForRef381" = alloca %StringRef - %tmp.StringRef382 = alloca %StringRef + %tmp.this340 = alloca %TokenType + %tmp.StringRef341 = alloca %StringRef br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - call void @ctor.417(%TokenType* %tmp.this, i32 0) - %1 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this) + call void @ctor.404(%TokenType* %tmp.this, i32 0) + %1 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this) br i1 %1, label %if_then, label %if_else if_then: ; preds = %if_block - %2 = load %String*, %String** %_result.addr - %3 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %4 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.42, i32 0, i32 0), i8** %3 - store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.42, i32 0, i32 11), i8** %4 - %5 = load %StringRef, %StringRef* %tmp.StringRef - store %StringRef %5, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %2, %StringRef* %"$tmpForRef") + %2 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %3 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %4 = bitcast %UntypedPtr* %2 to i8** + %5 = bitcast %UntypedPtr* %3 to i8** + store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.43, i32 0, i32 0), i8** %4 + store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.43, i32 0, i32 11), i8** %5 + %6 = load %StringRef, %StringRef* %tmp.StringRef + call void @ctor.459(%String* %_result, %StringRef %6) ret void if_else: ; preds = %if_block @@ -22403,1271 +19937,1280 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_else - call void @ctor.417(%TokenType* %tmp.this5, i32 1) - %6 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this5) - br i1 %6, label %if_then2, label %if_else3 + call void @ctor.404(%TokenType* %tmp.this5, i32 1) + %7 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this5) + br i1 %7, label %if_then2, label %if_else3 if_then2: ; preds = %if_block1 - %7 = load %String*, %String** %_result.addr - %8 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef7, i32 0, i32 0 - %9 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef7, i32 0, i32 1 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.43, i32 0, i32 0), i8** %8 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.43, i32 0, i32 8), i8** %9 - %10 = load %StringRef, %StringRef* %tmp.StringRef7 - store %StringRef %10, %StringRef* %"$tmpForRef6" - call void @ctor.471(%String* %7, %StringRef* %"$tmpForRef6") + %8 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef6, i32 0, i32 0 + %9 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef6, i32 0, i32 1 + %10 = bitcast %UntypedPtr* %8 to i8** + %11 = bitcast %UntypedPtr* %9 to i8** + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.44, i32 0, i32 0), i8** %10 + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.44, i32 0, i32 8), i8** %11 + %12 = load %StringRef, %StringRef* %tmp.StringRef6 + call void @ctor.459(%String* %_result, %StringRef %12) ret void if_else3: ; preds = %if_block1 - br label %if_block9 + br label %if_block8 -if_end4: ; preds = %if_end12, %dumy_block8 +if_end4: ; preds = %if_end11, %dumy_block7 br label %if_end -dumy_block8: ; No predecessors! +dumy_block7: ; No predecessors! br label %if_end4 -if_block9: ; preds = %if_else3 - call void @ctor.417(%TokenType* %tmp.this13, i32 2) - %11 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this13) - br i1 %11, label %if_then10, label %if_else11 +if_block8: ; preds = %if_else3 + call void @ctor.404(%TokenType* %tmp.this12, i32 2) + %13 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this12) + br i1 %13, label %if_then9, label %if_else10 -if_then10: ; preds = %if_block9 - %12 = load %String*, %String** %_result.addr - %13 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef15, i32 0, i32 0 - %14 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef15, i32 0, i32 1 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.44, i32 0, i32 0), i8** %13 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.44, i32 0, i32 8), i8** %14 - %15 = load %StringRef, %StringRef* %tmp.StringRef15 - store %StringRef %15, %StringRef* %"$tmpForRef14" - call void @ctor.471(%String* %12, %StringRef* %"$tmpForRef14") +if_then9: ; preds = %if_block8 + %14 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef13, i32 0, i32 0 + %15 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef13, i32 0, i32 1 + %16 = bitcast %UntypedPtr* %14 to i8** + %17 = bitcast %UntypedPtr* %15 to i8** + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.45, i32 0, i32 0), i8** %16 + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.45, i32 0, i32 8), i8** %17 + %18 = load %StringRef, %StringRef* %tmp.StringRef13 + call void @ctor.459(%String* %_result, %StringRef %18) ret void -if_else11: ; preds = %if_block9 - br label %if_block17 +if_else10: ; preds = %if_block8 + br label %if_block15 -if_end12: ; preds = %if_end20, %dumy_block16 +if_end11: ; preds = %if_end18, %dumy_block14 br label %if_end4 -dumy_block16: ; No predecessors! - br label %if_end12 +dumy_block14: ; No predecessors! + br label %if_end11 -if_block17: ; preds = %if_else11 - call void @ctor.417(%TokenType* %tmp.this21, i32 3) - %16 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this21) - br i1 %16, label %if_then18, label %if_else19 +if_block15: ; preds = %if_else10 + call void @ctor.404(%TokenType* %tmp.this19, i32 3) + %19 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this19) + br i1 %19, label %if_then16, label %if_else17 -if_then18: ; preds = %if_block17 - %17 = load %String*, %String** %_result.addr - %18 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef23, i32 0, i32 0 - %19 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef23, i32 0, i32 1 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.45, i32 0, i32 0), i8** %18 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.45, i32 0, i32 8), i8** %19 - %20 = load %StringRef, %StringRef* %tmp.StringRef23 - store %StringRef %20, %StringRef* %"$tmpForRef22" - call void @ctor.471(%String* %17, %StringRef* %"$tmpForRef22") +if_then16: ; preds = %if_block15 + %20 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef20, i32 0, i32 0 + %21 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef20, i32 0, i32 1 + %22 = bitcast %UntypedPtr* %20 to i8** + %23 = bitcast %UntypedPtr* %21 to i8** + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.46, i32 0, i32 0), i8** %22 + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.46, i32 0, i32 8), i8** %23 + %24 = load %StringRef, %StringRef* %tmp.StringRef20 + call void @ctor.459(%String* %_result, %StringRef %24) ret void -if_else19: ; preds = %if_block17 - br label %if_block25 +if_else17: ; preds = %if_block15 + br label %if_block22 -if_end20: ; preds = %if_end28, %dumy_block24 - br label %if_end12 +if_end18: ; preds = %if_end25, %dumy_block21 + br label %if_end11 -dumy_block24: ; No predecessors! - br label %if_end20 +dumy_block21: ; No predecessors! + br label %if_end18 -if_block25: ; preds = %if_else19 - call void @ctor.417(%TokenType* %tmp.this29, i32 4) - %21 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this29) - br i1 %21, label %if_then26, label %if_else27 +if_block22: ; preds = %if_else17 + call void @ctor.404(%TokenType* %tmp.this26, i32 4) + %25 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this26) + br i1 %25, label %if_then23, label %if_else24 -if_then26: ; preds = %if_block25 - %22 = load %String*, %String** %_result.addr - %23 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef31, i32 0, i32 0 - %24 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef31, i32 0, i32 1 - store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.46, i32 0, i32 0), i8** %23 - store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.46, i32 0, i32 9), i8** %24 - %25 = load %StringRef, %StringRef* %tmp.StringRef31 - store %StringRef %25, %StringRef* %"$tmpForRef30" - call void @ctor.471(%String* %22, %StringRef* %"$tmpForRef30") +if_then23: ; preds = %if_block22 + %26 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef27, i32 0, i32 0 + %27 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef27, i32 0, i32 1 + %28 = bitcast %UntypedPtr* %26 to i8** + %29 = bitcast %UntypedPtr* %27 to i8** + store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.47, i32 0, i32 0), i8** %28 + store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.47, i32 0, i32 9), i8** %29 + %30 = load %StringRef, %StringRef* %tmp.StringRef27 + call void @ctor.459(%String* %_result, %StringRef %30) ret void -if_else27: ; preds = %if_block25 - br label %if_block33 +if_else24: ; preds = %if_block22 + br label %if_block29 -if_end28: ; preds = %if_end36, %dumy_block32 - br label %if_end20 +if_end25: ; preds = %if_end32, %dumy_block28 + br label %if_end18 -dumy_block32: ; No predecessors! - br label %if_end28 +dumy_block28: ; No predecessors! + br label %if_end25 -if_block33: ; preds = %if_else27 - call void @ctor.417(%TokenType* %tmp.this37, i32 5) - %26 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this37) - br i1 %26, label %if_then34, label %if_else35 +if_block29: ; preds = %if_else24 + call void @ctor.404(%TokenType* %tmp.this33, i32 5) + %31 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this33) + br i1 %31, label %if_then30, label %if_else31 -if_then34: ; preds = %if_block33 - %27 = load %String*, %String** %_result.addr - %28 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef39, i32 0, i32 0 - %29 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef39, i32 0, i32 1 - store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.47, i32 0, i32 0), i8** %28 - store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.47, i32 0, i32 10), i8** %29 - %30 = load %StringRef, %StringRef* %tmp.StringRef39 - store %StringRef %30, %StringRef* %"$tmpForRef38" - call void @ctor.471(%String* %27, %StringRef* %"$tmpForRef38") +if_then30: ; preds = %if_block29 + %32 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef34, i32 0, i32 0 + %33 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef34, i32 0, i32 1 + %34 = bitcast %UntypedPtr* %32 to i8** + %35 = bitcast %UntypedPtr* %33 to i8** + store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.48, i32 0, i32 0), i8** %34 + store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.48, i32 0, i32 10), i8** %35 + %36 = load %StringRef, %StringRef* %tmp.StringRef34 + call void @ctor.459(%String* %_result, %StringRef %36) ret void -if_else35: ; preds = %if_block33 - br label %if_block41 - -if_end36: ; preds = %if_end44, %dumy_block40 - br label %if_end28 +if_else31: ; preds = %if_block29 + br label %if_block36 -dumy_block40: ; No predecessors! - br label %if_end36 +if_end32: ; preds = %if_end39, %dumy_block35 + br label %if_end25 -if_block41: ; preds = %if_else35 - call void @ctor.417(%TokenType* %tmp.this45, i32 6) - %31 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this45) - br i1 %31, label %if_then42, label %if_else43 +dumy_block35: ; No predecessors! + br label %if_end32 -if_then42: ; preds = %if_block41 - %32 = load %String*, %String** %_result.addr - %33 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef47, i32 0, i32 0 - %34 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef47, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.48, i32 0, i32 0), i8** %33 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.48, i32 0, i32 5), i8** %34 - %35 = load %StringRef, %StringRef* %tmp.StringRef47 - store %StringRef %35, %StringRef* %"$tmpForRef46" - call void @ctor.471(%String* %32, %StringRef* %"$tmpForRef46") - ret void +if_block36: ; preds = %if_else31 + call void @ctor.404(%TokenType* %tmp.this40, i32 6) + %37 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this40) + br i1 %37, label %if_then37, label %if_else38 -if_else43: ; preds = %if_block41 - br label %if_block49 +if_then37: ; preds = %if_block36 + %38 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef41, i32 0, i32 0 + %39 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef41, i32 0, i32 1 + %40 = bitcast %UntypedPtr* %38 to i8** + %41 = bitcast %UntypedPtr* %39 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.49, i32 0, i32 0), i8** %40 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.49, i32 0, i32 5), i8** %41 + %42 = load %StringRef, %StringRef* %tmp.StringRef41 + call void @ctor.459(%String* %_result, %StringRef %42) + ret void + +if_else38: ; preds = %if_block36 + br label %if_block43 + +if_end39: ; preds = %if_end46, %dumy_block42 + br label %if_end32 + +dumy_block42: ; No predecessors! + br label %if_end39 + +if_block43: ; preds = %if_else38 + call void @ctor.404(%TokenType* %tmp.this47, i32 8) + %43 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this47) + br i1 %43, label %if_then44, label %if_else45 + +if_then44: ; preds = %if_block43 + %44 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef48, i32 0, i32 0 + %45 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef48, i32 0, i32 1 + %46 = bitcast %UntypedPtr* %44 to i8** + %47 = bitcast %UntypedPtr* %45 to i8** + store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.50, i32 0, i32 0), i8** %46 + store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.50, i32 0, i32 9), i8** %47 + %48 = load %StringRef, %StringRef* %tmp.StringRef48 + call void @ctor.459(%String* %_result, %StringRef %48) + ret void + +if_else45: ; preds = %if_block43 + br label %if_block50 -if_end44: ; preds = %if_end52, %dumy_block48 - br label %if_end36 +if_end46: ; preds = %if_end53, %dumy_block49 + br label %if_end39 -dumy_block48: ; No predecessors! - br label %if_end44 +dumy_block49: ; No predecessors! + br label %if_end46 -if_block49: ; preds = %if_else43 - call void @ctor.417(%TokenType* %tmp.this53, i32 7) - %36 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this53) - br i1 %36, label %if_then50, label %if_else51 +if_block50: ; preds = %if_else45 + call void @ctor.404(%TokenType* %tmp.this54, i32 9) + %49 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this54) + br i1 %49, label %if_then51, label %if_else52 -if_then50: ; preds = %if_block49 - %37 = load %String*, %String** %_result.addr - %38 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef55, i32 0, i32 0 - %39 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef55, i32 0, i32 1 - store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.49, i32 0, i32 0), i8** %38 - store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.49, i32 0, i32 9), i8** %39 - %40 = load %StringRef, %StringRef* %tmp.StringRef55 - store %StringRef %40, %StringRef* %"$tmpForRef54" - call void @ctor.471(%String* %37, %StringRef* %"$tmpForRef54") +if_then51: ; preds = %if_block50 + %50 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef55, i32 0, i32 0 + %51 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef55, i32 0, i32 1 + %52 = bitcast %UntypedPtr* %50 to i8** + %53 = bitcast %UntypedPtr* %51 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.51, i32 0, i32 0), i8** %52 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.51, i32 0, i32 7), i8** %53 + %54 = load %StringRef, %StringRef* %tmp.StringRef55 + call void @ctor.459(%String* %_result, %StringRef %54) ret void -if_else51: ; preds = %if_block49 +if_else52: ; preds = %if_block50 br label %if_block57 -if_end52: ; preds = %if_end60, %dumy_block56 - br label %if_end44 +if_end53: ; preds = %if_end60, %dumy_block56 + br label %if_end46 dumy_block56: ; No predecessors! - br label %if_end52 + br label %if_end53 -if_block57: ; preds = %if_else51 - call void @ctor.417(%TokenType* %tmp.this61, i32 8) - %41 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this61) - br i1 %41, label %if_then58, label %if_else59 +if_block57: ; preds = %if_else52 + call void @ctor.404(%TokenType* %tmp.this61, i32 7) + %55 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this61) + br i1 %55, label %if_then58, label %if_else59 if_then58: ; preds = %if_block57 - %42 = load %String*, %String** %_result.addr - %43 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef63, i32 0, i32 0 - %44 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef63, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.50, i32 0, i32 0), i8** %43 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.50, i32 0, i32 7), i8** %44 - %45 = load %StringRef, %StringRef* %tmp.StringRef63 - store %StringRef %45, %StringRef* %"$tmpForRef62" - call void @ctor.471(%String* %42, %StringRef* %"$tmpForRef62") + %56 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef62, i32 0, i32 0 + %57 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef62, i32 0, i32 1 + %58 = bitcast %UntypedPtr* %56 to i8** + %59 = bitcast %UntypedPtr* %57 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.52, i32 0, i32 0), i8** %58 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.52, i32 0, i32 5), i8** %59 + %60 = load %StringRef, %StringRef* %tmp.StringRef62 + call void @ctor.459(%String* %_result, %StringRef %60) ret void if_else59: ; preds = %if_block57 - br label %if_block65 + br label %if_block64 -if_end60: ; preds = %if_end68, %dumy_block64 - br label %if_end52 +if_end60: ; preds = %if_end67, %dumy_block63 + br label %if_end53 -dumy_block64: ; No predecessors! +dumy_block63: ; No predecessors! br label %if_end60 -if_block65: ; preds = %if_else59 - call void @ctor.417(%TokenType* %tmp.this69, i32 9) - %46 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this69) - br i1 %46, label %if_then66, label %if_else67 +if_block64: ; preds = %if_else59 + call void @ctor.404(%TokenType* %tmp.this68, i32 10) + %61 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this68) + br i1 %61, label %if_then65, label %if_else66 -if_then66: ; preds = %if_block65 - %47 = load %String*, %String** %_result.addr - %48 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef71, i32 0, i32 0 - %49 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef71, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.51, i32 0, i32 0), i8** %48 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.51, i32 0, i32 5), i8** %49 - %50 = load %StringRef, %StringRef* %tmp.StringRef71 - store %StringRef %50, %StringRef* %"$tmpForRef70" - call void @ctor.471(%String* %47, %StringRef* %"$tmpForRef70") +if_then65: ; preds = %if_block64 + %62 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef69, i32 0, i32 0 + %63 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef69, i32 0, i32 1 + %64 = bitcast %UntypedPtr* %62 to i8** + %65 = bitcast %UntypedPtr* %63 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.53, i32 0, i32 0), i8** %64 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.53, i32 0, i32 5), i8** %65 + %66 = load %StringRef, %StringRef* %tmp.StringRef69 + call void @ctor.459(%String* %_result, %StringRef %66) ret void -if_else67: ; preds = %if_block65 - br label %if_block73 +if_else66: ; preds = %if_block64 + br label %if_block71 -if_end68: ; preds = %if_end76, %dumy_block72 +if_end67: ; preds = %if_end74, %dumy_block70 br label %if_end60 -dumy_block72: ; No predecessors! - br label %if_end68 +dumy_block70: ; No predecessors! + br label %if_end67 -if_block73: ; preds = %if_else67 - call void @ctor.417(%TokenType* %tmp.this77, i32 10) - %51 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this77) - br i1 %51, label %if_then74, label %if_else75 +if_block71: ; preds = %if_else66 + call void @ctor.404(%TokenType* %tmp.this75, i32 11) + %67 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this75) + br i1 %67, label %if_then72, label %if_else73 -if_then74: ; preds = %if_block73 - %52 = load %String*, %String** %_result.addr - %53 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef79, i32 0, i32 0 - %54 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef79, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.52, i32 0, i32 0), i8** %53 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.52, i32 0, i32 7), i8** %54 - %55 = load %StringRef, %StringRef* %tmp.StringRef79 - store %StringRef %55, %StringRef* %"$tmpForRef78" - call void @ctor.471(%String* %52, %StringRef* %"$tmpForRef78") +if_then72: ; preds = %if_block71 + %68 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef76, i32 0, i32 0 + %69 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef76, i32 0, i32 1 + %70 = bitcast %UntypedPtr* %68 to i8** + %71 = bitcast %UntypedPtr* %69 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.54, i32 0, i32 0), i8** %70 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.54, i32 0, i32 7), i8** %71 + %72 = load %StringRef, %StringRef* %tmp.StringRef76 + call void @ctor.459(%String* %_result, %StringRef %72) ret void -if_else75: ; preds = %if_block73 - br label %if_block81 +if_else73: ; preds = %if_block71 + br label %if_block78 -if_end76: ; preds = %if_end84, %dumy_block80 - br label %if_end68 +if_end74: ; preds = %if_end81, %dumy_block77 + br label %if_end67 -dumy_block80: ; No predecessors! - br label %if_end76 +dumy_block77: ; No predecessors! + br label %if_end74 -if_block81: ; preds = %if_else75 - call void @ctor.417(%TokenType* %tmp.this85, i32 11) - %56 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this85) - br i1 %56, label %if_then82, label %if_else83 +if_block78: ; preds = %if_else73 + call void @ctor.404(%TokenType* %tmp.this82, i32 12) + %73 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this82) + br i1 %73, label %if_then79, label %if_else80 -if_then82: ; preds = %if_block81 - %57 = load %String*, %String** %_result.addr - %58 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef87, i32 0, i32 0 - %59 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef87, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.53, i32 0, i32 0), i8** %58 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.53, i32 0, i32 7), i8** %59 - %60 = load %StringRef, %StringRef* %tmp.StringRef87 - store %StringRef %60, %StringRef* %"$tmpForRef86" - call void @ctor.471(%String* %57, %StringRef* %"$tmpForRef86") +if_then79: ; preds = %if_block78 + %74 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef83, i32 0, i32 0 + %75 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef83, i32 0, i32 1 + %76 = bitcast %UntypedPtr* %74 to i8** + %77 = bitcast %UntypedPtr* %75 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.55, i32 0, i32 0), i8** %76 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.55, i32 0, i32 7), i8** %77 + %78 = load %StringRef, %StringRef* %tmp.StringRef83 + call void @ctor.459(%String* %_result, %StringRef %78) ret void -if_else83: ; preds = %if_block81 - br label %if_block89 +if_else80: ; preds = %if_block78 + br label %if_block85 -if_end84: ; preds = %if_end92, %dumy_block88 - br label %if_end76 +if_end81: ; preds = %if_end88, %dumy_block84 + br label %if_end74 -dumy_block88: ; No predecessors! - br label %if_end84 +dumy_block84: ; No predecessors! + br label %if_end81 -if_block89: ; preds = %if_else83 - call void @ctor.417(%TokenType* %tmp.this93, i32 12) - %61 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this93) - br i1 %61, label %if_then90, label %if_else91 +if_block85: ; preds = %if_else80 + call void @ctor.404(%TokenType* %tmp.this89, i32 13) + %79 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this89) + br i1 %79, label %if_then86, label %if_else87 -if_then90: ; preds = %if_block89 - %62 = load %String*, %String** %_result.addr - %63 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef95, i32 0, i32 0 - %64 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef95, i32 0, i32 1 - store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.54, i32 0, i32 0), i8** %63 - store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.54, i32 0, i32 10), i8** %64 - %65 = load %StringRef, %StringRef* %tmp.StringRef95 - store %StringRef %65, %StringRef* %"$tmpForRef94" - call void @ctor.471(%String* %62, %StringRef* %"$tmpForRef94") +if_then86: ; preds = %if_block85 + %80 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef90, i32 0, i32 0 + %81 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef90, i32 0, i32 1 + %82 = bitcast %UntypedPtr* %80 to i8** + %83 = bitcast %UntypedPtr* %81 to i8** + store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.56, i32 0, i32 0), i8** %82 + store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.56, i32 0, i32 10), i8** %83 + %84 = load %StringRef, %StringRef* %tmp.StringRef90 + call void @ctor.459(%String* %_result, %StringRef %84) ret void -if_else91: ; preds = %if_block89 - br label %if_block97 +if_else87: ; preds = %if_block85 + br label %if_block92 -if_end92: ; preds = %if_end100, %dumy_block96 - br label %if_end84 +if_end88: ; preds = %if_end95, %dumy_block91 + br label %if_end81 -dumy_block96: ; No predecessors! - br label %if_end92 +dumy_block91: ; No predecessors! + br label %if_end88 -if_block97: ; preds = %if_else91 - call void @ctor.417(%TokenType* %tmp.this101, i32 13) - %66 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this101) - br i1 %66, label %if_then98, label %if_else99 +if_block92: ; preds = %if_else87 + call void @ctor.404(%TokenType* %tmp.this96, i32 14) + %85 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this96) + br i1 %85, label %if_then93, label %if_else94 -if_then98: ; preds = %if_block97 - %67 = load %String*, %String** %_result.addr - %68 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef103, i32 0, i32 0 - %69 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef103, i32 0, i32 1 - store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.55, i32 0, i32 0), i8** %68 - store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.55, i32 0, i32 9), i8** %69 - %70 = load %StringRef, %StringRef* %tmp.StringRef103 - store %StringRef %70, %StringRef* %"$tmpForRef102" - call void @ctor.471(%String* %67, %StringRef* %"$tmpForRef102") +if_then93: ; preds = %if_block92 + %86 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef97, i32 0, i32 0 + %87 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef97, i32 0, i32 1 + %88 = bitcast %UntypedPtr* %86 to i8** + %89 = bitcast %UntypedPtr* %87 to i8** + store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.57, i32 0, i32 0), i8** %88 + store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.57, i32 0, i32 9), i8** %89 + %90 = load %StringRef, %StringRef* %tmp.StringRef97 + call void @ctor.459(%String* %_result, %StringRef %90) ret void -if_else99: ; preds = %if_block97 - br label %if_block105 +if_else94: ; preds = %if_block92 + br label %if_block99 -if_end100: ; preds = %if_end108, %dumy_block104 - br label %if_end92 +if_end95: ; preds = %if_end102, %dumy_block98 + br label %if_end88 -dumy_block104: ; No predecessors! - br label %if_end100 +dumy_block98: ; No predecessors! + br label %if_end95 + +if_block99: ; preds = %if_else94 + call void @ctor.404(%TokenType* %tmp.this103, i32 15) + %91 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this103) + br i1 %91, label %if_then100, label %if_else101 -if_block105: ; preds = %if_else99 - call void @ctor.417(%TokenType* %tmp.this109, i32 14) - %71 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this109) - br i1 %71, label %if_then106, label %if_else107 +if_then100: ; preds = %if_block99 + %92 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef104, i32 0, i32 0 + %93 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef104, i32 0, i32 1 + %94 = bitcast %UntypedPtr* %92 to i8** + %95 = bitcast %UntypedPtr* %93 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.58, i32 0, i32 0), i8** %94 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.58, i32 0, i32 5), i8** %95 + %96 = load %StringRef, %StringRef* %tmp.StringRef104 + call void @ctor.459(%String* %_result, %StringRef %96) + ret void + +if_else101: ; preds = %if_block99 + br label %if_block106 + +if_end102: ; preds = %if_end109, %dumy_block105 + br label %if_end95 -if_then106: ; preds = %if_block105 - %72 = load %String*, %String** %_result.addr - %73 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef111, i32 0, i32 0 - %74 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef111, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.56, i32 0, i32 0), i8** %73 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.56, i32 0, i32 5), i8** %74 - %75 = load %StringRef, %StringRef* %tmp.StringRef111 - store %StringRef %75, %StringRef* %"$tmpForRef110" - call void @ctor.471(%String* %72, %StringRef* %"$tmpForRef110") +dumy_block105: ; No predecessors! + br label %if_end102 + +if_block106: ; preds = %if_else101 + call void @ctor.404(%TokenType* %tmp.this110, i32 16) + %97 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this110) + br i1 %97, label %if_then107, label %if_else108 + +if_then107: ; preds = %if_block106 + %98 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef111, i32 0, i32 0 + %99 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef111, i32 0, i32 1 + %100 = bitcast %UntypedPtr* %98 to i8** + %101 = bitcast %UntypedPtr* %99 to i8** + store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.59, i32 0, i32 0), i8** %100 + store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.59, i32 0, i32 4), i8** %101 + %102 = load %StringRef, %StringRef* %tmp.StringRef111 + call void @ctor.459(%String* %_result, %StringRef %102) ret void -if_else107: ; preds = %if_block105 +if_else108: ; preds = %if_block106 br label %if_block113 -if_end108: ; preds = %if_end116, %dumy_block112 - br label %if_end100 +if_end109: ; preds = %if_end116, %dumy_block112 + br label %if_end102 dumy_block112: ; No predecessors! - br label %if_end108 + br label %if_end109 -if_block113: ; preds = %if_else107 - call void @ctor.417(%TokenType* %tmp.this117, i32 15) - %76 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this117) - br i1 %76, label %if_then114, label %if_else115 +if_block113: ; preds = %if_else108 + call void @ctor.404(%TokenType* %tmp.this117, i32 17) + %103 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this117) + br i1 %103, label %if_then114, label %if_else115 if_then114: ; preds = %if_block113 - %77 = load %String*, %String** %_result.addr - %78 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef119, i32 0, i32 0 - %79 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef119, i32 0, i32 1 - store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.57, i32 0, i32 0), i8** %78 - store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.57, i32 0, i32 4), i8** %79 - %80 = load %StringRef, %StringRef* %tmp.StringRef119 - store %StringRef %80, %StringRef* %"$tmpForRef118" - call void @ctor.471(%String* %77, %StringRef* %"$tmpForRef118") + %104 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef118, i32 0, i32 0 + %105 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef118, i32 0, i32 1 + %106 = bitcast %UntypedPtr* %104 to i8** + %107 = bitcast %UntypedPtr* %105 to i8** + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.60, i32 0, i32 0), i8** %106 + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.60, i32 0, i32 8), i8** %107 + %108 = load %StringRef, %StringRef* %tmp.StringRef118 + call void @ctor.459(%String* %_result, %StringRef %108) ret void if_else115: ; preds = %if_block113 - br label %if_block121 + br label %if_block120 -if_end116: ; preds = %if_end124, %dumy_block120 - br label %if_end108 +if_end116: ; preds = %if_end123, %dumy_block119 + br label %if_end109 -dumy_block120: ; No predecessors! +dumy_block119: ; No predecessors! br label %if_end116 -if_block121: ; preds = %if_else115 - call void @ctor.417(%TokenType* %tmp.this125, i32 16) - %81 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this125) - br i1 %81, label %if_then122, label %if_else123 +if_block120: ; preds = %if_else115 + call void @ctor.404(%TokenType* %tmp.this124, i32 18) + %109 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this124) + br i1 %109, label %if_then121, label %if_else122 -if_then122: ; preds = %if_block121 - %82 = load %String*, %String** %_result.addr - %83 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef127, i32 0, i32 0 - %84 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef127, i32 0, i32 1 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.58, i32 0, i32 0), i8** %83 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.58, i32 0, i32 8), i8** %84 - %85 = load %StringRef, %StringRef* %tmp.StringRef127 - store %StringRef %85, %StringRef* %"$tmpForRef126" - call void @ctor.471(%String* %82, %StringRef* %"$tmpForRef126") +if_then121: ; preds = %if_block120 + %110 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef125, i32 0, i32 0 + %111 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef125, i32 0, i32 1 + %112 = bitcast %UntypedPtr* %110 to i8** + %113 = bitcast %UntypedPtr* %111 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.61, i32 0, i32 0), i8** %112 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.61, i32 0, i32 7), i8** %113 + %114 = load %StringRef, %StringRef* %tmp.StringRef125 + call void @ctor.459(%String* %_result, %StringRef %114) ret void -if_else123: ; preds = %if_block121 - br label %if_block129 +if_else122: ; preds = %if_block120 + br label %if_block127 -if_end124: ; preds = %if_end132, %dumy_block128 +if_end123: ; preds = %if_end130, %dumy_block126 br label %if_end116 -dumy_block128: ; No predecessors! - br label %if_end124 +dumy_block126: ; No predecessors! + br label %if_end123 -if_block129: ; preds = %if_else123 - call void @ctor.417(%TokenType* %tmp.this133, i32 17) - %86 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this133) - br i1 %86, label %if_then130, label %if_else131 +if_block127: ; preds = %if_else122 + call void @ctor.404(%TokenType* %tmp.this131, i32 19) + %115 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this131) + br i1 %115, label %if_then128, label %if_else129 -if_then130: ; preds = %if_block129 - %87 = load %String*, %String** %_result.addr - %88 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef135, i32 0, i32 0 - %89 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef135, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.59, i32 0, i32 0), i8** %88 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.59, i32 0, i32 7), i8** %89 - %90 = load %StringRef, %StringRef* %tmp.StringRef135 - store %StringRef %90, %StringRef* %"$tmpForRef134" - call void @ctor.471(%String* %87, %StringRef* %"$tmpForRef134") +if_then128: ; preds = %if_block127 + %116 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef132, i32 0, i32 0 + %117 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef132, i32 0, i32 1 + %118 = bitcast %UntypedPtr* %116 to i8** + %119 = bitcast %UntypedPtr* %117 to i8** + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.62, i32 0, i32 0), i8** %118 + store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.62, i32 0, i32 5), i8** %119 + %120 = load %StringRef, %StringRef* %tmp.StringRef132 + call void @ctor.459(%String* %_result, %StringRef %120) ret void -if_else131: ; preds = %if_block129 - br label %if_block137 +if_else129: ; preds = %if_block127 + br label %if_block134 -if_end132: ; preds = %if_end140, %dumy_block136 - br label %if_end124 +if_end130: ; preds = %if_end137, %dumy_block133 + br label %if_end123 -dumy_block136: ; No predecessors! - br label %if_end132 +dumy_block133: ; No predecessors! + br label %if_end130 -if_block137: ; preds = %if_else131 - call void @ctor.417(%TokenType* %tmp.this141, i32 18) - %91 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this141) - br i1 %91, label %if_then138, label %if_else139 +if_block134: ; preds = %if_else129 + call void @ctor.404(%TokenType* %tmp.this138, i32 20) + %121 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this138) + br i1 %121, label %if_then135, label %if_else136 -if_then138: ; preds = %if_block137 - %92 = load %String*, %String** %_result.addr - %93 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef143, i32 0, i32 0 - %94 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef143, i32 0, i32 1 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.60, i32 0, i32 0), i8** %93 - store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.60, i32 0, i32 5), i8** %94 - %95 = load %StringRef, %StringRef* %tmp.StringRef143 - store %StringRef %95, %StringRef* %"$tmpForRef142" - call void @ctor.471(%String* %92, %StringRef* %"$tmpForRef142") +if_then135: ; preds = %if_block134 + %122 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef139, i32 0, i32 0 + %123 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef139, i32 0, i32 1 + %124 = bitcast %UntypedPtr* %122 to i8** + %125 = bitcast %UntypedPtr* %123 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.63, i32 0, i32 0), i8** %124 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.63, i32 0, i32 7), i8** %125 + %126 = load %StringRef, %StringRef* %tmp.StringRef139 + call void @ctor.459(%String* %_result, %StringRef %126) ret void -if_else139: ; preds = %if_block137 - br label %if_block145 +if_else136: ; preds = %if_block134 + br label %if_block141 -if_end140: ; preds = %if_end148, %dumy_block144 - br label %if_end132 +if_end137: ; preds = %if_end144, %dumy_block140 + br label %if_end130 -dumy_block144: ; No predecessors! - br label %if_end140 +dumy_block140: ; No predecessors! + br label %if_end137 -if_block145: ; preds = %if_else139 - call void @ctor.417(%TokenType* %tmp.this149, i32 19) - %96 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this149) - br i1 %96, label %if_then146, label %if_else147 +if_block141: ; preds = %if_else136 + call void @ctor.404(%TokenType* %tmp.this145, i32 21) + %127 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this145) + br i1 %127, label %if_then142, label %if_else143 -if_then146: ; preds = %if_block145 - %97 = load %String*, %String** %_result.addr - %98 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef151, i32 0, i32 0 - %99 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef151, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.61, i32 0, i32 0), i8** %98 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.61, i32 0, i32 7), i8** %99 - %100 = load %StringRef, %StringRef* %tmp.StringRef151 - store %StringRef %100, %StringRef* %"$tmpForRef150" - call void @ctor.471(%String* %97, %StringRef* %"$tmpForRef150") +if_then142: ; preds = %if_block141 + %128 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef146, i32 0, i32 0 + %129 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef146, i32 0, i32 1 + %130 = bitcast %UntypedPtr* %128 to i8** + %131 = bitcast %UntypedPtr* %129 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.64, i32 0, i32 0), i8** %130 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.64, i32 0, i32 7), i8** %131 + %132 = load %StringRef, %StringRef* %tmp.StringRef146 + call void @ctor.459(%String* %_result, %StringRef %132) ret void -if_else147: ; preds = %if_block145 - br label %if_block153 +if_else143: ; preds = %if_block141 + br label %if_block148 -if_end148: ; preds = %if_end156, %dumy_block152 - br label %if_end140 +if_end144: ; preds = %if_end151, %dumy_block147 + br label %if_end137 -dumy_block152: ; No predecessors! - br label %if_end148 +dumy_block147: ; No predecessors! + br label %if_end144 -if_block153: ; preds = %if_else147 - call void @ctor.417(%TokenType* %tmp.this157, i32 20) - %101 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this157) - br i1 %101, label %if_then154, label %if_else155 +if_block148: ; preds = %if_else143 + call void @ctor.404(%TokenType* %tmp.this152, i32 22) + %133 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this152) + br i1 %133, label %if_then149, label %if_else150 -if_then154: ; preds = %if_block153 - %102 = load %String*, %String** %_result.addr - %103 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef159, i32 0, i32 0 - %104 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef159, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.62, i32 0, i32 0), i8** %103 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.62, i32 0, i32 7), i8** %104 - %105 = load %StringRef, %StringRef* %tmp.StringRef159 - store %StringRef %105, %StringRef* %"$tmpForRef158" - call void @ctor.471(%String* %102, %StringRef* %"$tmpForRef158") +if_then149: ; preds = %if_block148 + %134 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef153, i32 0, i32 0 + %135 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef153, i32 0, i32 1 + %136 = bitcast %UntypedPtr* %134 to i8** + %137 = bitcast %UntypedPtr* %135 to i8** + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.65, i32 0, i32 0), i8** %136 + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.65, i32 0, i32 6), i8** %137 + %138 = load %StringRef, %StringRef* %tmp.StringRef153 + call void @ctor.459(%String* %_result, %StringRef %138) ret void -if_else155: ; preds = %if_block153 - br label %if_block161 +if_else150: ; preds = %if_block148 + br label %if_block155 -if_end156: ; preds = %if_end164, %dumy_block160 - br label %if_end148 +if_end151: ; preds = %if_end158, %dumy_block154 + br label %if_end144 -dumy_block160: ; No predecessors! - br label %if_end156 +dumy_block154: ; No predecessors! + br label %if_end151 + +if_block155: ; preds = %if_else150 + call void @ctor.404(%TokenType* %tmp.this159, i32 23) + %139 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this159) + br i1 %139, label %if_then156, label %if_else157 + +if_then156: ; preds = %if_block155 + %140 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef160, i32 0, i32 0 + %141 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef160, i32 0, i32 1 + %142 = bitcast %UntypedPtr* %140 to i8** + %143 = bitcast %UntypedPtr* %141 to i8** + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.66, i32 0, i32 0), i8** %142 + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.66, i32 0, i32 6), i8** %143 + %144 = load %StringRef, %StringRef* %tmp.StringRef160 + call void @ctor.459(%String* %_result, %StringRef %144) + ret void + +if_else157: ; preds = %if_block155 + br label %if_block162 + +if_end158: ; preds = %if_end165, %dumy_block161 + br label %if_end151 + +dumy_block161: ; No predecessors! + br label %if_end158 -if_block161: ; preds = %if_else155 - call void @ctor.417(%TokenType* %tmp.this165, i32 21) - %106 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this165) - br i1 %106, label %if_then162, label %if_else163 +if_block162: ; preds = %if_else157 + call void @ctor.404(%TokenType* %tmp.this166, i32 24) + %145 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this166) + br i1 %145, label %if_then163, label %if_else164 -if_then162: ; preds = %if_block161 - %107 = load %String*, %String** %_result.addr - %108 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef167, i32 0, i32 0 - %109 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef167, i32 0, i32 1 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.63, i32 0, i32 0), i8** %108 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.63, i32 0, i32 6), i8** %109 - %110 = load %StringRef, %StringRef* %tmp.StringRef167 - store %StringRef %110, %StringRef* %"$tmpForRef166" - call void @ctor.471(%String* %107, %StringRef* %"$tmpForRef166") +if_then163: ; preds = %if_block162 + %146 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef167, i32 0, i32 0 + %147 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef167, i32 0, i32 1 + %148 = bitcast %UntypedPtr* %146 to i8** + %149 = bitcast %UntypedPtr* %147 to i8** + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.67, i32 0, i32 0), i8** %148 + store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.67, i32 0, i32 6), i8** %149 + %150 = load %StringRef, %StringRef* %tmp.StringRef167 + call void @ctor.459(%String* %_result, %StringRef %150) ret void -if_else163: ; preds = %if_block161 +if_else164: ; preds = %if_block162 br label %if_block169 -if_end164: ; preds = %if_end172, %dumy_block168 - br label %if_end156 +if_end165: ; preds = %if_end172, %dumy_block168 + br label %if_end158 dumy_block168: ; No predecessors! - br label %if_end164 + br label %if_end165 -if_block169: ; preds = %if_else163 - call void @ctor.417(%TokenType* %tmp.this173, i32 22) - %111 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this173) - br i1 %111, label %if_then170, label %if_else171 +if_block169: ; preds = %if_else164 + call void @ctor.404(%TokenType* %tmp.this173, i32 25) + %151 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this173) + br i1 %151, label %if_then170, label %if_else171 if_then170: ; preds = %if_block169 - %112 = load %String*, %String** %_result.addr - %113 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef175, i32 0, i32 0 - %114 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef175, i32 0, i32 1 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.64, i32 0, i32 0), i8** %113 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.64, i32 0, i32 6), i8** %114 - %115 = load %StringRef, %StringRef* %tmp.StringRef175 - store %StringRef %115, %StringRef* %"$tmpForRef174" - call void @ctor.471(%String* %112, %StringRef* %"$tmpForRef174") + %152 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef174, i32 0, i32 0 + %153 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef174, i32 0, i32 1 + %154 = bitcast %UntypedPtr* %152 to i8** + %155 = bitcast %UntypedPtr* %153 to i8** + store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.68, i32 0, i32 0), i8** %154 + store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.68, i32 0, i32 15), i8** %155 + %156 = load %StringRef, %StringRef* %tmp.StringRef174 + call void @ctor.459(%String* %_result, %StringRef %156) ret void if_else171: ; preds = %if_block169 - br label %if_block177 + br label %if_block176 -if_end172: ; preds = %if_end180, %dumy_block176 - br label %if_end164 +if_end172: ; preds = %if_end179, %dumy_block175 + br label %if_end165 -dumy_block176: ; No predecessors! +dumy_block175: ; No predecessors! br label %if_end172 -if_block177: ; preds = %if_else171 - call void @ctor.417(%TokenType* %tmp.this181, i32 23) - %116 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this181) - br i1 %116, label %if_then178, label %if_else179 +if_block176: ; preds = %if_else171 + call void @ctor.404(%TokenType* %tmp.this180, i32 26) + %157 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this180) + br i1 %157, label %if_then177, label %if_else178 -if_then178: ; preds = %if_block177 - %117 = load %String*, %String** %_result.addr - %118 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef183, i32 0, i32 0 - %119 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef183, i32 0, i32 1 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.65, i32 0, i32 0), i8** %118 - store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.65, i32 0, i32 6), i8** %119 - %120 = load %StringRef, %StringRef* %tmp.StringRef183 - store %StringRef %120, %StringRef* %"$tmpForRef182" - call void @ctor.471(%String* %117, %StringRef* %"$tmpForRef182") +if_then177: ; preds = %if_block176 + %158 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef181, i32 0, i32 0 + %159 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef181, i32 0, i32 1 + %160 = bitcast %UntypedPtr* %158 to i8** + %161 = bitcast %UntypedPtr* %159 to i8** + store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.69, i32 0, i32 0), i8** %160 + store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.69, i32 0, i32 15), i8** %161 + %162 = load %StringRef, %StringRef* %tmp.StringRef181 + call void @ctor.459(%String* %_result, %StringRef %162) ret void -if_else179: ; preds = %if_block177 - br label %if_block185 +if_else178: ; preds = %if_block176 + br label %if_block183 -if_end180: ; preds = %if_end188, %dumy_block184 +if_end179: ; preds = %if_end186, %dumy_block182 br label %if_end172 -dumy_block184: ; No predecessors! - br label %if_end180 +dumy_block182: ; No predecessors! + br label %if_end179 + +if_block183: ; preds = %if_else178 + call void @ctor.404(%TokenType* %tmp.this187, i32 27) + %163 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this187) + br i1 %163, label %if_then184, label %if_else185 + +if_then184: ; preds = %if_block183 + %164 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef188, i32 0, i32 0 + %165 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef188, i32 0, i32 1 + %166 = bitcast %UntypedPtr* %164 to i8** + %167 = bitcast %UntypedPtr* %165 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.70, i32 0, i32 0), i8** %166 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.70, i32 0, i32 3), i8** %167 + %168 = load %StringRef, %StringRef* %tmp.StringRef188 + call void @ctor.459(%String* %_result, %StringRef %168) + ret void + +if_else185: ; preds = %if_block183 + br label %if_block190 -if_block185: ; preds = %if_else179 - call void @ctor.417(%TokenType* %tmp.this189, i32 24) - %121 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this189) - br i1 %121, label %if_then186, label %if_else187 +if_end186: ; preds = %if_end193, %dumy_block189 + br label %if_end179 -if_then186: ; preds = %if_block185 - %122 = load %String*, %String** %_result.addr - %123 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef191, i32 0, i32 0 - %124 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef191, i32 0, i32 1 - store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.66, i32 0, i32 0), i8** %123 - store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.66, i32 0, i32 15), i8** %124 - %125 = load %StringRef, %StringRef* %tmp.StringRef191 - store %StringRef %125, %StringRef* %"$tmpForRef190" - call void @ctor.471(%String* %122, %StringRef* %"$tmpForRef190") - ret void - -if_else187: ; preds = %if_block185 - br label %if_block193 - -if_end188: ; preds = %if_end196, %dumy_block192 - br label %if_end180 - -dumy_block192: ; No predecessors! - br label %if_end188 - -if_block193: ; preds = %if_else187 - call void @ctor.417(%TokenType* %tmp.this197, i32 25) - %126 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this197) - br i1 %126, label %if_then194, label %if_else195 - -if_then194: ; preds = %if_block193 - %127 = load %String*, %String** %_result.addr - %128 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef199, i32 0, i32 0 - %129 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef199, i32 0, i32 1 - store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.67, i32 0, i32 0), i8** %128 - store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.67, i32 0, i32 15), i8** %129 - %130 = load %StringRef, %StringRef* %tmp.StringRef199 - store %StringRef %130, %StringRef* %"$tmpForRef198" - call void @ctor.471(%String* %127, %StringRef* %"$tmpForRef198") - ret void - -if_else195: ; preds = %if_block193 - br label %if_block201 - -if_end196: ; preds = %if_end204, %dumy_block200 - br label %if_end188 - -dumy_block200: ; No predecessors! - br label %if_end196 - -if_block201: ; preds = %if_else195 - call void @ctor.417(%TokenType* %tmp.this205, i32 26) - %131 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this205) - br i1 %131, label %if_then202, label %if_else203 - -if_then202: ; preds = %if_block201 - %132 = load %String*, %String** %_result.addr - %133 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef207, i32 0, i32 0 - %134 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef207, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.68, i32 0, i32 0), i8** %133 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.68, i32 0, i32 3), i8** %134 - %135 = load %StringRef, %StringRef* %tmp.StringRef207 - store %StringRef %135, %StringRef* %"$tmpForRef206" - call void @ctor.471(%String* %132, %StringRef* %"$tmpForRef206") - ret void - -if_else203: ; preds = %if_block201 - br label %if_block209 - -if_end204: ; preds = %if_end212, %dumy_block208 - br label %if_end196 - -dumy_block208: ; No predecessors! - br label %if_end204 - -if_block209: ; preds = %if_else203 - call void @ctor.417(%TokenType* %tmp.this213, i32 27) - %136 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this213) - br i1 %136, label %if_then210, label %if_else211 - -if_then210: ; preds = %if_block209 - %137 = load %String*, %String** %_result.addr - %138 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef215, i32 0, i32 0 - %139 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef215, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.69, i32 0, i32 0), i8** %138 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.69, i32 0, i32 3), i8** %139 - %140 = load %StringRef, %StringRef* %tmp.StringRef215 - store %StringRef %140, %StringRef* %"$tmpForRef214" - call void @ctor.471(%String* %137, %StringRef* %"$tmpForRef214") - ret void - -if_else211: ; preds = %if_block209 - br label %if_block217 - -if_end212: ; preds = %if_end220, %dumy_block216 - br label %if_end204 - -dumy_block216: ; No predecessors! - br label %if_end212 - -if_block217: ; preds = %if_else211 - call void @ctor.417(%TokenType* %tmp.this221, i32 28) - %141 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this221) - br i1 %141, label %if_then218, label %if_else219 - -if_then218: ; preds = %if_block217 - %142 = load %String*, %String** %_result.addr - %143 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef223, i32 0, i32 0 - %144 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef223, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.70, i32 0, i32 0), i8** %143 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.70, i32 0, i32 3), i8** %144 - %145 = load %StringRef, %StringRef* %tmp.StringRef223 - store %StringRef %145, %StringRef* %"$tmpForRef222" - call void @ctor.471(%String* %142, %StringRef* %"$tmpForRef222") +dumy_block189: ; No predecessors! + br label %if_end186 + +if_block190: ; preds = %if_else185 + call void @ctor.404(%TokenType* %tmp.this194, i32 28) + %169 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this194) + br i1 %169, label %if_then191, label %if_else192 + +if_then191: ; preds = %if_block190 + %170 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef195, i32 0, i32 0 + %171 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef195, i32 0, i32 1 + %172 = bitcast %UntypedPtr* %170 to i8** + %173 = bitcast %UntypedPtr* %171 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.71, i32 0, i32 0), i8** %172 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.71, i32 0, i32 3), i8** %173 + %174 = load %StringRef, %StringRef* %tmp.StringRef195 + call void @ctor.459(%String* %_result, %StringRef %174) ret void -if_else219: ; preds = %if_block217 +if_else192: ; preds = %if_block190 + br label %if_block197 + +if_end193: ; preds = %if_end200, %dumy_block196 + br label %if_end186 + +dumy_block196: ; No predecessors! + br label %if_end193 + +if_block197: ; preds = %if_else192 + call void @ctor.404(%TokenType* %tmp.this201, i32 29) + %175 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this201) + br i1 %175, label %if_then198, label %if_else199 + +if_then198: ; preds = %if_block197 + %176 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef202, i32 0, i32 0 + %177 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef202, i32 0, i32 1 + %178 = bitcast %UntypedPtr* %176 to i8** + %179 = bitcast %UntypedPtr* %177 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.72, i32 0, i32 0), i8** %178 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.72, i32 0, i32 3), i8** %179 + %180 = load %StringRef, %StringRef* %tmp.StringRef202 + call void @ctor.459(%String* %_result, %StringRef %180) + ret void + +if_else199: ; preds = %if_block197 + br label %if_block204 + +if_end200: ; preds = %if_end207, %dumy_block203 + br label %if_end193 + +dumy_block203: ; No predecessors! + br label %if_end200 + +if_block204: ; preds = %if_else199 + call void @ctor.404(%TokenType* %tmp.this208, i32 30) + %181 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this208) + br i1 %181, label %if_then205, label %if_else206 + +if_then205: ; preds = %if_block204 + %182 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef209, i32 0, i32 0 + %183 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef209, i32 0, i32 1 + %184 = bitcast %UntypedPtr* %182 to i8** + %185 = bitcast %UntypedPtr* %183 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.73, i32 0, i32 0), i8** %184 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.73, i32 0, i32 3), i8** %185 + %186 = load %StringRef, %StringRef* %tmp.StringRef209 + call void @ctor.459(%String* %_result, %StringRef %186) + ret void + +if_else206: ; preds = %if_block204 + br label %if_block211 + +if_end207: ; preds = %if_end214, %dumy_block210 + br label %if_end200 + +dumy_block210: ; No predecessors! + br label %if_end207 + +if_block211: ; preds = %if_else206 + call void @ctor.404(%TokenType* %tmp.this215, i32 31) + %187 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this215) + br i1 %187, label %if_then212, label %if_else213 + +if_then212: ; preds = %if_block211 + %188 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef216, i32 0, i32 0 + %189 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef216, i32 0, i32 1 + %190 = bitcast %UntypedPtr* %188 to i8** + %191 = bitcast %UntypedPtr* %189 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.74, i32 0, i32 0), i8** %190 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.74, i32 0, i32 3), i8** %191 + %192 = load %StringRef, %StringRef* %tmp.StringRef216 + call void @ctor.459(%String* %_result, %StringRef %192) + ret void + +if_else213: ; preds = %if_block211 + br label %if_block218 + +if_end214: ; preds = %if_end221, %dumy_block217 + br label %if_end207 + +dumy_block217: ; No predecessors! + br label %if_end214 + +if_block218: ; preds = %if_else213 + call void @ctor.404(%TokenType* %tmp.this222, i32 32) + %193 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this222) + br i1 %193, label %if_then219, label %if_else220 + +if_then219: ; preds = %if_block218 + %194 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef223, i32 0, i32 0 + %195 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef223, i32 0, i32 1 + %196 = bitcast %UntypedPtr* %194 to i8** + %197 = bitcast %UntypedPtr* %195 to i8** + store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.75, i32 0, i32 0), i8** %196 + store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.75, i32 0, i32 16), i8** %197 + %198 = load %StringRef, %StringRef* %tmp.StringRef223 + call void @ctor.459(%String* %_result, %StringRef %198) + ret void + +if_else220: ; preds = %if_block218 br label %if_block225 -if_end220: ; preds = %if_end228, %dumy_block224 - br label %if_end212 +if_end221: ; preds = %if_end228, %dumy_block224 + br label %if_end214 dumy_block224: ; No predecessors! - br label %if_end220 + br label %if_end221 -if_block225: ; preds = %if_else219 - call void @ctor.417(%TokenType* %tmp.this229, i32 29) - %146 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this229) - br i1 %146, label %if_then226, label %if_else227 +if_block225: ; preds = %if_else220 + call void @ctor.404(%TokenType* %tmp.this229, i32 33) + %199 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this229) + br i1 %199, label %if_then226, label %if_else227 if_then226: ; preds = %if_block225 - %147 = load %String*, %String** %_result.addr - %148 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef231, i32 0, i32 0 - %149 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef231, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.71, i32 0, i32 0), i8** %148 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.71, i32 0, i32 3), i8** %149 - %150 = load %StringRef, %StringRef* %tmp.StringRef231 - store %StringRef %150, %StringRef* %"$tmpForRef230" - call void @ctor.471(%String* %147, %StringRef* %"$tmpForRef230") + %200 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef230, i32 0, i32 0 + %201 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef230, i32 0, i32 1 + %202 = bitcast %UntypedPtr* %200 to i8** + %203 = bitcast %UntypedPtr* %201 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.76, i32 0, i32 0), i8** %202 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.76, i32 0, i32 3), i8** %203 + %204 = load %StringRef, %StringRef* %tmp.StringRef230 + call void @ctor.459(%String* %_result, %StringRef %204) ret void if_else227: ; preds = %if_block225 - br label %if_block233 + br label %if_block232 -if_end228: ; preds = %if_end236, %dumy_block232 - br label %if_end220 +if_end228: ; preds = %if_end235, %dumy_block231 + br label %if_end221 -dumy_block232: ; No predecessors! +dumy_block231: ; No predecessors! br label %if_end228 -if_block233: ; preds = %if_else227 - call void @ctor.417(%TokenType* %tmp.this237, i32 30) - %151 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this237) - br i1 %151, label %if_then234, label %if_else235 +if_block232: ; preds = %if_else227 + call void @ctor.404(%TokenType* %tmp.this236, i32 34) + %205 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this236) + br i1 %205, label %if_then233, label %if_else234 -if_then234: ; preds = %if_block233 - %152 = load %String*, %String** %_result.addr - %153 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef239, i32 0, i32 0 - %154 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef239, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.72, i32 0, i32 0), i8** %153 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.72, i32 0, i32 3), i8** %154 - %155 = load %StringRef, %StringRef* %tmp.StringRef239 - store %StringRef %155, %StringRef* %"$tmpForRef238" - call void @ctor.471(%String* %152, %StringRef* %"$tmpForRef238") +if_then233: ; preds = %if_block232 + %206 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef237, i32 0, i32 0 + %207 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef237, i32 0, i32 1 + %208 = bitcast %UntypedPtr* %206 to i8** + %209 = bitcast %UntypedPtr* %207 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.77, i32 0, i32 0), i8** %208 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.77, i32 0, i32 3), i8** %209 + %210 = load %StringRef, %StringRef* %tmp.StringRef237 + call void @ctor.459(%String* %_result, %StringRef %210) ret void -if_else235: ; preds = %if_block233 - br label %if_block241 +if_else234: ; preds = %if_block232 + br label %if_block239 -if_end236: ; preds = %if_end244, %dumy_block240 +if_end235: ; preds = %if_end242, %dumy_block238 br label %if_end228 -dumy_block240: ; No predecessors! - br label %if_end236 +dumy_block238: ; No predecessors! + br label %if_end235 + +if_block239: ; preds = %if_else234 + call void @ctor.404(%TokenType* %tmp.this243, i32 35) + %211 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this243) + br i1 %211, label %if_then240, label %if_else241 + +if_then240: ; preds = %if_block239 + %212 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef244, i32 0, i32 0 + %213 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef244, i32 0, i32 1 + %214 = bitcast %UntypedPtr* %212 to i8** + %215 = bitcast %UntypedPtr* %213 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.78, i32 0, i32 0), i8** %214 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.78, i32 0, i32 3), i8** %215 + %216 = load %StringRef, %StringRef* %tmp.StringRef244 + call void @ctor.459(%String* %_result, %StringRef %216) + ret void + +if_else241: ; preds = %if_block239 + br label %if_block246 -if_block241: ; preds = %if_else235 - call void @ctor.417(%TokenType* %tmp.this245, i32 31) - %156 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this245) - br i1 %156, label %if_then242, label %if_else243 +if_end242: ; preds = %if_end249, %dumy_block245 + br label %if_end235 -if_then242: ; preds = %if_block241 - %157 = load %String*, %String** %_result.addr - %158 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef247, i32 0, i32 0 - %159 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef247, i32 0, i32 1 - store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.73, i32 0, i32 0), i8** %158 - store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.73, i32 0, i32 16), i8** %159 - %160 = load %StringRef, %StringRef* %tmp.StringRef247 - store %StringRef %160, %StringRef* %"$tmpForRef246" - call void @ctor.471(%String* %157, %StringRef* %"$tmpForRef246") - ret void - -if_else243: ; preds = %if_block241 - br label %if_block249 - -if_end244: ; preds = %if_end252, %dumy_block248 - br label %if_end236 - -dumy_block248: ; No predecessors! - br label %if_end244 - -if_block249: ; preds = %if_else243 - call void @ctor.417(%TokenType* %tmp.this253, i32 32) - %161 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this253) - br i1 %161, label %if_then250, label %if_else251 - -if_then250: ; preds = %if_block249 - %162 = load %String*, %String** %_result.addr - %163 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef255, i32 0, i32 0 - %164 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef255, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.74, i32 0, i32 0), i8** %163 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.74, i32 0, i32 3), i8** %164 - %165 = load %StringRef, %StringRef* %tmp.StringRef255 - store %StringRef %165, %StringRef* %"$tmpForRef254" - call void @ctor.471(%String* %162, %StringRef* %"$tmpForRef254") - ret void - -if_else251: ; preds = %if_block249 - br label %if_block257 - -if_end252: ; preds = %if_end260, %dumy_block256 - br label %if_end244 - -dumy_block256: ; No predecessors! - br label %if_end252 - -if_block257: ; preds = %if_else251 - call void @ctor.417(%TokenType* %tmp.this261, i32 33) - %166 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this261) - br i1 %166, label %if_then258, label %if_else259 - -if_then258: ; preds = %if_block257 - %167 = load %String*, %String** %_result.addr - %168 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef263, i32 0, i32 0 - %169 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef263, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.75, i32 0, i32 0), i8** %168 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.75, i32 0, i32 3), i8** %169 - %170 = load %StringRef, %StringRef* %tmp.StringRef263 - store %StringRef %170, %StringRef* %"$tmpForRef262" - call void @ctor.471(%String* %167, %StringRef* %"$tmpForRef262") - ret void - -if_else259: ; preds = %if_block257 - br label %if_block265 - -if_end260: ; preds = %if_end268, %dumy_block264 - br label %if_end252 - -dumy_block264: ; No predecessors! - br label %if_end260 - -if_block265: ; preds = %if_else259 - call void @ctor.417(%TokenType* %tmp.this269, i32 34) - %171 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this269) - br i1 %171, label %if_then266, label %if_else267 - -if_then266: ; preds = %if_block265 - %172 = load %String*, %String** %_result.addr - %173 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef271, i32 0, i32 0 - %174 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef271, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.76, i32 0, i32 0), i8** %173 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.76, i32 0, i32 3), i8** %174 - %175 = load %StringRef, %StringRef* %tmp.StringRef271 - store %StringRef %175, %StringRef* %"$tmpForRef270" - call void @ctor.471(%String* %172, %StringRef* %"$tmpForRef270") - ret void - -if_else267: ; preds = %if_block265 - br label %if_block273 - -if_end268: ; preds = %if_end276, %dumy_block272 - br label %if_end260 - -dumy_block272: ; No predecessors! - br label %if_end268 - -if_block273: ; preds = %if_else267 - call void @ctor.417(%TokenType* %tmp.this277, i32 35) - %176 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this277) - br i1 %176, label %if_then274, label %if_else275 - -if_then274: ; preds = %if_block273 - %177 = load %String*, %String** %_result.addr - %178 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef279, i32 0, i32 0 - %179 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef279, i32 0, i32 1 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.77, i32 0, i32 0), i8** %178 - store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.77, i32 0, i32 3), i8** %179 - %180 = load %StringRef, %StringRef* %tmp.StringRef279 - store %StringRef %180, %StringRef* %"$tmpForRef278" - call void @ctor.471(%String* %177, %StringRef* %"$tmpForRef278") +dumy_block245: ; No predecessors! + br label %if_end242 + +if_block246: ; preds = %if_else241 + call void @ctor.404(%TokenType* %tmp.this250, i32 36) + %217 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this250) + br i1 %217, label %if_then247, label %if_else248 + +if_then247: ; preds = %if_block246 + %218 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef251, i32 0, i32 0 + %219 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef251, i32 0, i32 1 + %220 = bitcast %UntypedPtr* %218 to i8** + %221 = bitcast %UntypedPtr* %219 to i8** + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.79, i32 0, i32 0), i8** %220 + store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.79, i32 0, i32 3), i8** %221 + %222 = load %StringRef, %StringRef* %tmp.StringRef251 + call void @ctor.459(%String* %_result, %StringRef %222) + ret void + +if_else248: ; preds = %if_block246 + br label %if_block253 + +if_end249: ; preds = %if_end256, %dumy_block252 + br label %if_end242 + +dumy_block252: ; No predecessors! + br label %if_end249 + +if_block253: ; preds = %if_else248 + call void @ctor.404(%TokenType* %tmp.this257, i32 37) + %223 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this257) + br i1 %223, label %if_then254, label %if_else255 + +if_then254: ; preds = %if_block253 + %224 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef258, i32 0, i32 0 + %225 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef258, i32 0, i32 1 + %226 = bitcast %UntypedPtr* %224 to i8** + %227 = bitcast %UntypedPtr* %225 to i8** + store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.80, i32 0, i32 0), i8** %226 + store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.80, i32 0, i32 10), i8** %227 + %228 = load %StringRef, %StringRef* %tmp.StringRef258 + call void @ctor.459(%String* %_result, %StringRef %228) + ret void + +if_else255: ; preds = %if_block253 + br label %if_block260 + +if_end256: ; preds = %if_end263, %dumy_block259 + br label %if_end249 + +dumy_block259: ; No predecessors! + br label %if_end256 + +if_block260: ; preds = %if_else255 + call void @ctor.404(%TokenType* %tmp.this264, i32 38) + %229 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this264) + br i1 %229, label %if_then261, label %if_else262 + +if_then261: ; preds = %if_block260 + %230 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef265, i32 0, i32 0 + %231 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef265, i32 0, i32 1 + %232 = bitcast %UntypedPtr* %230 to i8** + %233 = bitcast %UntypedPtr* %231 to i8** + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.81, i32 0, i32 0), i8** %232 + store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.81, i32 0, i32 8), i8** %233 + %234 = load %StringRef, %StringRef* %tmp.StringRef265 + call void @ctor.459(%String* %_result, %StringRef %234) + ret void + +if_else262: ; preds = %if_block260 + br label %if_block267 + +if_end263: ; preds = %if_end270, %dumy_block266 + br label %if_end256 + +dumy_block266: ; No predecessors! + br label %if_end263 + +if_block267: ; preds = %if_else262 + call void @ctor.404(%TokenType* %tmp.this271, i32 39) + %235 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this271) + br i1 %235, label %if_then268, label %if_else269 + +if_then268: ; preds = %if_block267 + %236 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef272, i32 0, i32 0 + %237 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef272, i32 0, i32 1 + %238 = bitcast %UntypedPtr* %236 to i8** + %239 = bitcast %UntypedPtr* %237 to i8** + store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.82, i32 0, i32 0), i8** %238 + store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.82, i32 0, i32 12), i8** %239 + %240 = load %StringRef, %StringRef* %tmp.StringRef272 + call void @ctor.459(%String* %_result, %StringRef %240) + ret void + +if_else269: ; preds = %if_block267 + br label %if_block274 + +if_end270: ; preds = %if_end277, %dumy_block273 + br label %if_end263 + +dumy_block273: ; No predecessors! + br label %if_end270 + +if_block274: ; preds = %if_else269 + call void @ctor.404(%TokenType* %tmp.this278, i32 40) + %241 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this278) + br i1 %241, label %if_then275, label %if_else276 + +if_then275: ; preds = %if_block274 + %242 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef279, i32 0, i32 0 + %243 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef279, i32 0, i32 1 + %244 = bitcast %UntypedPtr* %242 to i8** + %245 = bitcast %UntypedPtr* %243 to i8** + store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.83, i32 0, i32 0), i8** %244 + store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.83, i32 0, i32 14), i8** %245 + %246 = load %StringRef, %StringRef* %tmp.StringRef279 + call void @ctor.459(%String* %_result, %StringRef %246) ret void -if_else275: ; preds = %if_block273 +if_else276: ; preds = %if_block274 br label %if_block281 -if_end276: ; preds = %if_end284, %dumy_block280 - br label %if_end268 +if_end277: ; preds = %if_end284, %dumy_block280 + br label %if_end270 dumy_block280: ; No predecessors! - br label %if_end276 + br label %if_end277 -if_block281: ; preds = %if_else275 - call void @ctor.417(%TokenType* %tmp.this285, i32 36) - %181 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this285) - br i1 %181, label %if_then282, label %if_else283 +if_block281: ; preds = %if_else276 + call void @ctor.404(%TokenType* %tmp.this285, i32 41) + %247 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this285) + br i1 %247, label %if_then282, label %if_else283 if_then282: ; preds = %if_block281 - %182 = load %String*, %String** %_result.addr - %183 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef287, i32 0, i32 0 - %184 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef287, i32 0, i32 1 - store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.78, i32 0, i32 0), i8** %183 - store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.78, i32 0, i32 10), i8** %184 - %185 = load %StringRef, %StringRef* %tmp.StringRef287 - store %StringRef %185, %StringRef* %"$tmpForRef286" - call void @ctor.471(%String* %182, %StringRef* %"$tmpForRef286") + %248 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef286, i32 0, i32 0 + %249 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef286, i32 0, i32 1 + %250 = bitcast %UntypedPtr* %248 to i8** + %251 = bitcast %UntypedPtr* %249 to i8** + store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.84, i32 0, i32 0), i8** %250 + store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.84, i32 0, i32 11), i8** %251 + %252 = load %StringRef, %StringRef* %tmp.StringRef286 + call void @ctor.459(%String* %_result, %StringRef %252) ret void if_else283: ; preds = %if_block281 - br label %if_block289 + br label %if_block288 -if_end284: ; preds = %if_end292, %dumy_block288 - br label %if_end276 +if_end284: ; preds = %if_end291, %dumy_block287 + br label %if_end277 -dumy_block288: ; No predecessors! +dumy_block287: ; No predecessors! br label %if_end284 -if_block289: ; preds = %if_else283 - call void @ctor.417(%TokenType* %tmp.this293, i32 37) - %186 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this293) - br i1 %186, label %if_then290, label %if_else291 +if_block288: ; preds = %if_else283 + call void @ctor.404(%TokenType* %tmp.this292, i32 42) + %253 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this292) + br i1 %253, label %if_then289, label %if_else290 -if_then290: ; preds = %if_block289 - %187 = load %String*, %String** %_result.addr - %188 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef295, i32 0, i32 0 - %189 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef295, i32 0, i32 1 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.79, i32 0, i32 0), i8** %188 - store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.79, i32 0, i32 8), i8** %189 - %190 = load %StringRef, %StringRef* %tmp.StringRef295 - store %StringRef %190, %StringRef* %"$tmpForRef294" - call void @ctor.471(%String* %187, %StringRef* %"$tmpForRef294") +if_then289: ; preds = %if_block288 + %254 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef293, i32 0, i32 0 + %255 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef293, i32 0, i32 1 + %256 = bitcast %UntypedPtr* %254 to i8** + %257 = bitcast %UntypedPtr* %255 to i8** + store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.85, i32 0, i32 0), i8** %256 + store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.85, i32 0, i32 12), i8** %257 + %258 = load %StringRef, %StringRef* %tmp.StringRef293 + call void @ctor.459(%String* %_result, %StringRef %258) ret void -if_else291: ; preds = %if_block289 - br label %if_block297 +if_else290: ; preds = %if_block288 + br label %if_block295 -if_end292: ; preds = %if_end300, %dumy_block296 +if_end291: ; preds = %if_end298, %dumy_block294 br label %if_end284 -dumy_block296: ; No predecessors! - br label %if_end292 +dumy_block294: ; No predecessors! + br label %if_end291 -if_block297: ; preds = %if_else291 - call void @ctor.417(%TokenType* %tmp.this301, i32 38) - %191 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this301) - br i1 %191, label %if_then298, label %if_else299 - -if_then298: ; preds = %if_block297 - %192 = load %String*, %String** %_result.addr - %193 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef303, i32 0, i32 0 - %194 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef303, i32 0, i32 1 - store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.80, i32 0, i32 0), i8** %193 - store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.80, i32 0, i32 12), i8** %194 - %195 = load %StringRef, %StringRef* %tmp.StringRef303 - store %StringRef %195, %StringRef* %"$tmpForRef302" - call void @ctor.471(%String* %192, %StringRef* %"$tmpForRef302") - ret void - -if_else299: ; preds = %if_block297 - br label %if_block305 - -if_end300: ; preds = %if_end308, %dumy_block304 - br label %if_end292 - -dumy_block304: ; No predecessors! - br label %if_end300 - -if_block305: ; preds = %if_else299 - call void @ctor.417(%TokenType* %tmp.this309, i32 39) - %196 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this309) - br i1 %196, label %if_then306, label %if_else307 - -if_then306: ; preds = %if_block305 - %197 = load %String*, %String** %_result.addr - %198 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef311, i32 0, i32 0 - %199 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef311, i32 0, i32 1 - store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.81, i32 0, i32 0), i8** %198 - store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.81, i32 0, i32 14), i8** %199 - %200 = load %StringRef, %StringRef* %tmp.StringRef311 - store %StringRef %200, %StringRef* %"$tmpForRef310" - call void @ctor.471(%String* %197, %StringRef* %"$tmpForRef310") - ret void - -if_else307: ; preds = %if_block305 - br label %if_block313 - -if_end308: ; preds = %if_end316, %dumy_block312 - br label %if_end300 - -dumy_block312: ; No predecessors! - br label %if_end308 - -if_block313: ; preds = %if_else307 - call void @ctor.417(%TokenType* %tmp.this317, i32 40) - %201 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this317) - br i1 %201, label %if_then314, label %if_else315 - -if_then314: ; preds = %if_block313 - %202 = load %String*, %String** %_result.addr - %203 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef319, i32 0, i32 0 - %204 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef319, i32 0, i32 1 - store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.82, i32 0, i32 0), i8** %203 - store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.82, i32 0, i32 11), i8** %204 - %205 = load %StringRef, %StringRef* %tmp.StringRef319 - store %StringRef %205, %StringRef* %"$tmpForRef318" - call void @ctor.471(%String* %202, %StringRef* %"$tmpForRef318") - ret void - -if_else315: ; preds = %if_block313 - br label %if_block321 - -if_end316: ; preds = %if_end324, %dumy_block320 - br label %if_end308 - -dumy_block320: ; No predecessors! - br label %if_end316 - -if_block321: ; preds = %if_else315 - call void @ctor.417(%TokenType* %tmp.this325, i32 41) - %206 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this325) - br i1 %206, label %if_then322, label %if_else323 - -if_then322: ; preds = %if_block321 - %207 = load %String*, %String** %_result.addr - %208 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef327, i32 0, i32 0 - %209 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef327, i32 0, i32 1 - store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.83, i32 0, i32 0), i8** %208 - store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.83, i32 0, i32 12), i8** %209 - %210 = load %StringRef, %StringRef* %tmp.StringRef327 - store %StringRef %210, %StringRef* %"$tmpForRef326" - call void @ctor.471(%String* %207, %StringRef* %"$tmpForRef326") - ret void - -if_else323: ; preds = %if_block321 - br label %if_block329 - -if_end324: ; preds = %if_end332, %dumy_block328 - br label %if_end316 - -dumy_block328: ; No predecessors! - br label %if_end324 - -if_block329: ; preds = %if_else323 - call void @ctor.417(%TokenType* %tmp.this333, i32 42) - %211 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this333) - br i1 %211, label %if_then330, label %if_else331 - -if_then330: ; preds = %if_block329 - %212 = load %String*, %String** %_result.addr - %213 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef335, i32 0, i32 0 - %214 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef335, i32 0, i32 1 - store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.84, i32 0, i32 0), i8** %213 - store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.84, i32 0, i32 12), i8** %214 - %215 = load %StringRef, %StringRef* %tmp.StringRef335 - store %StringRef %215, %StringRef* %"$tmpForRef334" - call void @ctor.471(%String* %212, %StringRef* %"$tmpForRef334") - ret void - -if_else331: ; preds = %if_block329 - br label %if_block337 +if_block295: ; preds = %if_else290 + call void @ctor.404(%TokenType* %tmp.this299, i32 43) + %259 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this299) + br i1 %259, label %if_then296, label %if_else297 -if_end332: ; preds = %if_end340, %dumy_block336 - br label %if_end324 +if_then296: ; preds = %if_block295 + %260 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef300, i32 0, i32 0 + %261 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef300, i32 0, i32 1 + %262 = bitcast %UntypedPtr* %260 to i8** + %263 = bitcast %UntypedPtr* %261 to i8** + store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.86, i32 0, i32 0), i8** %262 + store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.86, i32 0, i32 12), i8** %263 + %264 = load %StringRef, %StringRef* %tmp.StringRef300 + call void @ctor.459(%String* %_result, %StringRef %264) + ret void + +if_else297: ; preds = %if_block295 + br label %if_block302 -dumy_block336: ; No predecessors! - br label %if_end332 +if_end298: ; preds = %if_end305, %dumy_block301 + br label %if_end291 -if_block337: ; preds = %if_else331 - call void @ctor.417(%TokenType* %tmp.this341, i32 43) - %216 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this341) - br i1 %216, label %if_then338, label %if_else339 +dumy_block301: ; No predecessors! + br label %if_end298 -if_then338: ; preds = %if_block337 - %217 = load %String*, %String** %_result.addr - %218 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef343, i32 0, i32 0 - %219 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef343, i32 0, i32 1 - store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.85, i32 0, i32 0), i8** %218 - store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.85, i32 0, i32 13), i8** %219 - %220 = load %StringRef, %StringRef* %tmp.StringRef343 - store %StringRef %220, %StringRef* %"$tmpForRef342" - call void @ctor.471(%String* %217, %StringRef* %"$tmpForRef342") - ret void - -if_else339: ; preds = %if_block337 - br label %if_block345 - -if_end340: ; preds = %if_end348, %dumy_block344 - br label %if_end332 - -dumy_block344: ; No predecessors! - br label %if_end340 +if_block302: ; preds = %if_else297 + call void @ctor.404(%TokenType* %tmp.this306, i32 44) + %265 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this306) + br i1 %265, label %if_then303, label %if_else304 -if_block345: ; preds = %if_else339 - call void @ctor.417(%TokenType* %tmp.this349, i32 44) - %221 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this349) - br i1 %221, label %if_then346, label %if_else347 - -if_then346: ; preds = %if_block345 - %222 = load %String*, %String** %_result.addr - %223 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef351, i32 0, i32 0 - %224 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef351, i32 0, i32 1 - store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.86, i32 0, i32 0), i8** %223 - store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.86, i32 0, i32 13), i8** %224 - %225 = load %StringRef, %StringRef* %tmp.StringRef351 - store %StringRef %225, %StringRef* %"$tmpForRef350" - call void @ctor.471(%String* %222, %StringRef* %"$tmpForRef350") - ret void - -if_else347: ; preds = %if_block345 - br label %if_block353 - -if_end348: ; preds = %if_end356, %dumy_block352 - br label %if_end340 - -dumy_block352: ; No predecessors! - br label %if_end348 +if_then303: ; preds = %if_block302 + %266 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef307, i32 0, i32 0 + %267 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef307, i32 0, i32 1 + %268 = bitcast %UntypedPtr* %266 to i8** + %269 = bitcast %UntypedPtr* %267 to i8** + store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.87, i32 0, i32 0), i8** %268 + store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.87, i32 0, i32 13), i8** %269 + %270 = load %StringRef, %StringRef* %tmp.StringRef307 + call void @ctor.459(%String* %_result, %StringRef %270) + ret void + +if_else304: ; preds = %if_block302 + br label %if_block309 + +if_end305: ; preds = %if_end312, %dumy_block308 + br label %if_end298 + +dumy_block308: ; No predecessors! + br label %if_end305 + +if_block309: ; preds = %if_else304 + call void @ctor.404(%TokenType* %tmp.this313, i32 45) + %271 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this313) + br i1 %271, label %if_then310, label %if_else311 + +if_then310: ; preds = %if_block309 + %272 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef314, i32 0, i32 0 + %273 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef314, i32 0, i32 1 + %274 = bitcast %UntypedPtr* %272 to i8** + %275 = bitcast %UntypedPtr* %273 to i8** + store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.88, i32 0, i32 0), i8** %274 + store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.88, i32 0, i32 13), i8** %275 + %276 = load %StringRef, %StringRef* %tmp.StringRef314 + call void @ctor.459(%String* %_result, %StringRef %276) + ret void + +if_else311: ; preds = %if_block309 + br label %if_block316 + +if_end312: ; preds = %if_end319, %dumy_block315 + br label %if_end305 + +dumy_block315: ; No predecessors! + br label %if_end312 + +if_block316: ; preds = %if_else311 + call void @ctor.404(%TokenType* %tmp.this320, i32 46) + %277 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this320) + br i1 %277, label %if_then317, label %if_else318 + +if_then317: ; preds = %if_block316 + %278 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef321, i32 0, i32 0 + %279 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef321, i32 0, i32 1 + %280 = bitcast %UntypedPtr* %278 to i8** + %281 = bitcast %UntypedPtr* %279 to i8** + store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.89, i32 0, i32 0), i8** %280 + store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.89, i32 0, i32 14), i8** %281 + %282 = load %StringRef, %StringRef* %tmp.StringRef321 + call void @ctor.459(%String* %_result, %StringRef %282) + ret void + +if_else318: ; preds = %if_block316 + br label %if_block323 + +if_end319: ; preds = %if_end326, %dumy_block322 + br label %if_end312 + +dumy_block322: ; No predecessors! + br label %if_end319 + +if_block323: ; preds = %if_else318 + call void @ctor.404(%TokenType* %tmp.this327, i32 253) + %283 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this327) + br i1 %283, label %if_then324, label %if_else325 + +if_then324: ; preds = %if_block323 + %284 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef328, i32 0, i32 0 + %285 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef328, i32 0, i32 1 + %286 = bitcast %UntypedPtr* %284 to i8** + %287 = bitcast %UntypedPtr* %285 to i8** + store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.90, i32 0, i32 0), i8** %286 + store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.90, i32 0, i32 13), i8** %287 + %288 = load %StringRef, %StringRef* %tmp.StringRef328 + call void @ctor.459(%String* %_result, %StringRef %288) + ret void -if_block353: ; preds = %if_else347 - call void @ctor.417(%TokenType* %tmp.this357, i32 45) - %226 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this357) - br i1 %226, label %if_then354, label %if_else355 - -if_then354: ; preds = %if_block353 - %227 = load %String*, %String** %_result.addr - %228 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef359, i32 0, i32 0 - %229 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef359, i32 0, i32 1 - store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.87, i32 0, i32 0), i8** %228 - store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str.87, i32 0, i32 14), i8** %229 - %230 = load %StringRef, %StringRef* %tmp.StringRef359 - store %StringRef %230, %StringRef* %"$tmpForRef358" - call void @ctor.471(%String* %227, %StringRef* %"$tmpForRef358") - ret void - -if_else355: ; preds = %if_block353 - br label %if_block361 - -if_end356: ; preds = %if_end364, %dumy_block360 - br label %if_end348 - -dumy_block360: ; No predecessors! - br label %if_end356 - -if_block361: ; preds = %if_else355 - call void @ctor.417(%TokenType* %tmp.this365, i32 253) - %231 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this365) - br i1 %231, label %if_then362, label %if_else363 - -if_then362: ; preds = %if_block361 - %232 = load %String*, %String** %_result.addr - %233 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef367, i32 0, i32 0 - %234 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef367, i32 0, i32 1 - store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.88, i32 0, i32 0), i8** %233 - store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.88, i32 0, i32 13), i8** %234 - %235 = load %StringRef, %StringRef* %tmp.StringRef367 - store %StringRef %235, %StringRef* %"$tmpForRef366" - call void @ctor.471(%String* %232, %StringRef* %"$tmpForRef366") - ret void - -if_else363: ; preds = %if_block361 - br label %if_block369 - -if_end364: ; preds = %if_end372, %dumy_block368 - br label %if_end356 - -dumy_block368: ; No predecessors! - br label %if_end364 - -if_block369: ; preds = %if_else363 - call void @ctor.417(%TokenType* %tmp.this373, i32 254) - %236 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this373) - br i1 %236, label %if_then370, label %if_else371 - -if_then370: ; preds = %if_block369 - %237 = load %String*, %String** %_result.addr - %238 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef375, i32 0, i32 0 - %239 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef375, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.89, i32 0, i32 0), i8** %238 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.89, i32 0, i32 7), i8** %239 - %240 = load %StringRef, %StringRef* %tmp.StringRef375 - store %StringRef %240, %StringRef* %"$tmpForRef374" - call void @ctor.471(%String* %237, %StringRef* %"$tmpForRef374") +if_else325: ; preds = %if_block323 + br label %if_block330 + +if_end326: ; preds = %if_end333, %dumy_block329 + br label %if_end319 + +dumy_block329: ; No predecessors! + br label %if_end326 + +if_block330: ; preds = %if_else325 + call void @ctor.404(%TokenType* %tmp.this334, i32 254) + %289 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this334) + br i1 %289, label %if_then331, label %if_else332 + +if_then331: ; preds = %if_block330 + %290 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef335, i32 0, i32 0 + %291 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef335, i32 0, i32 1 + %292 = bitcast %UntypedPtr* %290 to i8** + %293 = bitcast %UntypedPtr* %291 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.91, i32 0, i32 0), i8** %292 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.91, i32 0, i32 7), i8** %293 + %294 = load %StringRef, %StringRef* %tmp.StringRef335 + call void @ctor.459(%String* %_result, %StringRef %294) ret void -if_else371: ; preds = %if_block369 - br label %if_block377 +if_else332: ; preds = %if_block330 + br label %if_block337 -if_end372: ; preds = %if_end379, %dumy_block376 - br label %if_end364 +if_end333: ; preds = %if_end339, %dumy_block336 + br label %if_end326 -dumy_block376: ; No predecessors! - br label %if_end372 +dumy_block336: ; No predecessors! + br label %if_end333 -if_block377: ; preds = %if_else371 - call void @ctor.417(%TokenType* %tmp.this380, i32 255) - %241 = call i1 @"==.352"(%TokenType* %t.addr, %TokenType* %tmp.this380) - br i1 %241, label %if_then378, label %if_end379 +if_block337: ; preds = %if_else332 + call void @ctor.404(%TokenType* %tmp.this340, i32 255) + %295 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this340) + br i1 %295, label %if_then338, label %if_end339 -if_then378: ; preds = %if_block377 - %242 = load %String*, %String** %_result.addr - %243 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef382, i32 0, i32 0 - %244 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef382, i32 0, i32 1 - store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.90, i32 0, i32 0), i8** %243 - store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.90, i32 0, i32 10), i8** %244 - %245 = load %StringRef, %StringRef* %tmp.StringRef382 - store %StringRef %245, %StringRef* %"$tmpForRef381" - call void @ctor.471(%String* %242, %StringRef* %"$tmpForRef381") +if_then338: ; preds = %if_block337 + %296 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef341, i32 0, i32 0 + %297 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef341, i32 0, i32 1 + %298 = bitcast %UntypedPtr* %296 to i8** + %299 = bitcast %UntypedPtr* %297 to i8** + store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.92, i32 0, i32 0), i8** %298 + store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.92, i32 0, i32 10), i8** %299 + %300 = load %StringRef, %StringRef* %tmp.StringRef341 + call void @ctor.459(%String* %_result, %StringRef %300) ret void -if_end379: ; preds = %dumy_block383, %if_block377 - br label %if_end372 +if_end339: ; preds = %dumy_block342, %if_block337 + br label %if_end333 -dumy_block383: ; No predecessors! - br label %if_end379 +dumy_block342: ; No predecessors! + br label %if_end339 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkIdentifier(%AstBuilder* %obj, %Location* %loc, %StringRef %id) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkIdentifier(%AstBuilder* %obj, %Location %loc, %StringRef %id) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %id.addr = alloca %StringRef store %StringRef %id, %StringRef* %id.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 17 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %id.addr - %8 = call %Node @"().553"(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 18 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %id.addr + %5 = call %Node @"().543"(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().553"(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %this.addr +define internal %Node @"().543"(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %StringRef store %StringRef %p3, %StringRef* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %StringRef, %StringRef* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %1 to %Node (%UntypedPtr, %Location*, %StringRef)** - %6 = load %Node (%UntypedPtr, %Location*, %StringRef)*, %Node (%UntypedPtr, %Location*, %StringRef)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Location* %3, %StringRef %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %StringRef, %StringRef* %p3.addr + %3 = bitcast %"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %this to %Node (%UntypedPtr, %Location*, %StringRef)** + %4 = load %Node (%UntypedPtr, %Location*, %StringRef)*, %Node (%UntypedPtr, %Location*, %StringRef)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Location* %p2, %StringRef %2) + ret %Node %5 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.554"(%Node* %this, %Node* %other) #3 { - %this.addr = alloca %Node* - store %Node* %this, %Node** %this.addr +define internal void @"=.544"(%Node* %this, %Node* %other) #3 { %other.addr = alloca %Node* store %Node* %other, %Node** %other.addr br label %code code: ; preds = %0 - %1 = load %Node*, %Node** %this.addr - %2 = getelementptr inbounds %Node, %Node* %1, i32 0, i32 0 - %3 = load %Node*, %Node** %other.addr - %4 = getelementptr inbounds %Node, %Node* %3, i32 0, i32 0 - call void @"=.288"(%UntypedPtr* %2, %UntypedPtr* %4) + %1 = getelementptr inbounds %Node, %Node* %this, i32 0, i32 0 + %2 = load %Node*, %Node** %other.addr + %3 = getelementptr inbounds %Node, %Node* %2, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %3) ret void } ; Function Attrs: inlinehint nounwind -define internal %Node @mkStarExpr(%AstBuilder* %obj, %Location* %loc, %Node %base, %StringRef %id) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkStarExpr(%AstBuilder* %obj, %Location %loc, %Node %base, %StringRef %id) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %base.addr = alloca %Node store %Node %base, %Node* %base.addr %id.addr = alloca %StringRef @@ -23675,26 +21218,19 @@ define internal %Node @mkStarExpr(%AstBuilder* %obj, %Location* %loc, %Node %bas br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 19 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %base.addr - %8 = load %StringRef, %StringRef* %id.addr - %9 = call %Node @"().555"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %StringRef %8) - ret %Node %9 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 20 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %base.addr + %5 = load %StringRef, %StringRef* %id.addr + %6 = call %Node @"().545"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %StringRef %5) + ret %Node %6 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().555"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3, %StringRef %p4) #4 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %this.addr +define internal %Node @"().545"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3, %StringRef %p4) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %Node store %Node %p3, %Node* %p3.addr %p4.addr = alloca %StringRef @@ -23702,78 +21238,60 @@ define internal %Node @"().555"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %Node, %Node* %p3.addr - %5 = load %StringRef, %StringRef* %p4.addr - %6 = bitcast %"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %1 to %Node (%UntypedPtr, %Location*, %Node, %StringRef)** - %7 = load %Node (%UntypedPtr, %Location*, %Node, %StringRef)*, %Node (%UntypedPtr, %Location*, %Node, %StringRef)** %6 - %8 = call %Node %7(%UntypedPtr %2, %Location* %3, %Node %4, %StringRef %5) - ret %Node %8 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %Node, %Node* %p3.addr + %3 = load %StringRef, %StringRef* %p4.addr + %4 = bitcast %"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %this to %Node (%UntypedPtr, %Location*, %Node, %StringRef)** + %5 = load %Node (%UntypedPtr, %Location*, %Node, %StringRef)*, %Node (%UntypedPtr, %Location*, %Node, %StringRef)** %4 + %6 = call %Node %5(%UntypedPtr %1, %Location* %p2, %Node %2, %StringRef %3) + ret %Node %6 } ; Function Attrs: inlinehint nounwind -define internal void @span(%Location* sret %_result, %Location* %start, %Location* %end) #4 { - %_result.addr = alloca %Location* - store %Location* %_result, %Location** %_result.addr - %start.addr = alloca %Location* - store %Location* %start, %Location** %start.addr - %end.addr = alloca %Location* - store %Location* %end, %Location** %end.addr +define internal %Location @span(%Location %start, %Location %end) #4 { + %start.addr = alloca %Location + store %Location %start, %Location* %start.addr + %end.addr = alloca %Location + store %Location %end, %Location* %end.addr %res = alloca %Location br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %start.addr - call void @ctor.182(%Location* %res, %Location* %1) - %2 = load %Location*, %Location** %end.addr - call void @copyEnd(%Location* %res, %Location* %2) - %3 = load %Location*, %Location** %_result.addr - call void @ctor.182(%Location* %3, %Location* %res) - ret void + call void @ctor.169(%Location* %res, %Location* %start.addr) + %1 = load %Location, %Location* %end.addr + call void @copyEnd(%Location* %res, %Location %1) + %2 = load %Location, %Location* %res + ret %Location %2 } ; Function Attrs: inlinehint nounwind -define internal void @copyEnd(%Location* %l, %Location* %other) #4 { - %l.addr = alloca %Location* - store %Location* %l, %Location** %l.addr - %other.addr = alloca %Location* - store %Location* %other, %Location** %other.addr +define internal void @copyEnd(%Location* %l, %Location %other) #4 { + %other.addr = alloca %Location + store %Location %other, %Location* %other.addr br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %l.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 2 - %3 = load %Location*, %Location** %other.addr - %4 = getelementptr inbounds %Location, %Location* %3, i32 0, i32 2 - call void @"=.285"(%LineCol* %2, %LineCol* %4) + %1 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + %2 = getelementptr inbounds %Location, %Location* %other.addr, i32 0, i32 2 + call void @"=.274"(%LineCol* %1, %LineCol* %2) ret void } ; Function Attrs: inlinehint nounwind -define internal void @lastLoc(%Location* sret %_result, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %_result.addr = alloca %Location* - store %Location* %_result, %Location** %_result.addr - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %_result.addr - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 0, i32 1 - %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 - call void @ctor.182(%Location* %1, %Location* %4) - ret void + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %Token, %Token* %1, i32 0, i32 0 + %3 = load %Location, %Location* %2 + ret %Location %3 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkCompoundExpr(%AstBuilder* %obj, %Location* %loc, %Node %base, %StringRef %id) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkCompoundExpr(%AstBuilder* %obj, %Location %loc, %Node %base, %StringRef %id) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %base.addr = alloca %Node store %Node %base, %Node* %base.addr %id.addr = alloca %StringRef @@ -23781,39 +21299,29 @@ define internal %Node @mkCompoundExpr(%AstBuilder* %obj, %Location* %loc, %Node br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 18 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %base.addr - %8 = load %StringRef, %StringRef* %id.addr - %9 = call %Node @"().555"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %StringRef %8) - ret %Node %9 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 19 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %base.addr + %5 = load %StringRef, %StringRef* %id.addr + %6 = call %Node @"().545"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %StringRef %5) + ret %Node %6 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.556(%Node* %this) #3 { - %this.addr = alloca %Node* - store %Node* %this, %Node** %this.addr +define internal void @ctor.546(%Node* %this) #3 { br label %code code: ; preds = %0 - %1 = load %Node*, %Node** %this.addr - %2 = getelementptr inbounds %Node, %Node* %1, i32 0, i32 0 - call void @ctor.135(%UntypedPtr* %2) + %1 = getelementptr inbounds %Node, %Node* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: inlinehint nounwind define internal void @parseStmts(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %topLevel, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %topLevel.addr = alloca i1 store i1 %topLevel, i1* %topLevel.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %child = alloca %Node %"$tmpForRef" = alloca %Node %"$tmpForRef1" = alloca %Node @@ -23826,11 +21334,10 @@ while_block: ; preds = %while_step, %code br i1 true, label %while_body, label %while_end while_body: ; preds = %while_block - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = load i1, i1* %topLevel.addr - %3 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i1 %2) - store %Node %3, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %child, %Node* %"$tmpForRef") + %1 = load i1, i1* %topLevel.addr + %2 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %1) + store %Node %2, %Node* %"$tmpForRef" + call void @ctor.535(%Node* %child, %Node* %"$tmpForRef") br label %if_block while_step: ; preds = %dumy_block2, %if_then @@ -23840,20 +21347,17 @@ while_end: ; preds = %if_end, %while_bloc ret void if_block: ; preds = %while_body - %4 = load %Node, %Node* %child - %5 = call i1 @isSet.595(%Node %4) - br i1 %5, label %if_then, label %if_end + %3 = load %Node, %Node* %child + %4 = call i1 @isSet.587(%Node %3) + br i1 %4, label %if_then, label %if_end if_then: ; preds = %if_block - %6 = load %Node*, %Node** %res.addr - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 3 - %9 = load %Node*, %Node** %res.addr - %10 = load %Node, %Node* %9 - %11 = load %Node, %Node* %child - %12 = call %Node @addToNodeList(%AstBuilder* %8, %Node %10, %Node %11) - store %Node %12, %Node* %"$tmpForRef1" - call void @"=.554"(%Node* %6, %Node* %"$tmpForRef1") + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %6 = load %Node, %Node* %res + %7 = load %Node, %Node* %child + %8 = call %Node @addToNodeList(%AstBuilder* %5, %Node %6, %Node %7) + store %Node %8, %Node* %"$tmpForRef1" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef1") br label %while_step if_end: ; preds = %dumy_block, %if_block @@ -23868,271 +21372,254 @@ dumy_block2: ; No predecessors! ; Function Attrs: noinline nounwind define %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %topLevel) #5 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %topLevel.addr = alloca i1 store i1 %topLevel, i1* %topLevel.addr %res = alloca %Node %loc = alloca %Location + %"$tmpForRef" = alloca %Location %mods = alloca %Node - %"$tmpForRef" = alloca %Node + %"$tmpForRef1" = alloca %Node %found = alloca i1 - %"$tmpForRef56" = alloca %Node - %"$tmpC" = alloca %Location - %"$tmpC57" = alloca %Location - %"$tmpC58" = alloca %String + %"$tmpForRef57" = alloca %Node + %"$tmpC" = alloca %String + %"$tmpForRef58" = alloca %StringRef %tmp.StringRef = alloca %StringRef %"$tmpC59" = alloca %Token - %tmp.StringRef60 = alloca %StringRef + %"$tmpForRef60" = alloca %StringRef + %tmp.StringRef61 = alloca %StringRef br label %code code: ; preds = %0 - call void @ctor.556(%Node* %res) - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @consumeSemis(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2) - %3 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %4 = call %Node @parseModifiers(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %3) - store %Node %4, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %mods, %Node* %"$tmpForRef") - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = call i1 @parseImportLineOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, %Node* %res) - br i1 %6, label %cond.true37, label %cond.false38 + call void @ctor.546(%Node* %res) + call void @consumeSemis(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") + %2 = call %Node @parseModifiers(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %2, %Node* %"$tmpForRef1" + call void @ctor.535(%Node* %mods, %Node* %"$tmpForRef1") + %3 = call i1 @parseImportLineOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) + br i1 %3, label %cond.true38, label %cond.false39 -cond.true: ; preds = %cond.end3 +cond.true: ; preds = %cond.end4 br label %cond.end -cond.false: ; preds = %cond.end3 - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = call i1 @parseReturnStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %Node* %res) +cond.false: ; preds = %cond.end4 + %4 = call i1 @parseReturnStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res52 = phi i1 [ true, %cond.true ], [ %8, %cond.false ] - store i1 %cond.res52, i1* %found + %cond.res53 = phi i1 [ true, %cond.true ], [ %4, %cond.false ] + store i1 %cond.res53, i1* %found br label %if_block -cond.true1: ; preds = %cond.end6 - br label %cond.end3 +cond.true2: ; preds = %cond.end7 + br label %cond.end4 -cond.false2: ; preds = %cond.end6 - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %10 = call i1 @parseContinueStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, %Node* %res) - br label %cond.end3 +cond.false3: ; preds = %cond.end7 + %5 = call i1 @parseContinueStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) + br label %cond.end4 -cond.end3: ; preds = %cond.false2, %cond.true1 - %cond.res51 = phi i1 [ true, %cond.true1 ], [ %10, %cond.false2 ] - br i1 %cond.res51, label %cond.true, label %cond.false +cond.end4: ; preds = %cond.false3, %cond.true2 + %cond.res52 = phi i1 [ true, %cond.true2 ], [ %5, %cond.false3 ] + br i1 %cond.res52, label %cond.true, label %cond.false -cond.true4: ; preds = %cond.end9 - br label %cond.end6 +cond.true5: ; preds = %cond.end10 + br label %cond.end7 -cond.false5: ; preds = %cond.end9 - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %12 = call i1 @parseBreakStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, %Node* %res) - br label %cond.end6 +cond.false6: ; preds = %cond.end10 + %6 = call i1 @parseBreakStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) + br label %cond.end7 -cond.end6: ; preds = %cond.false5, %cond.true4 - %cond.res50 = phi i1 [ true, %cond.true4 ], [ %12, %cond.false5 ] - br i1 %cond.res50, label %cond.true1, label %cond.false2 +cond.end7: ; preds = %cond.false6, %cond.true5 + %cond.res51 = phi i1 [ true, %cond.true5 ], [ %6, %cond.false6 ] + br i1 %cond.res51, label %cond.true2, label %cond.false3 -cond.true7: ; preds = %cond.end12 - br label %cond.end9 +cond.true8: ; preds = %cond.end13 + br label %cond.end10 -cond.false8: ; preds = %cond.end12 - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = load i1, i1* %topLevel.addr - %15 = call i1 @parseWhileStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, %Node* %res, i1 %14) - br label %cond.end9 +cond.false9: ; preds = %cond.end13 + %7 = load i1, i1* %topLevel.addr + %8 = call i1 @parseWhileStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 %7) + br label %cond.end10 -cond.end9: ; preds = %cond.false8, %cond.true7 - %cond.res49 = phi i1 [ true, %cond.true7 ], [ %15, %cond.false8 ] - br i1 %cond.res49, label %cond.true4, label %cond.false5 +cond.end10: ; preds = %cond.false9, %cond.true8 + %cond.res50 = phi i1 [ true, %cond.true8 ], [ %8, %cond.false9 ] + br i1 %cond.res50, label %cond.true5, label %cond.false6 -cond.true10: ; preds = %cond.end15 - br label %cond.end12 +cond.true11: ; preds = %cond.end16 + br label %cond.end13 -cond.false11: ; preds = %cond.end15 - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %17 = load i1, i1* %topLevel.addr - %18 = call i1 @parseForStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, %Node* %res, i1 %17) - br label %cond.end12 +cond.false12: ; preds = %cond.end16 + %9 = load i1, i1* %topLevel.addr + %10 = call i1 @parseForStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 %9) + br label %cond.end13 -cond.end12: ; preds = %cond.false11, %cond.true10 - %cond.res48 = phi i1 [ true, %cond.true10 ], [ %18, %cond.false11 ] - br i1 %cond.res48, label %cond.true7, label %cond.false8 +cond.end13: ; preds = %cond.false12, %cond.true11 + %cond.res49 = phi i1 [ true, %cond.true11 ], [ %10, %cond.false12 ] + br i1 %cond.res49, label %cond.true8, label %cond.false9 -cond.true13: ; preds = %cond.end18 - br label %cond.end15 +cond.true14: ; preds = %cond.end19 + br label %cond.end16 -cond.false14: ; preds = %cond.end18 - %19 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %20 = load i1, i1* %topLevel.addr - %21 = call i1 @parseIfStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %19, %Node* %res, i1 %20) - br label %cond.end15 +cond.false15: ; preds = %cond.end19 + %11 = load i1, i1* %topLevel.addr + %12 = call i1 @parseIfStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 %11) + br label %cond.end16 -cond.end15: ; preds = %cond.false14, %cond.true13 - %cond.res47 = phi i1 [ true, %cond.true13 ], [ %21, %cond.false14 ] - br i1 %cond.res47, label %cond.true10, label %cond.false11 +cond.end16: ; preds = %cond.false15, %cond.true14 + %cond.res48 = phi i1 [ true, %cond.true14 ], [ %12, %cond.false15 ] + br i1 %cond.res48, label %cond.true11, label %cond.false12 -cond.true16: ; preds = %cond.end21 - br label %cond.end18 +cond.true17: ; preds = %cond.end22 + br label %cond.end19 -cond.false17: ; preds = %cond.end21 - %22 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %23 = load i1, i1* %topLevel.addr - %24 = call i1 @parseBlockStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %22, %Node* %res, i1 %23) - br label %cond.end18 +cond.false18: ; preds = %cond.end22 + %13 = load i1, i1* %topLevel.addr + %14 = call i1 @parseBlockStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 %13) + br label %cond.end19 -cond.end18: ; preds = %cond.false17, %cond.true16 - %cond.res46 = phi i1 [ true, %cond.true16 ], [ %24, %cond.false17 ] - br i1 %cond.res46, label %cond.true13, label %cond.false14 +cond.end19: ; preds = %cond.false18, %cond.true17 + %cond.res47 = phi i1 [ true, %cond.true17 ], [ %14, %cond.false18 ] + br i1 %cond.res47, label %cond.true14, label %cond.false15 -cond.true19: ; preds = %cond.end24 - br label %cond.end21 +cond.true20: ; preds = %cond.end25 + br label %cond.end22 -cond.false20: ; preds = %cond.end24 - %25 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %26 = call i1 @parseExprStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %25, %Node* %res) - br label %cond.end21 +cond.false21: ; preds = %cond.end25 + %15 = call i1 @parseExprStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) + br label %cond.end22 -cond.end21: ; preds = %cond.false20, %cond.true19 - %cond.res45 = phi i1 [ true, %cond.true19 ], [ %26, %cond.false20 ] - br i1 %cond.res45, label %cond.true16, label %cond.false17 +cond.end22: ; preds = %cond.false21, %cond.true20 + %cond.res46 = phi i1 [ true, %cond.true20 ], [ %15, %cond.false21 ] + br i1 %cond.res46, label %cond.true17, label %cond.false18 -cond.true22: ; preds = %cond.end27 - br label %cond.end24 +cond.true23: ; preds = %cond.end28 + br label %cond.end25 -cond.false23: ; preds = %cond.end27 - %27 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %28 = call i1 @parseFunDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %27, %Node* %res) - br label %cond.end24 +cond.false24: ; preds = %cond.end28 + %16 = call i1 @parseFunDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) + br label %cond.end25 -cond.end24: ; preds = %cond.false23, %cond.true22 - %cond.res44 = phi i1 [ true, %cond.true22 ], [ %28, %cond.false23 ] - br i1 %cond.res44, label %cond.true19, label %cond.false20 +cond.end25: ; preds = %cond.false24, %cond.true23 + %cond.res45 = phi i1 [ true, %cond.true23 ], [ %16, %cond.false24 ] + br i1 %cond.res45, label %cond.true20, label %cond.false21 -cond.true25: ; preds = %cond.end30 - br label %cond.end27 +cond.true26: ; preds = %cond.end31 + br label %cond.end28 -cond.false26: ; preds = %cond.end30 - %29 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %30 = call i1 @parseVarDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %29, %Node* %res) - br label %cond.end27 +cond.false27: ; preds = %cond.end31 + %17 = call i1 @parseVarLikeDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) + br label %cond.end28 -cond.end27: ; preds = %cond.false26, %cond.true25 - %cond.res43 = phi i1 [ true, %cond.true25 ], [ %30, %cond.false26 ] - br i1 %cond.res43, label %cond.true22, label %cond.false23 +cond.end28: ; preds = %cond.false27, %cond.true26 + %cond.res44 = phi i1 [ true, %cond.true26 ], [ %17, %cond.false27 ] + br i1 %cond.res44, label %cond.true23, label %cond.false24 -cond.true28: ; preds = %cond.end33 - br label %cond.end30 +cond.true29: ; preds = %cond.end34 + br label %cond.end31 -cond.false29: ; preds = %cond.end33 - %31 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %32 = call i1 @parseConceptDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %31, %Node* %res) - br label %cond.end30 +cond.false30: ; preds = %cond.end34 + %18 = call i1 @parseConceptDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) + br label %cond.end31 -cond.end30: ; preds = %cond.false29, %cond.true28 - %cond.res42 = phi i1 [ true, %cond.true28 ], [ %32, %cond.false29 ] - br i1 %cond.res42, label %cond.true25, label %cond.false26 +cond.end31: ; preds = %cond.false30, %cond.true29 + %cond.res43 = phi i1 [ true, %cond.true29 ], [ %18, %cond.false30 ] + br i1 %cond.res43, label %cond.true26, label %cond.false27 -cond.true31: ; preds = %cond.end36 - br label %cond.end33 +cond.true32: ; preds = %cond.end37 + br label %cond.end34 -cond.false32: ; preds = %cond.end36 - %33 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %34 = call i1 @parseDatatypeDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %33, %Node* %res) - br label %cond.end33 +cond.false33: ; preds = %cond.end37 + %19 = call i1 @parseDatatypeDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) + br label %cond.end34 -cond.end33: ; preds = %cond.false32, %cond.true31 - %cond.res41 = phi i1 [ true, %cond.true31 ], [ %34, %cond.false32 ] - br i1 %cond.res41, label %cond.true28, label %cond.false29 +cond.end34: ; preds = %cond.false33, %cond.true32 + %cond.res42 = phi i1 [ true, %cond.true32 ], [ %19, %cond.false33 ] + br i1 %cond.res42, label %cond.true29, label %cond.false30 -cond.true34: ; preds = %cond.end39 - br label %cond.end36 +cond.true35: ; preds = %cond.end40 + br label %cond.end37 -cond.false35: ; preds = %cond.end39 - %35 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %36 = call i1 @parsePackageDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %35, %Node* %res) - br label %cond.end36 +cond.false36: ; preds = %cond.end40 + %20 = call i1 @parsePackageDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) + br label %cond.end37 -cond.end36: ; preds = %cond.false35, %cond.true34 - %cond.res40 = phi i1 [ true, %cond.true34 ], [ %36, %cond.false35 ] - br i1 %cond.res40, label %cond.true31, label %cond.false32 +cond.end37: ; preds = %cond.false36, %cond.true35 + %cond.res41 = phi i1 [ true, %cond.true35 ], [ %20, %cond.false36 ] + br i1 %cond.res41, label %cond.true32, label %cond.false33 -cond.true37: ; preds = %code - br label %cond.end39 +cond.true38: ; preds = %code + br label %cond.end40 -cond.false38: ; preds = %code - %37 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %38 = call i1 @parseUsingDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %37, %Node* %res) - br label %cond.end39 +cond.false39: ; preds = %code + %21 = call i1 @parseUsingDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) + br label %cond.end40 -cond.end39: ; preds = %cond.false38, %cond.true37 - %cond.res = phi i1 [ true, %cond.true37 ], [ %38, %cond.false38 ] - br i1 %cond.res, label %cond.true34, label %cond.false35 +cond.end40: ; preds = %cond.false39, %cond.true38 + %cond.res = phi i1 [ true, %cond.true38 ], [ %21, %cond.false39 ] + br i1 %cond.res, label %cond.true35, label %cond.false36 if_block: ; preds = %cond.end - %39 = load %Node, %Node* %mods - %40 = call i1 @isSet.595(%Node %39) - br i1 %40, label %if_then, label %if_end + %22 = load %Node, %Node* %mods + %23 = call i1 @isSet.587(%Node %22) + br i1 %23, label %if_then, label %if_end if_then: ; preds = %if_block - br label %if_block53 + br label %if_block54 -if_end: ; preds = %if_end55, %if_block - %41 = load %Node, %Node* %res - ret %Node %41 - -if_block53: ; preds = %if_then - %42 = load i1, i1* %found - br i1 %42, label %if_then54, label %if_else - -if_then54: ; preds = %if_block53 - %43 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %44 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %43, i32 0, i32 3 - %45 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC57", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %45) - call void @span(%Location* %"$tmpC", %Location* %loc, %Location* %"$tmpC57") - %46 = load %Node, %Node* %res - %47 = load %Node, %Node* %mods - %48 = call %Node @mkModifiers(%AstBuilder* %44, %Location* %"$tmpC", %Node %46, %Node %47) - store %Node %48, %Node* %"$tmpForRef56" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef56") - br label %if_end55 +if_end: ; preds = %if_end56, %if_block + %24 = load %Node, %Node* %res + ret %Node %24 -if_else: ; preds = %if_block53 - %49 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %50 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %51 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.107, i32 0, i32 0), i8** %50 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.107, i32 0, i32 25), i8** %51 - %52 = load %StringRef, %StringRef* %tmp.StringRef - %53 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %54 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %53, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC59", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %54) - %55 = getelementptr inbounds %Token, %Token* %"$tmpC59", i32 0, i32 1 - %56 = load %TokenType, %TokenType* %55 - %57 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef60, i32 0, i32 0 - %58 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef60, i32 0, i32 1 - store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.108, i32 0, i32 0), i8** %57 - store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.108, i32 0, i32 21), i8** %58 - %59 = load %StringRef, %StringRef* %tmp.StringRef60 - call void @toString.597(%String* %"$tmpC58", %StringRef %52, %TokenType %56, %StringRef %59) - call void @reportError.548(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %49, %String* %"$tmpC58") - call void @dtor.261(%String* %"$tmpC58") - call void @dtor.260(%Token* %"$tmpC59") - br label %if_end55 +if_block54: ; preds = %if_then + %25 = load i1, i1* %found + br i1 %25, label %if_then55, label %if_else -if_end55: ; preds = %if_else, %if_then54 +if_then55: ; preds = %if_block54 + %26 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %27 = load %Location, %Location* %loc + %28 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %29 = call %Location @span(%Location %27, %Location %28) + %30 = load %Node, %Node* %res + %31 = load %Node, %Node* %mods + %32 = call %Node @mkModifiers(%AstBuilder* %26, %Location %29, %Node %30, %Node %31) + store %Node %32, %Node* %"$tmpForRef57" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef57") + br label %if_end56 + +if_else: ; preds = %if_block54 + %33 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %34 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %35 = bitcast %UntypedPtr* %33 to i8** + %36 = bitcast %UntypedPtr* %34 to i8** + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.109, i32 0, i32 0), i8** %35 + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.109, i32 0, i32 25), i8** %36 + %37 = load %StringRef, %StringRef* %tmp.StringRef + store %StringRef %37, %StringRef* %"$tmpForRef58" + %38 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC59", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %38) + %39 = getelementptr inbounds %Token, %Token* %"$tmpC59", i32 0, i32 1 + %40 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef61, i32 0, i32 0 + %41 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef61, i32 0, i32 1 + %42 = bitcast %UntypedPtr* %40 to i8** + %43 = bitcast %UntypedPtr* %41 to i8** + store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.110, i32 0, i32 0), i8** %42 + store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.110, i32 0, i32 21), i8** %43 + %44 = load %StringRef, %StringRef* %tmp.StringRef61 + store %StringRef %44, %StringRef* %"$tmpForRef60" + call void @toString.589(%String* %"$tmpC", %StringRef* %"$tmpForRef58", %TokenType* %39, %StringRef* %"$tmpForRef60") + call void @reportError.538(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC59") + br label %if_end56 + +if_end56: ; preds = %if_else, %if_then55 br label %if_end } ; Function Attrs: inlinehint nounwind define internal void @consumeSemis(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %tmp.this = alloca %TokenType br label %code @@ -24140,11 +21627,9 @@ code: ; preds = %0 br label %while_block while_block: ; preds = %while_step, %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 31) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %while_body, label %while_end + call void @ctor.404(%TokenType* %tmp.this, i32 32) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %while_body, label %while_end while_body: ; preds = %while_block br label %while_step @@ -24158,8 +21643,6 @@ while_end: ; preds = %while_block ; Function Attrs: inlinehint nounwind define internal %Node @parseModifiers(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %res = alloca %Node %tmp.this = alloca %TokenType %e = alloca %Node @@ -24172,299 +21655,255 @@ define internal %Node @parseModifiers(%"SparrowParser[SparrowLayoutDecoder[Sparr br label %code code: ; preds = %0 - call void @ctor.556(%Node* %res) + call void @ctor.546(%Node* %res) br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 26) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 27) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - call void @ctor.556(%Node* %e) - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i1 true) - store %Node %5, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %e, %Node* %"$tmpForRef") - %6 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %7 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %6, i32 0, i32 3 - %8 = load %Node, %Node* %res - %9 = load %Node, %Node* %e - %10 = call %Node @addToNodeList(%AstBuilder* %7, %Node %8, %Node %9) - store %Node %10, %Node* %"$tmpForRef1" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef1") + call void @ctor.546(%Node* %e) + %2 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %2, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %e, %Node* %"$tmpForRef") + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %4 = load %Node, %Node* %res + %5 = load %Node, %Node* %e + %6 = call %Node @addToNodeList(%AstBuilder* %3, %Node %4, %Node %5) + store %Node %6, %Node* %"$tmpForRef1" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef1") br label %while_block if_end: ; preds = %while_end, %if_block - %11 = load %Node, %Node* %res - ret %Node %11 + %7 = load %Node, %Node* %res + ret %Node %7 while_block: ; preds = %while_step, %if_then - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this2, i32 32) - %13 = load %TokenType, %TokenType* %tmp.this2 - %14 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, %TokenType %13) - br i1 %14, label %while_body, label %while_end + call void @ctor.404(%TokenType* %tmp.this2, i32 33) + %8 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this2) + br i1 %8, label %while_body, label %while_end while_body: ; preds = %while_block - %15 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %16 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %15, i1 true) - store %Node %16, %Node* %"$tmpForRef3" - call void @"=.554"(%Node* %e, %Node* %"$tmpForRef3") - %17 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %18 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %17, i32 0, i32 3 - %19 = load %Node, %Node* %res - %20 = load %Node, %Node* %e - %21 = call %Node @addToNodeList(%AstBuilder* %18, %Node %19, %Node %20) - store %Node %21, %Node* %"$tmpForRef4" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef4") + %9 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %9, %Node* %"$tmpForRef3" + call void @"=.544"(%Node* %e, %Node* %"$tmpForRef3") + %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %11 = load %Node, %Node* %res + %12 = load %Node, %Node* %e + %13 = call %Node @addToNodeList(%AstBuilder* %10, %Node %11, %Node %12) + store %Node %13, %Node* %"$tmpForRef4" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef4") br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - %22 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 27) - %23 = load %TokenType, %TokenType* %tmp.this5 - %24 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %22, %TokenType %23) - %25 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @consumeSemis(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %25) + call void @ctor.404(%TokenType* %tmp.this5, i32 28) + %14 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + call void @consumeSemis(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) br label %if_end } ; Function Attrs: inlinehint nounwind define internal %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %withEqual) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %withEqual.addr = alloca i1 store i1 %withEqual, i1* %withEqual.addr %loc = alloca %Location + %"$tmpForRef" = alloca %Location %baseExpr = alloca %Node - %"$tmpForRef" = alloca %Node + %"$tmpForRef1" = alloca %Node %op = alloca %String %"$tmpC" = alloca %String %rhs = alloca %Node - %"$tmpForRef4" = alloca %Node %"$tmpForRef5" = alloca %Node - %"$tmpC6" = alloca %Location - %"$tmpC7" = alloca %Location - %"$tmpForRef8" = alloca %Node - %"$tmpC9" = alloca %Location - %"$tmpC10" = alloca %Location + %"$tmpForRef6" = alloca %Node + %"$tmpForRef7" = alloca %Node br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %3 = load i1, i1* %withEqual.addr - %4 = call %Node @parsePrefixExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, i1 %3) - store %Node %4, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %baseExpr, %Node* %"$tmpForRef") - call void @ctor.137(%String* %op) + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") + %2 = load i1, i1* %withEqual.addr + %3 = call %Node @parsePrefixExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %2) + store %Node %3, %Node* %"$tmpForRef1" + call void @ctor.535(%Node* %baseExpr, %Node* %"$tmpForRef1") + call void @ctor.124(%String* %op) br label %while_block while_block: ; preds = %while_step, %code br i1 true, label %while_body, label %while_end while_body: ; preds = %while_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = load i1, i1* %withEqual.addr - call void @parseIdOrOperOpt(%String* %"$tmpC", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i1 %6) - %7 = call %String* @"=.290"(%String* %op, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") + %4 = load i1, i1* %withEqual.addr + call void @parseIdOrOperOpt(%String* %"$tmpC", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %4) + %5 = call %String* @"=.278"(%String* %op, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") br label %if_block -while_step: ; preds = %if_end3 +while_step: ; preds = %if_end4 br label %while_block while_end: ; preds = %if_else, %if_then, %while_block - %8 = load %Node, %Node* %baseExpr - call void @dtor.261(%String* %op) - ret %Node %8 + %6 = load %Node, %Node* %baseExpr + call void @dtor.250(%String* %op) + ret %Node %6 if_block: ; preds = %while_body - %9 = call i1 @isEmpty.397(%String* %op) - br i1 %9, label %if_then, label %if_end + %7 = call i1 @isEmpty.384(%String* %op) + br i1 %7, label %if_then, label %if_end if_then: ; preds = %if_block br label %while_end if_end: ; preds = %dumy_block, %if_block - br label %if_block1 + br label %if_block2 dumy_block: ; No predecessors! br label %if_end -if_block1: ; preds = %if_end - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = load i1, i1* %withEqual.addr - %12 = call i1 @nextIsExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i1 %11) - br i1 %12, label %if_then2, label %if_else +if_block2: ; preds = %if_end + %8 = load i1, i1* %withEqual.addr + %9 = call i1 @nextIsExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %8) + br i1 %9, label %if_then3, label %if_else -if_then2: ; preds = %if_block1 - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = load i1, i1* %withEqual.addr - %15 = call %Node @parsePrefixExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, i1 %14) - store %Node %15, %Node* %"$tmpForRef4" - call void @ctor.545(%Node* %rhs, %Node* %"$tmpForRef4") - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %17 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, i32 0, i32 3 - %18 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC7", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %18) - call void @span(%Location* %"$tmpC6", %Location* %loc, %Location* %"$tmpC7") - %19 = load %Node, %Node* %baseExpr - %20 = call %StringRef @asStringRef(%String* %op) - %21 = load %Node, %Node* %rhs - %22 = call %Node @mkInfixOp(%AstBuilder* %17, %Location* %"$tmpC6", %Node %19, %StringRef %20, %Node %21) - store %Node %22, %Node* %"$tmpForRef5" - call void @"=.554"(%Node* %baseExpr, %Node* %"$tmpForRef5") - br label %if_end3 +if_then3: ; preds = %if_block2 + %10 = load i1, i1* %withEqual.addr + %11 = call %Node @parsePrefixExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %10) + store %Node %11, %Node* %"$tmpForRef5" + call void @ctor.535(%Node* %rhs, %Node* %"$tmpForRef5") + %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %13 = load %Location, %Location* %loc + %14 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %15 = call %Location @span(%Location %13, %Location %14) + %16 = load %Node, %Node* %baseExpr + %17 = call %StringRef @asStringRef(%String* %op) + %18 = load %Node, %Node* %rhs + %19 = call %Node @mkInfixOp(%AstBuilder* %12, %Location %15, %Node %16, %StringRef %17, %Node %18) + store %Node %19, %Node* %"$tmpForRef6" + call void @"=.544"(%Node* %baseExpr, %Node* %"$tmpForRef6") + br label %if_end4 -if_else: ; preds = %if_block1 - %23 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %24 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23, i32 0, i32 3 - %25 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC10", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %25) - call void @span(%Location* %"$tmpC9", %Location* %loc, %Location* %"$tmpC10") - %26 = load %Node, %Node* %baseExpr - %27 = call %StringRef @asStringRef(%String* %op) - %28 = call %Node @mkPostfixOp(%AstBuilder* %24, %Location* %"$tmpC9", %Node %26, %StringRef %27) - store %Node %28, %Node* %"$tmpForRef8" - call void @"=.554"(%Node* %baseExpr, %Node* %"$tmpForRef8") +if_else: ; preds = %if_block2 + %20 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %21 = load %Location, %Location* %loc + %22 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %23 = call %Location @span(%Location %21, %Location %22) + %24 = load %Node, %Node* %baseExpr + %25 = call %StringRef @asStringRef(%String* %op) + %26 = call %Node @mkPostfixOp(%AstBuilder* %20, %Location %23, %Node %24, %StringRef %25) + store %Node %26, %Node* %"$tmpForRef7" + call void @"=.544"(%Node* %baseExpr, %Node* %"$tmpForRef7") br label %while_end -if_end3: ; preds = %dumy_block11, %if_then2 +if_end4: ; preds = %dumy_block8, %if_then3 br label %while_step -dumy_block11: ; No predecessors! - br label %if_end3 +dumy_block8: ; No predecessors! + br label %if_end4 -dumy_block12: ; No predecessors! - call void @dtor.261(%String* %op) +dumy_block9: ; No predecessors! + call void @dtor.250(%String* %op) unreachable } ; Function Attrs: inlinehint nounwind define internal %Node @parsePrefixExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %withEqual) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %withEqual.addr = alloca i1 store i1 %withEqual, i1* %withEqual.addr %loc = alloca %Location + %"$tmpForRef" = alloca %Location %op = alloca %String %tmp.this = alloca %TokenType %"$tmpC" = alloca %String %tmp.this1 = alloca %TokenType %"$tmpC2" = alloca %String %baseExpr = alloca %Node - %"$tmpForRef" = alloca %Node - %"$tmpC7" = alloca %Location - %"$tmpC8" = alloca %Location + %"$tmpForRef7" = alloca %Node br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - call void @ctor.137(%String* %op) + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") + call void @ctor.124(%String* %op) br label %if_block if_block: ; preds = %code - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 34) - %3 = load %TokenType, %TokenType* %tmp.this - %4 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, %TokenType %3) - br i1 %4, label %if_then, label %if_else + call void @ctor.404(%TokenType* %tmp.this, i32 35) + %2 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %2, label %if_then, label %if_else if_then: ; preds = %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseId(%String* %"$tmpC", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5) - %6 = call %String* @"=.290"(%String* %op, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 34) - %8 = load %TokenType, %TokenType* %tmp.this1 - %9 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %TokenType %8) + call void @parseId(%String* %"$tmpC", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %3 = call %String* @"=.278"(%String* %op, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") + call void @ctor.404(%TokenType* %tmp.this1, i32 35) + %4 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) br label %if_end if_else: ; preds = %if_block - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseOperOpt(%String* %"$tmpC2", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i1 true) - %11 = call %String* @"=.290"(%String* %op, %String* %"$tmpC2") - call void @dtor.261(%String* %"$tmpC2") + call void @parseOperOpt(%String* %"$tmpC2", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + %5 = call %String* @"=.278"(%String* %op, %String* %"$tmpC2") + call void @dtor.250(%String* %"$tmpC2") br label %if_end if_end: ; preds = %if_else, %if_then br label %if_block3 if_block3: ; preds = %if_end - %12 = call i1 @isEmpty.397(%String* %op) - br i1 %12, label %if_then4, label %if_else5 + %6 = call i1 @isEmpty.384(%String* %op) + br i1 %6, label %if_then4, label %if_else5 if_then4: ; preds = %if_block3 - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = call %Node @parseSimpleExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, i1 true) - call void @dtor.261(%String* %op) - ret %Node %14 + %7 = call %Node @parseSimpleExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + call void @dtor.250(%String* %op) + ret %Node %7 if_else5: ; preds = %if_block3 - %15 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %16 = call %Node @parsePrefixExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %15, i1 true) - store %Node %16, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %baseExpr, %Node* %"$tmpForRef") - %17 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %18 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %17, i32 0, i32 3 - %19 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC8", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %19) - call void @span(%Location* %"$tmpC7", %Location* %loc, %Location* %"$tmpC8") - %20 = call %StringRef @asStringRef(%String* %op) - %21 = load %Node, %Node* %baseExpr - %22 = call %Node @mkPrefixOp(%AstBuilder* %18, %Location* %"$tmpC7", %StringRef %20, %Node %21) - call void @dtor.261(%String* %op) - ret %Node %22 - -if_end6: ; preds = %dumy_block9, %dumy_block - call void @dtor.261(%String* %op) + %8 = call %Node @parsePrefixExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %8, %Node* %"$tmpForRef7" + call void @ctor.535(%Node* %baseExpr, %Node* %"$tmpForRef7") + %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %10 = load %Location, %Location* %loc + %11 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %12 = call %Location @span(%Location %10, %Location %11) + %13 = call %StringRef @asStringRef(%String* %op) + %14 = load %Node, %Node* %baseExpr + %15 = call %Node @mkPrefixOp(%AstBuilder* %9, %Location %12, %StringRef %13, %Node %14) + call void @dtor.250(%String* %op) + ret %Node %15 + +if_end6: ; preds = %dumy_block8, %dumy_block + call void @dtor.250(%String* %op) unreachable dumy_block: ; No predecessors! br label %if_end6 -dumy_block9: ; No predecessors! +dumy_block8: ; No predecessors! br label %if_end6 } ; Function Attrs: inlinehint nounwind define internal void @parseId(%String* sret %_result, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %tmp.this = alloca %TokenType br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 36) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - %4 = load %String*, %String** %_result.addr - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 2 - call void @ctor.189(%String* %4, %String* %7) + call void @ctor.404(%TokenType* %tmp.this, i32 37) + %1 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 2 + call void @ctor.175(%String* %_result, %String* %3) ret void } ; Function Attrs: inlinehint nounwind define internal void @parseOperOpt(%String* sret %_result, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %withEqual) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %withEqual.addr = alloca i1 store i1 %withEqual, i1* %withEqual.addr %tmp.this = alloca %TokenType @@ -24475,18 +21914,14 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 37) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_else + call void @ctor.404(%TokenType* %tmp.this, i32 38) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_else if_then: ; preds = %if_block - %4 = load %String*, %String** %_result.addr - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 2 - call void @ctor.189(%String* %4, %String* %7) + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 2 + call void @ctor.175(%String* %_result, %String* %3) ret void if_else: ; preds = %if_block @@ -24499,37 +21934,32 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_else - %8 = load i1, i1* %withEqual.addr - br i1 %8, label %cond.true, label %cond.false + %4 = load i1, i1* %withEqual.addr + br i1 %4, label %cond.true, label %cond.false if_then2: ; preds = %cond.end - %9 = load %String*, %String** %_result.addr - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i32 0, i32 1 - %12 = getelementptr inbounds %Token, %Token* %11, i32 0, i32 2 - call void @ctor.189(%String* %9, %String* %12) - br i1 %8, label %cond_destruct_alt1, label %cond_destruct_alt2 + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 2 + call void @ctor.175(%String* %_result, %String* %6) + br i1 %4, label %cond_destruct_alt1, label %cond_destruct_alt2 if_else3: ; preds = %cond.end - %13 = load %String*, %String** %_result.addr - call void @ctor.137(%String* %13) - br i1 %8, label %cond_destruct_alt17, label %cond_destruct_alt28 + call void @ctor.124(%String* %_result) + br i1 %4, label %cond_destruct_alt17, label %cond_destruct_alt28 if_end4: ; preds = %dumy_block10, %dumy_block6 - br i1 %8, label %cond_destruct_alt111, label %cond_destruct_alt212 + br i1 %4, label %cond_destruct_alt111, label %cond_destruct_alt212 cond.true: ; preds = %if_block1 - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 35) - %15 = load %TokenType, %TokenType* %tmp.this5 - %16 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, %TokenType %15) + call void @ctor.404(%TokenType* %tmp.this5, i32 36) + %7 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) br label %cond.end cond.false: ; preds = %if_block1 br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %16, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %7, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then2, label %if_else3 cond_destruct_alt1: ; preds = %if_then2 @@ -24568,479 +21998,419 @@ cond_destruct_end13: ; preds = %cond_destruct_alt21 ; Function Attrs: noinline nounwind define %Node @parseSimpleExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %withEqual) #5 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %withEqual.addr = alloca i1 store i1 %withEqual, i1* %withEqual.addr %res = alloca %Node %loc = alloca %Location + %"$tmpForRef" = alloca %Location %tmp.this = alloca %TokenType %tmp.this1 = alloca %TokenType - %"$tmpForRef" = alloca %Node - %tmp.this6 = alloca %TokenType - %"$tmpForRef7" = alloca %Node - %tmp.this8 = alloca %TokenType - %tmp.this13 = alloca %TokenType - %"$tmpForRef14" = alloca %Node - %tmp.this19 = alloca %TokenType - %"$tmpForRef20" = alloca %Node - %tmp.this25 = alloca %TokenType - %"$tmpForRef26" = alloca %Node - %tmp.this31 = alloca %TokenType - %"$tmpForRef32" = alloca %Node - %tmp.this37 = alloca %TokenType - %"$tmpForRef38" = alloca %Node - %tmp.this39 = alloca i32 - %tmp.this44 = alloca %TokenType - %"$tmpForRef45" = alloca %Node - %tmp.this46 = alloca i32 - %tmp.this51 = alloca %TokenType - %"$tmpForRef52" = alloca %Node - %tmp.this53 = alloca i64 - %tmp.this58 = alloca %TokenType - %"$tmpForRef59" = alloca %Node - %tmp.this60 = alloca i64 - %tmp.this65 = alloca %TokenType - %"$tmpForRef66" = alloca %Node - %tmp.this67 = alloca float - %tmp.this72 = alloca %TokenType - %"$tmpForRef73" = alloca %Node - %tmp.this74 = alloca double - %tmp.this79 = alloca %TokenType - %"$tmpForRef80" = alloca %Node - %tmp.this81 = alloca i64 - %tmp.this85 = alloca %TokenType - %"$tmpForRef86" = alloca %Node + %"$tmpForRef2" = alloca %Node + %tmp.this7 = alloca %TokenType + %"$tmpForRef8" = alloca %Node + %tmp.this9 = alloca %TokenType + %tmp.this14 = alloca %TokenType + %"$tmpForRef15" = alloca %Node + %tmp.this20 = alloca %TokenType + %"$tmpForRef21" = alloca %Node + %tmp.this26 = alloca %TokenType + %"$tmpForRef27" = alloca %Node + %tmp.this32 = alloca %TokenType + %"$tmpForRef33" = alloca %Node + %tmp.this38 = alloca %TokenType + %"$tmpForRef39" = alloca %Node + %tmp.this40 = alloca i32 + %tmp.this45 = alloca %TokenType + %"$tmpForRef46" = alloca %Node + %tmp.this47 = alloca i32 + %tmp.this52 = alloca %TokenType + %"$tmpForRef53" = alloca %Node + %tmp.this54 = alloca i64 + %tmp.this59 = alloca %TokenType + %"$tmpForRef60" = alloca %Node + %tmp.this61 = alloca i64 + %tmp.this66 = alloca %TokenType + %"$tmpForRef67" = alloca %Node + %tmp.this68 = alloca float + %tmp.this73 = alloca %TokenType + %"$tmpForRef74" = alloca %Node + %tmp.this75 = alloca double + %tmp.this80 = alloca %TokenType + %"$tmpForRef81" = alloca %Node + %tmp.this82 = alloca i64 + %tmp.this86 = alloca %TokenType + %"$tmpForRef87" = alloca %Node %"$tmpC" = alloca %String + %"$tmpForRef91" = alloca %StringRef %tmp.StringRef = alloca %StringRef - %"$tmpC90" = alloca %Token - %tmp.StringRef91 = alloca %StringRef - %tmp.this92 = alloca %Node - %tmp.this97 = alloca %TokenType + %"$tmpC92" = alloca %Token + %"$tmpForRef93" = alloca %StringRef + %tmp.StringRef94 = alloca %StringRef + %tmp.this95 = alloca %Node + %tmp.this100 = alloca %TokenType %args = alloca %Node - %"$tmpForRef98" = alloca %Node - %tmp.this99 = alloca %TokenType - %"$tmpForRef100" = alloca %Node - %"$tmpC101" = alloca %Location - %"$tmpC102" = alloca %Location - %tmp.this107 = alloca %TokenType - %tmp.this112 = alloca %TokenType + %"$tmpForRef101" = alloca %Node + %tmp.this102 = alloca %TokenType + %"$tmpForRef103" = alloca %Node + %tmp.this108 = alloca %TokenType %tmp.this113 = alloca %TokenType - %"$tmpForRef114" = alloca %Node - %"$tmpC115" = alloca %Location - %"$tmpC116" = alloca %Location - %tmp.StringRef117 = alloca %StringRef + %tmp.this114 = alloca %TokenType + %"$tmpForRef115" = alloca %Node + %tmp.StringRef116 = alloca %StringRef %id = alloca %String - %"$tmpForRef118" = alloca %Node - %"$tmpC119" = alloca %Location - %"$tmpC120" = alloca %Location + %"$tmpForRef117" = alloca %Node br label %code code: ; preds = %0 - call void @ctor.556(%Node* %res) - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) + call void @ctor.546(%Node* %res) + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") br label %if_block if_block: ; preds = %code - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 28) - %3 = load %TokenType, %TokenType* %tmp.this - %4 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, %TokenType %3) - br i1 %4, label %cond.true, label %cond.false + call void @ctor.404(%TokenType* %tmp.this, i32 29) + %2 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %2, label %cond.true, label %cond.false if_then: ; preds = %cond.end - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = call %Node @parseLambdaExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5) - store %Node %6, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef") + %3 = call %Node @parseLambdaExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %3, %Node* %"$tmpForRef2" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef2") br label %if_end if_else: ; preds = %cond.end - br label %if_block2 + br label %if_block3 -if_end: ; preds = %if_end5, %if_then - br i1 %4, label %cond_destruct_alt1, label %cond_destruct_alt2 +if_end: ; preds = %if_end6, %if_then + br i1 %2, label %cond_destruct_alt1, label %cond_destruct_alt2 cond.true: ; preds = %if_block - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 6) - %8 = load %TokenType, %TokenType* %tmp.this1 - %9 = call i1 @next2Is(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %TokenType %8) + call void @ctor.404(%TokenType* %tmp.this1, i32 6) + %4 = call i1 @next2Is(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) br label %cond.end cond.false: ; preds = %if_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %9, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %4, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then, label %if_else -if_block2: ; preds = %if_else - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this6, i32 28) - %11 = load %TokenType, %TokenType* %tmp.this6 - %12 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, %TokenType %11) - br i1 %12, label %if_then3, label %if_else4 +if_block3: ; preds = %if_else + call void @ctor.404(%TokenType* %tmp.this7, i32 29) + %5 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this7) + br i1 %5, label %if_then4, label %if_else5 -if_then3: ; preds = %if_block2 - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, i32 0, i32 3 - %15 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %16 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %15, i1 true) - %17 = call %Node @mkParenthesisExpr(%AstBuilder* %14, %Node %16) - store %Node %17, %Node* %"$tmpForRef7" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef7") - %18 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this8, i32 29) - %19 = load %TokenType, %TokenType* %tmp.this8 - %20 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %18, %TokenType %19) - br label %if_end5 +if_then4: ; preds = %if_block3 + %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %7 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + %8 = call %Node @mkParenthesisExpr(%AstBuilder* %6, %Node %7) + store %Node %8, %Node* %"$tmpForRef8" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef8") + call void @ctor.404(%TokenType* %tmp.this9, i32 30) + %9 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this9) + br label %if_end6 -if_else4: ; preds = %if_block2 - br label %if_block9 +if_else5: ; preds = %if_block3 + br label %if_block10 -if_end5: ; preds = %if_end12, %if_then3 +if_end6: ; preds = %if_end13, %if_then4 br label %if_end -if_block9: ; preds = %if_else4 - %21 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this13, i32 36) - %22 = load %TokenType, %TokenType* %tmp.this13 - %23 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %21, %TokenType %22) - br i1 %23, label %if_then10, label %if_else11 +if_block10: ; preds = %if_else5 + call void @ctor.404(%TokenType* %tmp.this14, i32 37) + %10 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this14) + br i1 %10, label %if_then11, label %if_else12 -if_then10: ; preds = %if_block9 - %24 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %25 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %24, i32 0, i32 3 - %26 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %27 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %26, i32 0, i32 1 +if_then11: ; preds = %if_block10 + %11 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %13 = getelementptr inbounds %Token, %Token* %12, i32 0, i32 0 + %14 = load %Location, %Location* %13 + %15 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %16 = getelementptr inbounds %Token, %Token* %15, i32 0, i32 2 + %17 = call %StringRef @asStringRef(%String* %16) + %18 = call %Node @mkIdentifier(%AstBuilder* %11, %Location %14, %StringRef %17) + store %Node %18, %Node* %"$tmpForRef15" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef15") + br label %if_end13 + +if_else12: ; preds = %if_block10 + br label %if_block16 + +if_end13: ; preds = %if_end19, %if_then11 + br label %if_end6 + +if_block16: ; preds = %if_else12 + call void @ctor.404(%TokenType* %tmp.this20, i32 22) + %19 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this20) + br i1 %19, label %if_then17, label %if_else18 + +if_then17: ; preds = %if_block16 + %20 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %21 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %22 = getelementptr inbounds %Token, %Token* %21, i32 0, i32 0 + %23 = load %Location, %Location* %22 + %24 = call %Node @mkNullLiteral(%AstBuilder* %20, %Location %23) + store %Node %24, %Node* %"$tmpForRef21" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef21") + br label %if_end19 + +if_else18: ; preds = %if_block16 + br label %if_block22 + +if_end19: ; preds = %if_end25, %if_then17 + br label %if_end13 + +if_block22: ; preds = %if_else18 + call void @ctor.404(%TokenType* %tmp.this26, i32 23) + %25 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this26) + br i1 %25, label %if_then23, label %if_else24 + +if_then23: ; preds = %if_block22 + %26 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %27 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 %28 = getelementptr inbounds %Token, %Token* %27, i32 0, i32 0 - %29 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %30 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %29, i32 0, i32 1 - %31 = getelementptr inbounds %Token, %Token* %30, i32 0, i32 2 - %32 = call %StringRef @asStringRef(%String* %31) - %33 = call %Node @mkIdentifier(%AstBuilder* %25, %Location* %28, %StringRef %32) - store %Node %33, %Node* %"$tmpForRef14" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef14") - br label %if_end12 + %29 = load %Location, %Location* %28 + %30 = call %Node @mkBoolLiteral(%AstBuilder* %26, %Location %29, i1 true) + store %Node %30, %Node* %"$tmpForRef27" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef27") + br label %if_end25 -if_else11: ; preds = %if_block9 - br label %if_block15 +if_else24: ; preds = %if_block22 + br label %if_block28 -if_end12: ; preds = %if_end18, %if_then10 - br label %if_end5 +if_end25: ; preds = %if_end31, %if_then23 + br label %if_end19 -if_block15: ; preds = %if_else11 - %34 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this19, i32 21) - %35 = load %TokenType, %TokenType* %tmp.this19 - %36 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %34, %TokenType %35) - br i1 %36, label %if_then16, label %if_else17 +if_block28: ; preds = %if_else24 + call void @ctor.404(%TokenType* %tmp.this32, i32 21) + %31 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this32) + br i1 %31, label %if_then29, label %if_else30 -if_then16: ; preds = %if_block15 - %37 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %38 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %37, i32 0, i32 3 - %39 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %40 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %39, i32 0, i32 1 - %41 = getelementptr inbounds %Token, %Token* %40, i32 0, i32 0 - %42 = call %Node @mkNullLiteral(%AstBuilder* %38, %Location* %41) - store %Node %42, %Node* %"$tmpForRef20" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef20") - br label %if_end18 +if_then29: ; preds = %if_block28 + %32 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %33 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %34 = getelementptr inbounds %Token, %Token* %33, i32 0, i32 0 + %35 = load %Location, %Location* %34 + %36 = call %Node @mkBoolLiteral(%AstBuilder* %32, %Location %35, i1 false) + store %Node %36, %Node* %"$tmpForRef33" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef33") + br label %if_end31 -if_else17: ; preds = %if_block15 - br label %if_block21 +if_else30: ; preds = %if_block28 + br label %if_block34 -if_end18: ; preds = %if_end24, %if_then16 - br label %if_end12 +if_end31: ; preds = %if_end37, %if_then29 + br label %if_end25 -if_block21: ; preds = %if_else17 - %43 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this25, i32 22) - %44 = load %TokenType, %TokenType* %tmp.this25 - %45 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %43, %TokenType %44) - br i1 %45, label %if_then22, label %if_else23 +if_block34: ; preds = %if_else30 + call void @ctor.404(%TokenType* %tmp.this38, i32 41) + %37 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this38) + br i1 %37, label %if_then35, label %if_else36 -if_then22: ; preds = %if_block21 - %46 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %47 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %46, i32 0, i32 3 - %48 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %49 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %48, i32 0, i32 1 - %50 = getelementptr inbounds %Token, %Token* %49, i32 0, i32 0 - %51 = call %Node @mkBoolLiteral(%AstBuilder* %47, %Location* %50, i1 true) - store %Node %51, %Node* %"$tmpForRef26" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef26") - br label %if_end24 +if_then35: ; preds = %if_block34 + %38 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %39 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %40 = getelementptr inbounds %Token, %Token* %39, i32 0, i32 0 + %41 = load %Location, %Location* %40 + %42 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %43 = getelementptr inbounds %Token, %Token* %42, i32 0, i32 3 + %44 = load i64, i64* %43 + %45 = trunc i64 %44 to i32 + store i32 %45, i32* %tmp.this40 + %46 = load i32, i32* %tmp.this40 + %47 = call %Node @mkIntLiteral(%AstBuilder* %38, %Location %41, i32 %46) + store %Node %47, %Node* %"$tmpForRef39" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef39") + br label %if_end37 -if_else23: ; preds = %if_block21 - br label %if_block27 +if_else36: ; preds = %if_block34 + br label %if_block41 -if_end24: ; preds = %if_end30, %if_then22 - br label %if_end18 +if_end37: ; preds = %if_end44, %if_then35 + br label %if_end31 -if_block27: ; preds = %if_else23 - %52 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this31, i32 20) - %53 = load %TokenType, %TokenType* %tmp.this31 - %54 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %52, %TokenType %53) - br i1 %54, label %if_then28, label %if_else29 +if_block41: ; preds = %if_else36 + call void @ctor.404(%TokenType* %tmp.this45, i32 43) + %48 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this45) + br i1 %48, label %if_then42, label %if_else43 -if_then28: ; preds = %if_block27 - %55 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %56 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %55, i32 0, i32 3 - %57 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %58 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %57, i32 0, i32 1 - %59 = getelementptr inbounds %Token, %Token* %58, i32 0, i32 0 - %60 = call %Node @mkBoolLiteral(%AstBuilder* %56, %Location* %59, i1 false) - store %Node %60, %Node* %"$tmpForRef32" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef32") - br label %if_end30 - -if_else29: ; preds = %if_block27 - br label %if_block33 - -if_end30: ; preds = %if_end36, %if_then28 - br label %if_end24 +if_then42: ; preds = %if_block41 + %49 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %50 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %51 = getelementptr inbounds %Token, %Token* %50, i32 0, i32 0 + %52 = load %Location, %Location* %51 + %53 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %54 = getelementptr inbounds %Token, %Token* %53, i32 0, i32 3 + %55 = load i64, i64* %54 + %56 = trunc i64 %55 to i32 + store i32 %56, i32* %tmp.this47 + %57 = load i32, i32* %tmp.this47 + %58 = call %Node @mkUIntLiteral(%AstBuilder* %49, %Location %52, i32 %57) + store %Node %58, %Node* %"$tmpForRef46" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef46") + br label %if_end44 -if_block33: ; preds = %if_else29 - %61 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this37, i32 40) - %62 = load %TokenType, %TokenType* %tmp.this37 - %63 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %61, %TokenType %62) - br i1 %63, label %if_then34, label %if_else35 - -if_then34: ; preds = %if_block33 - %64 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %65 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %64, i32 0, i32 3 - %66 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %67 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %66, i32 0, i32 1 - %68 = getelementptr inbounds %Token, %Token* %67, i32 0, i32 0 - %69 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %70 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %69, i32 0, i32 1 - %71 = getelementptr inbounds %Token, %Token* %70, i32 0, i32 3 - %72 = load i64, i64* %71 - %73 = trunc i64 %72 to i32 - store i32 %73, i32* %tmp.this39 - %74 = load i32, i32* %tmp.this39 - %75 = call %Node @mkIntLiteral(%AstBuilder* %65, %Location* %68, i32 %74) - store %Node %75, %Node* %"$tmpForRef38" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef38") - br label %if_end36 - -if_else35: ; preds = %if_block33 - br label %if_block40 +if_else43: ; preds = %if_block41 + br label %if_block48 -if_end36: ; preds = %if_end43, %if_then34 - br label %if_end30 - -if_block40: ; preds = %if_else35 - %76 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this44, i32 42) - %77 = load %TokenType, %TokenType* %tmp.this44 - %78 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %76, %TokenType %77) - br i1 %78, label %if_then41, label %if_else42 - -if_then41: ; preds = %if_block40 - %79 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %80 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %79, i32 0, i32 3 - %81 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %82 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %81, i32 0, i32 1 - %83 = getelementptr inbounds %Token, %Token* %82, i32 0, i32 0 - %84 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %85 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %84, i32 0, i32 1 - %86 = getelementptr inbounds %Token, %Token* %85, i32 0, i32 3 - %87 = load i64, i64* %86 - %88 = trunc i64 %87 to i32 - store i32 %88, i32* %tmp.this46 - %89 = load i32, i32* %tmp.this46 - %90 = call %Node @mkUIntLiteral(%AstBuilder* %80, %Location* %83, i32 %89) - store %Node %90, %Node* %"$tmpForRef45" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef45") - br label %if_end43 - -if_else42: ; preds = %if_block40 - br label %if_block47 - -if_end43: ; preds = %if_end50, %if_then41 - br label %if_end36 - -if_block47: ; preds = %if_else42 - %91 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this51, i32 41) - %92 = load %TokenType, %TokenType* %tmp.this51 - %93 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %91, %TokenType %92) - br i1 %93, label %if_then48, label %if_else49 - -if_then48: ; preds = %if_block47 - %94 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %95 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %94, i32 0, i32 3 - %96 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %97 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %96, i32 0, i32 1 - %98 = getelementptr inbounds %Token, %Token* %97, i32 0, i32 0 - %99 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %100 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %99, i32 0, i32 1 - %101 = getelementptr inbounds %Token, %Token* %100, i32 0, i32 3 - %102 = load i64, i64* %101 - store i64 %102, i64* %tmp.this53 - %103 = load i64, i64* %tmp.this53 - %104 = call %Node @mkLongLiteral(%AstBuilder* %95, %Location* %98, i64 %103) - store %Node %104, %Node* %"$tmpForRef52" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef52") - br label %if_end50 +if_end44: ; preds = %if_end51, %if_then42 + br label %if_end37 -if_else49: ; preds = %if_block47 - br label %if_block54 +if_block48: ; preds = %if_else43 + call void @ctor.404(%TokenType* %tmp.this52, i32 42) + %59 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this52) + br i1 %59, label %if_then49, label %if_else50 -if_end50: ; preds = %if_end57, %if_then48 - br label %if_end43 +if_then49: ; preds = %if_block48 + %60 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %61 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %62 = getelementptr inbounds %Token, %Token* %61, i32 0, i32 0 + %63 = load %Location, %Location* %62 + %64 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %65 = getelementptr inbounds %Token, %Token* %64, i32 0, i32 3 + %66 = load i64, i64* %65 + store i64 %66, i64* %tmp.this54 + %67 = load i64, i64* %tmp.this54 + %68 = call %Node @mkLongLiteral(%AstBuilder* %60, %Location %63, i64 %67) + store %Node %68, %Node* %"$tmpForRef53" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef53") + br label %if_end51 -if_block54: ; preds = %if_else49 - %105 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this58, i32 43) - %106 = load %TokenType, %TokenType* %tmp.this58 - %107 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %105, %TokenType %106) - br i1 %107, label %if_then55, label %if_else56 +if_else50: ; preds = %if_block48 + br label %if_block55 -if_then55: ; preds = %if_block54 - %108 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %109 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %108, i32 0, i32 3 - %110 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %111 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %110, i32 0, i32 1 - %112 = getelementptr inbounds %Token, %Token* %111, i32 0, i32 0 - %113 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %114 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %113, i32 0, i32 1 - %115 = getelementptr inbounds %Token, %Token* %114, i32 0, i32 3 - %116 = load i64, i64* %115 - store i64 %116, i64* %tmp.this60 - %117 = load i64, i64* %tmp.this60 - %118 = call %Node @mkULongLiteral(%AstBuilder* %109, %Location* %112, i64 %117) - store %Node %118, %Node* %"$tmpForRef59" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef59") - br label %if_end57 - -if_else56: ; preds = %if_block54 - br label %if_block61 - -if_end57: ; preds = %if_end64, %if_then55 - br label %if_end50 +if_end51: ; preds = %if_end58, %if_then49 + br label %if_end44 -if_block61: ; preds = %if_else56 - %119 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this65, i32 44) - %120 = load %TokenType, %TokenType* %tmp.this65 - %121 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %119, %TokenType %120) - br i1 %121, label %if_then62, label %if_else63 - -if_then62: ; preds = %if_block61 - %122 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %123 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %122, i32 0, i32 3 - %124 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %125 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %124, i32 0, i32 1 - %126 = getelementptr inbounds %Token, %Token* %125, i32 0, i32 0 - %127 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %128 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %127, i32 0, i32 1 - %129 = getelementptr inbounds %Token, %Token* %128, i32 0, i32 4 - %130 = load double, double* %129 - %131 = fptrunc double %130 to float - store float %131, float* %tmp.this67 - %132 = load float, float* %tmp.this67 - %133 = call %Node @mkFloatLiteral(%AstBuilder* %123, %Location* %126, float %132) - store %Node %133, %Node* %"$tmpForRef66" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef66") - br label %if_end64 - -if_else63: ; preds = %if_block61 - br label %if_block68 +if_block55: ; preds = %if_else50 + call void @ctor.404(%TokenType* %tmp.this59, i32 44) + %69 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this59) + br i1 %69, label %if_then56, label %if_else57 + +if_then56: ; preds = %if_block55 + %70 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %71 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %72 = getelementptr inbounds %Token, %Token* %71, i32 0, i32 0 + %73 = load %Location, %Location* %72 + %74 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %75 = getelementptr inbounds %Token, %Token* %74, i32 0, i32 3 + %76 = load i64, i64* %75 + store i64 %76, i64* %tmp.this61 + %77 = load i64, i64* %tmp.this61 + %78 = call %Node @mkULongLiteral(%AstBuilder* %70, %Location %73, i64 %77) + store %Node %78, %Node* %"$tmpForRef60" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef60") + br label %if_end58 -if_end64: ; preds = %if_end71, %if_then62 - br label %if_end57 +if_else57: ; preds = %if_block55 + br label %if_block62 -if_block68: ; preds = %if_else63 - %134 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this72, i32 45) - %135 = load %TokenType, %TokenType* %tmp.this72 - %136 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %134, %TokenType %135) - br i1 %136, label %if_then69, label %if_else70 +if_end58: ; preds = %if_end65, %if_then56 + br label %if_end51 -if_then69: ; preds = %if_block68 - %137 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %138 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %137, i32 0, i32 3 - %139 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %140 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %139, i32 0, i32 1 - %141 = getelementptr inbounds %Token, %Token* %140, i32 0, i32 0 - %142 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %143 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %142, i32 0, i32 1 - %144 = getelementptr inbounds %Token, %Token* %143, i32 0, i32 4 - %145 = load double, double* %144 - store double %145, double* %tmp.this74 - %146 = load double, double* %tmp.this74 - %147 = call %Node @mkDoubleLiteral(%AstBuilder* %138, %Location* %141, double %146) - store %Node %147, %Node* %"$tmpForRef73" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef73") - br label %if_end71 +if_block62: ; preds = %if_else57 + call void @ctor.404(%TokenType* %tmp.this66, i32 45) + %79 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this66) + br i1 %79, label %if_then63, label %if_else64 -if_else70: ; preds = %if_block68 - br label %if_block75 - -if_end71: ; preds = %if_end78, %if_then69 - br label %if_end64 - -if_block75: ; preds = %if_else70 - %148 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this79, i32 38) - %149 = load %TokenType, %TokenType* %tmp.this79 - %150 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %148, %TokenType %149) - br i1 %150, label %if_then76, label %if_else77 - -if_then76: ; preds = %if_block75 - %151 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %152 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %151, i32 0, i32 3 - %153 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %154 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %153, i32 0, i32 1 - %155 = getelementptr inbounds %Token, %Token* %154, i32 0, i32 0 - %156 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %157 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %156, i32 0, i32 1 - %158 = getelementptr inbounds %Token, %Token* %157, i32 0, i32 2 - store i64 0, i64* %tmp.this81 - %159 = load i64, i64* %tmp.this81 - %160 = call i8* @"().344"(%String* %158, i64 %159) - %161 = load i8, i8* %160 - %162 = call %Node @mkCharLiteral(%AstBuilder* %152, %Location* %155, i8 %161) - store %Node %162, %Node* %"$tmpForRef80" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef80") - br label %if_end78 +if_then63: ; preds = %if_block62 + %80 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %81 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %82 = getelementptr inbounds %Token, %Token* %81, i32 0, i32 0 + %83 = load %Location, %Location* %82 + %84 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %85 = getelementptr inbounds %Token, %Token* %84, i32 0, i32 4 + %86 = load double, double* %85 + %87 = fptrunc double %86 to float + store float %87, float* %tmp.this68 + %88 = load float, float* %tmp.this68 + %89 = call %Node @mkFloatLiteral(%AstBuilder* %80, %Location %83, float %88) + store %Node %89, %Node* %"$tmpForRef67" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef67") + br label %if_end65 -if_else77: ; preds = %if_block75 - br label %if_block82 +if_else64: ; preds = %if_block62 + br label %if_block69 -if_end78: ; preds = %if_end84, %if_then76 - br label %if_end71 +if_end65: ; preds = %if_end72, %if_then63 + br label %if_end58 -if_block82: ; preds = %if_else77 - %163 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this85, i32 39) - %164 = load %TokenType, %TokenType* %tmp.this85 - %165 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %163, %TokenType %164) - br i1 %165, label %if_then83, label %if_end84 - -if_then83: ; preds = %if_block82 - %166 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %167 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %166, i32 0, i32 3 - %168 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %169 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %168, i32 0, i32 1 - %170 = getelementptr inbounds %Token, %Token* %169, i32 0, i32 0 - %171 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %172 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %171, i32 0, i32 1 - %173 = getelementptr inbounds %Token, %Token* %172, i32 0, i32 2 - %174 = call %StringRef @asStringRef(%String* %173) - %175 = call %Node @mkStringLiteral(%AstBuilder* %167, %Location* %170, %StringRef %174) - store %Node %175, %Node* %"$tmpForRef86" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef86") - br label %if_end84 - -if_end84: ; preds = %if_then83, %if_block82 - br label %if_end78 +if_block69: ; preds = %if_else64 + call void @ctor.404(%TokenType* %tmp.this73, i32 46) + %90 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this73) + br i1 %90, label %if_then70, label %if_else71 + +if_then70: ; preds = %if_block69 + %91 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %92 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %93 = getelementptr inbounds %Token, %Token* %92, i32 0, i32 0 + %94 = load %Location, %Location* %93 + %95 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %96 = getelementptr inbounds %Token, %Token* %95, i32 0, i32 4 + %97 = load double, double* %96 + store double %97, double* %tmp.this75 + %98 = load double, double* %tmp.this75 + %99 = call %Node @mkDoubleLiteral(%AstBuilder* %91, %Location %94, double %98) + store %Node %99, %Node* %"$tmpForRef74" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef74") + br label %if_end72 + +if_else71: ; preds = %if_block69 + br label %if_block76 + +if_end72: ; preds = %if_end79, %if_then70 + br label %if_end65 + +if_block76: ; preds = %if_else71 + call void @ctor.404(%TokenType* %tmp.this80, i32 39) + %100 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this80) + br i1 %100, label %if_then77, label %if_else78 + +if_then77: ; preds = %if_block76 + %101 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %102 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %103 = getelementptr inbounds %Token, %Token* %102, i32 0, i32 0 + %104 = load %Location, %Location* %103 + %105 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %106 = getelementptr inbounds %Token, %Token* %105, i32 0, i32 2 + store i64 0, i64* %tmp.this82 + %107 = load i64, i64* %tmp.this82 + %108 = call i8* @"().332"(%String* %106, i64 %107) + %109 = load i8, i8* %108 + %110 = call %Node @mkCharLiteral(%AstBuilder* %101, %Location %104, i8 %109) + store %Node %110, %Node* %"$tmpForRef81" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef81") + br label %if_end79 + +if_else78: ; preds = %if_block76 + br label %if_block83 + +if_end79: ; preds = %if_end85, %if_then77 + br label %if_end72 + +if_block83: ; preds = %if_else78 + call void @ctor.404(%TokenType* %tmp.this86, i32 40) + %111 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this86) + br i1 %111, label %if_then84, label %if_end85 + +if_then84: ; preds = %if_block83 + %112 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %113 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %114 = getelementptr inbounds %Token, %Token* %113, i32 0, i32 0 + %115 = load %Location, %Location* %114 + %116 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %117 = getelementptr inbounds %Token, %Token* %116, i32 0, i32 2 + %118 = call %StringRef @asStringRef(%String* %117) + %119 = call %Node @mkStringLiteral(%AstBuilder* %112, %Location %115, %StringRef %118) + store %Node %119, %Node* %"$tmpForRef87" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef87") + br label %if_end85 + +if_end85: ; preds = %if_then84, %if_block83 + br label %if_end79 cond_destruct_alt1: ; preds = %if_end br label %cond_destruct_end @@ -25049,214 +22419,190 @@ cond_destruct_alt2: ; preds = %if_end br label %cond_destruct_end cond_destruct_end: ; preds = %cond_destruct_alt2, %cond_destruct_alt1 - br label %if_block87 - -if_block87: ; preds = %cond_destruct_end - %176 = load %Node, %Node* %res - %177 = call i1 @isNull(%Node %176) - br i1 %177, label %if_then88, label %if_end89 - -if_then88: ; preds = %if_block87 - %178 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %179 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %180 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.96, i32 0, i32 0), i8** %179 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.96, i32 0, i32 25), i8** %180 - %181 = load %StringRef, %StringRef* %tmp.StringRef - %182 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %183 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %182, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC90", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %183) - %184 = getelementptr inbounds %Token, %Token* %"$tmpC90", i32 0, i32 1 - %185 = load %TokenType, %TokenType* %184 - %186 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef91, i32 0, i32 0 - %187 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef91, i32 0, i32 1 - store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.97, i32 0, i32 0), i8** %186 - store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.97, i32 0, i32 22), i8** %187 - %188 = load %StringRef, %StringRef* %tmp.StringRef91 - call void @toString.597(%String* %"$tmpC", %StringRef %181, %TokenType %185, %StringRef %188) - call void @reportError.548(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %178, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC90") - call void @ctor.556(%Node* %tmp.this92) - %189 = load %Node, %Node* %tmp.this92 - ret %Node %189 - -if_end89: ; preds = %dumy_block, %if_block87 + br label %if_block88 + +if_block88: ; preds = %cond_destruct_end + %120 = load %Node, %Node* %res + %121 = call i1 @isNull(%Node %120) + br i1 %121, label %if_then89, label %if_end90 + +if_then89: ; preds = %if_block88 + %122 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %123 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %124 = bitcast %UntypedPtr* %122 to i8** + %125 = bitcast %UntypedPtr* %123 to i8** + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.98, i32 0, i32 0), i8** %124 + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.98, i32 0, i32 25), i8** %125 + %126 = load %StringRef, %StringRef* %tmp.StringRef + store %StringRef %126, %StringRef* %"$tmpForRef91" + %127 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC92", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %127) + %128 = getelementptr inbounds %Token, %Token* %"$tmpC92", i32 0, i32 1 + %129 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef94, i32 0, i32 0 + %130 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef94, i32 0, i32 1 + %131 = bitcast %UntypedPtr* %129 to i8** + %132 = bitcast %UntypedPtr* %130 to i8** + store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.99, i32 0, i32 0), i8** %131 + store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.99, i32 0, i32 22), i8** %132 + %133 = load %StringRef, %StringRef* %tmp.StringRef94 + store %StringRef %133, %StringRef* %"$tmpForRef93" + call void @toString.589(%String* %"$tmpC", %StringRef* %"$tmpForRef91", %TokenType* %128, %StringRef* %"$tmpForRef93") + call void @reportError.538(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC92") + call void @ctor.546(%Node* %tmp.this95) + %134 = load %Node, %Node* %tmp.this95 + ret %Node %134 + +if_end90: ; preds = %dumy_block, %if_block88 br label %while_block dumy_block: ; No predecessors! - br label %if_end89 + br label %if_end90 -while_block: ; preds = %while_step, %if_end89 +while_block: ; preds = %while_step, %if_end90 br i1 true, label %while_body, label %while_end while_body: ; preds = %while_block - br label %if_block93 + br label %if_block96 -while_step: ; preds = %if_end96 +while_step: ; preds = %if_end99 br label %while_block -while_end: ; preds = %if_else105, %while_block - %190 = load %Node, %Node* %res - ret %Node %190 - -if_block93: ; preds = %while_body - %191 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this97, i32 28) - %192 = load %TokenType, %TokenType* %tmp.this97 - %193 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %191, %TokenType %192) - br i1 %193, label %if_then94, label %if_else95 - -if_then94: ; preds = %if_block93 - %194 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %195 = call %Node @parseExprListOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %194) - store %Node %195, %Node* %"$tmpForRef98" - call void @ctor.545(%Node* %args, %Node* %"$tmpForRef98") - %196 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this99, i32 29) - %197 = load %TokenType, %TokenType* %tmp.this99 - %198 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %196, %TokenType %197) - %199 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %200 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %199, i32 0, i32 3 - %201 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC102", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %201) - call void @span(%Location* %"$tmpC101", %Location* %loc, %Location* %"$tmpC102") - %202 = load %Node, %Node* %res - %203 = load %Node, %Node* %args - %204 = call %Node @mkFunAppExpr(%AstBuilder* %200, %Location* %"$tmpC101", %Node %202, %Node %203) - store %Node %204, %Node* %"$tmpForRef100" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef100") - br label %if_end96 - -if_else95: ; preds = %if_block93 - br label %if_block103 - -if_end96: ; preds = %if_end106, %if_then94 +while_end: ; preds = %if_else106, %while_block + %135 = load %Node, %Node* %res + ret %Node %135 + +if_block96: ; preds = %while_body + call void @ctor.404(%TokenType* %tmp.this100, i32 29) + %136 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this100) + br i1 %136, label %if_then97, label %if_else98 + +if_then97: ; preds = %if_block96 + %137 = call %Node @parseExprListOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %137, %Node* %"$tmpForRef101" + call void @ctor.535(%Node* %args, %Node* %"$tmpForRef101") + call void @ctor.404(%TokenType* %tmp.this102, i32 30) + %138 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this102) + %139 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %140 = load %Location, %Location* %loc + %141 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %142 = call %Location @span(%Location %140, %Location %141) + %143 = load %Node, %Node* %res + %144 = load %Node, %Node* %args + %145 = call %Node @mkFunAppExpr(%AstBuilder* %139, %Location %142, %Node %143, %Node %144) + store %Node %145, %Node* %"$tmpForRef103" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef103") + br label %if_end99 + +if_else98: ; preds = %if_block96 + br label %if_block104 + +if_end99: ; preds = %if_end107, %if_then97 br label %while_step -if_block103: ; preds = %if_else95 - %205 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this107, i32 33) - %206 = load %TokenType, %TokenType* %tmp.this107 - %207 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %205, %TokenType %206) - br i1 %207, label %if_then104, label %if_else105 +if_block104: ; preds = %if_else98 + call void @ctor.404(%TokenType* %tmp.this108, i32 34) + %146 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this108) + br i1 %146, label %if_then105, label %if_else106 -if_then104: ; preds = %if_block103 - br label %if_block108 +if_then105: ; preds = %if_block104 + br label %if_block109 -if_else105: ; preds = %if_block103 +if_else106: ; preds = %if_block104 br label %while_end -if_end106: ; preds = %dumy_block121, %if_end111 - br label %if_end96 - -if_block108: ; preds = %if_then104 - %208 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this112, i32 28) - %209 = load %TokenType, %TokenType* %tmp.this112 - %210 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %208, %TokenType %209) - br i1 %210, label %if_then109, label %if_else110 - -if_then109: ; preds = %if_block108 - %211 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this113, i32 29) - %212 = load %TokenType, %TokenType* %tmp.this113 - %213 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %211, %TokenType %212) - %214 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %215 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %214, i32 0, i32 3 - %216 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC116", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %216) - call void @span(%Location* %"$tmpC115", %Location* %loc, %Location* %"$tmpC116") - %217 = load %Node, %Node* %res - %218 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef117, i32 0, i32 0 - %219 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef117, i32 0, i32 1 - store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.98, i32 0, i32 0), i8** %218 - store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.98, i32 0, i32 2), i8** %219 - %220 = load %StringRef, %StringRef* %tmp.StringRef117 - %221 = call %Node @mkDotExpr(%AstBuilder* %215, %Location* %"$tmpC115", %Node %217, %StringRef %220) - store %Node %221, %Node* %"$tmpForRef114" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef114") - br label %if_end111 +if_end107: ; preds = %dumy_block118, %if_end112 + br label %if_end99 -if_else110: ; preds = %if_block108 - %222 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %223 = load i1, i1* %withEqual.addr - call void @parseIdOrOper(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %222, i1 %223) - %224 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %225 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %224, i32 0, i32 3 - %226 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC120", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %226) - call void @span(%Location* %"$tmpC119", %Location* %loc, %Location* %"$tmpC120") - %227 = load %Node, %Node* %res - %228 = call %StringRef @asStringRef(%String* %id) - %229 = call %Node @mkDotExpr(%AstBuilder* %225, %Location* %"$tmpC119", %Node %227, %StringRef %228) - store %Node %229, %Node* %"$tmpForRef118" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef118") - call void @dtor.261(%String* %id) - br label %if_end111 +if_block109: ; preds = %if_then105 + call void @ctor.404(%TokenType* %tmp.this113, i32 29) + %147 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this113) + br i1 %147, label %if_then110, label %if_else111 + +if_then110: ; preds = %if_block109 + call void @ctor.404(%TokenType* %tmp.this114, i32 30) + %148 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this114) + %149 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %150 = load %Location, %Location* %loc + %151 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %152 = call %Location @span(%Location %150, %Location %151) + %153 = load %Node, %Node* %res + %154 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef116, i32 0, i32 0 + %155 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef116, i32 0, i32 1 + %156 = bitcast %UntypedPtr* %154 to i8** + %157 = bitcast %UntypedPtr* %155 to i8** + store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.100, i32 0, i32 0), i8** %156 + store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.100, i32 0, i32 2), i8** %157 + %158 = load %StringRef, %StringRef* %tmp.StringRef116 + %159 = call %Node @mkDotExpr(%AstBuilder* %149, %Location %152, %Node %153, %StringRef %158) + store %Node %159, %Node* %"$tmpForRef115" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef115") + br label %if_end112 -if_end111: ; preds = %if_else110, %if_then109 - br label %if_end106 +if_else111: ; preds = %if_block109 + %160 = load i1, i1* %withEqual.addr + call void @parseIdOrOper(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %160) + %161 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %162 = load %Location, %Location* %loc + %163 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %164 = call %Location @span(%Location %162, %Location %163) + %165 = load %Node, %Node* %res + %166 = call %StringRef @asStringRef(%String* %id) + %167 = call %Node @mkDotExpr(%AstBuilder* %161, %Location %164, %Node %165, %StringRef %166) + store %Node %167, %Node* %"$tmpForRef117" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef117") + call void @dtor.250(%String* %id) + br label %if_end112 -dumy_block121: ; No predecessors! - br label %if_end106 +if_end112: ; preds = %if_else111, %if_then110 + br label %if_end107 + +dumy_block118: ; No predecessors! + br label %if_end107 } ; Function Attrs: inlinehint nounwind -define internal i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType %t) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %t.addr = alloca %TokenType - store %TokenType %t, %TokenType* %t.addr +define internal i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %t) #4 { %"$tmpC" = alloca %Token br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2) - %3 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 - %4 = call i1 @"==.352"(%TokenType* %3, %TokenType* %t.addr) - call void @dtor.260(%Token* %"$tmpC") - ret i1 %4 + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1) + %2 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 + %3 = call i1 @"==.339"(%TokenType* %2, %TokenType* %t) + call void @dtor.249(%Token* %"$tmpC") + ret i1 %3 dumy_block: ; No predecessors! - call void @dtor.260(%Token* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC") unreachable } ; Function Attrs: inlinehint nounwind -define internal i1 @next2Is(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType %t) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %t.addr = alloca %TokenType - store %TokenType %t, %TokenType* %t.addr +define internal i1 @next2Is(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %t) #4 { %"$tmpC" = alloca %Token %tmp.this = alloca i32 br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 store i32 1, i32* %tmp.this - %3 = load i32, i32* %tmp.this - call void @peek.557(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 %3) - %4 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 - %5 = call i1 @"==.352"(%TokenType* %4, %TokenType* %t.addr) - call void @dtor.260(%Token* %"$tmpC") - ret i1 %5 + %2 = load i32, i32* %tmp.this + call void @peek.547(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 %2) + %3 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 + %4 = call i1 @"==.339"(%TokenType* %3, %TokenType* %t) + call void @dtor.249(%Token* %"$tmpC") + ret i1 %4 dumy_block: ; No predecessors! - call void @dtor.260(%Token* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC") unreachable } ; Function Attrs: inlinehint nounwind -define internal void @peek.557(%Token* sret %_result, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 %n) #4 { - %_result.addr = alloca %Token* - store %Token* %_result, %Token** %_result.addr - %this.addr = alloca %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* - store %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr +define internal void @peek.547(%Token* sret %_result, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 %n) #4 { %n.addr = alloca i32 store i32 %n, i32* %n.addr %tmp.this = alloca i64 @@ -25273,20 +22619,17 @@ while_block: ; preds = %while_step, %code %2 = zext i32 %1 to i64 store i64 %2, i64* %tmp.this %3 = load i64, i64* %tmp.this - %4 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %4, i32 0, i32 1 - %6 = call i64 @size.209(%"Vector[Token]"* %5) - %7 = icmp sge i64 %3, %6 - br i1 %7, label %cond.true, label %cond.false + %4 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %5 = call i64 @size.195(%"Vector[Token]"* %4) + %6 = icmp sge i64 %3, %5 + br i1 %6, label %cond.true, label %cond.false while_body: ; preds = %cond.end - %8 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %9 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %8, i32 0, i32 1 - %10 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %10, i32 0, i32 0 - call void @"post_++.523"(%Token* %"$tmpC", %"SparrowLayoutDecoder[SparrowScanner]"* %11) - call void @"+=.409"(%"Vector[Token]"* %9, %Token* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC") + %7 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %8 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"post_++.511"(%Token* %"$tmpC", %"SparrowLayoutDecoder[SparrowScanner]"* %8) + call void @"+=.396"(%"Vector[Token]"* %7, %Token* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC") br label %while_step while_step: ; preds = %while_body @@ -25296,44 +22639,39 @@ while_end: ; preds = %cond.end br label %if_block cond.true: ; preds = %while_block - %12 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %13 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %12, i32 0, i32 0 - %14 = call i1 @"pre_!!.521"(%"SparrowLayoutDecoder[SparrowScanner]"* %13) + %9 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + %10 = call i1 @"pre_!!.509"(%"SparrowLayoutDecoder[SparrowScanner]"* %9) br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %14, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %10, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end if_block: ; preds = %while_end - %15 = load i32, i32* %n.addr - %16 = zext i32 %15 to i64 - store i64 %16, i64* %tmp.this1 - %17 = load i64, i64* %tmp.this1 - %18 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %19 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %18, i32 0, i32 1 - %20 = call i64 @size.209(%"Vector[Token]"* %19) - %21 = icmp slt i64 %17, %20 - br i1 %21, label %if_then, label %if_else + %11 = load i32, i32* %n.addr + %12 = zext i32 %11 to i64 + store i64 %12, i64* %tmp.this1 + %13 = load i64, i64* %tmp.this1 + %14 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %15 = call i64 @size.195(%"Vector[Token]"* %14) + %16 = icmp slt i64 %13, %15 + br i1 %16, label %if_then, label %if_else if_then: ; preds = %if_block - %22 = load %Token*, %Token** %_result.addr - %23 = load %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"*, %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %24 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %23, i32 0, i32 1 - %25 = load i32, i32* %n.addr - %26 = zext i32 %25 to i64 - store i64 %26, i64* %tmp.this2 - %27 = load i64, i64* %tmp.this2 - %28 = call %Token* @"().558"(%"Vector[Token]"* %24, i64 %27) - call void @ctor.202(%Token* %22, %Token* %28) + %17 = getelementptr inbounds %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %18 = load i32, i32* %n.addr + %19 = zext i32 %18 to i64 + store i64 %19, i64* %tmp.this2 + %20 = load i64, i64* %tmp.this2 + %21 = call %Token* @"().548"(%"Vector[Token]"* %17, i64 %20) + call void @ctor.188(%Token* %_result, %Token* %21) ret void if_else: ; preds = %if_block - %29 = load %Token*, %Token** %_result.addr - call void @ctor.143(%Token* %29) + call void @ctor.130(%Token* %_result) ret void if_end: ; preds = %dumy_block3, %dumy_block @@ -25347,119 +22685,97 @@ dumy_block3: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal %Token* @"().558"(%"Vector[Token]"* %this, i64 %index) #4 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal %Token* @"().548"(%"Vector[Token]"* %this, i64 %index) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr - %"$tmpC" = alloca %"RawPtr[Token]" + %"$tmpForRef" = alloca %"RawPtr[Token]" br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 - %3 = load %"RawPtr[Token]", %"RawPtr[Token]"* %2 - %4 = load i64, i64* %index.addr - call void @advance.215(%"RawPtr[Token]"* %"$tmpC", %"RawPtr[Token]" %3, i64 %4) - %5 = load %"RawPtr[Token]", %"RawPtr[Token]"* %"$tmpC" - %6 = call %Token* @value.219(%"RawPtr[Token]" %5) - ret %Token* %6 + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %2 = load i64, i64* %index.addr + %3 = call %"RawPtr[Token]" @advance.201(%"RawPtr[Token]"* %1, i64 %2) + store %"RawPtr[Token]" %3, %"RawPtr[Token]"* %"$tmpForRef" + %4 = call %Token* @value.206(%"RawPtr[Token]"* %"$tmpForRef") + ret %Token* %4 } ; Function Attrs: inlinehint nounwind define internal %Node @parseLambdaExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %loc = alloca %Location + %"$tmpForRef" = alloca %Location %tmp.this = alloca %TokenType %tmp.this1 = alloca %TokenType %closureParams = alloca %Node - %"$tmpForRef" = alloca %Node - %formals = alloca %Node %"$tmpForRef2" = alloca %Node - %retType = alloca %Node + %formals = alloca %Node %"$tmpForRef3" = alloca %Node + %retType = alloca %Node + %"$tmpForRef4" = alloca %Node %body = alloca %Node %bodyExp = alloca %Node - %tmp.this4 = alloca %TokenType - %"$tmpForRef5" = alloca %Node + %tmp.this5 = alloca %TokenType %"$tmpForRef6" = alloca %Node - %tmp.this7 = alloca %TokenType - %"$tmpC" = alloca %Location - %"$tmpC8" = alloca %Location + %"$tmpForRef7" = alloca %Node + %tmp.this8 = alloca %TokenType br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 28) - %3 = load %TokenType, %TokenType* %tmp.this - %4 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, %TokenType %3) - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 6) - %6 = load %TokenType, %TokenType* %tmp.this1 - %7 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, %TokenType %6) - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %9 = call %Node @parseClosureParams(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8) - store %Node %9, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %closureParams, %Node* %"$tmpForRef") - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = call %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i1 false) - store %Node %11, %Node* %"$tmpForRef2" - call void @ctor.545(%Node* %formals, %Node* %"$tmpForRef2") - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %13 = call %Node @parseTypeNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12) - store %Node %13, %Node* %"$tmpForRef3" - call void @ctor.545(%Node* %retType, %Node* %"$tmpForRef3") - call void @ctor.556(%Node* %body) - call void @ctor.556(%Node* %bodyExp) + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") + call void @ctor.404(%TokenType* %tmp.this, i32 29) + %2 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + call void @ctor.404(%TokenType* %tmp.this1, i32 6) + %3 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) + %4 = call %Node @parseClosureParams(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %4, %Node* %"$tmpForRef2" + call void @ctor.535(%Node* %closureParams, %Node* %"$tmpForRef2") + %5 = call %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %5, %Node* %"$tmpForRef3" + call void @ctor.535(%Node* %formals, %Node* %"$tmpForRef3") + %6 = call %Node @parseTypeNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %6, %Node* %"$tmpForRef4" + call void @ctor.535(%Node* %retType, %Node* %"$tmpForRef4") + call void @ctor.546(%Node* %body) + call void @ctor.546(%Node* %bodyExp) br label %if_block if_block: ; preds = %code - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this4, i32 35) - %15 = load %TokenType, %TokenType* %tmp.this4 - %16 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, %TokenType %15) - br i1 %16, label %if_then, label %if_else + call void @ctor.404(%TokenType* %tmp.this5, i32 36) + %7 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + br i1 %7, label %if_then, label %if_else if_then: ; preds = %if_block - %17 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %18 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %17, i1 true) - store %Node %18, %Node* %"$tmpForRef5" - call void @"=.554"(%Node* %bodyExp, %Node* %"$tmpForRef5") + %8 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %8, %Node* %"$tmpForRef6" + call void @"=.544"(%Node* %bodyExp, %Node* %"$tmpForRef6") br label %if_end if_else: ; preds = %if_block - %19 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %20 = call %Node @parseFunBody(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %19) - store %Node %20, %Node* %"$tmpForRef6" - call void @"=.554"(%Node* %body, %Node* %"$tmpForRef6") + %9 = call %Node @parseFunBody(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %9, %Node* %"$tmpForRef7" + call void @"=.544"(%Node* %body, %Node* %"$tmpForRef7") br label %if_end if_end: ; preds = %if_else, %if_then - %21 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this7, i32 29) - %22 = load %TokenType, %TokenType* %tmp.this7 - %23 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %21, %TokenType %22) - %24 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %25 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %24, i32 0, i32 3 - %26 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC8", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %26) - call void @span(%Location* %"$tmpC", %Location* %loc, %Location* %"$tmpC8") - %27 = load %Node, %Node* %closureParams - %28 = load %Node, %Node* %formals - %29 = load %Node, %Node* %retType - %30 = load %Node, %Node* %body - %31 = load %Node, %Node* %bodyExp - %32 = call %Node @mkLambdaExpr(%AstBuilder* %25, %Location* %"$tmpC", %Node %27, %Node %28, %Node %29, %Node %30, %Node %31) - ret %Node %32 + call void @ctor.404(%TokenType* %tmp.this8, i32 30) + %10 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this8) + %11 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %12 = load %Location, %Location* %loc + %13 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %14 = call %Location @span(%Location %12, %Location %13) + %15 = load %Node, %Node* %closureParams + %16 = load %Node, %Node* %formals + %17 = load %Node, %Node* %retType + %18 = load %Node, %Node* %body + %19 = load %Node, %Node* %bodyExp + %20 = call %Node @mkLambdaExpr(%AstBuilder* %11, %Location %14, %Node %15, %Node %16, %Node %17, %Node %18, %Node %19) + ret %Node %20 } ; Function Attrs: inlinehint nounwind define internal %Node @parseClosureParams(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %res = alloca %Node %tmp.this = alloca %TokenType %tmp.this1 = alloca %TokenType @@ -25469,53 +22785,42 @@ define internal %Node @parseClosureParams(%"SparrowParser[SparrowLayoutDecoder[S br label %code code: ; preds = %0 - call void @ctor.556(%Node* %res) + call void @ctor.546(%Node* %res) br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 33) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 34) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 24) - %5 = load %TokenType, %TokenType* %tmp.this1 - %6 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, %TokenType %5) + call void @ctor.404(%TokenType* %tmp.this1, i32 25) + %2 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) br label %if_block2 if_end: ; preds = %if_end4, %if_block - %7 = load %Node, %Node* %res - ret %Node %7 + %3 = load %Node, %Node* %res + ret %Node %3 if_block2: ; preds = %if_then - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 36) - %9 = load %TokenType, %TokenType* %tmp.this5 - %10 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8, %TokenType %9) - br i1 %10, label %if_then3, label %if_end4 + call void @ctor.404(%TokenType* %tmp.this5, i32 37) + %4 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + br i1 %4, label %if_then3, label %if_end4 if_then3: ; preds = %if_block2 - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %12 = call %Node @parseIdListNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11) - store %Node %12, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef") + %5 = call %Node @parseIdListNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %5, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef") br label %if_end4 if_end4: ; preds = %if_then3, %if_block2 - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this6, i32 25) - %14 = load %TokenType, %TokenType* %tmp.this6 - %15 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, %TokenType %14) + call void @ctor.404(%TokenType* %tmp.this6, i32 26) + %6 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this6) br label %if_end } ; Function Attrs: inlinehint nounwind define internal %Node @parseIdListNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %res = alloca %Node %id = alloca %String %"$tmpForRef" = alloca %Node @@ -25525,68 +22830,58 @@ define internal %Node @parseIdListNode(%"SparrowParser[SparrowLayoutDecoder[Spar br label %code code: ; preds = %0 - call void @ctor.556(%Node* %res) - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 0, i32 3 - %4 = load %Node, %Node* %res - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 3 - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 1 - %9 = getelementptr inbounds %Token, %Token* %8, i32 0, i32 0 - %10 = call %StringRef @asStringRef(%String* %id) - %11 = call %Node @mkIdentifier(%AstBuilder* %6, %Location* %9, %StringRef %10) - %12 = call %Node @addToNodeList(%AstBuilder* %3, %Node %4, %Node %11) - store %Node %12, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef") + call void @ctor.546(%Node* %res) + call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %2 = load %Node, %Node* %res + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %5 = getelementptr inbounds %Token, %Token* %4, i32 0, i32 0 + %6 = load %Location, %Location* %5 + %7 = call %StringRef @asStringRef(%String* %id) + %8 = call %Node @mkIdentifier(%AstBuilder* %3, %Location %6, %StringRef %7) + %9 = call %Node @addToNodeList(%AstBuilder* %1, %Node %2, %Node %8) + store %Node %9, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef") br label %while_block while_block: ; preds = %while_step, %code - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 32) - %14 = load %TokenType, %TokenType* %tmp.this - %15 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, %TokenType %14) - br i1 %15, label %while_body, label %while_end + call void @ctor.404(%TokenType* %tmp.this, i32 33) + %10 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %10, label %while_body, label %while_end while_body: ; preds = %while_block - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseId(%String* %"$tmpC", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16) - %17 = call %String* @"=.290"(%String* %id, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") - %18 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %19 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %18, i32 0, i32 3 - %20 = load %Node, %Node* %res - %21 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %22 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %21, i32 0, i32 3 - %23 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %24 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23, i32 0, i32 1 - %25 = getelementptr inbounds %Token, %Token* %24, i32 0, i32 0 - %26 = call %StringRef @asStringRef(%String* %id) - %27 = call %Node @mkIdentifier(%AstBuilder* %22, %Location* %25, %StringRef %26) - %28 = call %Node @addToNodeList(%AstBuilder* %19, %Node %20, %Node %27) - store %Node %28, %Node* %"$tmpForRef1" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef1") + call void @parseId(%String* %"$tmpC", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %11 = call %String* @"=.278"(%String* %id, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") + %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %13 = load %Node, %Node* %res + %14 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %15 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %16 = getelementptr inbounds %Token, %Token* %15, i32 0, i32 0 + %17 = load %Location, %Location* %16 + %18 = call %StringRef @asStringRef(%String* %id) + %19 = call %Node @mkIdentifier(%AstBuilder* %14, %Location %17, %StringRef %18) + %20 = call %Node @addToNodeList(%AstBuilder* %12, %Node %13, %Node %19) + store %Node %20, %Node* %"$tmpForRef1" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef1") br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - %29 = load %Node, %Node* %res - call void @dtor.261(%String* %id) - ret %Node %29 + %21 = load %Node, %Node* %res + call void @dtor.250(%String* %id) + ret %Node %21 dumy_block: ; No predecessors! - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %id) unreachable } ; Function Attrs: inlinehint nounwind define internal %Node @addToNodeList(%AstBuilder* %obj, %Node %nl, %Node %newNode) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr %nl.addr = alloca %Node store %Node %nl, %Node* %nl.addr %newNode.addr = alloca %Node @@ -25594,21 +22889,17 @@ define internal %Node @addToNodeList(%AstBuilder* %obj, %Node %nl, %Node %newNod br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 1 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Node, %Node* %nl.addr - %7 = load %Node, %Node* %newNode.addr - %8 = call %Node @"().559"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %2, %UntypedPtr %5, %Node %6, %Node %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 1 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %nl.addr + %5 = load %Node, %Node* %newNode.addr + %6 = call %Node @"().549"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %1, %UntypedPtr %3, %Node %4, %Node %5) + ret %Node %6 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().559"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %UntypedPtr %p1, %Node %p2, %Node %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %this.addr +define internal %Node @"().549"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this, %UntypedPtr %p1, %Node %p2, %Node %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr %p2.addr = alloca %Node @@ -25618,22 +22909,17 @@ define internal %Node @"().559"(%"FunctionPtr3[Node, UntypedPtr, Node, Node]"* % br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, Node, Node]"*, %"FunctionPtr3[Node, UntypedPtr, Node, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Node, %Node* %p2.addr - %4 = load %Node, %Node* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %1 to %Node (%UntypedPtr, %Node, %Node)** - %6 = load %Node (%UntypedPtr, %Node, %Node)*, %Node (%UntypedPtr, %Node, %Node)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Node %3, %Node %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %Node, %Node* %p2.addr + %3 = load %Node, %Node* %p3.addr + %4 = bitcast %"FunctionPtr3[Node, UntypedPtr, Node, Node]"* %this to %Node (%UntypedPtr, %Node, %Node)** + %5 = load %Node (%UntypedPtr, %Node, %Node)*, %Node (%UntypedPtr, %Node, %Node)** %4 + %6 = call %Node %5(%UntypedPtr %1, %Node %2, %Node %3) + ret %Node %6 } ; Function Attrs: inlinehint nounwind -define internal %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %varFormals) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %varFormals.addr = alloca i1 - store i1 %varFormals, i1* %varFormals.addr +define internal %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { %res = alloca %Node %tmp.this = alloca %TokenType %tmp.this4 = alloca %TokenType @@ -25641,23 +22927,20 @@ define internal %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[Spar %tmp.this6 = alloca %TokenType %tmp.this10 = alloca %TokenType %loc = alloca %Location + %"$tmpForRef" = alloca %Location %ids = alloca %"Vector[LocString]" - %"$tmpC" = alloca %Location - %"$tmpC11" = alloca %Location %tmp.StringRef = alloca %StringRef - %tmp.this12 = alloca %Node + %tmp.this11 = alloca %Node br label %code code: ; preds = %0 - call void @ctor.556(%Node* %res) + call void @ctor.546(%Node* %res) br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 28) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_else + call void @ctor.404(%TokenType* %tmp.this, i32 29) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_else if_then: ; preds = %if_block br label %if_block1 @@ -25666,82 +22949,69 @@ if_else: ; preds = %if_block br label %if_block7 if_end: ; preds = %if_end9, %while_end - %4 = load %Node, %Node* %res - ret %Node %4 + %2 = load %Node, %Node* %res + ret %Node %2 if_block1: ; preds = %if_then - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this4, i32 29) - %6 = load %TokenType, %TokenType* %tmp.this4 - %7 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, %TokenType %6) - br i1 %7, label %if_then2, label %if_end3 + call void @ctor.404(%TokenType* %tmp.this4, i32 30) + %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this4) + br i1 %3, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 - %8 = load %Node, %Node* %res - ret %Node %8 + %4 = load %Node, %Node* %res + ret %Node %4 if_end3: ; preds = %dumy_block, %if_block1 - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %10 = load i1, i1* %varFormals.addr - call void @parseFormal(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, i1 %10, %Node* %res) + call void @parseFormal(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) br label %while_block dumy_block: ; No predecessors! br label %if_end3 while_block: ; preds = %while_step, %if_end3 - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 32) - %12 = load %TokenType, %TokenType* %tmp.this5 - %13 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, %TokenType %12) - br i1 %13, label %while_body, label %while_end + call void @ctor.404(%TokenType* %tmp.this5, i32 33) + %5 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + br i1 %5, label %while_body, label %while_end while_body: ; preds = %while_block - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %15 = load i1, i1* %varFormals.addr - call void @parseFormal(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, i1 %15, %Node* %res) + call void @parseFormal(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this6, i32 29) - %17 = load %TokenType, %TokenType* %tmp.this6 - %18 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, %TokenType %17) + call void @ctor.404(%TokenType* %tmp.this6, i32 30) + %6 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this6) br label %if_end if_block7: ; preds = %if_else - %19 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this10, i32 36) - %20 = load %TokenType, %TokenType* %tmp.this10 - %21 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %19, %TokenType %20) - br i1 %21, label %if_then8, label %if_end9 + call void @ctor.404(%TokenType* %tmp.this10, i32 37) + %7 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this10) + br i1 %7, label %if_then8, label %if_end9 if_then8: ; preds = %if_block7 - %22 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %22) - %23 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseIdList(%"Vector[LocString]"* %ids, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23) - %24 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %25 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %24, i32 0, i32 3 - %26 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %27 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %26, i32 0, i32 3 - %28 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC11", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %28) - call void @span(%Location* %"$tmpC", %Location* %loc, %Location* %"$tmpC11") - %29 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %30 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.93, i32 0, i32 0), i8** %29 - store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.93, i32 0, i32 7), i8** %30 - %31 = load %StringRef, %StringRef* %tmp.StringRef - %32 = call %Node @mkIdentifier(%AstBuilder* %27, %Location* %"$tmpC", %StringRef %31) - call void @ctor.556(%Node* %tmp.this12) - %33 = load %Node, %Node* %tmp.this12 - %34 = load i1, i1* %varFormals.addr - call void @createFormals(%AstBuilder* %25, %"Vector[LocString]"* %ids, %Node %32, %Node %33, i1 %34, %Node* %res) - call void @dtor.586(%"Vector[LocString]"* %ids) + %8 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %8, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") + call void @parseIdList(%"Vector[LocString]"* %ids, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %11 = load %Location, %Location* %loc + %12 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %13 = call %Location @span(%Location %11, %Location %12) + %14 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %15 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %16 = bitcast %UntypedPtr* %14 to i8** + %17 = bitcast %UntypedPtr* %15 to i8** + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.95, i32 0, i32 0), i8** %16 + store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.95, i32 0, i32 7), i8** %17 + %18 = load %StringRef, %StringRef* %tmp.StringRef + %19 = call %Node @mkIdentifier(%AstBuilder* %10, %Location %13, %StringRef %18) + call void @ctor.546(%Node* %tmp.this11) + %20 = load %Node, %Node* %tmp.this11 + call void @createFormals(%AstBuilder* %9, %"Vector[LocString]"* %ids, %Node %19, %Node %20, i32 2, %Node* %res) + call void @dtor.577(%"Vector[LocString]"* %ids) br label %if_end9 if_end9: ; preds = %if_then8, %if_block7 @@ -25749,13 +23019,7 @@ if_end9: ; preds = %if_then8, %if_block } ; Function Attrs: inlinehint nounwind -define internal void @parseFormal(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %varFormals, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %varFormals.addr = alloca i1 - store i1 %varFormals, i1* %varFormals.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr +define internal void @parseFormal(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { %ids = alloca %"Vector[LocString]" %tmp.this = alloca %TokenType %typeNode = alloca %Node @@ -25766,51 +23030,37 @@ define internal void @parseFormal(%"SparrowParser[SparrowLayoutDecoder[SparrowSc br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseIdList(%"Vector[LocString]"* %ids, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 30) - %3 = load %TokenType, %TokenType* %tmp.this - %4 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, %TokenType %3) - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i1 false) - store %Node %6, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %typeNode, %Node* %"$tmpForRef") - call void @ctor.556(%Node* %init) + call void @parseIdList(%"Vector[LocString]"* %ids, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + call void @ctor.404(%TokenType* %tmp.this, i32 31) + %1 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + %2 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 false) + store %Node %2, %Node* %"$tmpForRef" + call void @ctor.535(%Node* %typeNode, %Node* %"$tmpForRef") + call void @ctor.546(%Node* %init) br label %if_block if_block: ; preds = %code - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 35) - %8 = load %TokenType, %TokenType* %tmp.this1 - %9 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %TokenType %8) - br i1 %9, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this1, i32 36) + %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i1 true) - store %Node %11, %Node* %"$tmpForRef2" - call void @"=.554"(%Node* %init, %Node* %"$tmpForRef2") + %4 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %4, %Node* %"$tmpForRef2" + call void @"=.544"(%Node* %init, %Node* %"$tmpForRef2") br label %if_end if_end: ; preds = %if_then, %if_block - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, i32 0, i32 3 - %14 = load %Node, %Node* %typeNode - %15 = load %Node, %Node* %init - %16 = load i1, i1* %varFormals.addr - %17 = load %Node*, %Node** %res.addr - call void @createFormals(%AstBuilder* %13, %"Vector[LocString]"* %ids, %Node %14, %Node %15, i1 %16, %Node* %17) - call void @dtor.586(%"Vector[LocString]"* %ids) + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %6 = load %Node, %Node* %typeNode + %7 = load %Node, %Node* %init + call void @createFormals(%AstBuilder* %5, %"Vector[LocString]"* %ids, %Node %6, %Node %7, i32 2, %Node* %res) + call void @dtor.577(%"Vector[LocString]"* %ids) ret void } ; Function Attrs: inlinehint nounwind define internal void @parseIdList(%"Vector[LocString]"* sret %_result, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %_result.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %_result, %"Vector[LocString]"** %_result.addr - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %res = alloca %"Vector[LocString]" %id = alloca %String %tmp.this = alloca %LocString @@ -25822,181 +23072,141 @@ define internal void @parseIdList(%"Vector[LocString]"* sret %_result, %"Sparrow br label %code code: ; preds = %0 - call void @ctor.560(%"Vector[LocString]"* %res) - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 0, i32 1 - %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 - %5 = load %Location, %Location* %4 - %6 = load %String, %String* %id - call void @"~"(%"Tuple[Location, String]"* %"$tmpC", %Location %5, %String %6) - %7 = load %"Tuple[Location, String]", %"Tuple[Location, String]"* %"$tmpC" - call void @ctor.578(%LocString* %tmp.this, %"Tuple[Location, String]" %7) - call void @"+=.562"(%"Vector[LocString]"* %res, %LocString* %tmp.this) - call void @dtor.580(%LocString* %tmp.this) - call void @dtor.581(%"Tuple[Location, String]"* %"$tmpC") + call void @ctor.550(%"Vector[LocString]"* %res) + call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %Token, %Token* %1, i32 0, i32 0 + call void @"~"(%"Tuple[Location, String]"* %"$tmpC", %Location* %2, %String* %id) + call void @ctor.569(%LocString* %tmp.this, %"Tuple[Location, String]"* %"$tmpC") + call void @"+=.552"(%"Vector[LocString]"* %res, %LocString* %tmp.this) + call void @dtor.571(%LocString* %tmp.this) + call void @dtor.572(%"Tuple[Location, String]"* %"$tmpC") br label %while_block while_block: ; preds = %while_step, %code - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 32) - %9 = load %TokenType, %TokenType* %tmp.this1 - %10 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8, %TokenType %9) - br i1 %10, label %while_body, label %while_end + call void @ctor.404(%TokenType* %tmp.this1, i32 33) + %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) + br i1 %3, label %while_body, label %while_end while_body: ; preds = %while_block - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseId(%String* %"$tmpC2", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11) - %12 = call %String* @"=.290"(%String* %id, %String* %"$tmpC2") - call void @dtor.261(%String* %"$tmpC2") - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, i32 0, i32 1 - %15 = getelementptr inbounds %Token, %Token* %14, i32 0, i32 0 - %16 = load %Location, %Location* %15 - %17 = load %String, %String* %id - call void @"~"(%"Tuple[Location, String]"* %"$tmpC4", %Location %16, %String %17) - %18 = load %"Tuple[Location, String]", %"Tuple[Location, String]"* %"$tmpC4" - call void @ctor.578(%LocString* %tmp.this3, %"Tuple[Location, String]" %18) - call void @"+=.562"(%"Vector[LocString]"* %res, %LocString* %tmp.this3) - call void @dtor.580(%LocString* %tmp.this3) - call void @dtor.581(%"Tuple[Location, String]"* %"$tmpC4") + call void @parseId(%String* %"$tmpC2", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %4 = call %String* @"=.278"(%String* %id, %String* %"$tmpC2") + call void @dtor.250(%String* %"$tmpC2") + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 0 + call void @"~"(%"Tuple[Location, String]"* %"$tmpC4", %Location* %6, %String* %id) + call void @ctor.569(%LocString* %tmp.this3, %"Tuple[Location, String]"* %"$tmpC4") + call void @"+=.552"(%"Vector[LocString]"* %res, %LocString* %tmp.this3) + call void @dtor.571(%LocString* %tmp.this3) + call void @dtor.572(%"Tuple[Location, String]"* %"$tmpC4") br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - %19 = load %"Vector[LocString]"*, %"Vector[LocString]"** %_result.addr - call void @ctor.582(%"Vector[LocString]"* %19, %"Vector[LocString]"* %res) - call void @dtor.261(%String* %id) - call void @dtor.586(%"Vector[LocString]"* %res) + call void @ctor.573(%"Vector[LocString]"* %_result, %"Vector[LocString]"* %res) + call void @dtor.250(%String* %id) + call void @dtor.577(%"Vector[LocString]"* %res) ret void dumy_block: ; No predecessors! - call void @dtor.261(%String* %id) - call void @dtor.586(%"Vector[LocString]"* %res) + call void @dtor.250(%String* %id) + call void @dtor.577(%"Vector[LocString]"* %res) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.560(%"Vector[LocString]"* %this) #3 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr +define internal void @ctor.550(%"Vector[LocString]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %1, i32 0, i32 0 - call void @ctor.561(%"RawPtr[LocString]"* %2) - %3 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %4 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %3, i32 0, i32 1 - call void @ctor.561(%"RawPtr[LocString]"* %4) - %5 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %6 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %5, i32 0, i32 2 - call void @ctor.561(%"RawPtr[LocString]"* %6) + %1 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + call void @ctor.551(%"RawPtr[LocString]"* %1) + %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + call void @ctor.551(%"RawPtr[LocString]"* %2) + %3 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 2 + call void @ctor.551(%"RawPtr[LocString]"* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.561(%"RawPtr[LocString]"* %this) #3 { - %this.addr = alloca %"RawPtr[LocString]"* - store %"RawPtr[LocString]"* %this, %"RawPtr[LocString]"** %this.addr +define internal void @ctor.551(%"RawPtr[LocString]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %this.addr - %2 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %1, i32 0, i32 0 - store %LocString* null, %LocString** %2 + %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + store %LocString* null, %LocString** %1 ret void } ; Function Attrs: inlinehint nounwind -define internal void @"+=.562"(%"Vector[LocString]"* %this, %LocString* %value) #4 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr - %value.addr = alloca %LocString* - store %LocString* %value, %LocString** %value.addr +define internal void @"+=.552"(%"Vector[LocString]"* %this, %LocString* %value) #4 { br label %code code: ; preds = %0 - %1 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %2 = load %LocString*, %LocString** %value.addr - call void @pushBack.563(%"Vector[LocString]"* %1, %LocString* %2) + call void @pushBack.553(%"Vector[LocString]"* %this, %LocString* %value) ret void } ; Function Attrs: inlinehint nounwind -define internal void @pushBack.563(%"Vector[LocString]"* %this, %LocString* %value) #4 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr - %value.addr = alloca %LocString* - store %LocString* %value, %LocString** %value.addr +define internal void @pushBack.553(%"Vector[LocString]"* %this, %LocString* %value) #4 { %t = alloca i64 %tmp.this = alloca i64 %tmp.this4 = alloca i64 %tmp.this5 = alloca i64 - %"$tmpC" = alloca %"RawPtr[LocString]" + %"$tmpForRef" = alloca %"RawPtr[LocString]" br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %1, i32 0, i32 1 - %3 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %4 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %3, i32 0, i32 2 - %5 = call i1 @"==.564"(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %4) - br i1 %5, label %if_then, label %if_end + %1 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 2 + %3 = call i1 @"==.554"(%"RawPtr[LocString]"* %1, %"RawPtr[LocString]"* %2) + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block store i64 2, i64* %tmp.this - %6 = load i64, i64* %tmp.this - %7 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %8 = call i64 @capacity.565(%"Vector[LocString]"* %7) - %9 = mul i64 %6, %8 - store i64 %9, i64* %t + %4 = load i64, i64* %tmp.this + %5 = call i64 @capacity.555(%"Vector[LocString]"* %this) + %6 = mul i64 %4, %5 + store i64 %6, i64* %t br label %if_block1 if_end: ; preds = %if_end3, %if_block - %10 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %11 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %10, i32 0, i32 1 - %12 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %11 - %13 = call %LocString* @value.576(%"RawPtr[LocString]" %12) - %14 = load %LocString*, %LocString** %value.addr - call void @ctor.574(%LocString* %13, %LocString* %14) - %15 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %16 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %15, i32 0, i32 1 - %17 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %18 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %17, i32 0, i32 1 - %19 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %18 - call void @advance.577(%"RawPtr[LocString]"* %"$tmpC", %"RawPtr[LocString]" %19) - call void @"=.571"(%"RawPtr[LocString]"* %16, %"RawPtr[LocString]"* %"$tmpC") + %7 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %8 = call %LocString* @value.567(%"RawPtr[LocString]"* %7) + call void @ctor.565(%LocString* %8, %LocString* %value) + %9 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %10 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %11 = call %"RawPtr[LocString]" @advance.568(%"RawPtr[LocString]"* %10) + store %"RawPtr[LocString]" %11, %"RawPtr[LocString]"* %"$tmpForRef" + call void @"=.562"(%"RawPtr[LocString]"* %9, %"RawPtr[LocString]"* %"$tmpForRef") ret void if_block1: ; preds = %if_then - %20 = load i64, i64* %t + %12 = load i64, i64* %t store i64 2, i64* %tmp.this4 - %21 = load i64, i64* %tmp.this4 - %22 = icmp slt i64 %20, %21 - br i1 %22, label %if_then2, label %if_end3 + %13 = load i64, i64* %tmp.this4 + %14 = icmp slt i64 %12, %13 + br i1 %14, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i64 2, i64* %tmp.this5 - %23 = load i64, i64* %tmp.this5 - store i64 %23, i64* %t + %15 = load i64, i64* %tmp.this5 + store i64 %15, i64* %t br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 - %24 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %25 = load i64, i64* %t - call void @reserve.568(%"Vector[LocString]"* %24, i64 %25) + %16 = load i64, i64* %t + call void @reserve.558(%"Vector[LocString]"* %this, i64 %16) br label %if_end } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.564"(%"RawPtr[LocString]"* %this, %"RawPtr[LocString]"* %other) #3 { +define internal i1 @"==.554"(%"RawPtr[LocString]"* %this, %"RawPtr[LocString]"* %other) #3 { %this.addr = alloca %"RawPtr[LocString]"* store %"RawPtr[LocString]"* %this, %"RawPtr[LocString]"** %this.addr %other.addr = alloca %"RawPtr[LocString]"* @@ -26017,66 +23227,63 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal i64 @capacity.565(%"Vector[LocString]"* %this) #4 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr +define internal i64 @capacity.555(%"Vector[LocString]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %1, i32 0, i32 2 + %1 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 2 + %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 %3 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %2 - %4 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %5 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %4, i32 0, i32 0 - %6 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %5 - %7 = call i64 @diff.566(%"RawPtr[LocString]" %3, %"RawPtr[LocString]" %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = call i64 @diff.556(%"RawPtr[LocString]"* %1, %"RawPtr[LocString]" %3) + store i64 %4, i64* %tmp.this + %5 = load i64, i64* %tmp.this + ret i64 %5 } ; Function Attrs: inlinehint nounwind -define internal i64 @diff.566(%"RawPtr[LocString]" %this, %"RawPtr[LocString]" %other) #4 { - %this.addr = alloca %"RawPtr[LocString]" - store %"RawPtr[LocString]" %this, %"RawPtr[LocString]"* %this.addr +define internal i64 @diff.556(%"RawPtr[LocString]"* %this, %"RawPtr[LocString]" %other) #4 { %other.addr = alloca %"RawPtr[LocString]" store %"RawPtr[LocString]" %other, %"RawPtr[LocString]"* %other.addr - %tmp.this = alloca i64 - %tmp.this1 = alloca i64 + %tmp.this = alloca %UntypedPtr + %tmp.this1 = alloca %UntypedPtr + %tmp.this2 = alloca i64 br label %code code: ; preds = %0 - %1 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %this.addr - %2 = call i8* @bytePtr.567(%"RawPtr[LocString]" %1) - %3 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %other.addr - %4 = call i8* @bytePtr.567(%"RawPtr[LocString]" %3) - %5 = call i64 @ptrDiff(i8* %2, i8* %4) - store i64 48, i64* %tmp.this1 - %6 = load i64, i64* %tmp.this1 - %7 = sdiv i64 %5, %6 - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + %2 = load %LocString*, %LocString** %1 + call void @ctor.557(%UntypedPtr* %tmp.this, %LocString* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this + %4 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %other.addr, i32 0, i32 0 + %5 = load %LocString*, %LocString** %4 + call void @ctor.557(%UntypedPtr* %tmp.this1, %LocString* %5) + %6 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + %7 = call i64 bitcast (i64 (i8*, i8*)* @ptrDiff to i64 (%UntypedPtr, %UntypedPtr)*)(%UntypedPtr %3, %UntypedPtr %6) + store i64 48, i64* %tmp.this2 + %8 = load i64, i64* %tmp.this2 + %9 = sdiv i64 %7, %8 + ret i64 %9 } ; Function Attrs: inlinehint nounwind -define internal i8* @bytePtr.567(%"RawPtr[LocString]" %this) #4 { - %this.addr = alloca %"RawPtr[LocString]" - store %"RawPtr[LocString]" %this, %"RawPtr[LocString]"* %this.addr +define internal void @ctor.557(%UntypedPtr* %this, %LocString* %val) #4 { + %val.addr = alloca %LocString* + store %LocString* %val, %LocString** %val.addr br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this.addr, i32 0, i32 0 - %2 = load %LocString*, %LocString** %1 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* null, i8** %1 + %2 = load %LocString*, %LocString** %val.addr %3 = bitcast %LocString* %2 to i8* - ret i8* %3 + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this, i32 0, i32 0 + store i8* %3, i8** %4 + ret void } ; Function Attrs: inlinehint nounwind -define internal void @reserve.568(%"Vector[LocString]"* %this, i64 %n) #4 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr +define internal void @reserve.558(%"Vector[LocString]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr %curCapacity = alloca i64 @@ -26087,21 +23294,20 @@ define internal void @reserve.568(%"Vector[LocString]"* %this, i64 %n) #4 { %tmp.this10 = alloca i64 %tmp.this11 = alloca double %curSize = alloca i64 - %"$tmpC" = alloca %"RawPtr[LocString]" - %"$tmpC12" = alloca %"RawPtr[LocString]" + %"$tmpForRef" = alloca %"RawPtr[LocString]" + %"$tmpForRef12" = alloca %"RawPtr[LocString]" br label %code code: ; preds = %0 - %1 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %2 = call i64 @capacity.565(%"Vector[LocString]"* %1) - store i64 %2, i64* %curCapacity + %1 = call i64 @capacity.555(%"Vector[LocString]"* %this) + store i64 %1, i64* %curCapacity br label %if_block if_block: ; preds = %code - %3 = load i64, i64* %n.addr - %4 = load i64, i64* %curCapacity - %5 = icmp sle i64 %3, %4 - br i1 %5, label %if_then, label %if_end + %2 = load i64, i64* %n.addr + %3 = load i64, i64* %curCapacity + %4 = icmp sle i64 %2, %3 + br i1 %4, label %if_then, label %if_end if_then: ; preds = %if_block ret void @@ -26113,119 +23319,118 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %6 = load i64, i64* %n.addr + %5 = load i64, i64* %n.addr store i64 8, i64* %tmp.this - %7 = load i64, i64* %tmp.this - %8 = icmp slt i64 %6, %7 - br i1 %8, label %if_then2, label %if_end3 + %6 = load i64, i64* %tmp.this + %7 = icmp slt i64 %5, %6 + br i1 %7, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 store i64 8, i64* %tmp.this4 - %9 = load i64, i64* %tmp.this4 - store i64 %9, i64* %n.addr + %8 = load i64, i64* %tmp.this4 + store i64 %8, i64* %n.addr br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 br label %if_block5 if_block5: ; preds = %if_end3 - %10 = load i64, i64* %n.addr - %11 = sitofp i64 %10 to double - store double %11, double* %tmp.this8 - %12 = load double, double* %tmp.this8 - %13 = load i64, i64* %curCapacity - %14 = sitofp i64 %13 to double - store double %14, double* %tmp.this9 - %15 = load double, double* %tmp.this9 - %16 = call double @_Double_opMul(double 2.000000e+00, double %15) - %17 = call i1 @_Double_opLT(double %12, double %16) - br i1 %17, label %if_then6, label %if_end7 + %9 = load i64, i64* %n.addr + %10 = sitofp i64 %9 to double + store double %10, double* %tmp.this8 + %11 = load double, double* %tmp.this8 + %12 = load i64, i64* %curCapacity + %13 = sitofp i64 %12 to double + store double %13, double* %tmp.this9 + %14 = load double, double* %tmp.this9 + %15 = call double @_Double_opMul(double 2.000000e+00, double %14) + %16 = call i1 @_Double_opLT(double %11, double %15) + br i1 %16, label %if_then6, label %if_end7 if_then6: ; preds = %if_block5 - %18 = load i64, i64* %curCapacity - %19 = sitofp i64 %18 to double - store double %19, double* %tmp.this11 - %20 = load double, double* %tmp.this11 - %21 = call double @_Double_opMul(double 2.000000e+00, double %20) - %22 = fptoui double %21 to i64 - store i64 %22, i64* %tmp.this10 - %23 = load i64, i64* %tmp.this10 - store i64 %23, i64* %n.addr + %17 = load i64, i64* %curCapacity + %18 = sitofp i64 %17 to double + store double %18, double* %tmp.this11 + %19 = load double, double* %tmp.this11 + %20 = call double @_Double_opMul(double 2.000000e+00, double %19) + %21 = fptoui double %20 to i64 + store i64 %21, i64* %tmp.this10 + %22 = load i64, i64* %tmp.this10 + store i64 %22, i64* %n.addr br label %if_end7 if_end7: ; preds = %if_then6, %if_block5 - %24 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %25 = call i64 @size.569(%"Vector[LocString]"* %24) - store i64 %25, i64* %curSize - %26 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %27 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %26, i32 0, i32 0 - %28 = load i64, i64* %n.addr - call void @reallocPtr.570(%"RawPtr[LocString]"* %27, i64 %28) - %29 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %30 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %29, i32 0, i32 1 - %31 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %32 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %31, i32 0, i32 0 - %33 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %32 - %34 = load i64, i64* %curSize - call void @advance.572(%"RawPtr[LocString]"* %"$tmpC", %"RawPtr[LocString]" %33, i64 %34) - call void @"=.571"(%"RawPtr[LocString]"* %30, %"RawPtr[LocString]"* %"$tmpC") - %35 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %36 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %35, i32 0, i32 2 - %37 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %38 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %37, i32 0, i32 0 - %39 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %38 - %40 = load i64, i64* %n.addr - call void @advance.572(%"RawPtr[LocString]"* %"$tmpC12", %"RawPtr[LocString]" %39, i64 %40) - call void @"=.571"(%"RawPtr[LocString]"* %36, %"RawPtr[LocString]"* %"$tmpC12") - ret void -} - -; Function Attrs: inlinehint nounwind -define internal i64 @size.569(%"Vector[LocString]"* %this) #4 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr + %23 = call i64 @size.559(%"Vector[LocString]"* %this) + store i64 %23, i64* %curSize + %24 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + %25 = load i64, i64* %n.addr + call void @reallocPtr.560(%"RawPtr[LocString]"* %24, i64 %25) + %26 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %27 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + %28 = load i64, i64* %curSize + %29 = call %"RawPtr[LocString]" @advance.563(%"RawPtr[LocString]"* %27, i64 %28) + store %"RawPtr[LocString]" %29, %"RawPtr[LocString]"* %"$tmpForRef" + call void @"=.562"(%"RawPtr[LocString]"* %26, %"RawPtr[LocString]"* %"$tmpForRef") + %30 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 2 + %31 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + %32 = load i64, i64* %n.addr + %33 = call %"RawPtr[LocString]" @advance.563(%"RawPtr[LocString]"* %31, i64 %32) + store %"RawPtr[LocString]" %33, %"RawPtr[LocString]"* %"$tmpForRef12" + call void @"=.562"(%"RawPtr[LocString]"* %30, %"RawPtr[LocString]"* %"$tmpForRef12") + ret void +} + +; Function Attrs: inlinehint nounwind +define internal i64 @size.559(%"Vector[LocString]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %1, i32 0, i32 1 + %1 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 %3 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %2 - %4 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %5 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %4, i32 0, i32 0 - %6 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %5 - %7 = call i64 @diff.566(%"RawPtr[LocString]" %3, %"RawPtr[LocString]" %6) - store i64 %7, i64* %tmp.this - %8 = load i64, i64* %tmp.this - ret i64 %8 + %4 = call i64 @diff.556(%"RawPtr[LocString]"* %1, %"RawPtr[LocString]" %3) + store i64 %4, i64* %tmp.this + %5 = load i64, i64* %tmp.this + ret i64 %5 } ; Function Attrs: inlinehint nounwind -define internal void @reallocPtr.570(%"RawPtr[LocString]"* %this, i64 %n) #4 { - %this.addr = alloca %"RawPtr[LocString]"* - store %"RawPtr[LocString]"* %this, %"RawPtr[LocString]"** %this.addr +define internal void @reallocPtr.560(%"RawPtr[LocString]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %this.addr - %2 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %1 - %3 = call i8* @bytePtr.567(%"RawPtr[LocString]" %2) + %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + %2 = load %LocString*, %LocString** %1 + call void @ctor.557(%UntypedPtr* %tmp.this, %LocString* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this %4 = load i64, i64* %n.addr %5 = mul i64 %4, 48 - %6 = call i8* @realloc(i8* %3, i64 %5) - %7 = bitcast i8* %6 to %LocString* - %8 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %this.addr - %9 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %8, i32 0, i32 0 - store %LocString* %7, %LocString** %9 + %6 = call %UntypedPtr @realloc(%UntypedPtr %3, i64 %5) + %7 = call %LocString* @asRefOf.561(%UntypedPtr %6) + %8 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + store %LocString* %7, %LocString** %8 ret void } +; Function Attrs: inlinehint nounwind +define internal %LocString* @asRefOf.561(%UntypedPtr %this) #4 { + %this.addr = alloca %UntypedPtr + store %UntypedPtr %this, %UntypedPtr* %this.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %this.addr, i32 0, i32 0 + %2 = load i8*, i8** %1 + %3 = bitcast i8* %2 to %LocString* + ret %LocString* %3 +} + ; Function Attrs: alwaysinline nounwind -define internal void @"=.571"(%"RawPtr[LocString]"* %this, %"RawPtr[LocString]"* %other) #3 { - %this.addr = alloca %"RawPtr[LocString]"* - store %"RawPtr[LocString]"* %this, %"RawPtr[LocString]"** %this.addr +define internal void @"=.562"(%"RawPtr[LocString]"* %this, %"RawPtr[LocString]"* %other) #3 { %other.addr = alloca %"RawPtr[LocString]"* store %"RawPtr[LocString]"* %other, %"RawPtr[LocString]"** %other.addr br label %code @@ -26234,291 +23439,233 @@ code: ; preds = %0 %1 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %other.addr %2 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %1, i32 0, i32 0 %3 = load %LocString*, %LocString** %2 - %4 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %this.addr - %5 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %4, i32 0, i32 0 - store %LocString* %3, %LocString** %5 + %4 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + store %LocString* %3, %LocString** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal void @advance.572(%"RawPtr[LocString]"* sret %_result, %"RawPtr[LocString]" %this, i64 %n) #4 { - %_result.addr = alloca %"RawPtr[LocString]"* - store %"RawPtr[LocString]"* %_result, %"RawPtr[LocString]"** %_result.addr - %this.addr = alloca %"RawPtr[LocString]" - store %"RawPtr[LocString]" %this, %"RawPtr[LocString]"* %this.addr +define internal %"RawPtr[LocString]" @advance.563(%"RawPtr[LocString]"* %this, i64 %n) #4 { %n.addr = alloca i64 store i64 %n, i64* %n.addr + %tmp.this = alloca %"RawPtr[LocString]" + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %_result.addr - %2 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %this.addr - %3 = call i8* @bytePtr.567(%"RawPtr[LocString]" %2) + %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + %2 = load %LocString*, %LocString** %1 + call void @ctor.557(%UntypedPtr* %tmp.this1, %LocString* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 %4 = load i64, i64* %n.addr %5 = mul i64 %4, 48 - %6 = call i8* @ptrAdd(i8* %3, i64 %5) - call void @ctor.573(%"RawPtr[LocString]"* %1, i8* %6) - ret void + %6 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 %5) + call void @ctor.564(%"RawPtr[LocString]"* %tmp.this, %UntypedPtr %6) + %7 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %tmp.this + ret %"RawPtr[LocString]" %7 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.573(%"RawPtr[LocString]"* %this, i8* %byteRef) #4 { - %this.addr = alloca %"RawPtr[LocString]"* - store %"RawPtr[LocString]"* %this, %"RawPtr[LocString]"** %this.addr - %byteRef.addr = alloca i8* - store i8* %byteRef, i8** %byteRef.addr +define internal void @ctor.564(%"RawPtr[LocString]"* %this, %UntypedPtr %p) #4 { + %p.addr = alloca %UntypedPtr + store %UntypedPtr %p, %UntypedPtr* %p.addr br label %code code: ; preds = %0 - %1 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %this.addr - %2 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %1, i32 0, i32 0 - store %LocString* null, %LocString** %2 - %3 = load i8*, i8** %byteRef.addr - %4 = bitcast i8* %3 to %LocString* - %5 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %this.addr - %6 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %5, i32 0, i32 0 - store %LocString* %4, %LocString** %6 + %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + store %LocString* null, %LocString** %1 + %2 = load %UntypedPtr, %UntypedPtr* %p.addr + %3 = call %LocString* @asRefOf.561(%UntypedPtr %2) + %4 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + store %LocString* %3, %LocString** %4 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.574(%LocString* %this, %LocString* %other) #3 { - %this.addr = alloca %LocString* - store %LocString* %this, %LocString** %this.addr +define internal void @ctor.565(%LocString* %this, %LocString* %other) #3 { %other.addr = alloca %LocString* store %LocString* %other, %LocString** %other.addr br label %code code: ; preds = %0 - %1 = load %LocString*, %LocString** %this.addr - %2 = getelementptr inbounds %LocString, %LocString* %1, i32 0, i32 0 - %3 = load %LocString*, %LocString** %other.addr - %4 = getelementptr inbounds %LocString, %LocString* %3, i32 0, i32 0 - call void @ctor.575(%"Tuple[Location, String]"* %2, %"Tuple[Location, String]"* %4) + %1 = getelementptr inbounds %LocString, %LocString* %this, i32 0, i32 0 + %2 = load %LocString*, %LocString** %other.addr + %3 = getelementptr inbounds %LocString, %LocString* %2, i32 0, i32 0 + call void @ctor.566(%"Tuple[Location, String]"* %1, %"Tuple[Location, String]"* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.575(%"Tuple[Location, String]"* %this, %"Tuple[Location, String]"* %other) #3 { - %this.addr = alloca %"Tuple[Location, String]"* - store %"Tuple[Location, String]"* %this, %"Tuple[Location, String]"** %this.addr +define internal void @ctor.566(%"Tuple[Location, String]"* %this, %"Tuple[Location, String]"* %other) #3 { %other.addr = alloca %"Tuple[Location, String]"* store %"Tuple[Location, String]"* %other, %"Tuple[Location, String]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %this.addr - %2 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %1, i32 0, i32 0 - %3 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %other.addr - %4 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %3, i32 0, i32 0 - call void @ctor.182(%Location* %2, %Location* %4) - %5 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %this.addr + %1 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %this, i32 0, i32 0 + %2 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %other.addr + %3 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %2, i32 0, i32 0 + call void @ctor.169(%Location* %1, %Location* %3) + %4 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %this, i32 0, i32 1 + %5 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %other.addr %6 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %5, i32 0, i32 1 - %7 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %other.addr - %8 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %7, i32 0, i32 1 - call void @ctor.189(%String* %6, %String* %8) + call void @ctor.175(%String* %4, %String* %6) ret void } ; Function Attrs: inlinehint nounwind -define internal %LocString* @value.576(%"RawPtr[LocString]" %this) #4 { - %this.addr = alloca %"RawPtr[LocString]" - store %"RawPtr[LocString]" %this, %"RawPtr[LocString]"* %this.addr +define internal %LocString* @value.567(%"RawPtr[LocString]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 %2 = load %LocString*, %LocString** %1 ret %LocString* %2 } ; Function Attrs: inlinehint nounwind -define internal void @advance.577(%"RawPtr[LocString]"* sret %_result, %"RawPtr[LocString]" %this) #4 { - %_result.addr = alloca %"RawPtr[LocString]"* - store %"RawPtr[LocString]"* %_result, %"RawPtr[LocString]"** %_result.addr - %this.addr = alloca %"RawPtr[LocString]" - store %"RawPtr[LocString]" %this, %"RawPtr[LocString]"* %this.addr +define internal %"RawPtr[LocString]" @advance.568(%"RawPtr[LocString]"* %this) #4 { + %tmp.this = alloca %"RawPtr[LocString]" + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %_result.addr - %2 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %this.addr - %3 = call i8* @bytePtr.567(%"RawPtr[LocString]" %2) - %4 = call i8* @ptrAdd(i8* %3, i64 48) - call void @ctor.573(%"RawPtr[LocString]"* %1, i8* %4) - ret void + %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + %2 = load %LocString*, %LocString** %1 + call void @ctor.557(%UntypedPtr* %tmp.this1, %LocString* %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + %4 = call %UntypedPtr bitcast (i8* (i8*, i64)* @ptrAdd to %UntypedPtr (%UntypedPtr, i64)*)(%UntypedPtr %3, i64 48) + call void @ctor.564(%"RawPtr[LocString]"* %tmp.this, %UntypedPtr %4) + %5 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %tmp.this + ret %"RawPtr[LocString]" %5 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.578(%LocString* %this, %"Tuple[Location, String]" %fdata) #3 { +define internal void @ctor.569(%LocString* %this, %"Tuple[Location, String]"* %fdata) #3 { %this.addr = alloca %LocString* store %LocString* %this, %LocString** %this.addr - %fdata.addr = alloca %"Tuple[Location, String]" - store %"Tuple[Location, String]" %fdata, %"Tuple[Location, String]"* %fdata.addr br label %code code: ; preds = %0 %1 = load %LocString*, %LocString** %this.addr %2 = getelementptr inbounds %LocString, %LocString* %1, i32 0, i32 0 - call void @ctor.575(%"Tuple[Location, String]"* %2, %"Tuple[Location, String]"* %fdata.addr) + call void @ctor.566(%"Tuple[Location, String]"* %2, %"Tuple[Location, String]"* %fdata) ret void } ; Function Attrs: inlinehint nounwind -define internal void @"~"(%"Tuple[Location, String]"* sret %_result, %Location %v1, %String %v2) #4 { - %_result.addr = alloca %"Tuple[Location, String]"* - store %"Tuple[Location, String]"* %_result, %"Tuple[Location, String]"** %_result.addr - %v1.addr = alloca %Location - store %Location %v1, %Location* %v1.addr - %v2.addr = alloca %String - store %String %v2, %String* %v2.addr +define internal void @"~"(%"Tuple[Location, String]"* sret %_result, %Location* %v1, %String* %v2) #4 { br label %code code: ; preds = %0 - %1 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %_result.addr - %2 = load %Location, %Location* %v1.addr - %3 = load %String, %String* %v2.addr - call void @mkTuple(%"Tuple[Location, String]"* %1, %Location %2, %String %3) + call void @mkTuple(%"Tuple[Location, String]"* %_result, %Location* %v1, %String* %v2) ret void } ; Function Attrs: inlinehint nounwind -define internal void @mkTuple(%"Tuple[Location, String]"* sret %_result, %Location %v1, %String %v2) #4 { - %_result.addr = alloca %"Tuple[Location, String]"* - store %"Tuple[Location, String]"* %_result, %"Tuple[Location, String]"** %_result.addr - %v1.addr = alloca %Location - store %Location %v1, %Location* %v1.addr - %v2.addr = alloca %String - store %String %v2, %String* %v2.addr +define internal void @mkTuple(%"Tuple[Location, String]"* sret %_result, %Location* %v1, %String* %v2) #4 { br label %code code: ; preds = %0 - %1 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %_result.addr - %2 = load %Location, %Location* %v1.addr - %3 = load %String, %String* %v2.addr - call void @ctor.579(%"Tuple[Location, String]"* %1, %Location %2, %String %3) + %1 = load %Location, %Location* %v1 + call void @ctor.570(%"Tuple[Location, String]"* %_result, %Location %1, %String* %v2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.579(%"Tuple[Location, String]"* %this, %Location %fv1, %String %fv2) #3 { +define internal void @ctor.570(%"Tuple[Location, String]"* %this, %Location %fv1, %String* %fv2) #3 { %this.addr = alloca %"Tuple[Location, String]"* store %"Tuple[Location, String]"* %this, %"Tuple[Location, String]"** %this.addr %fv1.addr = alloca %Location store %Location %fv1, %Location* %fv1.addr - %fv2.addr = alloca %String - store %String %fv2, %String* %fv2.addr br label %code code: ; preds = %0 %1 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %this.addr %2 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %1, i32 0, i32 0 - call void @ctor.182(%Location* %2, %Location* %fv1.addr) + call void @ctor.169(%Location* %2, %Location* %fv1.addr) %3 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %this.addr %4 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %3, i32 0, i32 1 - call void @ctor.189(%String* %4, %String* %fv2.addr) + call void @ctor.175(%String* %4, %String* %fv2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.580(%LocString* %this) #3 { - %this.addr = alloca %LocString* - store %LocString* %this, %LocString** %this.addr +define internal void @dtor.571(%LocString* %this) #3 { br label %code code: ; preds = %0 - %1 = load %LocString*, %LocString** %this.addr - %2 = getelementptr inbounds %LocString, %LocString* %1, i32 0, i32 0 - call void @dtor.581(%"Tuple[Location, String]"* %2) + %1 = getelementptr inbounds %LocString, %LocString* %this, i32 0, i32 0 + call void @dtor.572(%"Tuple[Location, String]"* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.581(%"Tuple[Location, String]"* %this) #3 { - %this.addr = alloca %"Tuple[Location, String]"* - store %"Tuple[Location, String]"* %this, %"Tuple[Location, String]"** %this.addr +define internal void @dtor.572(%"Tuple[Location, String]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %this.addr - %2 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %1, i32 0, i32 1 - call void @dtor.261(%String* %2) + %1 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %this, i32 0, i32 1 + call void @dtor.250(%String* %1) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.582(%"Vector[LocString]"* %this, %"Vector[LocString]"* %other) #4 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr - %other.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %other, %"Vector[LocString]"** %other.addr +define internal void @ctor.573(%"Vector[LocString]"* %this, %"Vector[LocString]"* %other) #4 { %size = alloca i64 - %"$tmpC" = alloca %"RawPtr[LocString]" - %"$tmpC1" = alloca %"RawPtr[LocString]" + %"$tmpForRef" = alloca %"RawPtr[LocString]" + %"$tmpForRef1" = alloca %"RawPtr[LocString]" %dst = alloca %"RawPtr[LocString]" %src = alloca %"RawPtr[LocString]" - %"$tmpC2" = alloca %"RawPtr[LocString]" - %"$tmpC3" = alloca %"RawPtr[LocString]" - br label %code - -code: ; preds = %0 - %1 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %1, i32 0, i32 0 - call void @ctor.561(%"RawPtr[LocString]"* %2) - %3 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %4 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %3, i32 0, i32 1 - call void @ctor.561(%"RawPtr[LocString]"* %4) - %5 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %6 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %5, i32 0, i32 2 - call void @ctor.561(%"RawPtr[LocString]"* %6) - %7 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr - %8 = call i64 @size.569(%"Vector[LocString]"* %7) - store i64 %8, i64* %size - %9 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %10 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %9, i32 0, i32 0 - %11 = load i64, i64* %size - call void @allocRawPtr.583(%"RawPtr[LocString]"* %"$tmpC", i64 %11) - call void @"=.571"(%"RawPtr[LocString]"* %10, %"RawPtr[LocString]"* %"$tmpC") - %12 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %13 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %12, i32 0, i32 1 - %14 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %15 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %14, i32 0, i32 0 - %16 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %15 - %17 = load i64, i64* %size - call void @advance.572(%"RawPtr[LocString]"* %"$tmpC1", %"RawPtr[LocString]" %16, i64 %17) - call void @"=.571"(%"RawPtr[LocString]"* %13, %"RawPtr[LocString]"* %"$tmpC1") - %18 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %19 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %18, i32 0, i32 2 - %20 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %21 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %20, i32 0, i32 1 - call void @"=.571"(%"RawPtr[LocString]"* %19, %"RawPtr[LocString]"* %21) - %22 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %23 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %22, i32 0, i32 0 - call void @ctor.585(%"RawPtr[LocString]"* %dst, %"RawPtr[LocString]"* %23) - %24 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr - %25 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %24, i32 0, i32 0 - call void @ctor.585(%"RawPtr[LocString]"* %src, %"RawPtr[LocString]"* %25) + %"$tmpForRef2" = alloca %"RawPtr[LocString]" + %"$tmpForRef3" = alloca %"RawPtr[LocString]" + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + call void @ctor.551(%"RawPtr[LocString]"* %1) + %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + call void @ctor.551(%"RawPtr[LocString]"* %2) + %3 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 2 + call void @ctor.551(%"RawPtr[LocString]"* %3) + %4 = call i64 @size.559(%"Vector[LocString]"* %other) + store i64 %4, i64* %size + %5 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + %6 = load i64, i64* %size + %7 = call %"RawPtr[LocString]" @allocRawPtr.574(i64 %6) + store %"RawPtr[LocString]" %7, %"RawPtr[LocString]"* %"$tmpForRef" + call void @"=.562"(%"RawPtr[LocString]"* %5, %"RawPtr[LocString]"* %"$tmpForRef") + %8 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %9 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + %10 = load i64, i64* %size + %11 = call %"RawPtr[LocString]" @advance.563(%"RawPtr[LocString]"* %9, i64 %10) + store %"RawPtr[LocString]" %11, %"RawPtr[LocString]"* %"$tmpForRef1" + call void @"=.562"(%"RawPtr[LocString]"* %8, %"RawPtr[LocString]"* %"$tmpForRef1") + %12 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 2 + %13 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + call void @"=.562"(%"RawPtr[LocString]"* %12, %"RawPtr[LocString]"* %13) + %14 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + call void @ctor.576(%"RawPtr[LocString]"* %dst, %"RawPtr[LocString]"* %14) + %15 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %other, i32 0, i32 0 + call void @ctor.576(%"RawPtr[LocString]"* %src, %"RawPtr[LocString]"* %15) br label %while_block while_block: ; preds = %while_step, %code - %26 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %27 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %26, i32 0, i32 1 - %28 = call i1 @"==.564"(%"RawPtr[LocString]"* %dst, %"RawPtr[LocString]"* %27) - %29 = xor i1 true, %28 - br i1 %29, label %while_body, label %while_end + %16 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %17 = call i1 @"==.554"(%"RawPtr[LocString]"* %dst, %"RawPtr[LocString]"* %16) + %18 = xor i1 true, %17 + br i1 %18, label %while_body, label %while_end while_body: ; preds = %while_block - %30 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %dst - %31 = call %LocString* @value.576(%"RawPtr[LocString]" %30) - %32 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %src - %33 = call %LocString* @value.576(%"RawPtr[LocString]" %32) - call void @ctor.574(%LocString* %31, %LocString* %33) - %34 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %dst - call void @advance.577(%"RawPtr[LocString]"* %"$tmpC2", %"RawPtr[LocString]" %34) - call void @"=.571"(%"RawPtr[LocString]"* %dst, %"RawPtr[LocString]"* %"$tmpC2") - %35 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %src - call void @advance.577(%"RawPtr[LocString]"* %"$tmpC3", %"RawPtr[LocString]" %35) - call void @"=.571"(%"RawPtr[LocString]"* %src, %"RawPtr[LocString]"* %"$tmpC3") + %19 = call %LocString* @value.567(%"RawPtr[LocString]"* %dst) + %20 = call %LocString* @value.567(%"RawPtr[LocString]"* %src) + call void @ctor.565(%LocString* %19, %LocString* %20) + %21 = call %"RawPtr[LocString]" @advance.568(%"RawPtr[LocString]"* %dst) + store %"RawPtr[LocString]" %21, %"RawPtr[LocString]"* %"$tmpForRef2" + call void @"=.562"(%"RawPtr[LocString]"* %dst, %"RawPtr[LocString]"* %"$tmpForRef2") + %22 = call %"RawPtr[LocString]" @advance.568(%"RawPtr[LocString]"* %src) + store %"RawPtr[LocString]" %22, %"RawPtr[LocString]"* %"$tmpForRef3" + call void @"=.562"(%"RawPtr[LocString]"* %src, %"RawPtr[LocString]"* %"$tmpForRef3") br label %while_step while_step: ; preds = %while_body @@ -26529,25 +23676,28 @@ while_end: ; preds = %while_block } ; Function Attrs: inlinehint nounwind -define internal void @allocRawPtr.583(%"RawPtr[LocString]"* sret %_result, i64 %num) #4 { - %_result.addr = alloca %"RawPtr[LocString]"* - store %"RawPtr[LocString]"* %_result, %"RawPtr[LocString]"** %_result.addr +define internal %"RawPtr[LocString]" @allocRawPtr.574(i64 %num) #4 { %num.addr = alloca i64 store i64 %num, i64* %num.addr + %tmp.this = alloca %"RawPtr[LocString]" + %"$tmpForRef" = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %_result.addr - %2 = load i64, i64* %num.addr - %3 = mul i64 %2, 48 - %4 = call i8* @malloc(i64 %3) - %5 = bitcast i8* %4 to %LocString* - call void @ctor.584(%"RawPtr[LocString]"* %1, %LocString* %5) - ret void + %1 = load i64, i64* %num.addr + %2 = mul i64 %1, 48 + %3 = call %UntypedPtr @malloc(i64 %2) + store %UntypedPtr %3, %UntypedPtr* %"$tmpForRef" + %4 = getelementptr inbounds %UntypedPtr, %UntypedPtr* %"$tmpForRef", i32 0, i32 0 + %5 = load i8*, i8** %4 + %6 = bitcast i8* %5 to %LocString* + call void @ctor.575(%"RawPtr[LocString]"* %tmp.this, %LocString* %6) + %7 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %tmp.this + ret %"RawPtr[LocString]" %7 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.584(%"RawPtr[LocString]"* %this, %LocString* %f_ptr) #3 { +define internal void @ctor.575(%"RawPtr[LocString]"* %this, %LocString* %f_ptr) #3 { %this.addr = alloca %"RawPtr[LocString]"* store %"RawPtr[LocString]"* %this, %"RawPtr[LocString]"** %this.addr %f_ptr.addr = alloca %LocString* @@ -26563,9 +23713,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.585(%"RawPtr[LocString]"* %this, %"RawPtr[LocString]"* %other) #3 { - %this.addr = alloca %"RawPtr[LocString]"* - store %"RawPtr[LocString]"* %this, %"RawPtr[LocString]"** %this.addr +define internal void @ctor.576(%"RawPtr[LocString]"* %this, %"RawPtr[LocString]"* %other) #3 { %other.addr = alloca %"RawPtr[LocString]"* store %"RawPtr[LocString]"* %other, %"RawPtr[LocString]"** %other.addr br label %code @@ -26574,71 +23722,63 @@ code: ; preds = %0 %1 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %other.addr %2 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %1, i32 0, i32 0 %3 = load %LocString*, %LocString** %2 - %4 = load %"RawPtr[LocString]"*, %"RawPtr[LocString]"** %this.addr - %5 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %4, i32 0, i32 0 - store %LocString* %3, %LocString** %5 + %4 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + store %LocString* %3, %LocString** %4 ret void } ; Function Attrs: inlinehint nounwind -define internal void @dtor.586(%"Vector[LocString]"* %this) #4 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr +define internal void @dtor.577(%"Vector[LocString]"* %this) #4 { %p = alloca %"RawPtr[LocString]" - %"$tmpC" = alloca %"RawPtr[LocString]" + %"$tmpForRef" = alloca %"RawPtr[LocString]" br label %code code: ; preds = %0 - %1 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %1, i32 0, i32 0 - call void @ctor.585(%"RawPtr[LocString]"* %p, %"RawPtr[LocString]"* %2) + %1 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + call void @ctor.576(%"RawPtr[LocString]"* %p, %"RawPtr[LocString]"* %1) br label %while_block while_block: ; preds = %while_step, %code - %3 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %4 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %3, i32 0, i32 1 - %5 = call i1 @"==.564"(%"RawPtr[LocString]"* %p, %"RawPtr[LocString]"* %4) - %6 = xor i1 true, %5 - br i1 %6, label %while_body, label %while_end + %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %3 = call i1 @"==.554"(%"RawPtr[LocString]"* %p, %"RawPtr[LocString]"* %2) + %4 = xor i1 true, %3 + br i1 %4, label %while_body, label %while_end while_body: ; preds = %while_block - %7 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %p - %8 = call %LocString* @value.576(%"RawPtr[LocString]" %7) - call void @dtor.580(%LocString* %8) + %5 = call %LocString* @value.567(%"RawPtr[LocString]"* %p) + call void @dtor.571(%LocString* %5) br label %while_step while_step: ; preds = %while_body - %9 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %p - call void @advance.577(%"RawPtr[LocString]"* %"$tmpC", %"RawPtr[LocString]" %9) - call void @"=.571"(%"RawPtr[LocString]"* %p, %"RawPtr[LocString]"* %"$tmpC") + %6 = call %"RawPtr[LocString]" @advance.568(%"RawPtr[LocString]"* %p) + store %"RawPtr[LocString]" %6, %"RawPtr[LocString]"* %"$tmpForRef" + call void @"=.562"(%"RawPtr[LocString]"* %p, %"RawPtr[LocString]"* %"$tmpForRef") br label %while_block while_end: ; preds = %while_block - %10 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %11 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %10, i32 0, i32 0 - %12 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %11 - call void @freePtr.587(%"RawPtr[LocString]" %12) + %7 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + call void @freePtr.578(%"RawPtr[LocString]"* %7) ret void } ; Function Attrs: inlinehint nounwind -define internal void @freePtr.587(%"RawPtr[LocString]" %this) #4 { - %this.addr = alloca %"RawPtr[LocString]" - store %"RawPtr[LocString]" %this, %"RawPtr[LocString]"* %this.addr +define internal void @freePtr.578(%"RawPtr[LocString]"* %this) #4 { + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %this.addr - %2 = call i1 @isSet.588(%"RawPtr[LocString]" %1) - br i1 %2, label %if_then, label %if_end + %1 = call i1 @isSet.579(%"RawPtr[LocString]"* %this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %3 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %this.addr - %4 = call i8* @bytePtr.567(%"RawPtr[LocString]" %3) - call void @free(i8* %4) + %2 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 + %3 = load %LocString*, %LocString** %2 + call void @ctor.557(%UntypedPtr* %tmp.this, %LocString* %3) + %4 = load %UntypedPtr, %UntypedPtr* %tmp.this + call void @free(%UntypedPtr %4) br label %if_end if_end: ; preds = %if_then, %if_block @@ -26646,13 +23786,11 @@ if_end: ; preds = %if_then, %if_block } ; Function Attrs: inlinehint nounwind -define internal i1 @isSet.588(%"RawPtr[LocString]" %this) #4 { - %this.addr = alloca %"RawPtr[LocString]" - store %"RawPtr[LocString]" %this, %"RawPtr[LocString]"* %this.addr +define internal i1 @isSet.579(%"RawPtr[LocString]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this.addr, i32 0, i32 0 + %1 = getelementptr inbounds %"RawPtr[LocString]", %"RawPtr[LocString]"* %this, i32 0, i32 0 %2 = load %LocString*, %LocString** %1 %3 = bitcast %LocString* %2 to i8* %4 = call i1 @implOpRefNE(i8* %3, i8* null) @@ -26660,154 +23798,211 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @createFormals(%AstBuilder* %astBuilder, %"Vector[LocString]"* %ids, %Node %typeNode, %Node %init, i1 %varFormals, %Node* %res) #4 { - %astBuilder.addr = alloca %AstBuilder* - store %AstBuilder* %astBuilder, %AstBuilder** %astBuilder.addr - %ids.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %ids, %"Vector[LocString]"** %ids.addr +define internal void @createFormals(%AstBuilder* %astBuilder, %"Vector[LocString]"* %ids, %Node %typeNode, %Node %init, i32 %kind, %Node* %res) #4 { %typeNode.addr = alloca %Node store %Node %typeNode, %Node* %typeNode.addr %init.addr = alloca %Node store %Node %init, %Node* %init.addr - %varFormals.addr = alloca i1 - store i1 %varFormals, i1* %varFormals.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr + %kind.addr = alloca i32 + store i32 %kind, i32* %kind.addr %"$rangeVar" = alloca %"ContiguousMemoryRange[LocString]" - %id = alloca %LocString* + %"$tmpForRef" = alloca %"ContiguousMemoryRange[LocString]" + %id = alloca %LocString %v = alloca %Node - %"$tmpForRef" = alloca %Node %"$tmpForRef1" = alloca %Node - %"$rangeVar2" = alloca %"ContiguousMemoryRange[LocString]" - %id7 = alloca %LocString* + %"$tmpForRef2" = alloca %Node + %"$rangeVar7" = alloca %"ContiguousMemoryRange[LocString]" + %"$tmpForRef8" = alloca %"ContiguousMemoryRange[LocString]" + %id13 = alloca %LocString + %v14 = alloca %Node + %"$tmpForRef15" = alloca %Node + %"$tmpForRef16" = alloca %Node + %"$rangeVar17" = alloca %"ContiguousMemoryRange[LocString]" + %"$tmpForRef18" = alloca %"ContiguousMemoryRange[LocString]" + %id23 = alloca %LocString %p = alloca %Node - %"$tmpForRef8" = alloca %Node - %"$tmpForRef9" = alloca %Node + %"$tmpForRef24" = alloca %Node + %"$tmpForRef25" = alloca %Node br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load i1, i1* %varFormals.addr - br i1 %1, label %if_then, label %if_else + %1 = load i32, i32* %kind.addr + %2 = icmp eq i32 %1, 0 + br i1 %2, label %if_then, label %if_else if_then: ; preds = %if_block - %2 = load %"Vector[LocString]"*, %"Vector[LocString]"** %ids.addr - call void @all.589(%"ContiguousMemoryRange[LocString]"* %"$rangeVar", %"Vector[LocString]"* %2) + %3 = call %"ContiguousMemoryRange[LocString]" @all.581(%"Vector[LocString]"* %ids) + store %"ContiguousMemoryRange[LocString]" %3, %"ContiguousMemoryRange[LocString]"* %"$tmpForRef" + call void @ctor.580(%"ContiguousMemoryRange[LocString]"* %"$rangeVar", %"ContiguousMemoryRange[LocString]"* %"$tmpForRef") + br label %while_block + +if_else: ; preds = %if_block + br label %if_block3 + +if_end: ; preds = %if_end6, %while_end + ret void + +while_block: ; preds = %while_step, %if_then + %4 = call i1 @isEmpty.583(%"ContiguousMemoryRange[LocString]"* %"$rangeVar") + %5 = xor i1 true, %4 + br i1 %5, label %while_body, label %while_end + +while_body: ; preds = %while_block + %6 = call %LocString* @front.584(%"ContiguousMemoryRange[LocString]"* %"$rangeVar") + call void @ctor.565(%LocString* %id, %LocString* %6) + %7 = getelementptr inbounds %LocString, %LocString* %id, i32 0, i32 0 + %8 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %7, i32 0, i32 0 + %9 = load %Location, %Location* %8 + %10 = getelementptr inbounds %LocString, %LocString* %id, i32 0, i32 0 + %11 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %10, i32 0, i32 1 + %12 = call %StringRef @asStringRef(%String* %11) + %13 = load %Node, %Node* %typeNode.addr + %14 = load %Node, %Node* %init.addr + %15 = call %Node @mkLet(%AstBuilder* %astBuilder, %Location %9, %StringRef %12, %Node %13, %Node %14) + store %Node %15, %Node* %"$tmpForRef1" + call void @ctor.535(%Node* %v, %Node* %"$tmpForRef1") + %16 = load %Node, %Node* %res + %17 = load %Node, %Node* %v + %18 = call %Node @addToNodeList(%AstBuilder* %astBuilder, %Node %16, %Node %17) + store %Node %18, %Node* %"$tmpForRef2" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef2") + call void @dtor.571(%LocString* %id) + br label %while_step + +while_step: ; preds = %while_body + call void @popFront.586(%"ContiguousMemoryRange[LocString]"* %"$rangeVar") br label %while_block -if_else: ; preds = %if_block - %3 = load %"Vector[LocString]"*, %"Vector[LocString]"** %ids.addr - call void @all.589(%"ContiguousMemoryRange[LocString]"* %"$rangeVar2", %"Vector[LocString]"* %3) - br label %while_block3 +while_end: ; preds = %while_block + br label %if_end + +if_block3: ; preds = %if_else + %19 = load i32, i32* %kind.addr + %20 = icmp eq i32 %19, 1 + br i1 %20, label %if_then4, label %if_else5 + +if_then4: ; preds = %if_block3 + %21 = call %"ContiguousMemoryRange[LocString]" @all.581(%"Vector[LocString]"* %ids) + store %"ContiguousMemoryRange[LocString]" %21, %"ContiguousMemoryRange[LocString]"* %"$tmpForRef8" + call void @ctor.580(%"ContiguousMemoryRange[LocString]"* %"$rangeVar7", %"ContiguousMemoryRange[LocString]"* %"$tmpForRef8") + br label %while_block9 + +if_else5: ; preds = %if_block3 + %22 = call %"ContiguousMemoryRange[LocString]" @all.581(%"Vector[LocString]"* %ids) + store %"ContiguousMemoryRange[LocString]" %22, %"ContiguousMemoryRange[LocString]"* %"$tmpForRef18" + call void @ctor.580(%"ContiguousMemoryRange[LocString]"* %"$rangeVar17", %"ContiguousMemoryRange[LocString]"* %"$tmpForRef18") + br label %while_block19 + +if_end6: ; preds = %while_end22, %while_end12 + br label %if_end + +while_block9: ; preds = %while_step11, %if_then4 + %23 = call i1 @isEmpty.583(%"ContiguousMemoryRange[LocString]"* %"$rangeVar7") + %24 = xor i1 true, %23 + br i1 %24, label %while_body10, label %while_end12 + +while_body10: ; preds = %while_block9 + %25 = call %LocString* @front.584(%"ContiguousMemoryRange[LocString]"* %"$rangeVar7") + call void @ctor.565(%LocString* %id13, %LocString* %25) + %26 = getelementptr inbounds %LocString, %LocString* %id13, i32 0, i32 0 + %27 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %26, i32 0, i32 0 + %28 = load %Location, %Location* %27 + %29 = getelementptr inbounds %LocString, %LocString* %id13, i32 0, i32 0 + %30 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %29, i32 0, i32 1 + %31 = call %StringRef @asStringRef(%String* %30) + %32 = load %Node, %Node* %typeNode.addr + %33 = load %Node, %Node* %init.addr + %34 = call %Node @mkVar(%AstBuilder* %astBuilder, %Location %28, %StringRef %31, %Node %32, %Node %33) + store %Node %34, %Node* %"$tmpForRef15" + call void @ctor.535(%Node* %v14, %Node* %"$tmpForRef15") + %35 = load %Node, %Node* %res + %36 = load %Node, %Node* %v14 + %37 = call %Node @addToNodeList(%AstBuilder* %astBuilder, %Node %35, %Node %36) + store %Node %37, %Node* %"$tmpForRef16" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef16") + call void @dtor.571(%LocString* %id13) + br label %while_step11 + +while_step11: ; preds = %while_body10 + call void @popFront.586(%"ContiguousMemoryRange[LocString]"* %"$rangeVar7") + br label %while_block9 -if_end: ; preds = %while_end6, %while_end - ret void +while_end12: ; preds = %while_block9 + br label %if_end6 -while_block: ; preds = %while_step, %if_then - %4 = load %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %"$rangeVar" - %5 = call i1 @isEmpty.591(%"ContiguousMemoryRange[LocString]" %4) - %6 = xor i1 true, %5 - br i1 %6, label %while_body, label %while_end +while_block19: ; preds = %while_step21, %if_else5 + %38 = call i1 @isEmpty.583(%"ContiguousMemoryRange[LocString]"* %"$rangeVar17") + %39 = xor i1 true, %38 + br i1 %39, label %while_body20, label %while_end22 + +while_body20: ; preds = %while_block19 + %40 = call %LocString* @front.584(%"ContiguousMemoryRange[LocString]"* %"$rangeVar17") + call void @ctor.565(%LocString* %id23, %LocString* %40) + %41 = getelementptr inbounds %LocString, %LocString* %id23, i32 0, i32 0 + %42 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %41, i32 0, i32 0 + %43 = load %Location, %Location* %42 + %44 = getelementptr inbounds %LocString, %LocString* %id23, i32 0, i32 0 + %45 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %44, i32 0, i32 1 + %46 = call %StringRef @asStringRef(%String* %45) + %47 = load %Node, %Node* %typeNode.addr + %48 = load %Node, %Node* %init.addr + %49 = call %Node @mkParameter(%AstBuilder* %astBuilder, %Location %43, %StringRef %46, %Node %47, %Node %48) + store %Node %49, %Node* %"$tmpForRef24" + call void @ctor.535(%Node* %p, %Node* %"$tmpForRef24") + %50 = load %Node, %Node* %res + %51 = load %Node, %Node* %p + %52 = call %Node @addToNodeList(%AstBuilder* %astBuilder, %Node %50, %Node %51) + store %Node %52, %Node* %"$tmpForRef25" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef25") + call void @dtor.571(%LocString* %id23) + br label %while_step21 -while_body: ; preds = %while_block - %7 = load %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %"$rangeVar" - %8 = call %LocString* @front.592(%"ContiguousMemoryRange[LocString]" %7) - store %LocString* %8, %LocString** %id - %9 = load %AstBuilder*, %AstBuilder** %astBuilder.addr - %10 = load %LocString*, %LocString** %id - %11 = getelementptr inbounds %LocString, %LocString* %10, i32 0, i32 0 - %12 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %11, i32 0, i32 0 - %13 = load %LocString*, %LocString** %id - %14 = getelementptr inbounds %LocString, %LocString* %13, i32 0, i32 0 - %15 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %14, i32 0, i32 1 - %16 = call %StringRef @asStringRef(%String* %15) - %17 = load %Node, %Node* %typeNode.addr - %18 = load %Node, %Node* %init.addr - %19 = call %Node @mkVar(%AstBuilder* %9, %Location* %12, %StringRef %16, %Node %17, %Node %18) - store %Node %19, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %v, %Node* %"$tmpForRef") - %20 = load %Node*, %Node** %res.addr - %21 = load %AstBuilder*, %AstBuilder** %astBuilder.addr - %22 = load %Node*, %Node** %res.addr - %23 = load %Node, %Node* %22 - %24 = load %Node, %Node* %v - %25 = call %Node @addToNodeList(%AstBuilder* %21, %Node %23, %Node %24) - store %Node %25, %Node* %"$tmpForRef1" - call void @"=.554"(%Node* %20, %Node* %"$tmpForRef1") - br label %while_step +while_step21: ; preds = %while_body20 + call void @popFront.586(%"ContiguousMemoryRange[LocString]"* %"$rangeVar17") + br label %while_block19 -while_step: ; preds = %while_body - call void @popFront.594(%"ContiguousMemoryRange[LocString]"* %"$rangeVar") - br label %while_block +while_end22: ; preds = %while_block19 + br label %if_end6 +} -while_end: ; preds = %while_block - br label %if_end +; Function Attrs: alwaysinline nounwind +define internal void @ctor.580(%"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"* %other) #3 { + %other.addr = alloca %"ContiguousMemoryRange[LocString]"* + store %"ContiguousMemoryRange[LocString]"* %other, %"ContiguousMemoryRange[LocString]"** %other.addr + br label %code -while_block3: ; preds = %while_step5, %if_else - %26 = load %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %"$rangeVar2" - %27 = call i1 @isEmpty.591(%"ContiguousMemoryRange[LocString]" %26) - %28 = xor i1 true, %27 - br i1 %28, label %while_body4, label %while_end6 - -while_body4: ; preds = %while_block3 - %29 = load %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %"$rangeVar2" - %30 = call %LocString* @front.592(%"ContiguousMemoryRange[LocString]" %29) - store %LocString* %30, %LocString** %id7 - %31 = load %AstBuilder*, %AstBuilder** %astBuilder.addr - %32 = load %LocString*, %LocString** %id7 - %33 = getelementptr inbounds %LocString, %LocString* %32, i32 0, i32 0 - %34 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %33, i32 0, i32 0 - %35 = load %LocString*, %LocString** %id7 - %36 = getelementptr inbounds %LocString, %LocString* %35, i32 0, i32 0 - %37 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %36, i32 0, i32 1 - %38 = call %StringRef @asStringRef(%String* %37) - %39 = load %Node, %Node* %typeNode.addr - %40 = load %Node, %Node* %init.addr - %41 = call %Node @mkParameter(%AstBuilder* %31, %Location* %34, %StringRef %38, %Node %39, %Node %40) - store %Node %41, %Node* %"$tmpForRef8" - call void @ctor.545(%Node* %p, %Node* %"$tmpForRef8") - %42 = load %Node*, %Node** %res.addr - %43 = load %AstBuilder*, %AstBuilder** %astBuilder.addr - %44 = load %Node*, %Node** %res.addr - %45 = load %Node, %Node* %44 - %46 = load %Node, %Node* %p - %47 = call %Node @addToNodeList(%AstBuilder* %43, %Node %45, %Node %46) - store %Node %47, %Node* %"$tmpForRef9" - call void @"=.554"(%Node* %42, %Node* %"$tmpForRef9") - br label %while_step5 - -while_step5: ; preds = %while_body4 - call void @popFront.594(%"ContiguousMemoryRange[LocString]"* %"$rangeVar2") - br label %while_block3 - -while_end6: ; preds = %while_block3 - br label %if_end +code: ; preds = %0 + %1 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 0 + %2 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %other.addr + %3 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %2, i32 0, i32 0 + call void @ctor.576(%"RawPtr[LocString]"* %1, %"RawPtr[LocString]"* %3) + %4 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 1 + %5 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %other.addr + %6 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %5, i32 0, i32 1 + call void @ctor.576(%"RawPtr[LocString]"* %4, %"RawPtr[LocString]"* %6) + ret void } ; Function Attrs: inlinehint nounwind -define internal void @all.589(%"ContiguousMemoryRange[LocString]"* sret %_result, %"Vector[LocString]"* %this) #4 { - %_result.addr = alloca %"ContiguousMemoryRange[LocString]"* - store %"ContiguousMemoryRange[LocString]"* %_result, %"ContiguousMemoryRange[LocString]"** %_result.addr - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr +define internal %"ContiguousMemoryRange[LocString]" @all.581(%"Vector[LocString]"* %this) #4 { + %tmp.this = alloca %"ContiguousMemoryRange[LocString]" br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %_result.addr - %2 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %3 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %2, i32 0, i32 0 + %1 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + %2 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %1 + %3 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 %4 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %3 - %5 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %6 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %5, i32 0, i32 1 - %7 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %6 - call void @ctor.590(%"ContiguousMemoryRange[LocString]"* %1, %"RawPtr[LocString]" %4, %"RawPtr[LocString]" %7) - ret void + call void @ctor.582(%"ContiguousMemoryRange[LocString]"* %tmp.this, %"RawPtr[LocString]" %2, %"RawPtr[LocString]" %4) + %5 = load %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %tmp.this + ret %"ContiguousMemoryRange[LocString]" %5 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.590(%"ContiguousMemoryRange[LocString]"* %this, %"RawPtr[LocString]" %f_begin, %"RawPtr[LocString]" %f_end) #3 { +define internal void @ctor.582(%"ContiguousMemoryRange[LocString]"* %this, %"RawPtr[LocString]" %f_begin, %"RawPtr[LocString]" %f_end) #3 { %this.addr = alloca %"ContiguousMemoryRange[LocString]"* store %"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"** %this.addr %f_begin.addr = alloca %"RawPtr[LocString]" @@ -26819,51 +24014,43 @@ define internal void @ctor.590(%"ContiguousMemoryRange[LocString]"* %this, %"Raw code: ; preds = %0 %1 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %this.addr %2 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %1, i32 0, i32 0 - call void @ctor.585(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %f_begin.addr) + call void @ctor.576(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %f_begin.addr) %3 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %this.addr %4 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %3, i32 0, i32 1 - call void @ctor.585(%"RawPtr[LocString]"* %4, %"RawPtr[LocString]"* %f_end.addr) + call void @ctor.576(%"RawPtr[LocString]"* %4, %"RawPtr[LocString]"* %f_end.addr) ret void } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.591(%"ContiguousMemoryRange[LocString]" %this) #4 { - %this.addr = alloca %"ContiguousMemoryRange[LocString]" - store %"ContiguousMemoryRange[LocString]" %this, %"ContiguousMemoryRange[LocString]"* %this.addr +define internal i1 @isEmpty.583(%"ContiguousMemoryRange[LocString]"* %this) #4 { %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this.addr, i32 0, i32 1 - %2 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %1 - %3 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this.addr, i32 0, i32 0 - %4 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %3 - %5 = call i64 @diff.566(%"RawPtr[LocString]" %2, %"RawPtr[LocString]" %4) + %1 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 1 + %2 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 0 + %3 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %2 + %4 = call i64 @diff.556(%"RawPtr[LocString]"* %1, %"RawPtr[LocString]" %3) store i64 0, i64* %tmp.this - %6 = load i64, i64* %tmp.this - %7 = icmp sle i64 %5, %6 - ret i1 %7 + %5 = load i64, i64* %tmp.this + %6 = icmp sle i64 %4, %5 + ret i1 %6 } ; Function Attrs: inlinehint nounwind -define internal %LocString* @front.592(%"ContiguousMemoryRange[LocString]" %this) #4 { - %this.addr = alloca %"ContiguousMemoryRange[LocString]" - store %"ContiguousMemoryRange[LocString]" %this, %"ContiguousMemoryRange[LocString]"* %this.addr +define internal %LocString* @front.584(%"ContiguousMemoryRange[LocString]"* %this) #4 { br label %code code: ; preds = %0 - %1 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this.addr, i32 0, i32 0 - %2 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %1 - %3 = call %LocString* @value.576(%"RawPtr[LocString]" %2) - ret %LocString* %3 + %1 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 0 + %2 = call %LocString* @value.567(%"RawPtr[LocString]"* %1) + ret %LocString* %2 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkVar(%AstBuilder* %obj, %Location* %loc, %StringRef %name, %Node %typeNode, %Node %init) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkLet(%AstBuilder* %obj, %Location %loc, %StringRef %name, %Node %typeNode, %Node %init) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %name.addr = alloca %StringRef store %StringRef %name, %StringRef* %name.addr %typeNode.addr = alloca %Node @@ -26873,27 +24060,20 @@ define internal %Node @mkVar(%AstBuilder* %obj, %Location* %loc, %StringRef %nam br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 10 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %name.addr - %8 = load %Node, %Node* %typeNode.addr - %9 = load %Node, %Node* %init.addr - %10 = call %Node @"().593"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %Node %8, %Node %9) - ret %Node %10 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 10 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %name.addr + %5 = load %Node, %Node* %typeNode.addr + %6 = load %Node, %Node* %init.addr + %7 = call %Node @"().585"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5, %Node %6) + ret %Node %7 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().593"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %Node %p4, %Node %p5) #4 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %this.addr +define internal %Node @"().585"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %Node %p4, %Node %p5) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %StringRef store %StringRef %p3, %StringRef* %p3.addr %p4.addr = alloca %Node @@ -26903,42 +24083,34 @@ define internal %Node @"().593"(%"FunctionPtr5[Node, UntypedPtr, @Location, Stri br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %StringRef, %StringRef* %p3.addr - %5 = load %Node, %Node* %p4.addr - %6 = load %Node, %Node* %p5.addr - %7 = bitcast %"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %1 to %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node)** - %8 = load %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node)** %7 - %9 = call %Node %8(%UntypedPtr %2, %Location* %3, %StringRef %4, %Node %5, %Node %6) - ret %Node %9 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %StringRef, %StringRef* %p3.addr + %3 = load %Node, %Node* %p4.addr + %4 = load %Node, %Node* %p5.addr + %5 = bitcast %"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %this to %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node)** + %6 = load %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node)** %5 + %7 = call %Node %6(%UntypedPtr %1, %Location* %p2, %StringRef %2, %Node %3, %Node %4) + ret %Node %7 } ; Function Attrs: alwaysinline nounwind -define internal void @popFront.594(%"ContiguousMemoryRange[LocString]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[LocString]"* - store %"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"** %this.addr - %"$tmpC" = alloca %"RawPtr[LocString]" +define internal void @popFront.586(%"ContiguousMemoryRange[LocString]"* %this) #3 { + %"$tmpForRef" = alloca %"RawPtr[LocString]" br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %3, i32 0, i32 0 - %5 = load %"RawPtr[LocString]", %"RawPtr[LocString]"* %4 - call void @advance.577(%"RawPtr[LocString]"* %"$tmpC", %"RawPtr[LocString]" %5) - call void @"=.571"(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %"$tmpC") + %1 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 0 + %2 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 0 + %3 = call %"RawPtr[LocString]" @advance.568(%"RawPtr[LocString]"* %2) + store %"RawPtr[LocString]" %3, %"RawPtr[LocString]"* %"$tmpForRef" + call void @"=.562"(%"RawPtr[LocString]"* %1, %"RawPtr[LocString]"* %"$tmpForRef") ret void } ; Function Attrs: inlinehint nounwind -define internal %Node @mkParameter(%AstBuilder* %obj, %Location* %loc, %StringRef %name, %Node %typeNode, %Node %init) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkVar(%AstBuilder* %obj, %Location %loc, %StringRef %name, %Node %typeNode, %Node %init) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %name.addr = alloca %StringRef store %StringRef %name, %StringRef* %name.addr %typeNode.addr = alloca %Node @@ -26948,23 +24120,41 @@ define internal %Node @mkParameter(%AstBuilder* %obj, %Location* %loc, %StringRe br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 11 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %name.addr - %8 = load %Node, %Node* %typeNode.addr - %9 = load %Node, %Node* %init.addr - %10 = call %Node @"().593"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %Node %8, %Node %9) - ret %Node %10 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 11 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %name.addr + %5 = load %Node, %Node* %typeNode.addr + %6 = load %Node, %Node* %init.addr + %7 = call %Node @"().585"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5, %Node %6) + ret %Node %7 +} + +; Function Attrs: inlinehint nounwind +define internal %Node @mkParameter(%AstBuilder* %obj, %Location %loc, %StringRef %name, %Node %typeNode, %Node %init) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr + %name.addr = alloca %StringRef + store %StringRef %name, %StringRef* %name.addr + %typeNode.addr = alloca %Node + store %Node %typeNode, %Node* %typeNode.addr + %init.addr = alloca %Node + store %Node %init, %Node* %init.addr + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 12 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %name.addr + %5 = load %Node, %Node* %typeNode.addr + %6 = load %Node, %Node* %init.addr + %7 = call %Node @"().585"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5, %Node %6) + ret %Node %7 } ; Function Attrs: inlinehint nounwind define internal %Node @parseTypeNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %tmp.this = alloca %TokenType %tmp.this1 = alloca %Node br label %code @@ -26973,21 +24163,18 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 30) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 31) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i1 false) - ret %Node %5 + %2 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 false) + ret %Node %2 if_end: ; preds = %dumy_block, %if_block - call void @ctor.556(%Node* %tmp.this1) - %6 = load %Node, %Node* %tmp.this1 - ret %Node %6 + call void @ctor.546(%Node* %tmp.this1) + %3 = load %Node, %Node* %tmp.this1 + ret %Node %3 dumy_block: ; No predecessors! br label %if_end @@ -26995,201 +24182,182 @@ dumy_block: ; No predecessors! ; Function Attrs: inlinehint nounwind define internal %Node @parseFunBody(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %tmp.this = alloca %TokenType %tmp.this1 = alloca %Node %res = alloca %Node %"$tmpC" = alloca %String + %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef %"$tmpC5" = alloca %Token - %tmp.StringRef6 = alloca %StringRef + %"$tmpForRef6" = alloca %StringRef + %tmp.StringRef7 = alloca %StringRef br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 31) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 32) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - call void @ctor.556(%Node* %tmp.this1) - %4 = load %Node, %Node* %tmp.this1 - ret %Node %4 + call void @ctor.546(%Node* %tmp.this1) + %2 = load %Node, %Node* %tmp.this1 + ret %Node %2 if_end: ; preds = %dumy_block, %if_block - call void @ctor.556(%Node* %res) + call void @ctor.546(%Node* %res) br label %if_block2 dumy_block: ; No predecessors! br label %if_end if_block2: ; preds = %if_end - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = call i1 @parseBlockStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, %Node* %res, i1 false) - %7 = xor i1 true, %6 - br i1 %7, label %if_then3, label %if_end4 + %3 = call i1 @parseBlockStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 false) + %4 = xor i1 true, %3 + br i1 %4, label %if_then3, label %if_end4 if_then3: ; preds = %if_block2 - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %9 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %10 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.94, i32 0, i32 0), i8** %9 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.94, i32 0, i32 25), i8** %10 - %11 = load %StringRef, %StringRef* %tmp.StringRef - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC5", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %13) - %14 = getelementptr inbounds %Token, %Token* %"$tmpC5", i32 0, i32 1 - %15 = load %TokenType, %TokenType* %14 - %16 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef6, i32 0, i32 0 - %17 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef6, i32 0, i32 1 - store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.95, i32 0, i32 0), i8** %16 - store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.95, i32 0, i32 27), i8** %17 - %18 = load %StringRef, %StringRef* %tmp.StringRef6 - call void @toString.597(%String* %"$tmpC", %StringRef %11, %TokenType %15, %StringRef %18) - call void @reportError.548(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC5") + %5 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %6 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %7 = bitcast %UntypedPtr* %5 to i8** + %8 = bitcast %UntypedPtr* %6 to i8** + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.96, i32 0, i32 0), i8** %7 + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.96, i32 0, i32 25), i8** %8 + %9 = load %StringRef, %StringRef* %tmp.StringRef + store %StringRef %9, %StringRef* %"$tmpForRef" + %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC5", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %10) + %11 = getelementptr inbounds %Token, %Token* %"$tmpC5", i32 0, i32 1 + %12 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef7, i32 0, i32 0 + %13 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef7, i32 0, i32 1 + %14 = bitcast %UntypedPtr* %12 to i8** + %15 = bitcast %UntypedPtr* %13 to i8** + store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.97, i32 0, i32 0), i8** %14 + store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.97, i32 0, i32 27), i8** %15 + %16 = load %StringRef, %StringRef* %tmp.StringRef7 + store %StringRef %16, %StringRef* %"$tmpForRef6" + call void @toString.589(%String* %"$tmpC", %StringRef* %"$tmpForRef", %TokenType* %11, %StringRef* %"$tmpForRef6") + call void @reportError.538(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC5") br label %if_end4 if_end4: ; preds = %if_then3, %if_block2 - %19 = load %Node, %Node* %res - ret %Node %19 + %17 = load %Node, %Node* %res + ret %Node %17 } ; Function Attrs: inlinehint nounwind define internal i1 @parseBlockStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 %topLevel) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %topLevel.addr = alloca i1 store i1 %topLevel, i1* %topLevel.addr %loc = alloca %Location + %"$tmpForRef" = alloca %Location %tmp.this = alloca %TokenType %tmp.this1 = alloca %Node %tmp.this2 = alloca %TokenType %s = alloca %Node - %"$tmpForRef" = alloca %Node - %"$tmpForRef6" = alloca %Node - %tmp.this7 = alloca %TokenType - %"$tmpForRef11" = alloca %Node - %"$tmpC" = alloca %Location - %"$tmpC12" = alloca %Location + %"$tmpForRef3" = alloca %Node + %"$tmpForRef7" = alloca %Node + %tmp.this8 = alloca %TokenType + %"$tmpForRef12" = alloca %Node br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") br label %if_block if_block: ; preds = %code - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 24) - %3 = load %TokenType, %TokenType* %tmp.this - %4 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, %TokenType %3) - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 25) + %2 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block - %5 = load %Node*, %Node** %res.addr - call void @ctor.556(%Node* %tmp.this1) - call void @"=.554"(%Node* %5, %Node* %tmp.this1) + call void @ctor.546(%Node* %tmp.this1) + call void @"=.544"(%Node* %res, %Node* %tmp.this1) br label %while_block if_end: ; preds = %dumy_block13, %if_block ret i1 false while_block: ; preds = %while_step, %if_then - %6 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this2, i32 25) - %7 = load %TokenType, %TokenType* %tmp.this2 - %8 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %6, %TokenType %7) - %9 = xor i1 true, %8 - br i1 %9, label %cond.true, label %cond.false + call void @ctor.404(%TokenType* %tmp.this2, i32 26) + %3 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this2) + %4 = xor i1 true, %3 + br i1 %4, label %cond.true, label %cond.false while_body: ; preds = %cond.end - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = load i1, i1* %topLevel.addr - %12 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i1 %11) - store %Node %12, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %s, %Node* %"$tmpForRef") - br label %if_block3 + %5 = load i1, i1* %topLevel.addr + %6 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %5) + store %Node %6, %Node* %"$tmpForRef3" + call void @ctor.535(%Node* %s, %Node* %"$tmpForRef3") + br label %if_block4 -while_step: ; preds = %if_end5 +while_step: ; preds = %if_end6 br label %while_block while_end: ; preds = %if_else, %cond.end - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this7, i32 25) - %14 = load %TokenType, %TokenType* %tmp.this7 - %15 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, %TokenType %14) - br label %if_block8 + call void @ctor.404(%TokenType* %tmp.this8, i32 26) + %7 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this8) + br label %if_block9 cond.true: ; preds = %while_block - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %17 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, i32 0, i32 2 - %18 = load i1, i1* %17 - %19 = xor i1 true, %18 + %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 2 + %9 = load i1, i1* %8 + %10 = xor i1 true, %9 br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %19, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %10, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end -if_block3: ; preds = %while_body - %20 = load %Node, %Node* %s - %21 = call i1 @isSet.595(%Node %20) - br i1 %21, label %if_then4, label %if_else +if_block4: ; preds = %while_body + %11 = load %Node, %Node* %s + %12 = call i1 @isSet.587(%Node %11) + br i1 %12, label %if_then5, label %if_else -if_then4: ; preds = %if_block3 - %22 = load %Node*, %Node** %res.addr - %23 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %24 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23, i32 0, i32 3 - %25 = load %Node*, %Node** %res.addr - %26 = load %Node, %Node* %25 - %27 = load %Node, %Node* %s - %28 = call %Node @addToNodeList(%AstBuilder* %24, %Node %26, %Node %27) - store %Node %28, %Node* %"$tmpForRef6" - call void @"=.554"(%Node* %22, %Node* %"$tmpForRef6") - br label %if_end5 +if_then5: ; preds = %if_block4 + %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %14 = load %Node, %Node* %res + %15 = load %Node, %Node* %s + %16 = call %Node @addToNodeList(%AstBuilder* %13, %Node %14, %Node %15) + store %Node %16, %Node* %"$tmpForRef7" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef7") + br label %if_end6 -if_else: ; preds = %if_block3 +if_else: ; preds = %if_block4 br label %while_end -if_end5: ; preds = %dumy_block, %if_then4 +if_end6: ; preds = %dumy_block, %if_then5 br label %while_step dumy_block: ; No predecessors! - br label %if_end5 + br label %if_end6 -if_block8: ; preds = %while_end - %29 = load i1, i1* %topLevel.addr - %30 = xor i1 true, %29 - br i1 %30, label %if_then9, label %if_end10 +if_block9: ; preds = %while_end + %17 = load i1, i1* %topLevel.addr + %18 = xor i1 true, %17 + br i1 %18, label %if_then10, label %if_end11 -if_then9: ; preds = %if_block8 - %31 = load %Node*, %Node** %res.addr - %32 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %33 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %32, i32 0, i32 3 - %34 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC12", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %34) - call void @span(%Location* %"$tmpC", %Location* %loc, %Location* %"$tmpC12") - %35 = load %Node*, %Node** %res.addr - %36 = load %Node, %Node* %35 - %37 = call %Node @mkBlockStmt(%AstBuilder* %33, %Location* %"$tmpC", %Node %36) - store %Node %37, %Node* %"$tmpForRef11" - call void @"=.554"(%Node* %31, %Node* %"$tmpForRef11") - br label %if_end10 +if_then10: ; preds = %if_block9 + %19 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %20 = load %Location, %Location* %loc + %21 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %22 = call %Location @span(%Location %20, %Location %21) + %23 = load %Node, %Node* %res + %24 = call %Node @mkBlockStmt(%AstBuilder* %19, %Location %22, %Node %23) + store %Node %24, %Node* %"$tmpForRef12" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef12") + br label %if_end11 -if_end10: ; preds = %if_then9, %if_block8 +if_end11: ; preds = %if_then10, %if_block9 ret i1 true dumy_block13: ; No predecessors! @@ -27197,7 +24365,7 @@ dumy_block13: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal i1 @isSet.595(%Node %n) #4 { +define internal i1 @isSet.587(%Node %n) #4 { %n.addr = alloca %Node store %Node %n, %Node* %n.addr br label %code @@ -27211,85 +24379,69 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkBlockStmt(%AstBuilder* %obj, %Location* %loc, %Node %stmts) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkBlockStmt(%AstBuilder* %obj, %Location %loc, %Node %stmts) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %stmts.addr = alloca %Node store %Node %stmts, %Node* %stmts.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 33 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %stmts.addr - %8 = call %Node @"().596"(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %2, %UntypedPtr %5, %Location* %6, %Node %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 34 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %stmts.addr + %5 = call %Node @"().588"(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().596"(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %this.addr +define internal %Node @"().588"(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %Node store %Node %p3, %Node* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %Node, %Node* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %1 to %Node (%UntypedPtr, %Location*, %Node)** - %6 = load %Node (%UntypedPtr, %Location*, %Node)*, %Node (%UntypedPtr, %Location*, %Node)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Location* %3, %Node %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %Node, %Node* %p3.addr + %3 = bitcast %"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %this to %Node (%UntypedPtr, %Location*, %Node)** + %4 = load %Node (%UntypedPtr, %Location*, %Node)*, %Node (%UntypedPtr, %Location*, %Node)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Location* %p2, %Node %2) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal void @toString.597(%String* sret %_result, %StringRef %a1, %TokenType %a2, %StringRef %a3) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %a1.addr = alloca %StringRef - store %StringRef %a1, %StringRef* %a1.addr - %a2.addr = alloca %TokenType - store %TokenType %a2, %TokenType* %a2.addr - %a3.addr = alloca %StringRef - store %StringRef %a3, %StringRef* %a3.addr +define internal void @toString.589(%String* sret %_result, %StringRef* %a1, %TokenType* %a2, %StringRef* %a3) #4 { %s = alloca %StringOutputStream + %"$tmpC" = alloca %StringOutputStream + %"$tmpC1" = alloca %StringOutputStream + %"$tmpC2" = alloca %StringOutputStream br label %code code: ; preds = %0 - call void @ctor.452(%StringOutputStream* %s) - %1 = call %StringOutputStream* @"<<"(%StringOutputStream* %s, %StringRef* %a1.addr) - %2 = call %StringOutputStream* @"<<.550"(%StringOutputStream* %1, %TokenType* %a2.addr) - %3 = call %StringOutputStream* @"<<"(%StringOutputStream* %2, %StringRef* %a3.addr) - %4 = load %String*, %String** %_result.addr - %5 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %s, i32 0, i32 0 - call void @ctor.189(%String* %4, %String* %5) - call void @dtor.454(%StringOutputStream* %s) + call void @ctor.439(%StringOutputStream* %s) + call void @"<<"(%StringOutputStream* %"$tmpC2", %StringOutputStream* %s, %StringRef* %a1) + call void @"<<.540"(%StringOutputStream* %"$tmpC1", %StringOutputStream* %"$tmpC2", %TokenType* %a2) + call void @"<<"(%StringOutputStream* %"$tmpC", %StringOutputStream* %"$tmpC1", %StringRef* %a3) + call void @dtor.442(%StringOutputStream* %"$tmpC") + call void @dtor.442(%StringOutputStream* %"$tmpC1") + call void @dtor.442(%StringOutputStream* %"$tmpC2") + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %s, i32 0, i32 0 + call void @ctor.175(%String* %_result, %String* %1) + call void @dtor.442(%StringOutputStream* %s) ret void dumy_block: ; No predecessors! - call void @dtor.454(%StringOutputStream* %s) + call void @dtor.442(%StringOutputStream* %s) ret void } ; Function Attrs: inlinehint nounwind -define internal %Node @mkLambdaExpr(%AstBuilder* %obj, %Location* %loc, %Node %closureParams, %Node %formals, %Node %retType, %Node %body, %Node %bodyExpr) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkLambdaExpr(%AstBuilder* %obj, %Location %loc, %Node %closureParams, %Node %formals, %Node %retType, %Node %body, %Node %bodyExpr) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %closureParams.addr = alloca %Node store %Node %closureParams, %Node* %closureParams.addr %formals.addr = alloca %Node @@ -27303,29 +24455,22 @@ define internal %Node @mkLambdaExpr(%AstBuilder* %obj, %Location* %loc, %Node %c br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 22 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %closureParams.addr - %8 = load %Node, %Node* %formals.addr - %9 = load %Node, %Node* %retType.addr - %10 = load %Node, %Node* %body.addr - %11 = load %Node, %Node* %bodyExpr.addr - %12 = call %Node @"().598"(%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %Node %8, %Node %9, %Node %10, %Node %11) - ret %Node %12 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 23 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %closureParams.addr + %5 = load %Node, %Node* %formals.addr + %6 = load %Node, %Node* %retType.addr + %7 = load %Node, %Node* %body.addr + %8 = load %Node, %Node* %bodyExpr.addr + %9 = call %Node @"().590"(%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %Node %5, %Node %6, %Node %7, %Node %8) + ret %Node %9 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().598"(%"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3, %Node %p4, %Node %p5, %Node %p6, %Node %p7) #4 { - %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %this.addr +define internal %Node @"().590"(%"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3, %Node %p4, %Node %p5, %Node %p6, %Node %p7) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %Node store %Node %p3, %Node* %p3.addr %p4.addr = alloca %Node @@ -27339,43 +24484,35 @@ define internal %Node @"().598"(%"FunctionPtr7[Node, UntypedPtr, @Location, Node br label %code code: ; preds = %0 - %1 = load %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %Node, %Node* %p3.addr - %5 = load %Node, %Node* %p4.addr - %6 = load %Node, %Node* %p5.addr - %7 = load %Node, %Node* %p6.addr - %8 = load %Node, %Node* %p7.addr - %9 = bitcast %"FunctionPtr7[Node, UntypedPtr, @Location, Node, Node, Node, Node, Node]"* %1 to %Node (%UntypedPtr, %Location*, %Node, %Node, %Node, %Node, %Node)** - %10 = load %Node (%UntypedPtr, %Location*, %Node, %Node, %Node, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %Node, %Node, %Node, %Node, %Node)** %9 - %11 = call %Node %10(%UntypedPtr %2, %Location* %3, %Node %4, %Node %5, %Node %6, %Node %7, %Node %8) - ret %Node %11 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %Node, %Node* %p3.addr + %3 = load %Node, %Node* %p4.addr + %4 = load %Node, %Node* %p5.addr + %5 = load %Node, %Node* %p6.addr + %6 = load %Node, %Node* %p7.addr + %7 = bitcast %"FunctionPtr7[Node, UntypedPtr, Location const, Node, Node, Node, Node, Node]"* %this to %Node (%UntypedPtr, %Location*, %Node, %Node, %Node, %Node, %Node)** + %8 = load %Node (%UntypedPtr, %Location*, %Node, %Node, %Node, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %Node, %Node, %Node, %Node, %Node)** %7 + %9 = call %Node %8(%UntypedPtr %1, %Location* %p2, %Node %2, %Node %3, %Node %4, %Node %5, %Node %6) + ret %Node %9 } ; Function Attrs: inlinehint nounwind define internal %Node @mkParenthesisExpr(%AstBuilder* %obj, %Node %expr) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr %expr.addr = alloca %Node store %Node %expr, %Node* %expr.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 13 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Node, %Node* %expr.addr - %7 = call %Node @"().599"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %2, %UntypedPtr %5, %Node %6) - ret %Node %7 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 14 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %expr.addr + %5 = call %Node @"().591"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %1, %UntypedPtr %3, %Node %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().599"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %UntypedPtr %p1, %Node %p2) #4 { - %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, Node]"* - store %"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %"FunctionPtr2[Node, UntypedPtr, Node]"** %this.addr +define internal %Node @"().591"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this, %UntypedPtr %p1, %Node %p2) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr %p2.addr = alloca %Node @@ -27383,434 +24520,329 @@ define internal %Node @"().599"(%"FunctionPtr2[Node, UntypedPtr, Node]"* %this, br label %code code: ; preds = %0 - %1 = load %"FunctionPtr2[Node, UntypedPtr, Node]"*, %"FunctionPtr2[Node, UntypedPtr, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Node, %Node* %p2.addr - %4 = bitcast %"FunctionPtr2[Node, UntypedPtr, Node]"* %1 to %Node (%UntypedPtr, %Node)** - %5 = load %Node (%UntypedPtr, %Node)*, %Node (%UntypedPtr, %Node)** %4 - %6 = call %Node %5(%UntypedPtr %2, %Node %3) - ret %Node %6 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %Node, %Node* %p2.addr + %3 = bitcast %"FunctionPtr2[Node, UntypedPtr, Node]"* %this to %Node (%UntypedPtr, %Node)** + %4 = load %Node (%UntypedPtr, %Node)*, %Node (%UntypedPtr, %Node)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Node %2) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkNullLiteral(%AstBuilder* %obj, %Location* %loc) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkNullLiteral(%AstBuilder* %obj, %Location %loc) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 23 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = call %Node @"().600"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %2, %UntypedPtr %5, %Location* %6) - ret %Node %7 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 24 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = call %Node @"().592"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %1, %UntypedPtr %3, %Location* %loc.addr) + ret %Node %4 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().600"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %this, %UntypedPtr %p1, %Location* %p2) #4 { - %this.addr = alloca %"FunctionPtr2[Node, UntypedPtr, @Location]"* - store %"FunctionPtr2[Node, UntypedPtr, @Location]"* %this, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %this.addr +define internal %Node @"().592"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %this, %UntypedPtr %p1, %Location* %p2) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr2[Node, UntypedPtr, @Location]"*, %"FunctionPtr2[Node, UntypedPtr, @Location]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = bitcast %"FunctionPtr2[Node, UntypedPtr, @Location]"* %1 to %Node (%UntypedPtr, %Location*)** - %5 = load %Node (%UntypedPtr, %Location*)*, %Node (%UntypedPtr, %Location*)** %4 - %6 = call %Node %5(%UntypedPtr %2, %Location* %3) - ret %Node %6 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = bitcast %"FunctionPtr2[Node, UntypedPtr, Location const]"* %this to %Node (%UntypedPtr, %Location*)** + %3 = load %Node (%UntypedPtr, %Location*)*, %Node (%UntypedPtr, %Location*)** %2 + %4 = call %Node %3(%UntypedPtr %1, %Location* %p2) + ret %Node %4 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkBoolLiteral(%AstBuilder* %obj, %Location* %loc, i1 %val) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkBoolLiteral(%AstBuilder* %obj, %Location %loc, i1 %val) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %val.addr = alloca i1 store i1 %val, i1* %val.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 24 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load i1, i1* %val.addr - %8 = call %Node @"().601"(%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %2, %UntypedPtr %5, %Location* %6, i1 %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 25 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load i1, i1* %val.addr + %5 = call %Node @"().593"(%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %1, %UntypedPtr %3, %Location* %loc.addr, i1 %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().601"(%"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %this, %UntypedPtr %p1, %Location* %p2, i1 %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %this.addr +define internal %Node @"().593"(%"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %this, %UntypedPtr %p1, %Location* %p2, i1 %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca i1 store i1 %p3, i1* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load i1, i1* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, @Location, Bool]"* %1 to %Node (%UntypedPtr, %Location*, i1)** - %6 = load %Node (%UntypedPtr, %Location*, i1)*, %Node (%UntypedPtr, %Location*, i1)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Location* %3, i1 %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load i1, i1* %p3.addr + %3 = bitcast %"FunctionPtr3[Node, UntypedPtr, Location const, Bool]"* %this to %Node (%UntypedPtr, %Location*, i1)** + %4 = load %Node (%UntypedPtr, %Location*, i1)*, %Node (%UntypedPtr, %Location*, i1)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Location* %p2, i1 %2) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkIntLiteral(%AstBuilder* %obj, %Location* %loc, i32 %val) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkIntLiteral(%AstBuilder* %obj, %Location %loc, i32 %val) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %val.addr = alloca i32 store i32 %val, i32* %val.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 25 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load i32, i32* %val.addr - %8 = call %Node @"().602"(%"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %2, %UntypedPtr %5, %Location* %6, i32 %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 26 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load i32, i32* %val.addr + %5 = call %Node @"().594"(%"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %1, %UntypedPtr %3, %Location* %loc.addr, i32 %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().602"(%"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %this, %UntypedPtr %p1, %Location* %p2, i32 %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %this.addr +define internal %Node @"().594"(%"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %this, %UntypedPtr %p1, %Location* %p2, i32 %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca i32 store i32 %p3, i32* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load i32, i32* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, @Location, Int]"* %1 to %Node (%UntypedPtr, %Location*, i32)** - %6 = load %Node (%UntypedPtr, %Location*, i32)*, %Node (%UntypedPtr, %Location*, i32)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Location* %3, i32 %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load i32, i32* %p3.addr + %3 = bitcast %"FunctionPtr3[Node, UntypedPtr, Location const, Int]"* %this to %Node (%UntypedPtr, %Location*, i32)** + %4 = load %Node (%UntypedPtr, %Location*, i32)*, %Node (%UntypedPtr, %Location*, i32)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Location* %p2, i32 %2) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkUIntLiteral(%AstBuilder* %obj, %Location* %loc, i32 %val) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkUIntLiteral(%AstBuilder* %obj, %Location %loc, i32 %val) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %val.addr = alloca i32 store i32 %val, i32* %val.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 26 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load i32, i32* %val.addr - %8 = call %Node @"().603"(%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %2, %UntypedPtr %5, %Location* %6, i32 %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 27 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load i32, i32* %val.addr + %5 = call %Node @"().595"(%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %1, %UntypedPtr %3, %Location* %loc.addr, i32 %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().603"(%"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %this, %UntypedPtr %p1, %Location* %p2, i32 %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %this.addr +define internal %Node @"().595"(%"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %this, %UntypedPtr %p1, %Location* %p2, i32 %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca i32 store i32 %p3, i32* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load i32, i32* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, @Location, UInt]"* %1 to %Node (%UntypedPtr, %Location*, i32)** - %6 = load %Node (%UntypedPtr, %Location*, i32)*, %Node (%UntypedPtr, %Location*, i32)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Location* %3, i32 %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load i32, i32* %p3.addr + %3 = bitcast %"FunctionPtr3[Node, UntypedPtr, Location const, UInt]"* %this to %Node (%UntypedPtr, %Location*, i32)** + %4 = load %Node (%UntypedPtr, %Location*, i32)*, %Node (%UntypedPtr, %Location*, i32)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Location* %p2, i32 %2) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkLongLiteral(%AstBuilder* %obj, %Location* %loc, i64 %val) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkLongLiteral(%AstBuilder* %obj, %Location %loc, i64 %val) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %val.addr = alloca i64 store i64 %val, i64* %val.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 27 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load i64, i64* %val.addr - %8 = call %Node @"().604"(%"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %2, %UntypedPtr %5, %Location* %6, i64 %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 28 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load i64, i64* %val.addr + %5 = call %Node @"().596"(%"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %1, %UntypedPtr %3, %Location* %loc.addr, i64 %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().604"(%"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %this, %UntypedPtr %p1, %Location* %p2, i64 %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %this.addr +define internal %Node @"().596"(%"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %this, %UntypedPtr %p1, %Location* %p2, i64 %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca i64 store i64 %p3, i64* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load i64, i64* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, @Location, Long]"* %1 to %Node (%UntypedPtr, %Location*, i64)** - %6 = load %Node (%UntypedPtr, %Location*, i64)*, %Node (%UntypedPtr, %Location*, i64)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Location* %3, i64 %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load i64, i64* %p3.addr + %3 = bitcast %"FunctionPtr3[Node, UntypedPtr, Location const, Long]"* %this to %Node (%UntypedPtr, %Location*, i64)** + %4 = load %Node (%UntypedPtr, %Location*, i64)*, %Node (%UntypedPtr, %Location*, i64)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Location* %p2, i64 %2) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkULongLiteral(%AstBuilder* %obj, %Location* %loc, i64 %val) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkULongLiteral(%AstBuilder* %obj, %Location %loc, i64 %val) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %val.addr = alloca i64 store i64 %val, i64* %val.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 28 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load i64, i64* %val.addr - %8 = call %Node @"().605"(%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %2, %UntypedPtr %5, %Location* %6, i64 %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 29 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load i64, i64* %val.addr + %5 = call %Node @"().597"(%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %1, %UntypedPtr %3, %Location* %loc.addr, i64 %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().605"(%"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %this, %UntypedPtr %p1, %Location* %p2, i64 %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %this.addr +define internal %Node @"().597"(%"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %this, %UntypedPtr %p1, %Location* %p2, i64 %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca i64 store i64 %p3, i64* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load i64, i64* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, @Location, ULong]"* %1 to %Node (%UntypedPtr, %Location*, i64)** - %6 = load %Node (%UntypedPtr, %Location*, i64)*, %Node (%UntypedPtr, %Location*, i64)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Location* %3, i64 %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load i64, i64* %p3.addr + %3 = bitcast %"FunctionPtr3[Node, UntypedPtr, Location const, ULong]"* %this to %Node (%UntypedPtr, %Location*, i64)** + %4 = load %Node (%UntypedPtr, %Location*, i64)*, %Node (%UntypedPtr, %Location*, i64)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Location* %p2, i64 %2) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkFloatLiteral(%AstBuilder* %obj, %Location* %loc, float %val) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkFloatLiteral(%AstBuilder* %obj, %Location %loc, float %val) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %val.addr = alloca float store float %val, float* %val.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 29 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load float, float* %val.addr - %8 = call %Node @"().606"(%"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %2, %UntypedPtr %5, %Location* %6, float %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 30 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load float, float* %val.addr + %5 = call %Node @"().598"(%"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %1, %UntypedPtr %3, %Location* %loc.addr, float %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().606"(%"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %this, %UntypedPtr %p1, %Location* %p2, float %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %this.addr +define internal %Node @"().598"(%"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %this, %UntypedPtr %p1, %Location* %p2, float %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca float store float %p3, float* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load float, float* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, @Location, Float]"* %1 to %Node (%UntypedPtr, %Location*, float)** - %6 = load %Node (%UntypedPtr, %Location*, float)*, %Node (%UntypedPtr, %Location*, float)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Location* %3, float %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load float, float* %p3.addr + %3 = bitcast %"FunctionPtr3[Node, UntypedPtr, Location const, Float]"* %this to %Node (%UntypedPtr, %Location*, float)** + %4 = load %Node (%UntypedPtr, %Location*, float)*, %Node (%UntypedPtr, %Location*, float)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Location* %p2, float %2) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkDoubleLiteral(%AstBuilder* %obj, %Location* %loc, double %val) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkDoubleLiteral(%AstBuilder* %obj, %Location %loc, double %val) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %val.addr = alloca double store double %val, double* %val.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 30 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load double, double* %val.addr - %8 = call %Node @"().607"(%"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %2, %UntypedPtr %5, %Location* %6, double %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 31 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load double, double* %val.addr + %5 = call %Node @"().599"(%"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %1, %UntypedPtr %3, %Location* %loc.addr, double %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().607"(%"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %this, %UntypedPtr %p1, %Location* %p2, double %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %this.addr +define internal %Node @"().599"(%"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %this, %UntypedPtr %p1, %Location* %p2, double %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca double store double %p3, double* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load double, double* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, @Location, Double]"* %1 to %Node (%UntypedPtr, %Location*, double)** - %6 = load %Node (%UntypedPtr, %Location*, double)*, %Node (%UntypedPtr, %Location*, double)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Location* %3, double %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load double, double* %p3.addr + %3 = bitcast %"FunctionPtr3[Node, UntypedPtr, Location const, Double]"* %this to %Node (%UntypedPtr, %Location*, double)** + %4 = load %Node (%UntypedPtr, %Location*, double)*, %Node (%UntypedPtr, %Location*, double)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Location* %p2, double %2) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkCharLiteral(%AstBuilder* %obj, %Location* %loc, i8 %val) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkCharLiteral(%AstBuilder* %obj, %Location %loc, i8 %val) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %val.addr = alloca i8 store i8 %val, i8* %val.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 31 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load i8, i8* %val.addr - %8 = call %Node @"().608"(%"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %2, %UntypedPtr %5, %Location* %6, i8 %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 32 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load i8, i8* %val.addr + %5 = call %Node @"().600"(%"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %1, %UntypedPtr %3, %Location* %loc.addr, i8 %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().608"(%"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %this, %UntypedPtr %p1, %Location* %p2, i8 %p3) #4 { - %this.addr = alloca %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* - store %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %this, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %this.addr +define internal %Node @"().600"(%"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %this, %UntypedPtr %p1, %Location* %p2, i8 %p3) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca i8 store i8 %p3, i8* %p3.addr br label %code code: ; preds = %0 - %1 = load %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"*, %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load i8, i8* %p3.addr - %5 = bitcast %"FunctionPtr3[Node, UntypedPtr, @Location, Char]"* %1 to %Node (%UntypedPtr, %Location*, i8)** - %6 = load %Node (%UntypedPtr, %Location*, i8)*, %Node (%UntypedPtr, %Location*, i8)** %5 - %7 = call %Node %6(%UntypedPtr %2, %Location* %3, i8 %4) - ret %Node %7 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load i8, i8* %p3.addr + %3 = bitcast %"FunctionPtr3[Node, UntypedPtr, Location const, Char]"* %this to %Node (%UntypedPtr, %Location*, i8)** + %4 = load %Node (%UntypedPtr, %Location*, i8)*, %Node (%UntypedPtr, %Location*, i8)** %3 + %5 = call %Node %4(%UntypedPtr %1, %Location* %p2, i8 %2) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkStringLiteral(%AstBuilder* %obj, %Location* %loc, %StringRef %data) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkStringLiteral(%AstBuilder* %obj, %Location %loc, %StringRef %data) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %data.addr = alloca %StringRef store %StringRef %data, %StringRef* %data.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 32 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %data.addr - %8 = call %Node @"().553"(%"FunctionPtr3[Node, UntypedPtr, @Location, StringRef]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 33 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %data.addr + %5 = call %Node @"().543"(%"FunctionPtr3[Node, UntypedPtr, Location const, StringRef]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind @@ -27829,8 +24861,6 @@ code: ; preds = %0 ; Function Attrs: inlinehint nounwind define internal %Node @parseExprListOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %res = alloca %Node %expr = alloca %Node %"$tmpForRef" = alloca %Node @@ -27840,68 +24870,58 @@ define internal %Node @parseExprListOpt(%"SparrowParser[SparrowLayoutDecoder[Spa br label %code code: ; preds = %0 - call void @ctor.556(%Node* %res) - call void @ctor.556(%Node* %expr) + call void @ctor.546(%Node* %res) + call void @ctor.546(%Node* %expr) br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = call i1 @parseExprOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %Node* %expr, i1 false) - %3 = xor i1 true, %2 - br i1 %3, label %if_then, label %if_end + %1 = call i1 @parseExprOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %expr, i1 false) + %2 = xor i1 true, %1 + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %Node, %Node* %res - ret %Node %4 + %3 = load %Node, %Node* %res + ret %Node %3 -if_end: ; preds = %dumy_block, %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 3 - %7 = load %Node, %Node* %res - %8 = load %Node, %Node* %expr - %9 = call %Node @addToNodeList(%AstBuilder* %6, %Node %7, %Node %8) - store %Node %9, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef") +if_end: ; preds = %dumy_block, %if_block + %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %5 = load %Node, %Node* %res + %6 = load %Node, %Node* %expr + %7 = call %Node @addToNodeList(%AstBuilder* %4, %Node %5, %Node %6) + store %Node %7, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef") br label %while_block dumy_block: ; No predecessors! br label %if_end while_block: ; preds = %while_step, %if_end - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 32) - %11 = load %TokenType, %TokenType* %tmp.this - %12 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, %TokenType %11) - br i1 %12, label %while_body, label %while_end + call void @ctor.404(%TokenType* %tmp.this, i32 33) + %8 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %8, label %while_body, label %while_end while_body: ; preds = %while_block - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, i1 true) - store %Node %14, %Node* %"$tmpForRef1" - call void @"=.554"(%Node* %expr, %Node* %"$tmpForRef1") - %15 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %16 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %15, i32 0, i32 3 - %17 = load %Node, %Node* %res - %18 = load %Node, %Node* %expr - %19 = call %Node @addToNodeList(%AstBuilder* %16, %Node %17, %Node %18) - store %Node %19, %Node* %"$tmpForRef2" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef2") + %9 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %9, %Node* %"$tmpForRef1" + call void @"=.544"(%Node* %expr, %Node* %"$tmpForRef1") + %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %11 = load %Node, %Node* %res + %12 = load %Node, %Node* %expr + %13 = call %Node @addToNodeList(%AstBuilder* %10, %Node %11, %Node %12) + store %Node %13, %Node* %"$tmpForRef2" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef2") br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - %20 = load %Node, %Node* %res - ret %Node %20 + %14 = load %Node, %Node* %res + ret %Node %14 } ; Function Attrs: inlinehint nounwind define internal i1 @parseExprOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 %allowSemicolons) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %allowSemicolons.addr = alloca i1 store i1 %allowSemicolons, i1* %allowSemicolons.addr %"$tmpForRef" = alloca %Node @@ -27911,28 +24931,24 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = call i1 @nextIsExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i1 true) - br i1 %2, label %if_then, label %if_end + %1 = call i1 @nextIsExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %3 = load %Node*, %Node** %res.addr - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i1 true) - store %Node %5, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %3, %Node* %"$tmpForRef") + %2 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %2, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef") br label %if_block1 if_end: ; preds = %dumy_block, %if_block ret i1 false if_block1: ; preds = %if_then - %6 = load i1, i1* %allowSemicolons.addr - br i1 %6, label %if_then2, label %if_end3 + %3 = load i1, i1* %allowSemicolons.addr + br i1 %3, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @consumeSemis(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7) + call void @consumeSemis(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 @@ -27944,8 +24960,6 @@ dumy_block: ; No predecessors! ; Function Attrs: inlinehint nounwind define internal i1 @nextIsExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %withEqual) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %withEqual.addr = alloca i1 store i1 %withEqual, i1* %withEqual.addr %t = alloca %TokenType @@ -27969,27 +24983,26 @@ define internal i1 @nextIsExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScann br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %2) - %3 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 - call void @ctor.203(%TokenType* %t, %TokenType* %3) - call void @dtor.260(%Token* %"$tmpC") + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %1) + %2 = getelementptr inbounds %Token, %Token* %"$tmpC", i32 0, i32 1 + call void @ctor.189(%TokenType* %t, %TokenType* %2) + call void @dtor.249(%Token* %"$tmpC") br label %if_block if_block: ; preds = %code - call void @ctor.417(%TokenType* %tmp.this, i32 35) - %4 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this) - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 36) + %3 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this) + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block - %5 = load i1, i1* %withEqual.addr - ret i1 %5 + %4 = load i1, i1* %withEqual.addr + ret i1 %4 if_end: ; preds = %dumy_block, %if_block - call void @ctor.417(%TokenType* %tmp.this40, i32 36) - %6 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this40) - br i1 %6, label %cond.true37, label %cond.false38 + call void @ctor.404(%TokenType* %tmp.this40, i32 37) + %5 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this40) + br i1 %5, label %cond.true37, label %cond.false38 dumy_block: ; No predecessors! br label %if_end @@ -27998,168 +25011,168 @@ cond.true: ; preds = %cond.end3 br label %cond.end cond.false: ; preds = %cond.end3 - call void @ctor.417(%TokenType* %tmp.this66, i32 45) - %7 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this66) + call void @ctor.404(%TokenType* %tmp.this66, i32 46) + %6 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this66) br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res67 = phi i1 [ true, %cond.true ], [ %7, %cond.false ] + %cond.res67 = phi i1 [ true, %cond.true ], [ %6, %cond.false ] br i1 %cond.res65, label %cond_destruct_alt1, label %cond_destruct_alt2 cond.true1: ; preds = %cond.end6 br label %cond.end3 cond.false2: ; preds = %cond.end6 - call void @ctor.417(%TokenType* %tmp.this64, i32 44) - %8 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this64) + call void @ctor.404(%TokenType* %tmp.this64, i32 45) + %7 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this64) br label %cond.end3 cond.end3: ; preds = %cond.false2, %cond.true1 - %cond.res65 = phi i1 [ true, %cond.true1 ], [ %8, %cond.false2 ] + %cond.res65 = phi i1 [ true, %cond.true1 ], [ %7, %cond.false2 ] br i1 %cond.res65, label %cond.true, label %cond.false cond.true4: ; preds = %cond.end9 br label %cond.end6 cond.false5: ; preds = %cond.end9 - call void @ctor.417(%TokenType* %tmp.this62, i32 43) - %9 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this62) + call void @ctor.404(%TokenType* %tmp.this62, i32 44) + %8 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this62) br label %cond.end6 cond.end6: ; preds = %cond.false5, %cond.true4 - %cond.res63 = phi i1 [ true, %cond.true4 ], [ %9, %cond.false5 ] + %cond.res63 = phi i1 [ true, %cond.true4 ], [ %8, %cond.false5 ] br i1 %cond.res63, label %cond.true1, label %cond.false2 cond.true7: ; preds = %cond.end12 br label %cond.end9 cond.false8: ; preds = %cond.end12 - call void @ctor.417(%TokenType* %tmp.this60, i32 42) - %10 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this60) + call void @ctor.404(%TokenType* %tmp.this60, i32 43) + %9 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this60) br label %cond.end9 cond.end9: ; preds = %cond.false8, %cond.true7 - %cond.res61 = phi i1 [ true, %cond.true7 ], [ %10, %cond.false8 ] + %cond.res61 = phi i1 [ true, %cond.true7 ], [ %9, %cond.false8 ] br i1 %cond.res61, label %cond.true4, label %cond.false5 cond.true10: ; preds = %cond.end15 br label %cond.end12 cond.false11: ; preds = %cond.end15 - call void @ctor.417(%TokenType* %tmp.this58, i32 41) - %11 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this58) + call void @ctor.404(%TokenType* %tmp.this58, i32 42) + %10 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this58) br label %cond.end12 cond.end12: ; preds = %cond.false11, %cond.true10 - %cond.res59 = phi i1 [ true, %cond.true10 ], [ %11, %cond.false11 ] + %cond.res59 = phi i1 [ true, %cond.true10 ], [ %10, %cond.false11 ] br i1 %cond.res59, label %cond.true7, label %cond.false8 cond.true13: ; preds = %cond.end18 br label %cond.end15 cond.false14: ; preds = %cond.end18 - call void @ctor.417(%TokenType* %tmp.this56, i32 40) - %12 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this56) + call void @ctor.404(%TokenType* %tmp.this56, i32 41) + %11 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this56) br label %cond.end15 cond.end15: ; preds = %cond.false14, %cond.true13 - %cond.res57 = phi i1 [ true, %cond.true13 ], [ %12, %cond.false14 ] + %cond.res57 = phi i1 [ true, %cond.true13 ], [ %11, %cond.false14 ] br i1 %cond.res57, label %cond.true10, label %cond.false11 cond.true16: ; preds = %cond.end21 br label %cond.end18 cond.false17: ; preds = %cond.end21 - call void @ctor.417(%TokenType* %tmp.this54, i32 39) - %13 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this54) + call void @ctor.404(%TokenType* %tmp.this54, i32 40) + %12 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this54) br label %cond.end18 cond.end18: ; preds = %cond.false17, %cond.true16 - %cond.res55 = phi i1 [ true, %cond.true16 ], [ %13, %cond.false17 ] + %cond.res55 = phi i1 [ true, %cond.true16 ], [ %12, %cond.false17 ] br i1 %cond.res55, label %cond.true13, label %cond.false14 cond.true19: ; preds = %cond.end24 br label %cond.end21 cond.false20: ; preds = %cond.end24 - call void @ctor.417(%TokenType* %tmp.this52, i32 38) - %14 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this52) + call void @ctor.404(%TokenType* %tmp.this52, i32 39) + %13 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this52) br label %cond.end21 cond.end21: ; preds = %cond.false20, %cond.true19 - %cond.res53 = phi i1 [ true, %cond.true19 ], [ %14, %cond.false20 ] + %cond.res53 = phi i1 [ true, %cond.true19 ], [ %13, %cond.false20 ] br i1 %cond.res53, label %cond.true16, label %cond.false17 cond.true22: ; preds = %cond.end27 br label %cond.end24 cond.false23: ; preds = %cond.end27 - call void @ctor.417(%TokenType* %tmp.this50, i32 20) - %15 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this50) + call void @ctor.404(%TokenType* %tmp.this50, i32 21) + %14 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this50) br label %cond.end24 cond.end24: ; preds = %cond.false23, %cond.true22 - %cond.res51 = phi i1 [ true, %cond.true22 ], [ %15, %cond.false23 ] + %cond.res51 = phi i1 [ true, %cond.true22 ], [ %14, %cond.false23 ] br i1 %cond.res51, label %cond.true19, label %cond.false20 cond.true25: ; preds = %cond.end30 br label %cond.end27 cond.false26: ; preds = %cond.end30 - call void @ctor.417(%TokenType* %tmp.this48, i32 22) - %16 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this48) + call void @ctor.404(%TokenType* %tmp.this48, i32 23) + %15 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this48) br label %cond.end27 cond.end27: ; preds = %cond.false26, %cond.true25 - %cond.res49 = phi i1 [ true, %cond.true25 ], [ %16, %cond.false26 ] + %cond.res49 = phi i1 [ true, %cond.true25 ], [ %15, %cond.false26 ] br i1 %cond.res49, label %cond.true22, label %cond.false23 cond.true28: ; preds = %cond.end33 br label %cond.end30 cond.false29: ; preds = %cond.end33 - call void @ctor.417(%TokenType* %tmp.this46, i32 21) - %17 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this46) + call void @ctor.404(%TokenType* %tmp.this46, i32 22) + %16 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this46) br label %cond.end30 cond.end30: ; preds = %cond.false29, %cond.true28 - %cond.res47 = phi i1 [ true, %cond.true28 ], [ %17, %cond.false29 ] + %cond.res47 = phi i1 [ true, %cond.true28 ], [ %16, %cond.false29 ] br i1 %cond.res47, label %cond.true25, label %cond.false26 cond.true31: ; preds = %cond.end36 br label %cond.end33 cond.false32: ; preds = %cond.end36 - call void @ctor.417(%TokenType* %tmp.this44, i32 28) - %18 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this44) + call void @ctor.404(%TokenType* %tmp.this44, i32 29) + %17 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this44) br label %cond.end33 cond.end33: ; preds = %cond.false32, %cond.true31 - %cond.res45 = phi i1 [ true, %cond.true31 ], [ %18, %cond.false32 ] + %cond.res45 = phi i1 [ true, %cond.true31 ], [ %17, %cond.false32 ] br i1 %cond.res45, label %cond.true28, label %cond.false29 cond.true34: ; preds = %cond.end39 br label %cond.end36 cond.false35: ; preds = %cond.end39 - call void @ctor.417(%TokenType* %tmp.this42, i32 34) - %19 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this42) + call void @ctor.404(%TokenType* %tmp.this42, i32 35) + %18 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this42) br label %cond.end36 cond.end36: ; preds = %cond.false35, %cond.true34 - %cond.res43 = phi i1 [ true, %cond.true34 ], [ %19, %cond.false35 ] + %cond.res43 = phi i1 [ true, %cond.true34 ], [ %18, %cond.false35 ] br i1 %cond.res43, label %cond.true31, label %cond.false32 cond.true37: ; preds = %if_end br label %cond.end39 cond.false38: ; preds = %if_end - call void @ctor.417(%TokenType* %tmp.this41, i32 37) - %20 = call i1 @"==.352"(%TokenType* %t, %TokenType* %tmp.this41) + call void @ctor.404(%TokenType* %tmp.this41, i32 38) + %19 = call i1 @"==.339"(%TokenType* %t, %TokenType* %tmp.this41) br label %cond.end39 cond.end39: ; preds = %cond.false38, %cond.true37 - %cond.res = phi i1 [ true, %cond.true37 ], [ %20, %cond.false38 ] + %cond.res = phi i1 [ true, %cond.true37 ], [ %19, %cond.false38 ] br i1 %cond.res, label %cond.true34, label %cond.false35 cond_destruct_alt1: ; preds = %cond.end @@ -28277,7 +25290,7 @@ cond_destruct_alt2102: ; preds = %cond_destruct_end10 br label %cond_destruct_end103 cond_destruct_end103: ; preds = %cond_destruct_alt2102, %cond_destruct_alt1101 - br i1 %6, label %cond_destruct_alt1104, label %cond_destruct_alt2105 + br i1 %5, label %cond_destruct_alt1104, label %cond_destruct_alt2105 cond_destruct_alt1104: ; preds = %cond_destruct_end103 br label %cond_destruct_end106 @@ -28406,7 +25419,7 @@ cond_destruct_alt2145: ; preds = %cond_destruct_end14 br label %cond_destruct_end146 cond_destruct_end146: ; preds = %cond_destruct_alt2145, %cond_destruct_alt1144 - br i1 %6, label %cond_destruct_alt1147, label %cond_destruct_alt2148 + br i1 %5, label %cond_destruct_alt1147, label %cond_destruct_alt2148 cond_destruct_alt1147: ; preds = %cond_destruct_end146 br label %cond_destruct_end149 @@ -28419,11 +25432,9 @@ cond_destruct_end149: ; preds = %cond_destruct_alt21 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkFunAppExpr(%AstBuilder* %obj, %Location* %loc, %Node %base, %Node %args) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkFunAppExpr(%AstBuilder* %obj, %Location %loc, %Node %base, %Node %args) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %base.addr = alloca %Node store %Node %base, %Node* %base.addr %args.addr = alloca %Node @@ -28431,26 +25442,19 @@ define internal %Node @mkFunAppExpr(%AstBuilder* %obj, %Location* %loc, %Node %b br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 21 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %base.addr - %8 = load %Node, %Node* %args.addr - %9 = call %Node @"().609"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %Node %8) - ret %Node %9 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 22 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %base.addr + %5 = load %Node, %Node* %args.addr + %6 = call %Node @"().601"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %Node %5) + ret %Node %6 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().609"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3, %Node %p4) #4 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %this.addr +define internal %Node @"().601"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3, %Node %p4) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %Node store %Node %p3, %Node* %p3.addr %p4.addr = alloca %Node @@ -28458,23 +25462,19 @@ define internal %Node @"().609"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %Node, %Node* %p3.addr - %5 = load %Node, %Node* %p4.addr - %6 = bitcast %"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %1 to %Node (%UntypedPtr, %Location*, %Node, %Node)** - %7 = load %Node (%UntypedPtr, %Location*, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %Node, %Node)** %6 - %8 = call %Node %7(%UntypedPtr %2, %Location* %3, %Node %4, %Node %5) - ret %Node %8 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %Node, %Node* %p3.addr + %3 = load %Node, %Node* %p4.addr + %4 = bitcast %"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %this to %Node (%UntypedPtr, %Location*, %Node, %Node)** + %5 = load %Node (%UntypedPtr, %Location*, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %Node, %Node)** %4 + %6 = call %Node %5(%UntypedPtr %1, %Location* %p2, %Node %2, %Node %3) + ret %Node %6 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkDotExpr(%AstBuilder* %obj, %Location* %loc, %Node %base, %StringRef %id) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkDotExpr(%AstBuilder* %obj, %Location %loc, %Node %base, %StringRef %id) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %base.addr = alloca %Node store %Node %base, %Node* %base.addr %id.addr = alloca %StringRef @@ -28482,97 +25482,86 @@ define internal %Node @mkDotExpr(%AstBuilder* %obj, %Location* %loc, %Node %base br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 20 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %base.addr - %8 = load %StringRef, %StringRef* %id.addr - %9 = call %Node @"().555"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %StringRef %8) - ret %Node %9 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 21 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %base.addr + %5 = load %StringRef, %StringRef* %id.addr + %6 = call %Node @"().545"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %StringRef %5) + ret %Node %6 } ; Function Attrs: inlinehint nounwind define internal void @parseIdOrOper(%String* sret %_result, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %withEqual) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %withEqual.addr = alloca i1 store i1 %withEqual, i1* %withEqual.addr %tmp.this = alloca %TokenType %tmp.this5 = alloca %TokenType %tmp.this10 = alloca %TokenType - %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef %"$tmpC" = alloca %String + %"$tmpForRef" = alloca %StringRef %tmp.StringRef15 = alloca %StringRef %"$tmpC16" = alloca %Token - %tmp.StringRef17 = alloca %StringRef + %"$tmpForRef17" = alloca %StringRef + %tmp.StringRef18 = alloca %StringRef br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 36) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_else + call void @ctor.404(%TokenType* %tmp.this, i32 37) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_else if_then: ; preds = %if_block - %4 = load %String*, %String** %_result.addr - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 2 - call void @ctor.189(%String* %4, %String* %7) + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 2 + call void @ctor.175(%String* %_result, %String* %3) ret void if_else: ; preds = %if_block br label %if_block1 if_end: ; preds = %if_end4, %dumy_block - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %9 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef15, i32 0, i32 0 - %10 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef15, i32 0, i32 1 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.100, i32 0, i32 0), i8** %9 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.100, i32 0, i32 25), i8** %10 - %11 = load %StringRef, %StringRef* %tmp.StringRef15 - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC16", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %13) - %14 = getelementptr inbounds %Token, %Token* %"$tmpC16", i32 0, i32 1 - %15 = load %TokenType, %TokenType* %14 - %16 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef17, i32 0, i32 0 - %17 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef17, i32 0, i32 1 - store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str.101, i32 0, i32 0), i8** %16 - store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str.101, i32 0, i32 34), i8** %17 - %18 = load %StringRef, %StringRef* %tmp.StringRef17 - call void @toString.597(%String* %"$tmpC", %StringRef %11, %TokenType %15, %StringRef %18) - call void @reportError.548(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC16") + %4 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef15, i32 0, i32 0 + %5 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef15, i32 0, i32 1 + %6 = bitcast %UntypedPtr* %4 to i8** + %7 = bitcast %UntypedPtr* %5 to i8** + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.102, i32 0, i32 0), i8** %6 + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.102, i32 0, i32 25), i8** %7 + %8 = load %StringRef, %StringRef* %tmp.StringRef15 + store %StringRef %8, %StringRef* %"$tmpForRef" + %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC16", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %9) + %10 = getelementptr inbounds %Token, %Token* %"$tmpC16", i32 0, i32 1 + %11 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef18, i32 0, i32 0 + %12 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef18, i32 0, i32 1 + %13 = bitcast %UntypedPtr* %11 to i8** + %14 = bitcast %UntypedPtr* %12 to i8** + store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str.103, i32 0, i32 0), i8** %13 + store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str.103, i32 0, i32 34), i8** %14 + %15 = load %StringRef, %StringRef* %tmp.StringRef18 + store %StringRef %15, %StringRef* %"$tmpForRef17" + call void @toString.589(%String* %"$tmpC", %StringRef* %"$tmpForRef", %TokenType* %10, %StringRef* %"$tmpForRef17") + call void @reportError.538(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC16") ret void dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_else - %19 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 37) - %20 = load %TokenType, %TokenType* %tmp.this5 - %21 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %19, %TokenType %20) - br i1 %21, label %if_then2, label %if_else3 + call void @ctor.404(%TokenType* %tmp.this5, i32 38) + %16 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + br i1 %16, label %if_then2, label %if_else3 if_then2: ; preds = %if_block1 - %22 = load %String*, %String** %_result.addr - %23 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %24 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23, i32 0, i32 1 - %25 = getelementptr inbounds %Token, %Token* %24, i32 0, i32 2 - call void @ctor.189(%String* %22, %String* %25) + %17 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %18 = getelementptr inbounds %Token, %Token* %17, i32 0, i32 2 + call void @ctor.175(%String* %_result, %String* %18) ret void if_else3: ; preds = %if_block1 @@ -28585,35 +25574,33 @@ dumy_block6: ; No predecessors! br label %if_end4 if_block7: ; preds = %if_else3 - %26 = load i1, i1* %withEqual.addr - br i1 %26, label %cond.true, label %cond.false + %19 = load i1, i1* %withEqual.addr + br i1 %19, label %cond.true, label %cond.false if_then8: ; preds = %cond.end - %27 = load %String*, %String** %_result.addr - %28 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %29 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.99, i32 0, i32 0), i8** %28 - store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.99, i32 0, i32 1), i8** %29 - %30 = load %StringRef, %StringRef* %tmp.StringRef - store %StringRef %30, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %27, %StringRef* %"$tmpForRef") - br i1 %26, label %cond_destruct_alt1, label %cond_destruct_alt2 + %20 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %21 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %22 = bitcast %UntypedPtr* %20 to i8** + %23 = bitcast %UntypedPtr* %21 to i8** + store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.101, i32 0, i32 0), i8** %22 + store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.101, i32 0, i32 1), i8** %23 + %24 = load %StringRef, %StringRef* %tmp.StringRef + call void @ctor.459(%String* %_result, %StringRef %24) + br i1 %19, label %cond_destruct_alt1, label %cond_destruct_alt2 if_end9: ; preds = %dumy_block11, %cond.end - br i1 %26, label %cond_destruct_alt112, label %cond_destruct_alt213 + br i1 %19, label %cond_destruct_alt112, label %cond_destruct_alt213 cond.true: ; preds = %if_block7 - %31 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this10, i32 35) - %32 = load %TokenType, %TokenType* %tmp.this10 - %33 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %31, %TokenType %32) + call void @ctor.404(%TokenType* %tmp.this10, i32 36) + %25 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this10) br label %cond.end cond.false: ; preds = %if_block7 br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %33, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %25, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then8, label %if_end9 cond_destruct_alt1: ; preds = %if_then8 @@ -28639,11 +25626,9 @@ cond_destruct_end14: ; preds = %cond_destruct_alt21 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkPrefixOp(%AstBuilder* %obj, %Location* %loc, %StringRef %op, %Node %base) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkPrefixOp(%AstBuilder* %obj, %Location %loc, %StringRef %op, %Node %base) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %op.addr = alloca %StringRef store %StringRef %op, %StringRef* %op.addr %base.addr = alloca %Node @@ -28651,26 +25636,19 @@ define internal %Node @mkPrefixOp(%AstBuilder* %obj, %Location* %loc, %StringRef br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 16 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %op.addr - %8 = load %Node, %Node* %base.addr - %9 = call %Node @"().610"(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %Node %8) - ret %Node %9 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 17 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %op.addr + %5 = load %Node, %Node* %base.addr + %6 = call %Node @"().602"(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5) + ret %Node %6 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().610"(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %Node %p4) #4 { - %this.addr = alloca %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* - store %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %this, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %this.addr +define internal %Node @"().602"(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %Node %p4) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %StringRef store %StringRef %p3, %StringRef* %p3.addr %p4.addr = alloca %Node @@ -28678,29 +25656,22 @@ define internal %Node @"().610"(%"FunctionPtr4[Node, UntypedPtr, @Location, Stri br label %code code: ; preds = %0 - %1 = load %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"*, %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %StringRef, %StringRef* %p3.addr - %5 = load %Node, %Node* %p4.addr - %6 = bitcast %"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %1 to %Node (%UntypedPtr, %Location*, %StringRef, %Node)** - %7 = load %Node (%UntypedPtr, %Location*, %StringRef, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %Node)** %6 - %8 = call %Node %7(%UntypedPtr %2, %Location* %3, %StringRef %4, %Node %5) - ret %Node %8 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %StringRef, %StringRef* %p3.addr + %3 = load %Node, %Node* %p4.addr + %4 = bitcast %"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %this to %Node (%UntypedPtr, %Location*, %StringRef, %Node)** + %5 = load %Node (%UntypedPtr, %Location*, %StringRef, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %Node)** %4 + %6 = call %Node %5(%UntypedPtr %1, %Location* %p2, %StringRef %2, %Node %3) + ret %Node %6 } ; Function Attrs: inlinehint nounwind define internal void @parseIdOrOperOpt(%String* sret %_result, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %withEqual) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %withEqual.addr = alloca i1 store i1 %withEqual, i1* %withEqual.addr %tmp.this = alloca %TokenType %tmp.this5 = alloca %TokenType %tmp.this11 = alloca %TokenType - %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef br label %code @@ -28708,18 +25679,14 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 36) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_else + call void @ctor.404(%TokenType* %tmp.this, i32 37) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_else if_then: ; preds = %if_block - %4 = load %String*, %String** %_result.addr - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 2 - call void @ctor.189(%String* %4, %String* %7) + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 2 + call void @ctor.175(%String* %_result, %String* %3) ret void if_else: ; preds = %if_block @@ -28732,18 +25699,14 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_else - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 37) - %9 = load %TokenType, %TokenType* %tmp.this5 - %10 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8, %TokenType %9) - br i1 %10, label %if_then2, label %if_else3 + call void @ctor.404(%TokenType* %tmp.this5, i32 38) + %4 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + br i1 %4, label %if_then2, label %if_else3 if_then2: ; preds = %if_block1 - %11 = load %String*, %String** %_result.addr - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, i32 0, i32 1 - %14 = getelementptr inbounds %Token, %Token* %13, i32 0, i32 2 - call void @ctor.189(%String* %11, %String* %14) + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 2 + call void @ctor.175(%String* %_result, %String* %6) ret void if_else3: ; preds = %if_block1 @@ -28756,40 +25719,37 @@ dumy_block6: ; No predecessors! br label %if_end4 if_block7: ; preds = %if_else3 - %15 = load i1, i1* %withEqual.addr - br i1 %15, label %cond.true, label %cond.false + %7 = load i1, i1* %withEqual.addr + br i1 %7, label %cond.true, label %cond.false if_then8: ; preds = %cond.end - %16 = load %String*, %String** %_result.addr - %17 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %18 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.102, i32 0, i32 0), i8** %17 - store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.102, i32 0, i32 1), i8** %18 - %19 = load %StringRef, %StringRef* %tmp.StringRef - store %StringRef %19, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %16, %StringRef* %"$tmpForRef") - br i1 %15, label %cond_destruct_alt1, label %cond_destruct_alt2 + %8 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %9 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %10 = bitcast %UntypedPtr* %8 to i8** + %11 = bitcast %UntypedPtr* %9 to i8** + store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.104, i32 0, i32 0), i8** %10 + store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.104, i32 0, i32 1), i8** %11 + %12 = load %StringRef, %StringRef* %tmp.StringRef + call void @ctor.459(%String* %_result, %StringRef %12) + br i1 %7, label %cond_destruct_alt1, label %cond_destruct_alt2 if_else9: ; preds = %cond.end - %20 = load %String*, %String** %_result.addr - call void @ctor.137(%String* %20) - br i1 %15, label %cond_destruct_alt113, label %cond_destruct_alt214 + call void @ctor.124(%String* %_result) + br i1 %7, label %cond_destruct_alt113, label %cond_destruct_alt214 if_end10: ; preds = %dumy_block16, %dumy_block12 - br i1 %15, label %cond_destruct_alt117, label %cond_destruct_alt218 + br i1 %7, label %cond_destruct_alt117, label %cond_destruct_alt218 cond.true: ; preds = %if_block7 - %21 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this11, i32 35) - %22 = load %TokenType, %TokenType* %tmp.this11 - %23 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %21, %TokenType %22) + call void @ctor.404(%TokenType* %tmp.this11, i32 36) + %13 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this11) br label %cond.end cond.false: ; preds = %if_block7 br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %23, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %13, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then8, label %if_else9 cond_destruct_alt1: ; preds = %if_then8 @@ -28827,11 +25787,9 @@ cond_destruct_end19: ; preds = %cond_destruct_alt21 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkInfixOp(%AstBuilder* %obj, %Location* %loc, %Node %lhs, %StringRef %op, %Node %rhs) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkInfixOp(%AstBuilder* %obj, %Location %loc, %Node %lhs, %StringRef %op, %Node %rhs) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %lhs.addr = alloca %Node store %Node %lhs, %Node* %lhs.addr %op.addr = alloca %StringRef @@ -28841,27 +25799,20 @@ define internal %Node @mkInfixOp(%AstBuilder* %obj, %Location* %loc, %Node %lhs, br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 15 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %lhs.addr - %8 = load %StringRef, %StringRef* %op.addr - %9 = load %Node, %Node* %rhs.addr - %10 = call %Node @"().611"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %StringRef %8, %Node %9) - ret %Node %10 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 16 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %lhs.addr + %5 = load %StringRef, %StringRef* %op.addr + %6 = load %Node, %Node* %rhs.addr + %7 = call %Node @"().603"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %StringRef %5, %Node %6) + ret %Node %7 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().611"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3, %StringRef %p4, %Node %p5) #4 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %this.addr +define internal %Node @"().603"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3, %StringRef %p4, %Node %p5) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %Node store %Node %p3, %Node* %p3.addr %p4.addr = alloca %StringRef @@ -28871,24 +25822,20 @@ define internal %Node @"().611"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %Node, %Node* %p3.addr - %5 = load %StringRef, %StringRef* %p4.addr - %6 = load %Node, %Node* %p5.addr - %7 = bitcast %"FunctionPtr5[Node, UntypedPtr, @Location, Node, StringRef, Node]"* %1 to %Node (%UntypedPtr, %Location*, %Node, %StringRef, %Node)** - %8 = load %Node (%UntypedPtr, %Location*, %Node, %StringRef, %Node)*, %Node (%UntypedPtr, %Location*, %Node, %StringRef, %Node)** %7 - %9 = call %Node %8(%UntypedPtr %2, %Location* %3, %Node %4, %StringRef %5, %Node %6) - ret %Node %9 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %Node, %Node* %p3.addr + %3 = load %StringRef, %StringRef* %p4.addr + %4 = load %Node, %Node* %p5.addr + %5 = bitcast %"FunctionPtr5[Node, UntypedPtr, Location const, Node, StringRef, Node]"* %this to %Node (%UntypedPtr, %Location*, %Node, %StringRef, %Node)** + %6 = load %Node (%UntypedPtr, %Location*, %Node, %StringRef, %Node)*, %Node (%UntypedPtr, %Location*, %Node, %StringRef, %Node)** %5 + %7 = call %Node %6(%UntypedPtr %1, %Location* %p2, %Node %2, %StringRef %3, %Node %4) + ret %Node %7 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkPostfixOp(%AstBuilder* %obj, %Location* %loc, %Node %base, %StringRef %op) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkPostfixOp(%AstBuilder* %obj, %Location %loc, %Node %base, %StringRef %op) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %base.addr = alloca %Node store %Node %base, %Node* %base.addr %op.addr = alloca %StringRef @@ -28896,24 +25843,17 @@ define internal %Node @mkPostfixOp(%AstBuilder* %obj, %Location* %loc, %Node %ba br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 14 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %base.addr - %8 = load %StringRef, %StringRef* %op.addr - %9 = call %Node @"().555"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, StringRef]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %StringRef %8) - ret %Node %9 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 15 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %base.addr + %5 = load %StringRef, %StringRef* %op.addr + %6 = call %Node @"().545"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, StringRef]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %StringRef %5) + ret %Node %6 } ; Function Attrs: inlinehint nounwind define internal i1 @parseImportLineOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %tmp.this = alloca %TokenType %"$tmpForRef" = alloca %Node %tmp.this1 = alloca %TokenType @@ -28923,22 +25863,16 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 3) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 3) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %Node*, %Node** %res.addr - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = call %Node @parseImportNames(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5) - store %Node %6, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %4, %Node* %"$tmpForRef") - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 31) - %8 = load %TokenType, %TokenType* %tmp.this1 - %9 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %TokenType %8) + %2 = call %Node @parseImportNames(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %2, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef") + call void @ctor.404(%TokenType* %tmp.this1, i32 32) + %3 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) ret i1 true if_end: ; preds = %dumy_block, %if_block @@ -28950,8 +25884,6 @@ dumy_block: ; No predecessors! ; Function Attrs: inlinehint nounwind define internal %Node @parseImportNames(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %res = alloca %Node %"$tmpForRef" = alloca %Node %tmp.this = alloca %TokenType @@ -28959,93 +25891,77 @@ define internal %Node @parseImportNames(%"SparrowParser[SparrowLayoutDecoder[Spa br label %code code: ; preds = %0 - call void @ctor.556(%Node* %res) - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i32 0, i32 3 - %3 = load %Node, %Node* %res - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = call %Node @parseImportName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4) - %6 = call %Node @addToNodeList(%AstBuilder* %2, %Node %3, %Node %5) - store %Node %6, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef") + call void @ctor.546(%Node* %res) + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %2 = load %Node, %Node* %res + %3 = call %Node @parseImportName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %4 = call %Node @addToNodeList(%AstBuilder* %1, %Node %2, %Node %3) + store %Node %4, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef") br label %while_block while_block: ; preds = %while_step, %code - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 32) - %8 = load %TokenType, %TokenType* %tmp.this - %9 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %TokenType %8) - br i1 %9, label %while_body, label %while_end + call void @ctor.404(%TokenType* %tmp.this, i32 33) + %5 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %5, label %while_body, label %while_end while_body: ; preds = %while_block - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i32 0, i32 3 - %12 = load %Node, %Node* %res - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = call %Node @parseImportName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13) - %15 = call %Node @addToNodeList(%AstBuilder* %11, %Node %12, %Node %14) - store %Node %15, %Node* %"$tmpForRef1" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef1") + %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %7 = load %Node, %Node* %res + %8 = call %Node @parseImportName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %9 = call %Node @addToNodeList(%AstBuilder* %6, %Node %7, %Node %8) + store %Node %9, %Node* %"$tmpForRef1" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef1") br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - %16 = load %Node, %Node* %res - ret %Node %16 + %10 = load %Node, %Node* %res + ret %Node %10 } ; Function Attrs: inlinehint nounwind define internal %Node @parseImportName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %loc = alloca %Location + %"$tmpForRef" = alloca %Location %id = alloca %String %toImport = alloca %Node - %"$tmpForRef" = alloca %Node - %declNames = alloca %Node %"$tmpForRef1" = alloca %Node - %"$tmpC" = alloca %Location - %"$tmpC2" = alloca %Location + %declNames = alloca %Node + %"$tmpForRef2" = alloca %Node br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseIdEqualOpt(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2) - %3 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %4 = call %Node @parseQidOrString(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %3) - store %Node %4, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %toImport, %Node* %"$tmpForRef") - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = call %Node @parseImportDeclNamesOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5) - store %Node %6, %Node* %"$tmpForRef1" - call void @ctor.545(%Node* %declNames, %Node* %"$tmpForRef1") - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 3 - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @lastLoc(%Location* %"$tmpC2", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9) - call void @span(%Location* %"$tmpC", %Location* %loc, %Location* %"$tmpC2") - %10 = call %StringRef @asStringRef(%String* %id) - %11 = load %Node, %Node* %toImport - %12 = load %Node, %Node* %declNames - %13 = call %Node @mkImportName(%AstBuilder* %8, %Location* %"$tmpC", %StringRef %10, %Node %11, %Node %12) - call void @dtor.261(%String* %id) - ret %Node %13 + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") + call void @parseIdEqualOpt(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %2 = call %Node @parseQidOrString(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %2, %Node* %"$tmpForRef1" + call void @ctor.535(%Node* %toImport, %Node* %"$tmpForRef1") + %3 = call %Node @parseImportDeclNamesOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %3, %Node* %"$tmpForRef2" + call void @ctor.535(%Node* %declNames, %Node* %"$tmpForRef2") + %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %5 = load %Location, %Location* %loc + %6 = call %Location @lastLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %7 = call %Location @span(%Location %5, %Location %6) + %8 = call %StringRef @asStringRef(%String* %id) + %9 = load %Node, %Node* %toImport + %10 = load %Node, %Node* %declNames + %11 = call %Node @mkImportName(%AstBuilder* %4, %Location %7, %StringRef %8, %Node %9, %Node %10) + call void @dtor.250(%String* %id) + ret %Node %11 dumy_block: ; No predecessors! - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %id) unreachable } ; Function Attrs: inlinehint nounwind define internal void @parseIdEqualOpt(%String* sret %_result, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %id = alloca %String %tmp.this = alloca %TokenType %tmp.this1 = alloca %TokenType @@ -29054,46 +25970,37 @@ define internal void @parseIdEqualOpt(%String* sret %_result, %"SparrowParser[Sp br label %code code: ; preds = %0 - call void @ctor.137(%String* %id) + call void @ctor.124(%String* %id) br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 36) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %cond.true, label %cond.false + call void @ctor.404(%TokenType* %tmp.this, i32 37) + %1 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %cond.true, label %cond.false if_then: ; preds = %cond.end - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this2, i32 36) - %5 = load %TokenType, %TokenType* %tmp.this2 - %6 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, %TokenType %5) - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 1 - %9 = getelementptr inbounds %Token, %Token* %8, i32 0, i32 2 - %10 = call %String* @"=.290"(%String* %id, %String* %9) - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this3, i32 35) - %12 = load %TokenType, %TokenType* %tmp.this3 - %13 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, %TokenType %12) + call void @ctor.404(%TokenType* %tmp.this2, i32 37) + %2 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this2) + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 2 + %5 = call %String* @"=.278"(%String* %id, %String* %4) + call void @ctor.404(%TokenType* %tmp.this3, i32 36) + %6 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this3) br label %if_end if_end: ; preds = %if_then, %cond.end - br i1 %3, label %cond_destruct_alt1, label %cond_destruct_alt2 + br i1 %1, label %cond_destruct_alt1, label %cond_destruct_alt2 cond.true: ; preds = %if_block - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 35) - %15 = load %TokenType, %TokenType* %tmp.this1 - %16 = call i1 @next2Is(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, %TokenType %15) + call void @ctor.404(%TokenType* %tmp.this1, i32 36) + %7 = call i1 @next2Is(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) br label %cond.end cond.false: ; preds = %if_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %16, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %7, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %if_then, label %if_end cond_destruct_alt1: ; preds = %if_end @@ -29103,20 +26010,17 @@ cond_destruct_alt2: ; preds = %if_end br label %cond_destruct_end cond_destruct_end: ; preds = %cond_destruct_alt2, %cond_destruct_alt1 - %17 = load %String*, %String** %_result.addr - call void @ctor.189(%String* %17, %String* %id) - call void @dtor.261(%String* %id) + call void @ctor.175(%String* %_result, %String* %id) + call void @dtor.250(%String* %id) ret void dumy_block: ; No predecessors! - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %id) ret void } ; Function Attrs: inlinehint nounwind define internal %Node @parseQidOrString(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %tmp.this = alloca %TokenType br label %code @@ -29124,29 +26028,24 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 39) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 40) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i32 0, i32 3 - %6 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %7 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %6, i32 0, i32 1 - %8 = getelementptr inbounds %Token, %Token* %7, i32 0, i32 0 - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, i32 0, i32 1 - %11 = getelementptr inbounds %Token, %Token* %10, i32 0, i32 2 - %12 = call %StringRef @asStringRef(%String* %11) - %13 = call %Node @mkStringLiteral(%AstBuilder* %5, %Location* %8, %StringRef %12) - ret %Node %13 + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 + %5 = load %Location, %Location* %4 + %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 2 + %8 = call %StringRef @asStringRef(%String* %7) + %9 = call %Node @mkStringLiteral(%AstBuilder* %2, %Location %5, %StringRef %8) + ret %Node %9 if_end: ; preds = %dumy_block, %if_block - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %15 = call %Node @parseQualifiedName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, i1 false) - ret %Node %15 + %10 = call %Node @parseQualifiedName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 false) + ret %Node %10 dumy_block: ; No predecessors! br label %if_end @@ -29154,8 +26053,6 @@ dumy_block: ; No predecessors! ; Function Attrs: inlinehint nounwind define internal %Node @parseImportDeclNamesOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %res = alloca %Node %tmp.this = alloca %TokenType %"$tmpForRef" = alloca %Node @@ -29163,36 +26060,29 @@ define internal %Node @parseImportDeclNamesOpt(%"SparrowParser[SparrowLayoutDeco br label %code code: ; preds = %0 - call void @ctor.556(%Node* %res) + call void @ctor.546(%Node* %res) br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 28) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 29) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = call %Node @parseIdOrOperListNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4) - store %Node %5, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef") - %6 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 29) - %7 = load %TokenType, %TokenType* %tmp.this1 - %8 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %6, %TokenType %7) + %2 = call %Node @parseIdOrOperListNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %2, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef") + call void @ctor.404(%TokenType* %tmp.this1, i32 30) + %3 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) br label %if_end if_end: ; preds = %if_then, %if_block - %9 = load %Node, %Node* %res - ret %Node %9 + %4 = load %Node, %Node* %res + ret %Node %4 } ; Function Attrs: inlinehint nounwind define internal %Node @parseIdOrOperListNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %res = alloca %Node %id = alloca %String %"$tmpForRef" = alloca %Node @@ -29202,70 +26092,60 @@ define internal %Node @parseIdOrOperListNode(%"SparrowParser[SparrowLayoutDecode br label %code code: ; preds = %0 - call void @ctor.556(%Node* %res) - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseIdOrOper(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i1 true) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, i32 0, i32 3 - %4 = load %Node, %Node* %res - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 3 - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i32 0, i32 1 - %9 = getelementptr inbounds %Token, %Token* %8, i32 0, i32 0 - %10 = call %StringRef @asStringRef(%String* %id) - %11 = call %Node @mkIdentifier(%AstBuilder* %6, %Location* %9, %StringRef %10) - %12 = call %Node @addToNodeList(%AstBuilder* %3, %Node %4, %Node %11) - store %Node %12, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef") + call void @ctor.546(%Node* %res) + call void @parseIdOrOper(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + %1 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %2 = load %Node, %Node* %res + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %4 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %5 = getelementptr inbounds %Token, %Token* %4, i32 0, i32 0 + %6 = load %Location, %Location* %5 + %7 = call %StringRef @asStringRef(%String* %id) + %8 = call %Node @mkIdentifier(%AstBuilder* %3, %Location %6, %StringRef %7) + %9 = call %Node @addToNodeList(%AstBuilder* %1, %Node %2, %Node %8) + store %Node %9, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef") br label %while_block while_block: ; preds = %while_step, %code - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 32) - %14 = load %TokenType, %TokenType* %tmp.this - %15 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, %TokenType %14) - br i1 %15, label %while_body, label %while_end + call void @ctor.404(%TokenType* %tmp.this, i32 33) + %10 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %10, label %while_body, label %while_end while_body: ; preds = %while_block - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseIdOrOper(%String* %"$tmpC", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, i1 true) - %17 = call %String* @"=.290"(%String* %id, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") - %18 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %19 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %18, i32 0, i32 3 - %20 = load %Node, %Node* %res - %21 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %22 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %21, i32 0, i32 3 - %23 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %24 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23, i32 0, i32 1 - %25 = getelementptr inbounds %Token, %Token* %24, i32 0, i32 0 - %26 = call %StringRef @asStringRef(%String* %id) - %27 = call %Node @mkIdentifier(%AstBuilder* %22, %Location* %25, %StringRef %26) - %28 = call %Node @addToNodeList(%AstBuilder* %19, %Node %20, %Node %27) - store %Node %28, %Node* %"$tmpForRef1" - call void @"=.554"(%Node* %res, %Node* %"$tmpForRef1") + call void @parseIdOrOper(%String* %"$tmpC", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + %11 = call %String* @"=.278"(%String* %id, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") + %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %13 = load %Node, %Node* %res + %14 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %15 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %16 = getelementptr inbounds %Token, %Token* %15, i32 0, i32 0 + %17 = load %Location, %Location* %16 + %18 = call %StringRef @asStringRef(%String* %id) + %19 = call %Node @mkIdentifier(%AstBuilder* %14, %Location %17, %StringRef %18) + %20 = call %Node @addToNodeList(%AstBuilder* %12, %Node %13, %Node %19) + store %Node %20, %Node* %"$tmpForRef1" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef1") br label %while_step while_step: ; preds = %while_body br label %while_block while_end: ; preds = %while_block - %29 = load %Node, %Node* %res - call void @dtor.261(%String* %id) - ret %Node %29 + %21 = load %Node, %Node* %res + call void @dtor.250(%String* %id) + ret %Node %21 dumy_block: ; No predecessors! - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %id) unreachable } ; Function Attrs: inlinehint nounwind -define internal %Node @mkImportName(%AstBuilder* %obj, %Location* %loc, %StringRef %alias, %Node %toImport, %Node %decls) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkImportName(%AstBuilder* %obj, %Location %loc, %StringRef %alias, %Node %toImport, %Node %decls) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %alias.addr = alloca %StringRef store %StringRef %alias, %StringRef* %alias.addr %toImport.addr = alloca %Node @@ -29275,25 +26155,18 @@ define internal %Node @mkImportName(%AstBuilder* %obj, %Location* %loc, %StringR br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 4 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %alias.addr - %8 = load %Node, %Node* %toImport.addr - %9 = load %Node, %Node* %decls.addr - %10 = call %Node @"().593"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %Node %8, %Node %9) - ret %Node %10 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 4 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %alias.addr + %5 = load %Node, %Node* %toImport.addr + %6 = load %Node, %Node* %decls.addr + %7 = call %Node @"().585"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5, %Node %6) + ret %Node %7 } ; Function Attrs: inlinehint nounwind define internal i1 @parseUsingDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %tmp.this = alloca %TokenType %loc = alloca %Location %id = alloca %String @@ -29308,78 +26181,67 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 8) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - %4 = xor i1 true, %3 - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 9) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + %2 = xor i1 true, %1 + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 false if_end: ; preds = %dumy_block, %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 0 - call void @ctor.182(%Location* %loc, %Location* %7) - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseIdEqualOpt(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8) - call void @ctor.556(%Node* %usingNode) + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 + call void @ctor.169(%Location* %loc, %Location* %4) + call void @parseIdEqualOpt(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + call void @ctor.546(%Node* %usingNode) br label %if_block1 dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %9 = call i1 @isEmpty.397(%String* %id) - br i1 %9, label %if_then2, label %if_else + %5 = call i1 @isEmpty.384(%String* %id) + br i1 %5, label %if_then2, label %if_else if_then2: ; preds = %if_block1 - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = call %Node @parseQualifiedName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i1 true) - store %Node %11, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %usingNode, %Node* %"$tmpForRef") + %6 = call %Node @parseQualifiedName(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %6, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %usingNode, %Node* %"$tmpForRef") br label %if_end3 if_else: ; preds = %if_block1 - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %13 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, i1 true) - store %Node %13, %Node* %"$tmpForRef4" - call void @"=.554"(%Node* %usingNode, %Node* %"$tmpForRef4") + %7 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %7, %Node* %"$tmpForRef4" + call void @"=.544"(%Node* %usingNode, %Node* %"$tmpForRef4") br label %if_end3 if_end3: ; preds = %if_else, %if_then2 - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %15 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, i32 0, i32 1 - %16 = getelementptr inbounds %Token, %Token* %15, i32 0, i32 0 - call void @copyEnd(%Location* %loc, %Location* %16) - %17 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 31) - %18 = load %TokenType, %TokenType* %tmp.this5 - %19 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %17, %TokenType %18) - %20 = load %Node*, %Node** %res.addr - %21 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %22 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %21, i32 0, i32 3 - %23 = call %StringRef @asStringRef(%String* %id) - %24 = load %Node, %Node* %usingNode - %25 = call %Node @mkUsing(%AstBuilder* %22, %Location* %loc, %StringRef %23, %Node %24) - store %Node %25, %Node* %"$tmpForRef6" - call void @"=.554"(%Node* %20, %Node* %"$tmpForRef6") - call void @dtor.261(%String* %id) + %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %9 = getelementptr inbounds %Token, %Token* %8, i32 0, i32 0 + %10 = load %Location, %Location* %9 + call void @copyEnd(%Location* %loc, %Location %10) + call void @ctor.404(%TokenType* %tmp.this5, i32 32) + %11 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %13 = load %Location, %Location* %loc + %14 = call %StringRef @asStringRef(%String* %id) + %15 = load %Node, %Node* %usingNode + %16 = call %Node @mkUsing(%AstBuilder* %12, %Location %13, %StringRef %14, %Node %15) + store %Node %16, %Node* %"$tmpForRef6" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef6") + call void @dtor.250(%String* %id) ret i1 true dumy_block7: ; No predecessors! - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %id) unreachable } ; Function Attrs: inlinehint nounwind -define internal %Node @mkUsing(%AstBuilder* %obj, %Location* %loc, %StringRef %alias, %Node %usingNode) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkUsing(%AstBuilder* %obj, %Location %loc, %StringRef %alias, %Node %usingNode) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %alias.addr = alloca %StringRef store %StringRef %alias, %StringRef* %alias.addr %usingNode.addr = alloca %Node @@ -29387,24 +26249,17 @@ define internal %Node @mkUsing(%AstBuilder* %obj, %Location* %loc, %StringRef %a br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 5 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %alias.addr - %8 = load %Node, %Node* %usingNode.addr - %9 = call %Node @"().610"(%"FunctionPtr4[Node, UntypedPtr, @Location, StringRef, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %Node %8) - ret %Node %9 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 5 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %alias.addr + %5 = load %Node, %Node* %usingNode.addr + %6 = call %Node @"().602"(%"FunctionPtr4[Node, UntypedPtr, Location const, StringRef, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5) + ret %Node %6 } ; Function Attrs: inlinehint nounwind define internal i1 @parsePackageDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %tmp.this = alloca %TokenType %loc = alloca %Location %id = alloca %String @@ -29422,71 +26277,57 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 7) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - %4 = xor i1 true, %3 - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 8) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + %2 = xor i1 true, %1 + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 false if_end: ; preds = %dumy_block, %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 0 - call void @ctor.182(%Location* %loc, %Location* %7) - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8) - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %10 = call %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, i1 false) - store %Node %10, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %formals, %Node* %"$tmpForRef") - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %12 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11) - store %Node %12, %Node* %"$tmpForRef1" - call void @ctor.545(%Node* %ifClause, %Node* %"$tmpForRef1") - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this2, i32 24) - %14 = load %TokenType, %TokenType* %tmp.this2 - %15 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, %TokenType %14) - call void @ctor.556(%Node* %children) - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseStmts(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, i1 true, %Node* %children) - %17 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this3, i32 25) - %18 = load %TokenType, %TokenType* %tmp.this3 - %19 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %17, %TokenType %18) - %20 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %21 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %20, i32 0, i32 1 - %22 = getelementptr inbounds %Token, %Token* %21, i32 0, i32 0 - call void @copyEnd(%Location* %loc, %Location* %22) - %23 = load %Node*, %Node** %res.addr - %24 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %25 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %24, i32 0, i32 3 - %26 = call %StringRef @asStringRef(%String* %id) - %27 = load %Node, %Node* %children - %28 = load %Node, %Node* %formals - %29 = load %Node, %Node* %ifClause - %30 = call %Node @mkPackage(%AstBuilder* %25, %Location* %loc, %StringRef %26, %Node %27, %Node %28, %Node %29) - store %Node %30, %Node* %"$tmpForRef4" - call void @"=.554"(%Node* %23, %Node* %"$tmpForRef4") - call void @dtor.261(%String* %id) + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 + call void @ctor.169(%Location* %loc, %Location* %4) + call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %5 = call %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %5, %Node* %"$tmpForRef" + call void @ctor.535(%Node* %formals, %Node* %"$tmpForRef") + %6 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %6, %Node* %"$tmpForRef1" + call void @ctor.535(%Node* %ifClause, %Node* %"$tmpForRef1") + call void @ctor.404(%TokenType* %tmp.this2, i32 25) + %7 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this2) + call void @ctor.546(%Node* %children) + call void @parseStmts(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true, %Node* %children) + call void @ctor.404(%TokenType* %tmp.this3, i32 26) + %8 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this3) + %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %10 = getelementptr inbounds %Token, %Token* %9, i32 0, i32 0 + %11 = load %Location, %Location* %10 + call void @copyEnd(%Location* %loc, %Location %11) + %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %13 = load %Location, %Location* %loc + %14 = call %StringRef @asStringRef(%String* %id) + %15 = load %Node, %Node* %children + %16 = load %Node, %Node* %formals + %17 = load %Node, %Node* %ifClause + %18 = call %Node @mkPackage(%AstBuilder* %12, %Location %13, %StringRef %14, %Node %15, %Node %16, %Node %17) + store %Node %18, %Node* %"$tmpForRef4" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef4") + call void @dtor.250(%String* %id) ret i1 true dumy_block: ; No predecessors! br label %if_end dumy_block5: ; No predecessors! - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %id) unreachable } ; Function Attrs: inlinehint nounwind define internal %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %tmp.this = alloca %TokenType %tmp.this1 = alloca %Node br label %code @@ -29495,32 +26336,27 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 15) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 16) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i1 true) - ret %Node %5 + %2 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + ret %Node %2 if_end: ; preds = %dumy_block, %if_block - call void @ctor.556(%Node* %tmp.this1) - %6 = load %Node, %Node* %tmp.this1 - ret %Node %6 + call void @ctor.546(%Node* %tmp.this1) + %3 = load %Node, %Node* %tmp.this1 + ret %Node %3 dumy_block: ; No predecessors! br label %if_end } ; Function Attrs: inlinehint nounwind -define internal %Node @mkPackage(%AstBuilder* %obj, %Location* %loc, %StringRef %name, %Node %children, %Node %params, %Node %ifClause) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkPackage(%AstBuilder* %obj, %Location %loc, %StringRef %name, %Node %children, %Node %params, %Node %ifClause) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %name.addr = alloca %StringRef store %StringRef %name, %StringRef* %name.addr %children.addr = alloca %Node @@ -29532,28 +26368,21 @@ define internal %Node @mkPackage(%AstBuilder* %obj, %Location* %loc, %StringRef br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 6 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %name.addr - %8 = load %Node, %Node* %children.addr - %9 = load %Node, %Node* %params.addr - %10 = load %Node, %Node* %ifClause.addr - %11 = call %Node @"().612"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %Node %8, %Node %9, %Node %10) - ret %Node %11 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 6 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %name.addr + %5 = load %Node, %Node* %children.addr + %6 = load %Node, %Node* %params.addr + %7 = load %Node, %Node* %ifClause.addr + %8 = call %Node @"().604"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5, %Node %6, %Node %7) + ret %Node %8 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().612"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %Node %p4, %Node %p5, %Node %p6) #4 { - %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %this.addr +define internal %Node @"().604"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %Node %p4, %Node %p5, %Node %p6) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %StringRef store %StringRef %p3, %StringRef* %p3.addr %p4.addr = alloca %Node @@ -29565,25 +26394,19 @@ define internal %Node @"().612"(%"FunctionPtr6[Node, UntypedPtr, @Location, Stri br label %code code: ; preds = %0 - %1 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %StringRef, %StringRef* %p3.addr - %5 = load %Node, %Node* %p4.addr - %6 = load %Node, %Node* %p5.addr - %7 = load %Node, %Node* %p6.addr - %8 = bitcast %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %1 to %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node)** - %9 = load %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node)** %8 - %10 = call %Node %9(%UntypedPtr %2, %Location* %3, %StringRef %4, %Node %5, %Node %6, %Node %7) - ret %Node %10 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %StringRef, %StringRef* %p3.addr + %3 = load %Node, %Node* %p4.addr + %4 = load %Node, %Node* %p5.addr + %5 = load %Node, %Node* %p6.addr + %6 = bitcast %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %this to %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node)** + %7 = load %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node)** %6 + %8 = call %Node %7(%UntypedPtr %1, %Location* %p2, %StringRef %2, %Node %3, %Node %4, %Node %5) + ret %Node %8 } ; Function Attrs: noinline nounwind define i1 @parseDatatypeDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #5 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %tmp.this = alloca %TokenType %loc = alloca %Location %id = alloca %String @@ -29619,125 +26442,105 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 5) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - %4 = xor i1 true, %3 - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 5) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + %2 = xor i1 true, %1 + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 false if_end: ; preds = %dumy_block, %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 0 - call void @ctor.182(%Location* %loc, %Location* %7) - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8) - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %10 = call %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, i1 false) - store %Node %10, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %formals, %Node* %"$tmpForRef") + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 + call void @ctor.169(%Location* %loc, %Location* %4) + call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %5 = call %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %5, %Node* %"$tmpForRef" + call void @ctor.535(%Node* %formals, %Node* %"$tmpForRef") br label %if_block1 dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this4, i32 35) - %12 = load %TokenType, %TokenType* %tmp.this4 - %13 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, %TokenType %12) - br i1 %13, label %if_then2, label %if_else + call void @ctor.404(%TokenType* %tmp.this4, i32 36) + %6 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this4) + br i1 %6, label %if_then2, label %if_else if_then2: ; preds = %if_block1 - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %15 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, i1 true) - store %Node %15, %Node* %"$tmpForRef5" - call void @ctor.545(%Node* %underlyingData, %Node* %"$tmpForRef5") - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %17 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16) - store %Node %17, %Node* %"$tmpForRef6" - call void @ctor.545(%Node* %ifClause, %Node* %"$tmpForRef6") - %18 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this7, i32 31) - %19 = load %TokenType, %TokenType* %tmp.this7 - %20 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %18, %TokenType %19) - %21 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %22 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %21, i32 0, i32 1 - %23 = getelementptr inbounds %Token, %Token* %22, i32 0, i32 0 - call void @copyEnd(%Location* %loc, %Location* %23) - %24 = load %Node*, %Node** %res.addr - %25 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %26 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %25, i32 0, i32 3 - %27 = call %StringRef @asStringRef(%String* %id) - %28 = load %Node, %Node* %formals - %29 = load %Node, %Node* %underlyingData - %30 = load %Node, %Node* %ifClause - call void @ctor.556(%Node* %tmp.this9) - %31 = load %Node, %Node* %tmp.this9 - %32 = call %Node @mkDatatype(%AstBuilder* %26, %Location* %loc, %StringRef %27, %Node %28, %Node %29, %Node %30, %Node %31) - store %Node %32, %Node* %"$tmpForRef8" - call void @"=.554"(%Node* %24, %Node* %"$tmpForRef8") + %7 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %7, %Node* %"$tmpForRef5" + call void @ctor.535(%Node* %underlyingData, %Node* %"$tmpForRef5") + %8 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %8, %Node* %"$tmpForRef6" + call void @ctor.535(%Node* %ifClause, %Node* %"$tmpForRef6") + call void @ctor.404(%TokenType* %tmp.this7, i32 32) + %9 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this7) + %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %11 = getelementptr inbounds %Token, %Token* %10, i32 0, i32 0 + %12 = load %Location, %Location* %11 + call void @copyEnd(%Location* %loc, %Location %12) + %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %14 = load %Location, %Location* %loc + %15 = call %StringRef @asStringRef(%String* %id) + %16 = load %Node, %Node* %formals + %17 = load %Node, %Node* %underlyingData + %18 = load %Node, %Node* %ifClause + call void @ctor.546(%Node* %tmp.this9) + %19 = load %Node, %Node* %tmp.this9 + %20 = call %Node @mkDatatype(%AstBuilder* %13, %Location %14, %StringRef %15, %Node %16, %Node %17, %Node %18, %Node %19) + store %Node %20, %Node* %"$tmpForRef8" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef8") br label %if_end3 if_else: ; preds = %if_block1 - %33 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %34 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %33) - store %Node %34, %Node* %"$tmpForRef11" - call void @ctor.545(%Node* %ifClause10, %Node* %"$tmpForRef11") - call void @ctor.556(%Node* %children) + %21 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %21, %Node* %"$tmpForRef11" + call void @ctor.535(%Node* %ifClause10, %Node* %"$tmpForRef11") + call void @ctor.546(%Node* %children) br label %if_block12 if_end3: ; preds = %if_end15, %if_then2 - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %id) ret i1 true if_block12: ; preds = %if_else - %35 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this16, i32 31) - %36 = load %TokenType, %TokenType* %tmp.this16 - %37 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %35, %TokenType %36) - br i1 %37, label %if_then13, label %if_else14 + call void @ctor.404(%TokenType* %tmp.this16, i32 32) + %22 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this16) + br i1 %22, label %if_then13, label %if_else14 if_then13: ; preds = %if_block12 br label %if_end15 if_else14: ; preds = %if_block12 - %38 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this17, i32 24) - %39 = load %TokenType, %TokenType* %tmp.this17 - %40 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %38, %TokenType %39) + call void @ctor.404(%TokenType* %tmp.this17, i32 25) + %23 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this17) br label %while_block if_end15: ; preds = %while_end, %if_then13 - %41 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %42 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %41, i32 0, i32 1 - %43 = getelementptr inbounds %Token, %Token* %42, i32 0, i32 0 - call void @copyEnd(%Location* %loc, %Location* %43) - %44 = load %Node*, %Node** %res.addr - %45 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %46 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %45, i32 0, i32 3 - %47 = call %StringRef @asStringRef(%String* %id) - %48 = load %Node, %Node* %formals - call void @ctor.556(%Node* %tmp.this54) - %49 = load %Node, %Node* %tmp.this54 - %50 = load %Node, %Node* %ifClause10 - %51 = load %Node, %Node* %children - %52 = call %Node @mkDatatype(%AstBuilder* %46, %Location* %loc, %StringRef %47, %Node %48, %Node %49, %Node %50, %Node %51) - store %Node %52, %Node* %"$tmpForRef53" - call void @"=.554"(%Node* %44, %Node* %"$tmpForRef53") + %24 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %25 = getelementptr inbounds %Token, %Token* %24, i32 0, i32 0 + %26 = load %Location, %Location* %25 + call void @copyEnd(%Location* %loc, %Location %26) + %27 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %28 = load %Location, %Location* %loc + %29 = call %StringRef @asStringRef(%String* %id) + %30 = load %Node, %Node* %formals + call void @ctor.546(%Node* %tmp.this54) + %31 = load %Node, %Node* %tmp.this54 + %32 = load %Node, %Node* %ifClause10 + %33 = load %Node, %Node* %children + %34 = call %Node @mkDatatype(%AstBuilder* %27, %Location %28, %StringRef %29, %Node %30, %Node %31, %Node %32, %Node %33) + store %Node %34, %Node* %"$tmpForRef53" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef53") br label %if_end3 while_block: ; preds = %while_step, %if_else14 - %53 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this18, i32 25) - %54 = load %TokenType, %TokenType* %tmp.this18 - %55 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %53, %TokenType %54) - %56 = xor i1 true, %55 - br i1 %56, label %cond.true, label %cond.false + call void @ctor.404(%TokenType* %tmp.this18, i32 26) + %35 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this18) + %36 = xor i1 true, %35 + br i1 %36, label %cond.true, label %cond.false while_body: ; preds = %cond.end br label %while_block19 @@ -29746,32 +26549,27 @@ while_step: ; preds = %cond_destruct_end51 br label %while_block while_end: ; preds = %if_then30, %cond.end - %57 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this52, i32 25) - %58 = load %TokenType, %TokenType* %tmp.this52 - %59 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %57, %TokenType %58) + call void @ctor.404(%TokenType* %tmp.this52, i32 26) + %37 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this52) br label %if_end15 cond.true: ; preds = %while_block - %60 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %61 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %60, i32 0, i32 2 - %62 = load i1, i1* %61 - %63 = xor i1 true, %62 + %38 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 2 + %39 = load i1, i1* %38 + %40 = xor i1 true, %39 br label %cond.end cond.false: ; preds = %while_block br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %63, %cond.true ], [ false, %cond.false ] + %cond.res = phi i1 [ %40, %cond.true ], [ false, %cond.false ] br i1 %cond.res, label %while_body, label %while_end while_block19: ; preds = %while_step21, %while_body - %64 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this26, i32 32) - %65 = load %TokenType, %TokenType* %tmp.this26 - %66 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %64, %TokenType %65) - br i1 %66, label %cond.true23, label %cond.false24 + call void @ctor.404(%TokenType* %tmp.this26, i32 33) + %41 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this26) + br i1 %41, label %cond.true23, label %cond.false24 while_body20: ; preds = %cond.end25 br label %while_step21 @@ -29780,20 +26578,18 @@ while_step21: ; preds = %while_body20 br label %while_block19 while_end22: ; preds = %cond.end25 - br i1 %66, label %cond_destruct_alt1, label %cond_destruct_alt2 + br i1 %41, label %cond_destruct_alt1, label %cond_destruct_alt2 cond.true23: ; preds = %while_block19 br label %cond.end25 cond.false24: ; preds = %while_block19 - %67 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this27, i32 31) - %68 = load %TokenType, %TokenType* %tmp.this27 - %69 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %67, %TokenType %68) + call void @ctor.404(%TokenType* %tmp.this27, i32 32) + %42 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this27) br label %cond.end25 cond.end25: ; preds = %cond.false24, %cond.true23 - %cond.res28 = phi i1 [ true, %cond.true23 ], [ %69, %cond.false24 ] + %cond.res28 = phi i1 [ true, %cond.true23 ], [ %42, %cond.false24 ] br i1 %cond.res28, label %while_body20, label %while_end22 cond_destruct_alt1: ; preds = %while_end22 @@ -29806,51 +26602,44 @@ cond_destruct_end: ; preds = %cond_destruct_alt2, br label %if_block29 if_block29: ; preds = %cond_destruct_end - %70 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this32, i32 25) - %71 = load %TokenType, %TokenType* %tmp.this32 - %72 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %70, %TokenType %71) - br i1 %72, label %if_then30, label %if_end31 + call void @ctor.404(%TokenType* %tmp.this32, i32 26) + %43 = call i1 @nextIs(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this32) + br i1 %43, label %if_then30, label %if_end31 if_then30: ; preds = %if_block29 br label %while_end if_end31: ; preds = %dumy_block33, %if_block29 - call void @ctor.556(%Node* %usingNode) + call void @ctor.546(%Node* %usingNode) br label %if_block34 dumy_block33: ; No predecessors! br label %if_end31 if_block34: ; preds = %if_end31 - %73 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %74 = call i1 @parseUsingDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %73, %Node* %usingNode) - br i1 %74, label %if_then35, label %if_else36 + %44 = call i1 @parseUsingDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %usingNode) + br i1 %44, label %if_then35, label %if_else36 if_then35: ; preds = %if_block34 - %75 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %76 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %75, i32 0, i32 3 - %77 = load %Node, %Node* %children - %78 = load %Node, %Node* %usingNode - %79 = call %Node @addToNodeList(%AstBuilder* %76, %Node %77, %Node %78) - store %Node %79, %Node* %"$tmpForRef38" - call void @"=.554"(%Node* %children, %Node* %"$tmpForRef38") + %45 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %46 = load %Node, %Node* %children + %47 = load %Node, %Node* %usingNode + %48 = call %Node @addToNodeList(%AstBuilder* %45, %Node %46, %Node %47) + store %Node %48, %Node* %"$tmpForRef38" + call void @"=.544"(%Node* %children, %Node* %"$tmpForRef38") br label %if_end37 if_else36: ; preds = %if_block34 - %80 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseFieldsLine(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %80, %Node* %children) + call void @parseFieldsLine(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %children) br label %if_end37 if_end37: ; preds = %if_else36, %if_then35 br label %while_block39 while_block39: ; preds = %while_step41, %if_end37 - %81 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this46, i32 32) - %82 = load %TokenType, %TokenType* %tmp.this46 - %83 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %81, %TokenType %82) - br i1 %83, label %cond.true43, label %cond.false44 + call void @ctor.404(%TokenType* %tmp.this46, i32 33) + %49 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this46) + br i1 %49, label %cond.true43, label %cond.false44 while_body40: ; preds = %cond.end45 br label %while_step41 @@ -29859,20 +26648,18 @@ while_step41: ; preds = %while_body40 br label %while_block39 while_end42: ; preds = %cond.end45 - br i1 %83, label %cond_destruct_alt149, label %cond_destruct_alt250 + br i1 %49, label %cond_destruct_alt149, label %cond_destruct_alt250 cond.true43: ; preds = %while_block39 br label %cond.end45 cond.false44: ; preds = %while_block39 - %84 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this47, i32 31) - %85 = load %TokenType, %TokenType* %tmp.this47 - %86 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %84, %TokenType %85) + call void @ctor.404(%TokenType* %tmp.this47, i32 32) + %50 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this47) br label %cond.end45 cond.end45: ; preds = %cond.false44, %cond.true43 - %cond.res48 = phi i1 [ true, %cond.true43 ], [ %86, %cond.false44 ] + %cond.res48 = phi i1 [ true, %cond.true43 ], [ %50, %cond.false44 ] br i1 %cond.res48, label %while_body40, label %while_end42 cond_destruct_alt149: ; preds = %while_end42 @@ -29885,16 +26672,14 @@ cond_destruct_end51: ; preds = %cond_destruct_alt25 br label %while_step dumy_block55: ; No predecessors! - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %id) unreachable } ; Function Attrs: inlinehint nounwind -define internal %Node @mkDatatype(%AstBuilder* %obj, %Location* %loc, %StringRef %name, %Node %params, %Node %underlyingData, %Node %ifClause, %Node %children) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkDatatype(%AstBuilder* %obj, %Location %loc, %StringRef %name, %Node %params, %Node %underlyingData, %Node %ifClause, %Node %children) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %name.addr = alloca %StringRef store %StringRef %name, %StringRef* %name.addr %params.addr = alloca %Node @@ -29908,29 +26693,22 @@ define internal %Node @mkDatatype(%AstBuilder* %obj, %Location* %loc, %StringRef br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 7 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %name.addr - %8 = load %Node, %Node* %params.addr - %9 = load %Node, %Node* %underlyingData.addr - %10 = load %Node, %Node* %ifClause.addr - %11 = load %Node, %Node* %children.addr - %12 = call %Node @"().613"(%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %Node %8, %Node %9, %Node %10, %Node %11) - ret %Node %12 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 7 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %name.addr + %5 = load %Node, %Node* %params.addr + %6 = load %Node, %Node* %underlyingData.addr + %7 = load %Node, %Node* %ifClause.addr + %8 = load %Node, %Node* %children.addr + %9 = call %Node @"().605"(%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5, %Node %6, %Node %7, %Node %8) + ret %Node %9 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().613"(%"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %Node %p4, %Node %p5, %Node %p6, %Node %p7) #4 { - %this.addr = alloca %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* - store %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %this, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %this.addr +define internal %Node @"().605"(%"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %Node %p4, %Node %p5, %Node %p6, %Node %p7) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %StringRef store %StringRef %p3, %StringRef* %p3.addr %p4.addr = alloca %Node @@ -29944,26 +26722,20 @@ define internal %Node @"().613"(%"FunctionPtr7[Node, UntypedPtr, @Location, Stri br label %code code: ; preds = %0 - %1 = load %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"*, %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %StringRef, %StringRef* %p3.addr - %5 = load %Node, %Node* %p4.addr - %6 = load %Node, %Node* %p5.addr - %7 = load %Node, %Node* %p6.addr - %8 = load %Node, %Node* %p7.addr - %9 = bitcast %"FunctionPtr7[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node]"* %1 to %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node)** - %10 = load %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node)** %9 - %11 = call %Node %10(%UntypedPtr %2, %Location* %3, %StringRef %4, %Node %5, %Node %6, %Node %7, %Node %8) - ret %Node %11 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %StringRef, %StringRef* %p3.addr + %3 = load %Node, %Node* %p4.addr + %4 = load %Node, %Node* %p5.addr + %5 = load %Node, %Node* %p6.addr + %6 = load %Node, %Node* %p7.addr + %7 = bitcast %"FunctionPtr7[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node]"* %this to %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node)** + %8 = load %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node)** %7 + %9 = call %Node %8(%UntypedPtr %1, %Location* %p2, %StringRef %2, %Node %3, %Node %4, %Node %5, %Node %6) + ret %Node %9 } ; Function Attrs: inlinehint nounwind define internal void @parseFieldsLine(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %ids = alloca %"Vector[LocString]" %tmp.this = alloca %TokenType %typeNode = alloca %Node @@ -29972,94 +26744,82 @@ define internal void @parseFieldsLine(%"SparrowParser[SparrowLayoutDecoder[Sparr %tmp.this1 = alloca %TokenType %"$tmpForRef2" = alloca %Node %"$rangeVar" = alloca %"ContiguousMemoryRange[LocString]" - %id = alloca %LocString* + %"$tmpForRef3" = alloca %"ContiguousMemoryRange[LocString]" + %id = alloca %LocString %v = alloca %Node - %"$tmpForRef3" = alloca %Node %"$tmpForRef4" = alloca %Node + %"$tmpForRef5" = alloca %Node br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseIdList(%"Vector[LocString]"* %ids, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 30) - %3 = load %TokenType, %TokenType* %tmp.this - %4 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, %TokenType %3) - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i1 false) - store %Node %6, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %typeNode, %Node* %"$tmpForRef") - call void @ctor.556(%Node* %init) + call void @parseIdList(%"Vector[LocString]"* %ids, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + call void @ctor.404(%TokenType* %tmp.this, i32 31) + %1 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + %2 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 false) + store %Node %2, %Node* %"$tmpForRef" + call void @ctor.535(%Node* %typeNode, %Node* %"$tmpForRef") + call void @ctor.546(%Node* %init) br label %if_block if_block: ; preds = %code - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 35) - %8 = load %TokenType, %TokenType* %tmp.this1 - %9 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %TokenType %8) - br i1 %9, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this1, i32 36) + %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) + br i1 %3, label %if_then, label %if_end if_then: ; preds = %if_block - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i1 true) - store %Node %11, %Node* %"$tmpForRef2" - call void @"=.554"(%Node* %init, %Node* %"$tmpForRef2") + %4 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %4, %Node* %"$tmpForRef2" + call void @"=.544"(%Node* %init, %Node* %"$tmpForRef2") br label %if_end if_end: ; preds = %if_then, %if_block - call void @all.589(%"ContiguousMemoryRange[LocString]"* %"$rangeVar", %"Vector[LocString]"* %ids) + %5 = call %"ContiguousMemoryRange[LocString]" @all.581(%"Vector[LocString]"* %ids) + store %"ContiguousMemoryRange[LocString]" %5, %"ContiguousMemoryRange[LocString]"* %"$tmpForRef3" + call void @ctor.580(%"ContiguousMemoryRange[LocString]"* %"$rangeVar", %"ContiguousMemoryRange[LocString]"* %"$tmpForRef3") br label %while_block while_block: ; preds = %while_step, %if_end - %12 = load %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %"$rangeVar" - %13 = call i1 @isEmpty.591(%"ContiguousMemoryRange[LocString]" %12) - %14 = xor i1 true, %13 - br i1 %14, label %while_body, label %while_end + %6 = call i1 @isEmpty.583(%"ContiguousMemoryRange[LocString]"* %"$rangeVar") + %7 = xor i1 true, %6 + br i1 %7, label %while_body, label %while_end while_body: ; preds = %while_block - %15 = load %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %"$rangeVar" - %16 = call %LocString* @front.592(%"ContiguousMemoryRange[LocString]" %15) - store %LocString* %16, %LocString** %id - %17 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %18 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %17, i32 0, i32 3 - %19 = load %LocString*, %LocString** %id - %20 = getelementptr inbounds %LocString, %LocString* %19, i32 0, i32 0 - %21 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %20, i32 0, i32 0 - %22 = load %LocString*, %LocString** %id - %23 = getelementptr inbounds %LocString, %LocString* %22, i32 0, i32 0 - %24 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %23, i32 0, i32 1 - %25 = call %StringRef @asStringRef(%String* %24) - %26 = load %Node, %Node* %typeNode - %27 = load %Node, %Node* %init - %28 = call %Node @mkField(%AstBuilder* %18, %Location* %21, %StringRef %25, %Node %26, %Node %27) - store %Node %28, %Node* %"$tmpForRef3" - call void @ctor.545(%Node* %v, %Node* %"$tmpForRef3") - %29 = load %Node*, %Node** %res.addr - %30 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %31 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %30, i32 0, i32 3 - %32 = load %Node*, %Node** %res.addr - %33 = load %Node, %Node* %32 - %34 = load %Node, %Node* %v - %35 = call %Node @addToNodeList(%AstBuilder* %31, %Node %33, %Node %34) - store %Node %35, %Node* %"$tmpForRef4" - call void @"=.554"(%Node* %29, %Node* %"$tmpForRef4") + %8 = call %LocString* @front.584(%"ContiguousMemoryRange[LocString]"* %"$rangeVar") + call void @ctor.565(%LocString* %id, %LocString* %8) + %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %10 = getelementptr inbounds %LocString, %LocString* %id, i32 0, i32 0 + %11 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %10, i32 0, i32 0 + %12 = load %Location, %Location* %11 + %13 = getelementptr inbounds %LocString, %LocString* %id, i32 0, i32 0 + %14 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %13, i32 0, i32 1 + %15 = call %StringRef @asStringRef(%String* %14) + %16 = load %Node, %Node* %typeNode + %17 = load %Node, %Node* %init + %18 = call %Node @mkField(%AstBuilder* %9, %Location %12, %StringRef %15, %Node %16, %Node %17) + store %Node %18, %Node* %"$tmpForRef4" + call void @ctor.535(%Node* %v, %Node* %"$tmpForRef4") + %19 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %20 = load %Node, %Node* %res + %21 = load %Node, %Node* %v + %22 = call %Node @addToNodeList(%AstBuilder* %19, %Node %20, %Node %21) + store %Node %22, %Node* %"$tmpForRef5" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef5") + call void @dtor.571(%LocString* %id) br label %while_step while_step: ; preds = %while_body - call void @popFront.594(%"ContiguousMemoryRange[LocString]"* %"$rangeVar") + call void @popFront.586(%"ContiguousMemoryRange[LocString]"* %"$rangeVar") br label %while_block while_end: ; preds = %while_block - call void @dtor.586(%"Vector[LocString]"* %ids) + call void @dtor.577(%"Vector[LocString]"* %ids) ret void } ; Function Attrs: inlinehint nounwind -define internal %Node @mkField(%AstBuilder* %obj, %Location* %loc, %StringRef %name, %Node %typeNode, %Node %init) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkField(%AstBuilder* %obj, %Location %loc, %StringRef %name, %Node %typeNode, %Node %init) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %name.addr = alloca %StringRef store %StringRef %name, %StringRef* %name.addr %typeNode.addr = alloca %Node @@ -30069,25 +26829,18 @@ define internal %Node @mkField(%AstBuilder* %obj, %Location* %loc, %StringRef %n br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 8 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %name.addr - %8 = load %Node, %Node* %typeNode.addr - %9 = load %Node, %Node* %init.addr - %10 = call %Node @"().593"(%"FunctionPtr5[Node, UntypedPtr, @Location, StringRef, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %Node %8, %Node %9) - ret %Node %10 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 8 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %name.addr + %5 = load %Node, %Node* %typeNode.addr + %6 = load %Node, %Node* %init.addr + %7 = call %Node @"().585"(%"FunctionPtr5[Node, UntypedPtr, Location const, StringRef, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5, %Node %6) + ret %Node %7 } ; Function Attrs: inlinehint nounwind define internal i1 @parseConceptDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %tmp.this = alloca %TokenType %loc = alloca %Location %id = alloca %String @@ -30106,78 +26859,62 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 4) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - %4 = xor i1 true, %3 - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 4) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + %2 = xor i1 true, %1 + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 false if_end: ; preds = %dumy_block, %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 0 - call void @ctor.182(%Location* %loc, %Location* %7) - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8) - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 28) - %10 = load %TokenType, %TokenType* %tmp.this1 - %11 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, %TokenType %10) - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseId(%String* %paramName, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12) - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = call %Node @parseTypeNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13) - store %Node %14, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %baseConcept, %Node* %"$tmpForRef") - %15 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this2, i32 29) - %16 = load %TokenType, %TokenType* %tmp.this2 - %17 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %15, %TokenType %16) - %18 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %19 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %18) - store %Node %19, %Node* %"$tmpForRef3" - call void @ctor.545(%Node* %ifClause, %Node* %"$tmpForRef3") - %20 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this4, i32 31) - %21 = load %TokenType, %TokenType* %tmp.this4 - %22 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %20, %TokenType %21) - %23 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %24 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23, i32 0, i32 1 - %25 = getelementptr inbounds %Token, %Token* %24, i32 0, i32 0 - call void @copyEnd(%Location* %loc, %Location* %25) - %26 = load %Node*, %Node** %res.addr - %27 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %28 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %27, i32 0, i32 3 - %29 = call %StringRef @asStringRef(%String* %id) - %30 = call %StringRef @asStringRef(%String* %paramName) - %31 = load %Node, %Node* %baseConcept - %32 = load %Node, %Node* %ifClause - %33 = call %Node @mkConcept(%AstBuilder* %28, %Location* %loc, %StringRef %29, %StringRef %30, %Node %31, %Node %32) - store %Node %33, %Node* %"$tmpForRef5" - call void @"=.554"(%Node* %26, %Node* %"$tmpForRef5") - call void @dtor.261(%String* %paramName) - call void @dtor.261(%String* %id) + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 + call void @ctor.169(%Location* %loc, %Location* %4) + call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + call void @ctor.404(%TokenType* %tmp.this1, i32 29) + %5 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) + call void @parseId(%String* %paramName, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %6 = call %Node @parseTypeNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %6, %Node* %"$tmpForRef" + call void @ctor.535(%Node* %baseConcept, %Node* %"$tmpForRef") + call void @ctor.404(%TokenType* %tmp.this2, i32 30) + %7 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this2) + %8 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %8, %Node* %"$tmpForRef3" + call void @ctor.535(%Node* %ifClause, %Node* %"$tmpForRef3") + call void @ctor.404(%TokenType* %tmp.this4, i32 32) + %9 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this4) + %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %11 = getelementptr inbounds %Token, %Token* %10, i32 0, i32 0 + %12 = load %Location, %Location* %11 + call void @copyEnd(%Location* %loc, %Location %12) + %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %14 = load %Location, %Location* %loc + %15 = call %StringRef @asStringRef(%String* %id) + %16 = call %StringRef @asStringRef(%String* %paramName) + %17 = load %Node, %Node* %baseConcept + %18 = load %Node, %Node* %ifClause + %19 = call %Node @mkConcept(%AstBuilder* %13, %Location %14, %StringRef %15, %StringRef %16, %Node %17, %Node %18) + store %Node %19, %Node* %"$tmpForRef5" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef5") + call void @dtor.250(%String* %paramName) + call void @dtor.250(%String* %id) ret i1 true dumy_block: ; No predecessors! br label %if_end dumy_block6: ; No predecessors! - call void @dtor.261(%String* %paramName) - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %paramName) + call void @dtor.250(%String* %id) unreachable } ; Function Attrs: inlinehint nounwind -define internal %Node @mkConcept(%AstBuilder* %obj, %Location* %loc, %StringRef %name, %StringRef %paramName, %Node %baseConcept, %Node %ifClause) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkConcept(%AstBuilder* %obj, %Location %loc, %StringRef %name, %StringRef %paramName, %Node %baseConcept, %Node %ifClause) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %name.addr = alloca %StringRef store %StringRef %name, %StringRef* %name.addr %paramName.addr = alloca %StringRef @@ -30189,28 +26926,21 @@ define internal %Node @mkConcept(%AstBuilder* %obj, %Location* %loc, %StringRef br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 9 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %name.addr - %8 = load %StringRef, %StringRef* %paramName.addr - %9 = load %Node, %Node* %baseConcept.addr - %10 = load %Node, %Node* %ifClause.addr - %11 = call %Node @"().614"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %StringRef %8, %Node %9, %Node %10) - ret %Node %11 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 9 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %name.addr + %5 = load %StringRef, %StringRef* %paramName.addr + %6 = load %Node, %Node* %baseConcept.addr + %7 = load %Node, %Node* %ifClause.addr + %8 = call %Node @"().606"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %StringRef %5, %Node %6, %Node %7) + ret %Node %8 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().614"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %StringRef %p4, %Node %p5, %Node %p6) #4 { - %this.addr = alloca %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* - store %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %this, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %this.addr +define internal %Node @"().606"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %StringRef %p4, %Node %p5, %Node %p6) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %StringRef store %StringRef %p3, %StringRef* %p3.addr %p4.addr = alloca %StringRef @@ -30222,129 +26952,125 @@ define internal %Node @"().614"(%"FunctionPtr6[Node, UntypedPtr, @Location, Stri br label %code code: ; preds = %0 - %1 = load %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"*, %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %StringRef, %StringRef* %p3.addr - %5 = load %StringRef, %StringRef* %p4.addr - %6 = load %Node, %Node* %p5.addr - %7 = load %Node, %Node* %p6.addr - %8 = bitcast %"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, StringRef, Node, Node]"* %1 to %Node (%UntypedPtr, %Location*, %StringRef, %StringRef, %Node, %Node)** - %9 = load %Node (%UntypedPtr, %Location*, %StringRef, %StringRef, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %StringRef, %Node, %Node)** %8 - %10 = call %Node %9(%UntypedPtr %2, %Location* %3, %StringRef %4, %StringRef %5, %Node %6, %Node %7) - ret %Node %10 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %StringRef, %StringRef* %p3.addr + %3 = load %StringRef, %StringRef* %p4.addr + %4 = load %Node, %Node* %p5.addr + %5 = load %Node, %Node* %p6.addr + %6 = bitcast %"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, StringRef, Node, Node]"* %this to %Node (%UntypedPtr, %Location*, %StringRef, %StringRef, %Node, %Node)** + %7 = load %Node (%UntypedPtr, %Location*, %StringRef, %StringRef, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %StringRef, %Node, %Node)** %6 + %8 = call %Node %7(%UntypedPtr %1, %Location* %p2, %StringRef %2, %StringRef %3, %Node %4, %Node %5) + ret %Node %8 } ; Function Attrs: inlinehint nounwind -define internal i1 @parseVarDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr +define internal i1 @parseVarLikeDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { + %kind = alloca i32 %tmp.this = alloca %TokenType + %tmp.this5 = alloca %TokenType %ids = alloca %"Vector[LocString]" %typeNode = alloca %Node %init = alloca %Node - %tmp.this4 = alloca %TokenType - %"$tmpForRef" = alloca %Node - %tmp.this8 = alloca %TokenType - %"$tmpForRef9" = alloca %Node %tmp.this10 = alloca %TokenType - %"$tmpForRef11" = alloca %Node - %tmp.this12 = alloca %TokenType + %"$tmpForRef" = alloca %Node + %tmp.this14 = alloca %TokenType + %"$tmpForRef15" = alloca %Node + %tmp.this16 = alloca %TokenType + %"$tmpForRef17" = alloca %Node + %tmp.this18 = alloca %TokenType br label %code code: ; preds = %0 + store i32 0, i32* %kind br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 9) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - %4 = xor i1 true, %3 - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 7) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_else if_then: ; preds = %if_block - ret i1 false + store i32 0, i32* %kind + br label %if_end -if_end: ; preds = %dumy_block, %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseIdList(%"Vector[LocString]"* %ids, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5) - call void @ctor.556(%Node* %typeNode) - call void @ctor.556(%Node* %init) +if_else: ; preds = %if_block br label %if_block1 -dumy_block: ; No predecessors! - br label %if_end +if_end: ; preds = %if_end4, %if_then + call void @parseIdList(%"Vector[LocString]"* %ids, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + call void @ctor.546(%Node* %typeNode) + call void @ctor.546(%Node* %init) + br label %if_block6 -if_block1: ; preds = %if_end - %6 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this4, i32 30) - %7 = load %TokenType, %TokenType* %tmp.this4 - %8 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %6, %TokenType %7) - br i1 %8, label %if_then2, label %if_else +if_block1: ; preds = %if_else + call void @ctor.404(%TokenType* %tmp.this5, i32 10) + %2 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + br i1 %2, label %if_then2, label %if_else3 if_then2: ; preds = %if_block1 - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %10 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, i1 false) - store %Node %10, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %typeNode, %Node* %"$tmpForRef") - br label %if_block5 + store i32 1, i32* %kind + br label %if_end4 -if_else: ; preds = %if_block1 - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this10, i32 35) - %12 = load %TokenType, %TokenType* %tmp.this10 - %13 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, %TokenType %12) - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %15 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, i1 true) - store %Node %15, %Node* %"$tmpForRef11" - call void @"=.554"(%Node* %init, %Node* %"$tmpForRef11") - br label %if_end3 +if_else3: ; preds = %if_block1 + ret i1 false -if_end3: ; preds = %if_else, %if_end7 - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this12, i32 31) - %17 = load %TokenType, %TokenType* %tmp.this12 - %18 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, %TokenType %17) - %19 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %20 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %19, i32 0, i32 3 - %21 = load %Node, %Node* %typeNode - %22 = load %Node, %Node* %init - %23 = load %Node*, %Node** %res.addr - call void @createFormals(%AstBuilder* %20, %"Vector[LocString]"* %ids, %Node %21, %Node %22, i1 true, %Node* %23) - call void @dtor.586(%"Vector[LocString]"* %ids) +if_end4: ; preds = %dumy_block, %if_then2 + br label %if_end + +dumy_block: ; No predecessors! + br label %if_end4 + +if_block6: ; preds = %if_end + call void @ctor.404(%TokenType* %tmp.this10, i32 31) + %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this10) + br i1 %3, label %if_then7, label %if_else8 + +if_then7: ; preds = %if_block6 + %4 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 false) + store %Node %4, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %typeNode, %Node* %"$tmpForRef") + br label %if_block11 + +if_else8: ; preds = %if_block6 + call void @ctor.404(%TokenType* %tmp.this16, i32 36) + %5 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this16) + %6 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %6, %Node* %"$tmpForRef17" + call void @"=.544"(%Node* %init, %Node* %"$tmpForRef17") + br label %if_end9 + +if_end9: ; preds = %if_else8, %if_end13 + call void @ctor.404(%TokenType* %tmp.this18, i32 32) + %7 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this18) + %8 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %9 = load %Node, %Node* %typeNode + %10 = load %Node, %Node* %init + %11 = load i32, i32* %kind + call void @createFormals(%AstBuilder* %8, %"Vector[LocString]"* %ids, %Node %9, %Node %10, i32 %11, %Node* %res) + call void @dtor.577(%"Vector[LocString]"* %ids) ret i1 true -if_block5: ; preds = %if_then2 - %24 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this8, i32 35) - %25 = load %TokenType, %TokenType* %tmp.this8 - %26 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %24, %TokenType %25) - br i1 %26, label %if_then6, label %if_end7 +if_block11: ; preds = %if_then7 + call void @ctor.404(%TokenType* %tmp.this14, i32 36) + %12 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this14) + br i1 %12, label %if_then12, label %if_end13 -if_then6: ; preds = %if_block5 - %27 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %28 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %27, i1 true) - store %Node %28, %Node* %"$tmpForRef9" - call void @"=.554"(%Node* %init, %Node* %"$tmpForRef9") - br label %if_end7 +if_then12: ; preds = %if_block11 + %13 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %13, %Node* %"$tmpForRef15" + call void @"=.544"(%Node* %init, %Node* %"$tmpForRef15") + br label %if_end13 -if_end7: ; preds = %if_then6, %if_block5 - br label %if_end3 +if_end13: ; preds = %if_then12, %if_block11 + br label %if_end9 -dumy_block13: ; No predecessors! - call void @dtor.586(%"Vector[LocString]"* %ids) +dumy_block19: ; No predecessors! + call void @dtor.577(%"Vector[LocString]"* %ids) unreachable } ; Function Attrs: inlinehint nounwind define internal i1 @parseFunDecl(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %tmp.this = alloca %TokenType %loc = alloca %Location %id = alloca %String @@ -30368,131 +27094,108 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 6) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - %4 = xor i1 true, %3 - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 6) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + %2 = xor i1 true, %1 + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 false if_end: ; preds = %dumy_block, %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i32 0, i32 1 - %7 = getelementptr inbounds %Token, %Token* %6, i32 0, i32 0 - call void @ctor.182(%Location* %loc, %Location* %7) - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseFunNameString(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8) - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %10 = call %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, i1 false) - store %Node %10, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %formals, %Node* %"$tmpForRef") - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %12 = call %Node @parseTypeNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11) - store %Node %12, %Node* %"$tmpForRef1" - call void @ctor.545(%Node* %retType, %Node* %"$tmpForRef1") - call void @ctor.556(%Node* %body) - call void @ctor.556(%Node* %bodyExp) - call void @ctor.556(%Node* %ifClause) + %3 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %4 = getelementptr inbounds %Token, %Token* %3, i32 0, i32 0 + call void @ctor.169(%Location* %loc, %Location* %4) + call void @parseFunNameString(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + %5 = call %Node @parseFormalsOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %5, %Node* %"$tmpForRef" + call void @ctor.535(%Node* %formals, %Node* %"$tmpForRef") + %6 = call %Node @parseTypeNode(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %6, %Node* %"$tmpForRef1" + call void @ctor.535(%Node* %retType, %Node* %"$tmpForRef1") + call void @ctor.546(%Node* %body) + call void @ctor.546(%Node* %bodyExp) + call void @ctor.546(%Node* %ifClause) br label %if_block2 dumy_block: ; No predecessors! br label %if_end if_block2: ; preds = %if_end - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 35) - %14 = load %TokenType, %TokenType* %tmp.this5 - %15 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, %TokenType %14) - br i1 %15, label %if_then3, label %if_else + call void @ctor.404(%TokenType* %tmp.this5, i32 36) + %7 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + br i1 %7, label %if_then3, label %if_else if_then3: ; preds = %if_block2 - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %17 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, i1 true) - store %Node %17, %Node* %"$tmpForRef6" - call void @"=.554"(%Node* %bodyExp, %Node* %"$tmpForRef6") - %18 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %19 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %18) - store %Node %19, %Node* %"$tmpForRef7" - call void @"=.554"(%Node* %ifClause, %Node* %"$tmpForRef7") - %20 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this8, i32 31) - %21 = load %TokenType, %TokenType* %tmp.this8 - %22 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %20, %TokenType %21) + %8 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %8, %Node* %"$tmpForRef6" + call void @"=.544"(%Node* %bodyExp, %Node* %"$tmpForRef6") + %9 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %9, %Node* %"$tmpForRef7" + call void @"=.544"(%Node* %ifClause, %Node* %"$tmpForRef7") + call void @ctor.404(%TokenType* %tmp.this8, i32 32) + %10 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this8) br label %if_end4 if_else: ; preds = %if_block2 - %23 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %24 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23) - store %Node %24, %Node* %"$tmpForRef9" - call void @"=.554"(%Node* %ifClause, %Node* %"$tmpForRef9") - %25 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %26 = call %Node @parseFunBody(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %25) - store %Node %26, %Node* %"$tmpForRef10" - call void @"=.554"(%Node* %body, %Node* %"$tmpForRef10") + %11 = call %Node @parseIfClauseOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %11, %Node* %"$tmpForRef9" + call void @"=.544"(%Node* %ifClause, %Node* %"$tmpForRef9") + %12 = call %Node @parseFunBody(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Node %12, %Node* %"$tmpForRef10" + call void @"=.544"(%Node* %body, %Node* %"$tmpForRef10") br label %if_end4 if_end4: ; preds = %if_else, %if_then3 - %27 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %28 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %27, i32 0, i32 1 - %29 = getelementptr inbounds %Token, %Token* %28, i32 0, i32 0 - call void @copyEnd(%Location* %loc, %Location* %29) - %30 = load %Node*, %Node** %res.addr - %31 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %32 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %31, i32 0, i32 3 - %33 = call %StringRef @asStringRef(%String* %id) - %34 = load %Node, %Node* %formals - %35 = load %Node, %Node* %retType - %36 = load %Node, %Node* %body - %37 = load %Node, %Node* %bodyExp - %38 = load %Node, %Node* %ifClause - %39 = call %Node @mkFun(%AstBuilder* %32, %Location* %loc, %StringRef %33, %Node %34, %Node %35, %Node %36, %Node %37, %Node %38) - store %Node %39, %Node* %"$tmpForRef11" - call void @"=.554"(%Node* %30, %Node* %"$tmpForRef11") - call void @dtor.261(%String* %id) + %13 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %14 = getelementptr inbounds %Token, %Token* %13, i32 0, i32 0 + %15 = load %Location, %Location* %14 + call void @copyEnd(%Location* %loc, %Location %15) + %16 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %17 = load %Location, %Location* %loc + %18 = call %StringRef @asStringRef(%String* %id) + %19 = load %Node, %Node* %formals + %20 = load %Node, %Node* %retType + %21 = load %Node, %Node* %body + %22 = load %Node, %Node* %bodyExp + %23 = load %Node, %Node* %ifClause + %24 = call %Node @mkFun(%AstBuilder* %16, %Location %17, %StringRef %18, %Node %19, %Node %20, %Node %21, %Node %22, %Node %23) + store %Node %24, %Node* %"$tmpForRef11" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef11") + call void @dtor.250(%String* %id) ret i1 true dumy_block12: ; No predecessors! - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %id) unreachable } ; Function Attrs: inlinehint nounwind define internal void @parseFunNameString(%String* sret %_result, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %tmp.this = alloca %TokenType - %"$tmpForRef" = alloca %StringRef %tmp.StringRef = alloca %StringRef %tmp.this4 = alloca %TokenType %tmp.this5 = alloca %TokenType - %"$tmpForRef6" = alloca %StringRef - %tmp.StringRef7 = alloca %StringRef + %tmp.StringRef6 = alloca %StringRef br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 33) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 34) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %String*, %String** %_result.addr - %5 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %6 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.103, i32 0, i32 0), i8** %5 - store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.103, i32 0, i32 1), i8** %6 - %7 = load %StringRef, %StringRef* %tmp.StringRef - store %StringRef %7, %StringRef* %"$tmpForRef" - call void @ctor.471(%String* %4, %StringRef* %"$tmpForRef") + %2 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %3 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %4 = bitcast %UntypedPtr* %2 to i8** + %5 = bitcast %UntypedPtr* %3 to i8** + store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.105, i32 0, i32 0), i8** %4 + store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.105, i32 0, i32 1), i8** %5 + %6 = load %StringRef, %StringRef* %tmp.StringRef + call void @ctor.459(%String* %_result, %StringRef %6) ret void if_end: ; preds = %dumy_block, %if_block @@ -30502,43 +27205,35 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %8 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this4, i32 28) - %9 = load %TokenType, %TokenType* %tmp.this4 - %10 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %8, %TokenType %9) - br i1 %10, label %if_then2, label %if_end3 + call void @ctor.404(%TokenType* %tmp.this4, i32 29) + %7 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this4) + br i1 %7, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 29) - %12 = load %TokenType, %TokenType* %tmp.this5 - %13 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, %TokenType %12) - %14 = load %String*, %String** %_result.addr - %15 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef7, i32 0, i32 0 - %16 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef7, i32 0, i32 1 - store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.104, i32 0, i32 0), i8** %15 - store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.104, i32 0, i32 2), i8** %16 - %17 = load %StringRef, %StringRef* %tmp.StringRef7 - store %StringRef %17, %StringRef* %"$tmpForRef6" - call void @ctor.471(%String* %14, %StringRef* %"$tmpForRef6") + call void @ctor.404(%TokenType* %tmp.this5, i32 30) + %8 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + %9 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef6, i32 0, i32 0 + %10 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef6, i32 0, i32 1 + %11 = bitcast %UntypedPtr* %9 to i8** + %12 = bitcast %UntypedPtr* %10 to i8** + store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.106, i32 0, i32 0), i8** %11 + store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.106, i32 0, i32 2), i8** %12 + %13 = load %StringRef, %StringRef* %tmp.StringRef6 + call void @ctor.459(%String* %_result, %StringRef %13) ret void -if_end3: ; preds = %dumy_block8, %if_block1 - %18 = load %String*, %String** %_result.addr - %19 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseIdOrOper(%String* %18, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %19, i1 true) +if_end3: ; preds = %dumy_block7, %if_block1 + call void @parseIdOrOper(%String* %_result, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) ret void -dumy_block8: ; No predecessors! +dumy_block7: ; No predecessors! br label %if_end3 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkFun(%AstBuilder* %obj, %Location* %loc, %StringRef %name, %Node %formals, %Node %retType, %Node %body, %Node %bodyExp, %Node %ifClause) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkFun(%AstBuilder* %obj, %Location %loc, %StringRef %name, %Node %formals, %Node %retType, %Node %body, %Node %bodyExp, %Node %ifClause) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %name.addr = alloca %StringRef store %StringRef %name, %StringRef* %name.addr %formals.addr = alloca %Node @@ -30554,30 +27249,23 @@ define internal %Node @mkFun(%AstBuilder* %obj, %Location* %loc, %StringRef %nam br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 12 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %name.addr - %8 = load %Node, %Node* %formals.addr - %9 = load %Node, %Node* %retType.addr - %10 = load %Node, %Node* %body.addr - %11 = load %Node, %Node* %bodyExp.addr - %12 = load %Node, %Node* %ifClause.addr - %13 = call %Node @"().615"(%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %Node %8, %Node %9, %Node %10, %Node %11, %Node %12) - ret %Node %13 -} - -; Function Attrs: inlinehint nounwind -define internal %Node @"().615"(%"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %Node %p4, %Node %p5, %Node %p6, %Node %p7, %Node %p8) #4 { - %this.addr = alloca %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* - store %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %this, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %this.addr + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 13 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %name.addr + %5 = load %Node, %Node* %formals.addr + %6 = load %Node, %Node* %retType.addr + %7 = load %Node, %Node* %body.addr + %8 = load %Node, %Node* %bodyExp.addr + %9 = load %Node, %Node* %ifClause.addr + %10 = call %Node @"().607"(%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5, %Node %6, %Node %7, %Node %8, %Node %9) + ret %Node %10 +} + +; Function Attrs: inlinehint nounwind +define internal %Node @"().607"(%"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %StringRef %p3, %Node %p4, %Node %p5, %Node %p6, %Node %p7, %Node %p8) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %StringRef store %StringRef %p3, %StringRef* %p3.addr %p4.addr = alloca %Node @@ -30593,113 +27281,95 @@ define internal %Node @"().615"(%"FunctionPtr8[Node, UntypedPtr, @Location, Stri br label %code code: ; preds = %0 - %1 = load %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"*, %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %StringRef, %StringRef* %p3.addr - %5 = load %Node, %Node* %p4.addr - %6 = load %Node, %Node* %p5.addr - %7 = load %Node, %Node* %p6.addr - %8 = load %Node, %Node* %p7.addr - %9 = load %Node, %Node* %p8.addr - %10 = bitcast %"FunctionPtr8[Node, UntypedPtr, @Location, StringRef, Node, Node, Node, Node, Node]"* %1 to %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node, %Node)** - %11 = load %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node, %Node)** %10 - %12 = call %Node %11(%UntypedPtr %2, %Location* %3, %StringRef %4, %Node %5, %Node %6, %Node %7, %Node %8, %Node %9) - ret %Node %12 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %StringRef, %StringRef* %p3.addr + %3 = load %Node, %Node* %p4.addr + %4 = load %Node, %Node* %p5.addr + %5 = load %Node, %Node* %p6.addr + %6 = load %Node, %Node* %p7.addr + %7 = load %Node, %Node* %p8.addr + %8 = bitcast %"FunctionPtr8[Node, UntypedPtr, Location const, StringRef, Node, Node, Node, Node, Node]"* %this to %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node, %Node)** + %9 = load %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %StringRef, %Node, %Node, %Node, %Node, %Node)** %8 + %10 = call %Node %9(%UntypedPtr %1, %Location* %p2, %StringRef %2, %Node %3, %Node %4, %Node %5, %Node %6, %Node %7) + ret %Node %10 } ; Function Attrs: inlinehint nounwind define internal i1 @parseExprStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = load %Node*, %Node** %res.addr - %3 = call i1 @parseExprOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %Node* %2, i1 true) - ret i1 %3 + %1 = call i1 @parseExprOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 true) + ret i1 %1 } ; Function Attrs: inlinehint nounwind define internal i1 @parseIfStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 %topLevel) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %topLevel.addr = alloca i1 store i1 %topLevel, i1* %topLevel.addr %loc = alloca %Location + %"$tmpForRef" = alloca %Location %tmp.this = alloca %TokenType %expr = alloca %Node - %"$tmpForRef" = alloca %Node - %thenClause = alloca %Node %"$tmpForRef1" = alloca %Node + %thenClause = alloca %Node + %"$tmpForRef2" = alloca %Node %elseClause = alloca %Node - %tmp.this5 = alloca %TokenType - %"$tmpForRef6" = alloca %Node + %tmp.this6 = alloca %TokenType %"$tmpForRef7" = alloca %Node + %"$tmpForRef8" = alloca %Node br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") br label %if_block if_block: ; preds = %code - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 15) - %3 = load %TokenType, %TokenType* %tmp.this - %4 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, %TokenType %3) - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 16) + %2 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i1 true) - store %Node %6, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %expr, %Node* %"$tmpForRef") - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %8 = load i1, i1* %topLevel.addr - %9 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, i1 %8) - store %Node %9, %Node* %"$tmpForRef1" - call void @ctor.545(%Node* %thenClause, %Node* %"$tmpForRef1") - call void @ctor.556(%Node* %elseClause) - br label %if_block2 + %3 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %3, %Node* %"$tmpForRef1" + call void @ctor.535(%Node* %expr, %Node* %"$tmpForRef1") + %4 = load i1, i1* %topLevel.addr + %5 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %4) + store %Node %5, %Node* %"$tmpForRef2" + call void @ctor.535(%Node* %thenClause, %Node* %"$tmpForRef2") + call void @ctor.546(%Node* %elseClause) + br label %if_block3 if_end: ; preds = %dumy_block, %if_block ret i1 false -if_block2: ; preds = %if_then - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 23) - %11 = load %TokenType, %TokenType* %tmp.this5 - %12 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, %TokenType %11) - br i1 %12, label %if_then3, label %if_end4 +if_block3: ; preds = %if_then + call void @ctor.404(%TokenType* %tmp.this6, i32 24) + %6 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this6) + br i1 %6, label %if_then4, label %if_end5 -if_then3: ; preds = %if_block2 - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = load i1, i1* %topLevel.addr - %15 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, i1 %14) - store %Node %15, %Node* %"$tmpForRef6" - call void @"=.554"(%Node* %elseClause, %Node* %"$tmpForRef6") - br label %if_end4 +if_then4: ; preds = %if_block3 + %7 = load i1, i1* %topLevel.addr + %8 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %7) + store %Node %8, %Node* %"$tmpForRef7" + call void @"=.544"(%Node* %elseClause, %Node* %"$tmpForRef7") + br label %if_end5 -if_end4: ; preds = %if_then3, %if_block2 - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %17 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, i32 0, i32 1 - %18 = getelementptr inbounds %Token, %Token* %17, i32 0, i32 0 - call void @copyEnd(%Location* %loc, %Location* %18) - %19 = load %Node*, %Node** %res.addr - %20 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %21 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %20, i32 0, i32 3 - %22 = load %Node, %Node* %expr - %23 = load %Node, %Node* %thenClause - %24 = load %Node, %Node* %elseClause - %25 = call %Node @mkIfStmt(%AstBuilder* %21, %Location* %loc, %Node %22, %Node %23, %Node %24) - store %Node %25, %Node* %"$tmpForRef7" - call void @"=.554"(%Node* %19, %Node* %"$tmpForRef7") +if_end5: ; preds = %if_then4, %if_block3 + %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %10 = getelementptr inbounds %Token, %Token* %9, i32 0, i32 0 + %11 = load %Location, %Location* %10 + call void @copyEnd(%Location* %loc, %Location %11) + %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %13 = load %Location, %Location* %loc + %14 = load %Node, %Node* %expr + %15 = load %Node, %Node* %thenClause + %16 = load %Node, %Node* %elseClause + %17 = call %Node @mkIfStmt(%AstBuilder* %12, %Location %13, %Node %14, %Node %15, %Node %16) + store %Node %17, %Node* %"$tmpForRef8" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef8") ret i1 true dumy_block: ; No predecessors! @@ -30707,11 +27377,9 @@ dumy_block: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal %Node @mkIfStmt(%AstBuilder* %obj, %Location* %loc, %Node %expr, %Node %thenClause, %Node %elseClause) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkIfStmt(%AstBuilder* %obj, %Location %loc, %Node %expr, %Node %thenClause, %Node %elseClause) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %expr.addr = alloca %Node store %Node %expr, %Node* %expr.addr %thenClause.addr = alloca %Node @@ -30721,27 +27389,20 @@ define internal %Node @mkIfStmt(%AstBuilder* %obj, %Location* %loc, %Node %expr, br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 34 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %expr.addr - %8 = load %Node, %Node* %thenClause.addr - %9 = load %Node, %Node* %elseClause.addr - %10 = call %Node @"().616"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %Node %8, %Node %9) - ret %Node %10 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 35 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %expr.addr + %5 = load %Node, %Node* %thenClause.addr + %6 = load %Node, %Node* %elseClause.addr + %7 = call %Node @"().608"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %Node %5, %Node %6) + ret %Node %7 } ; Function Attrs: inlinehint nounwind -define internal %Node @"().616"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3, %Node %p4, %Node %p5) #4 { - %this.addr = alloca %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* - store %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %this, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %this.addr +define internal %Node @"().608"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %this, %UntypedPtr %p1, %Location* %p2, %Node %p3, %Node %p4, %Node %p5) #4 { %p1.addr = alloca %UntypedPtr store %UntypedPtr %p1, %UntypedPtr* %p1.addr - %p2.addr = alloca %Location* - store %Location* %p2, %Location** %p2.addr %p3.addr = alloca %Node store %Node %p3, %Node* %p3.addr %p4.addr = alloca %Node @@ -30751,117 +27412,100 @@ define internal %Node @"().616"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node br label %code code: ; preds = %0 - %1 = load %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"*, %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"** %this.addr - %2 = load %UntypedPtr, %UntypedPtr* %p1.addr - %3 = load %Location*, %Location** %p2.addr - %4 = load %Node, %Node* %p3.addr - %5 = load %Node, %Node* %p4.addr - %6 = load %Node, %Node* %p5.addr - %7 = bitcast %"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %1 to %Node (%UntypedPtr, %Location*, %Node, %Node, %Node)** - %8 = load %Node (%UntypedPtr, %Location*, %Node, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %Node, %Node, %Node)** %7 - %9 = call %Node %8(%UntypedPtr %2, %Location* %3, %Node %4, %Node %5, %Node %6) - ret %Node %9 + %1 = load %UntypedPtr, %UntypedPtr* %p1.addr + %2 = load %Node, %Node* %p3.addr + %3 = load %Node, %Node* %p4.addr + %4 = load %Node, %Node* %p5.addr + %5 = bitcast %"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %this to %Node (%UntypedPtr, %Location*, %Node, %Node, %Node)** + %6 = load %Node (%UntypedPtr, %Location*, %Node, %Node, %Node)*, %Node (%UntypedPtr, %Location*, %Node, %Node, %Node)** %5 + %7 = call %Node %6(%UntypedPtr %1, %Location* %p2, %Node %2, %Node %3, %Node %4) + ret %Node %7 } ; Function Attrs: inlinehint nounwind define internal i1 @parseForStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 %topLevel) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %topLevel.addr = alloca i1 store i1 %topLevel, i1* %topLevel.addr %loc = alloca %Location + %"$tmpForRef" = alloca %Location %tmp.this = alloca %TokenType %id = alloca %String %typeNode = alloca %Node %tmp.this4 = alloca %TokenType - %"$tmpForRef" = alloca %Node - %tmp.this5 = alloca %TokenType + %"$tmpForRef5" = alloca %Node + %tmp.this6 = alloca %TokenType %range = alloca %Node - %"$tmpForRef6" = alloca %Node - %action = alloca %Node %"$tmpForRef7" = alloca %Node + %action = alloca %Node %"$tmpForRef8" = alloca %Node + %"$tmpForRef9" = alloca %Node br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") br label %if_block if_block: ; preds = %code - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 14) - %3 = load %TokenType, %TokenType* %tmp.this - %4 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, %TokenType %3) - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 15) + %2 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5) - call void @ctor.556(%Node* %typeNode) + call void @parseId(%String* %id, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + call void @ctor.546(%Node* %typeNode) br label %if_block1 if_end: ; preds = %dumy_block, %if_block ret i1 false if_block1: ; preds = %if_then - %6 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this4, i32 30) - %7 = load %TokenType, %TokenType* %tmp.this4 - %8 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %6, %TokenType %7) - br i1 %8, label %if_then2, label %if_end3 + call void @ctor.404(%TokenType* %tmp.this4, i32 31) + %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this4) + br i1 %3, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 - %9 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %10 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %9, i1 false) - store %Node %10, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %typeNode, %Node* %"$tmpForRef") + %4 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 false) + store %Node %4, %Node* %"$tmpForRef5" + call void @"=.544"(%Node* %typeNode, %Node* %"$tmpForRef5") br label %if_end3 if_end3: ; preds = %if_then2, %if_block1 - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this5, i32 35) - %12 = load %TokenType, %TokenType* %tmp.this5 - %13 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, %TokenType %12) - %14 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %15 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %14, i1 true) - store %Node %15, %Node* %"$tmpForRef6" - call void @ctor.545(%Node* %range, %Node* %"$tmpForRef6") - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %17 = load i1, i1* %topLevel.addr - %18 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, i1 %17) - store %Node %18, %Node* %"$tmpForRef7" - call void @ctor.545(%Node* %action, %Node* %"$tmpForRef7") - %19 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %20 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %19, i32 0, i32 1 - %21 = getelementptr inbounds %Token, %Token* %20, i32 0, i32 0 - call void @copyEnd(%Location* %loc, %Location* %21) - %22 = load %Node*, %Node** %res.addr - %23 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %24 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23, i32 0, i32 3 - %25 = call %StringRef @asStringRef(%String* %id) - %26 = load %Node, %Node* %typeNode - %27 = load %Node, %Node* %range - %28 = load %Node, %Node* %action - %29 = call %Node @mkForStmt(%AstBuilder* %24, %Location* %loc, %StringRef %25, %Node %26, %Node %27, %Node %28) - store %Node %29, %Node* %"$tmpForRef8" - call void @"=.554"(%Node* %22, %Node* %"$tmpForRef8") - call void @dtor.261(%String* %id) + call void @ctor.404(%TokenType* %tmp.this6, i32 36) + %5 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this6) + %6 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %6, %Node* %"$tmpForRef7" + call void @ctor.535(%Node* %range, %Node* %"$tmpForRef7") + %7 = load i1, i1* %topLevel.addr + %8 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %7) + store %Node %8, %Node* %"$tmpForRef8" + call void @ctor.535(%Node* %action, %Node* %"$tmpForRef8") + %9 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %10 = getelementptr inbounds %Token, %Token* %9, i32 0, i32 0 + %11 = load %Location, %Location* %10 + call void @copyEnd(%Location* %loc, %Location %11) + %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %13 = load %Location, %Location* %loc + %14 = call %StringRef @asStringRef(%String* %id) + %15 = load %Node, %Node* %typeNode + %16 = load %Node, %Node* %range + %17 = load %Node, %Node* %action + %18 = call %Node @mkForStmt(%AstBuilder* %12, %Location %13, %StringRef %14, %Node %15, %Node %16, %Node %17) + store %Node %18, %Node* %"$tmpForRef9" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef9") + call void @dtor.250(%String* %id) ret i1 true dumy_block: ; No predecessors! - call void @dtor.261(%String* %id) + call void @dtor.250(%String* %id) br label %if_end } ; Function Attrs: inlinehint nounwind -define internal %Node @mkForStmt(%AstBuilder* %obj, %Location* %loc, %StringRef %id, %Node %typeNode, %Node %range, %Node %action) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkForStmt(%AstBuilder* %obj, %Location %loc, %StringRef %id, %Node %typeNode, %Node %range, %Node %action) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %id.addr = alloca %StringRef store %StringRef %id, %StringRef* %id.addr %typeNode.addr = alloca %Node @@ -30873,153 +27517,142 @@ define internal %Node @mkForStmt(%AstBuilder* %obj, %Location* %loc, %StringRef br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 35 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %StringRef, %StringRef* %id.addr - %8 = load %Node, %Node* %typeNode.addr - %9 = load %Node, %Node* %range.addr - %10 = load %Node, %Node* %action.addr - %11 = call %Node @"().612"(%"FunctionPtr6[Node, UntypedPtr, @Location, StringRef, Node, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %StringRef %7, %Node %8, %Node %9, %Node %10) - ret %Node %11 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 36 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %StringRef, %StringRef* %id.addr + %5 = load %Node, %Node* %typeNode.addr + %6 = load %Node, %Node* %range.addr + %7 = load %Node, %Node* %action.addr + %8 = call %Node @"().604"(%"FunctionPtr6[Node, UntypedPtr, Location const, StringRef, Node, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4, %Node %5, %Node %6, %Node %7) + ret %Node %8 } ; Function Attrs: inlinehint nounwind define internal i1 @parseWhileStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res, i1 %topLevel) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %topLevel.addr = alloca i1 store i1 %topLevel, i1* %topLevel.addr %loc = alloca %Location + %"$tmpForRef" = alloca %Location %tmp.this = alloca %TokenType %expr = alloca %Node - %"$tmpForRef" = alloca %Node + %"$tmpForRef1" = alloca %Node %stepAction = alloca %Node - %tmp.this4 = alloca %TokenType + %tmp.this5 = alloca %TokenType %"$tmpC" = alloca %String + %"$tmpForRef9" = alloca %StringRef %tmp.StringRef = alloca %StringRef - %"$tmpC8" = alloca %Token - %tmp.StringRef9 = alloca %StringRef + %"$tmpC10" = alloca %Token + %"$tmpForRef11" = alloca %StringRef + %tmp.StringRef12 = alloca %StringRef %body = alloca %Node - %"$tmpForRef10" = alloca %Node - %"$tmpForRef11" = alloca %Node + %"$tmpForRef13" = alloca %Node + %"$tmpForRef14" = alloca %Node br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @curLoc(%Location* %loc, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) + %1 = call %Location @curLoc(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) + store %Location %1, %Location* %"$tmpForRef" + call void @ctor.169(%Location* %loc, %Location* %"$tmpForRef") br label %if_block if_block: ; preds = %code - %2 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 19) - %3 = load %TokenType, %TokenType* %tmp.this - %4 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2, %TokenType %3) - br i1 %4, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 20) + %2 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %2, label %if_then, label %if_end if_then: ; preds = %if_block - %5 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %6 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %5, i1 true) - store %Node %6, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %expr, %Node* %"$tmpForRef") - call void @ctor.556(%Node* %stepAction) - br label %if_block1 + %3 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %3, %Node* %"$tmpForRef1" + call void @ctor.535(%Node* %expr, %Node* %"$tmpForRef1") + call void @ctor.546(%Node* %stepAction) + br label %if_block2 if_end: ; preds = %dumy_block, %if_block ret i1 false -if_block1: ; preds = %if_then - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this4, i32 31) - %8 = load %TokenType, %TokenType* %tmp.this4 - %9 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %TokenType %8) - br i1 %9, label %if_then2, label %if_end3 - -if_then2: ; preds = %if_block1 - br label %if_block5 +if_block2: ; preds = %if_then + call void @ctor.404(%TokenType* %tmp.this5, i32 32) + %4 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this5) + br i1 %4, label %if_then3, label %if_end4 -if_end3: ; preds = %if_end7, %if_block1 - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = load i1, i1* %topLevel.addr - %12 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i1 %11) - store %Node %12, %Node* %"$tmpForRef10" - call void @ctor.545(%Node* %body, %Node* %"$tmpForRef10") - %13 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %14 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %13, i32 0, i32 1 - %15 = getelementptr inbounds %Token, %Token* %14, i32 0, i32 0 - call void @copyEnd(%Location* %loc, %Location* %15) - %16 = load %Node*, %Node** %res.addr - %17 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %18 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %17, i32 0, i32 3 - %19 = load %Node, %Node* %expr - %20 = load %Node, %Node* %stepAction - %21 = load %Node, %Node* %body - %22 = call %Node @mkWhileStmt(%AstBuilder* %18, %Location* %loc, %Node %19, %Node %20, %Node %21) - store %Node %22, %Node* %"$tmpForRef11" - call void @"=.554"(%Node* %16, %Node* %"$tmpForRef11") +if_then3: ; preds = %if_block2 + br label %if_block6 + +if_end4: ; preds = %if_end8, %if_block2 + %5 = load i1, i1* %topLevel.addr + %6 = call %Node @parseStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 %5) + store %Node %6, %Node* %"$tmpForRef13" + call void @ctor.535(%Node* %body, %Node* %"$tmpForRef13") + %7 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %8 = getelementptr inbounds %Token, %Token* %7, i32 0, i32 0 + %9 = load %Location, %Location* %8 + call void @copyEnd(%Location* %loc, %Location %9) + %10 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %11 = load %Location, %Location* %loc + %12 = load %Node, %Node* %expr + %13 = load %Node, %Node* %stepAction + %14 = load %Node, %Node* %body + %15 = call %Node @mkWhileStmt(%AstBuilder* %10, %Location %11, %Node %12, %Node %13, %Node %14) + store %Node %15, %Node* %"$tmpForRef14" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef14") ret i1 true -if_block5: ; preds = %if_then2 - %23 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %24 = call i1 @parseExprOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %23, %Node* %stepAction, i1 true) - %25 = xor i1 true, %24 - br i1 %25, label %cond.true, label %cond.false - -if_then6: ; preds = %cond.end - %26 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %27 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 - %28 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.105, i32 0, i32 0), i8** %27 - store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.105, i32 0, i32 25), i8** %28 - %29 = load %StringRef, %StringRef* %tmp.StringRef - %30 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %31 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %30, i32 0, i32 0 - call void @"pre_*.543"(%Token* %"$tmpC8", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %31) - %32 = getelementptr inbounds %Token, %Token* %"$tmpC8", i32 0, i32 1 - %33 = load %TokenType, %TokenType* %32 - %34 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef9, i32 0, i32 0 - %35 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef9, i32 0, i32 1 - store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @str.106, i32 0, i32 0), i8** %34 - store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @str.106, i32 0, i32 41), i8** %35 - %36 = load %StringRef, %StringRef* %tmp.StringRef9 - call void @toString.597(%String* %"$tmpC", %StringRef %29, %TokenType %33, %StringRef %36) - call void @reportError.548(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %26, %String* %"$tmpC") - call void @dtor.261(%String* %"$tmpC") - call void @dtor.260(%Token* %"$tmpC8") - br label %if_end7 +if_block6: ; preds = %if_then3 + %16 = call i1 @parseExprOpt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %stepAction, i1 true) + %17 = xor i1 true, %16 + br i1 %17, label %cond.true, label %cond.false -if_end7: ; preds = %if_then6, %cond.end - br label %if_end3 +if_then7: ; preds = %cond.end + %18 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 0 + %19 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef, i32 0, i32 1 + %20 = bitcast %UntypedPtr* %18 to i8** + %21 = bitcast %UntypedPtr* %19 to i8** + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.107, i32 0, i32 0), i8** %20 + store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.107, i32 0, i32 25), i8** %21 + %22 = load %StringRef, %StringRef* %tmp.StringRef + store %StringRef %22, %StringRef* %"$tmpForRef9" + %23 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 0 + call void @"pre_*.533"(%Token* %"$tmpC10", %"RangeWithLookahead[SparrowLayoutDecoder[SparrowScanner]]"* %23) + %24 = getelementptr inbounds %Token, %Token* %"$tmpC10", i32 0, i32 1 + %25 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef12, i32 0, i32 0 + %26 = getelementptr inbounds %StringRef, %StringRef* %tmp.StringRef12, i32 0, i32 1 + %27 = bitcast %UntypedPtr* %25 to i8** + %28 = bitcast %UntypedPtr* %26 to i8** + store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @str.108, i32 0, i32 0), i8** %27 + store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @str.108, i32 0, i32 41), i8** %28 + %29 = load %StringRef, %StringRef* %tmp.StringRef12 + store %StringRef %29, %StringRef* %"$tmpForRef11" + call void @toString.589(%String* %"$tmpC", %StringRef* %"$tmpForRef9", %TokenType* %24, %StringRef* %"$tmpForRef11") + call void @reportError.538(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %String* %"$tmpC") + call void @dtor.250(%String* %"$tmpC") + call void @dtor.249(%Token* %"$tmpC10") + br label %if_end8 + +if_end8: ; preds = %if_then7, %cond.end + br label %if_end4 -cond.true: ; preds = %if_block5 - %37 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %38 = load i1, i1* %topLevel.addr - %39 = call i1 @parseBlockStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %37, %Node* %stepAction, i1 %38) - %40 = xor i1 true, %39 +cond.true: ; preds = %if_block6 + %30 = load i1, i1* %topLevel.addr + %31 = call i1 @parseBlockStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %stepAction, i1 %30) + %32 = xor i1 true, %31 br label %cond.end -cond.false: ; preds = %if_block5 +cond.false: ; preds = %if_block6 br label %cond.end cond.end: ; preds = %cond.false, %cond.true - %cond.res = phi i1 [ %40, %cond.true ], [ false, %cond.false ] - br i1 %cond.res, label %if_then6, label %if_end7 + %cond.res = phi i1 [ %32, %cond.true ], [ false, %cond.false ] + br i1 %cond.res, label %if_then7, label %if_end8 dumy_block: ; No predecessors! br label %if_end } ; Function Attrs: inlinehint nounwind -define internal %Node @mkWhileStmt(%AstBuilder* %obj, %Location* %loc, %Node %expr, %Node %stepAction, %Node %body) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkWhileStmt(%AstBuilder* %obj, %Location %loc, %Node %expr, %Node %stepAction, %Node %body) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %expr.addr = alloca %Node store %Node %expr, %Node* %expr.addr %stepAction.addr = alloca %Node @@ -31029,25 +27662,18 @@ define internal %Node @mkWhileStmt(%AstBuilder* %obj, %Location* %loc, %Node %ex br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 36 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %expr.addr - %8 = load %Node, %Node* %stepAction.addr - %9 = load %Node, %Node* %body.addr - %10 = call %Node @"().616"(%"FunctionPtr5[Node, UntypedPtr, @Location, Node, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %Node %8, %Node %9) - ret %Node %10 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 37 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %expr.addr + %5 = load %Node, %Node* %stepAction.addr + %6 = load %Node, %Node* %body.addr + %7 = call %Node @"().608"(%"FunctionPtr5[Node, UntypedPtr, Location const, Node, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %Node %5, %Node %6) + ret %Node %7 } ; Function Attrs: inlinehint nounwind define internal i1 @parseBreakStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %tmp.this = alloca %TokenType %loc = alloca %Location %tmp.this1 = alloca %TokenType @@ -31058,27 +27684,21 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 10) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 11) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i32 0, i32 1 - %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 0 - call void @ctor.182(%Location* %loc, %Location* %6) - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 31) - %8 = load %TokenType, %TokenType* %tmp.this1 - %9 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %TokenType %8) - %10 = load %Node*, %Node** %res.addr - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, i32 0, i32 3 - %13 = call %Node @mkBreakStmt(%AstBuilder* %12, %Location* %loc) - store %Node %13, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %10, %Node* %"$tmpForRef") + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 0 + call void @ctor.169(%Location* %loc, %Location* %3) + call void @ctor.404(%TokenType* %tmp.this1, i32 32) + %4 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %6 = load %Location, %Location* %loc + %7 = call %Node @mkBreakStmt(%AstBuilder* %5, %Location %6) + store %Node %7, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef") ret i1 true if_end: ; preds = %dumy_block, %if_block @@ -31089,30 +27709,21 @@ dumy_block: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal %Node @mkBreakStmt(%AstBuilder* %obj, %Location* %loc) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkBreakStmt(%AstBuilder* %obj, %Location %loc) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 37 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = call %Node @"().600"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %2, %UntypedPtr %5, %Location* %6) - ret %Node %7 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 38 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = call %Node @"().592"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %1, %UntypedPtr %3, %Location* %loc.addr) + ret %Node %4 } ; Function Attrs: inlinehint nounwind define internal i1 @parseContinueStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %tmp.this = alloca %TokenType %loc = alloca %Location %tmp.this1 = alloca %TokenType @@ -31123,27 +27734,21 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 12) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 13) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i32 0, i32 1 - %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 0 - call void @ctor.182(%Location* %loc, %Location* %6) - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 31) - %8 = load %TokenType, %TokenType* %tmp.this1 - %9 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %TokenType %8) - %10 = load %Node*, %Node** %res.addr - %11 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %12 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %11, i32 0, i32 3 - %13 = call %Node @mkContinueStmt(%AstBuilder* %12, %Location* %loc) - store %Node %13, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %10, %Node* %"$tmpForRef") + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 0 + call void @ctor.169(%Location* %loc, %Location* %3) + call void @ctor.404(%TokenType* %tmp.this1, i32 32) + %4 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) + %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %6 = load %Location, %Location* %loc + %7 = call %Node @mkContinueStmt(%AstBuilder* %5, %Location %6) + store %Node %7, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef") ret i1 true if_end: ; preds = %dumy_block, %if_block @@ -31154,30 +27759,21 @@ dumy_block: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal %Node @mkContinueStmt(%AstBuilder* %obj, %Location* %loc) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkContinueStmt(%AstBuilder* %obj, %Location %loc) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 38 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = call %Node @"().600"(%"FunctionPtr2[Node, UntypedPtr, @Location]"* %2, %UntypedPtr %5, %Location* %6) - ret %Node %7 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 39 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = call %Node @"().592"(%"FunctionPtr2[Node, UntypedPtr, Location const]"* %1, %UntypedPtr %3, %Location* %loc.addr) + ret %Node %4 } ; Function Attrs: inlinehint nounwind define internal i1 @parseReturnStmt(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %Node* %res) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %res.addr = alloca %Node* - store %Node* %res, %Node** %res.addr %tmp.this = alloca %TokenType %loc = alloca %Location %expr = alloca %Node @@ -31191,49 +27787,40 @@ code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 16) - %2 = load %TokenType, %TokenType* %tmp.this - %3 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, %TokenType %2) - br i1 %3, label %if_then, label %if_end + call void @ctor.404(%TokenType* %tmp.this, i32 17) + %1 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %4 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %5 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %4, i32 0, i32 1 - %6 = getelementptr inbounds %Token, %Token* %5, i32 0, i32 0 - call void @ctor.182(%Location* %loc, %Location* %6) - call void @ctor.556(%Node* %expr) + %2 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 1 + %3 = getelementptr inbounds %Token, %Token* %2, i32 0, i32 0 + call void @ctor.169(%Location* %loc, %Location* %3) + call void @ctor.546(%Node* %expr) br label %if_block1 if_end: ; preds = %dumy_block, %if_block ret i1 false if_block1: ; preds = %if_then - %7 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this3, i32 31) - %8 = load %TokenType, %TokenType* %tmp.this3 - %9 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %7, %TokenType %8) - br i1 %9, label %if_end2, label %if_else + call void @ctor.404(%TokenType* %tmp.this3, i32 32) + %4 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this3) + br i1 %4, label %if_end2, label %if_else if_else: ; preds = %if_block1 - %10 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %11 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %10, i1 true) - store %Node %11, %Node* %"$tmpForRef" - call void @"=.554"(%Node* %expr, %Node* %"$tmpForRef") - %12 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this4, i32 31) - %13 = load %TokenType, %TokenType* %tmp.this4 - %14 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %12, %TokenType %13) + %5 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %5, %Node* %"$tmpForRef" + call void @"=.544"(%Node* %expr, %Node* %"$tmpForRef") + call void @ctor.404(%TokenType* %tmp.this4, i32 32) + %6 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this4) br label %if_end2 if_end2: ; preds = %if_else, %if_block1 - %15 = load %Node*, %Node** %res.addr - %16 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %17 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %16, i32 0, i32 3 - %18 = load %Node, %Node* %expr - %19 = call %Node @mkReturnStmt(%AstBuilder* %17, %Location* %loc, %Node %18) - store %Node %19, %Node* %"$tmpForRef5" - call void @"=.554"(%Node* %15, %Node* %"$tmpForRef5") + %7 = getelementptr inbounds %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]", %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i32 0, i32 3 + %8 = load %Location, %Location* %loc + %9 = load %Node, %Node* %expr + %10 = call %Node @mkReturnStmt(%AstBuilder* %7, %Location %8, %Node %9) + store %Node %10, %Node* %"$tmpForRef5" + call void @"=.544"(%Node* %res, %Node* %"$tmpForRef5") ret i1 true dumy_block: ; No predecessors! @@ -31241,33 +27828,26 @@ dumy_block: ; No predecessors! } ; Function Attrs: inlinehint nounwind -define internal %Node @mkReturnStmt(%AstBuilder* %obj, %Location* %loc, %Node %expr) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkReturnStmt(%AstBuilder* %obj, %Location %loc, %Node %expr) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %expr.addr = alloca %Node store %Node %expr, %Node* %expr.addr br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 39 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %expr.addr - %8 = call %Node @"().596"(%"FunctionPtr3[Node, UntypedPtr, @Location, Node]"* %2, %UntypedPtr %5, %Location* %6, %Node %7) - ret %Node %8 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 40 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %expr.addr + %5 = call %Node @"().588"(%"FunctionPtr3[Node, UntypedPtr, Location const, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4) + ret %Node %5 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkModifiers(%AstBuilder* %obj, %Location* %loc, %Node %main, %Node %mods) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkModifiers(%AstBuilder* %obj, %Location %loc, %Node %main, %Node %mods) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %main.addr = alloca %Node store %Node %main, %Node* %main.addr %mods.addr = alloca %Node @@ -31275,24 +27855,19 @@ define internal %Node @mkModifiers(%AstBuilder* %obj, %Location* %loc, %Node %ma br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 2 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %main.addr - %8 = load %Node, %Node* %mods.addr - %9 = call %Node @"().609"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %Node %8) - ret %Node %9 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 2 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %main.addr + %5 = load %Node, %Node* %mods.addr + %6 = call %Node @"().601"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %Node %5) + ret %Node %6 } ; Function Attrs: inlinehint nounwind -define internal %Node @mkModule(%AstBuilder* %obj, %Location* %loc, %Node %moduleName, %Node %decls) #4 { - %obj.addr = alloca %AstBuilder* - store %AstBuilder* %obj, %AstBuilder** %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal %Node @mkModule(%AstBuilder* %obj, %Location %loc, %Node %moduleName, %Node %decls) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %moduleName.addr = alloca %Node store %Node %moduleName, %Node* %moduleName.addr %decls.addr = alloca %Node @@ -31300,35 +27875,27 @@ define internal %Node @mkModule(%AstBuilder* %obj, %Location* %loc, %Node %modul br label %code code: ; preds = %0 - %1 = load %AstBuilder*, %AstBuilder** %obj.addr - %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %1, i32 0, i32 3 - %3 = load %AstBuilder*, %AstBuilder** %obj.addr - %4 = getelementptr inbounds %AstBuilder, %AstBuilder* %3, i32 0, i32 0 - %5 = load %UntypedPtr, %UntypedPtr* %4 - %6 = load %Location*, %Location** %loc.addr - %7 = load %Node, %Node* %moduleName.addr - %8 = load %Node, %Node* %decls.addr - %9 = call %Node @"().609"(%"FunctionPtr4[Node, UntypedPtr, @Location, Node, Node]"* %2, %UntypedPtr %5, %Location* %6, %Node %7, %Node %8) - ret %Node %9 + %1 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 3 + %2 = getelementptr inbounds %AstBuilder, %AstBuilder* %obj, i32 0, i32 0 + %3 = load %UntypedPtr, %UntypedPtr* %2 + %4 = load %Node, %Node* %moduleName.addr + %5 = load %Node, %Node* %decls.addr + %6 = call %Node @"().601"(%"FunctionPtr4[Node, UntypedPtr, Location const, Node, Node]"* %1, %UntypedPtr %3, %Location* %loc.addr, %Node %4, %Node %5) + ret %Node %6 } ; Function Attrs: noinline nounwind define %Node @spr_parserIf_parseExpression(%ParserContext* %ctx) #5 { - %ctx.addr = alloca %ParserContext* - store %ParserContext* %ctx, %ParserContext** %ctx.addr br label %code code: ; preds = %0 - %1 = load %ParserContext*, %ParserContext** %ctx.addr - %2 = getelementptr inbounds %ParserContext, %ParserContext* %1, i32 0, i32 2 - %3 = call %Node @parseExpression(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %2) - ret %Node %3 + %1 = getelementptr inbounds %ParserContext, %ParserContext* %ctx, i32 0, i32 2 + %2 = call %Node @parseExpression(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1) + ret %Node %2 } ; Function Attrs: inlinehint nounwind define internal %Node @parseExpression(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this) #4 { - %this.addr = alloca %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* - store %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr %res = alloca %Node %"$tmpForRef" = alloca %Node %tmp.this = alloca %TokenType @@ -31336,20 +27903,15 @@ define internal %Node @parseExpression(%"SparrowParser[SparrowLayoutDecoder[Spar br label %code code: ; preds = %0 - %1 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - %2 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %1, i1 true) - store %Node %2, %Node* %"$tmpForRef" - call void @ctor.545(%Node* %res, %Node* %"$tmpForRef") - %3 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this, i32 31) - %4 = load %TokenType, %TokenType* %tmp.this - %5 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %3, %TokenType %4) - %6 = load %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"*, %"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"** %this.addr - call void @ctor.417(%TokenType* %tmp.this1, i32 0) - %7 = load %TokenType, %TokenType* %tmp.this1 - %8 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %6, %TokenType %7) - %9 = load %Node, %Node* %res - ret %Node %9 + %1 = call %Node @parseExpr(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, i1 true) + store %Node %1, %Node* %"$tmpForRef" + call void @ctor.535(%Node* %res, %Node* %"$tmpForRef") + call void @ctor.404(%TokenType* %tmp.this, i32 32) + %2 = call i1 @accept(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this) + call void @ctor.404(%TokenType* %tmp.this1, i32 0) + %3 = call i1 @expect(%"SparrowParser[SparrowLayoutDecoder[SparrowScanner]]"* %this, %TokenType* %tmp.this1) + %4 = load %Node, %Node* %res + ret %Node %4 } ; Function Attrs: inlinehint nounwind @@ -31401,75 +27963,61 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.617(%LocString* %this) #3 { - %this.addr = alloca %LocString* - store %LocString* %this, %LocString** %this.addr +define internal void @ctor.609(%LocString* %this) #3 { br label %code code: ; preds = %0 - %1 = load %LocString*, %LocString** %this.addr - %2 = getelementptr inbounds %LocString, %LocString* %1, i32 0, i32 0 - call void @ctor.618(%"Tuple[Location, String]"* %2) + %1 = getelementptr inbounds %LocString, %LocString* %this, i32 0, i32 0 + call void @ctor.610(%"Tuple[Location, String]"* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.618(%"Tuple[Location, String]"* %this) #3 { - %this.addr = alloca %"Tuple[Location, String]"* - store %"Tuple[Location, String]"* %this, %"Tuple[Location, String]"** %this.addr +define internal void @ctor.610(%"Tuple[Location, String]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %this.addr - %2 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %1, i32 0, i32 0 - call void @ctor.130(%Location* %2) - %3 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %this.addr - %4 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %3, i32 0, i32 1 - call void @ctor.137(%String* %4) + %1 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %this, i32 0, i32 0 + call void @ctor.118(%Location* %1) + %2 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %this, i32 0, i32 1 + call void @ctor.124(%String* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.619"(%LocString* %this, %LocString* %other) #3 { - %this.addr = alloca %LocString* - store %LocString* %this, %LocString** %this.addr +define internal void @"=.611"(%LocString* %this, %LocString* %other) #3 { %other.addr = alloca %LocString* store %LocString* %other, %LocString** %other.addr br label %code code: ; preds = %0 - %1 = load %LocString*, %LocString** %this.addr - %2 = getelementptr inbounds %LocString, %LocString* %1, i32 0, i32 0 - %3 = load %LocString*, %LocString** %other.addr - %4 = getelementptr inbounds %LocString, %LocString* %3, i32 0, i32 0 - call void @"=.620"(%"Tuple[Location, String]"* %2, %"Tuple[Location, String]"* %4) + %1 = getelementptr inbounds %LocString, %LocString* %this, i32 0, i32 0 + %2 = load %LocString*, %LocString** %other.addr + %3 = getelementptr inbounds %LocString, %LocString* %2, i32 0, i32 0 + call void @"=.612"(%"Tuple[Location, String]"* %1, %"Tuple[Location, String]"* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.620"(%"Tuple[Location, String]"* %this, %"Tuple[Location, String]"* %other) #3 { - %this.addr = alloca %"Tuple[Location, String]"* - store %"Tuple[Location, String]"* %this, %"Tuple[Location, String]"** %this.addr +define internal void @"=.612"(%"Tuple[Location, String]"* %this, %"Tuple[Location, String]"* %other) #3 { %other.addr = alloca %"Tuple[Location, String]"* store %"Tuple[Location, String]"* %other, %"Tuple[Location, String]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %this.addr - %2 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %1, i32 0, i32 0 - %3 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %other.addr - %4 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %3, i32 0, i32 0 - call void @"=.283"(%Location* %2, %Location* %4) - %5 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %this.addr + %1 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %this, i32 0, i32 0 + %2 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %other.addr + %3 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %2, i32 0, i32 0 + call void @"=.272"(%Location* %1, %Location* %3) + %4 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %this, i32 0, i32 1 + %5 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %other.addr %6 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %5, i32 0, i32 1 - %7 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %other.addr - %8 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %7, i32 0, i32 1 - %9 = call %String* @"=.290"(%String* %6, %String* %8) + %7 = call %String* @"=.278"(%String* %4, %String* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.621"(%LocString* %this, %LocString* %other) #3 { +define internal i1 @"==.613"(%LocString* %this, %LocString* %other) #3 { %this.addr = alloca %LocString* store %LocString* %this, %LocString** %this.addr %other.addr = alloca %LocString* @@ -31481,12 +28029,12 @@ code: ; preds = %0 %2 = getelementptr inbounds %LocString, %LocString* %1, i32 0, i32 0 %3 = load %LocString*, %LocString** %other.addr %4 = getelementptr inbounds %LocString, %LocString* %3, i32 0, i32 0 - %5 = call i1 @"==.622"(%"Tuple[Location, String]"* %2, %"Tuple[Location, String]"* %4) + %5 = call i1 @"==.614"(%"Tuple[Location, String]"* %2, %"Tuple[Location, String]"* %4) ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.622"(%"Tuple[Location, String]"* %this, %"Tuple[Location, String]"* %other) #3 { +define internal i1 @"==.614"(%"Tuple[Location, String]"* %this, %"Tuple[Location, String]"* %other) #3 { %this.addr = alloca %"Tuple[Location, String]"* store %"Tuple[Location, String]"* %this, %"Tuple[Location, String]"** %this.addr %other.addr = alloca %"Tuple[Location, String]"* @@ -31498,7 +28046,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %1, i32 0, i32 0 %3 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %other.addr %4 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %3, i32 0, i32 0 - %5 = call i1 @"==.336"(%Location* %2, %Location* %4) + %5 = call i1 @"==.324"(%Location* %2, %Location* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -31506,7 +28054,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %6, i32 0, i32 1 %8 = load %"Tuple[Location, String]"*, %"Tuple[Location, String]"** %other.addr %9 = getelementptr inbounds %"Tuple[Location, String]", %"Tuple[Location, String]"* %8, i32 0, i32 1 - %10 = call i1 @"==.343"(%String* %7, %String* %9) + %10 = call i1 @"==.331"(%String* %7, %String* %9) br label %cond.end cond.false: ; preds = %code @@ -31517,56 +28065,8 @@ cond.end: ; preds = %cond.false, %cond.t ret i1 %cond.res } -; Function Attrs: alwaysinline nounwind -define internal void @dtor.623(%LineCol* %this) #3 { - %this.addr = alloca %LineCol* - store %LineCol* %this, %LineCol** %this.addr - br label %code - -code: ; preds = %0 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.624(%SourceCode* %this, i8* %fdata) #3 { - %this.addr = alloca %SourceCode* - store %SourceCode* %this, %SourceCode** %this.addr - %fdata.addr = alloca i8* - store i8* %fdata, i8** %fdata.addr - br label %code - -code: ; preds = %0 - %1 = load i8*, i8** %fdata.addr - %2 = load %SourceCode*, %SourceCode** %this.addr - %3 = getelementptr inbounds %SourceCode, %SourceCode* %2, i32 0, i32 0 - store i8* %1, i8** %3 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @dtor.625(%SourceCode* %this) #3 { - %this.addr = alloca %SourceCode* - store %SourceCode* %this, %SourceCode** %this.addr - br label %code - -code: ; preds = %0 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @dtor.626(%Location* %this) #3 { - %this.addr = alloca %Location* - store %Location* %this, %Location** %this.addr - br label %code - -code: ; preds = %0 - ret void -} - ; Function Attrs: inlinehint nounwind -define internal void @mkLineCol(%LineCol* sret %_result, i32 %line, i32 %col) #4 { - %_result.addr = alloca %LineCol* - store %LineCol* %_result, %LineCol** %_result.addr +define internal %LineCol @mkLineCol(i32 %line, i32 %col) #4 { %line.addr = alloca i32 store i32 %line, i32* %line.addr %col.addr = alloca i32 @@ -31575,37 +28075,31 @@ define internal void @mkLineCol(%LineCol* sret %_result, i32 %line, i32 %col) #4 br label %code code: ; preds = %0 - call void @ctor.132(%LineCol* %res) + call void @ctor.120(%LineCol* %res) %1 = load i32, i32* %line.addr %2 = getelementptr inbounds %LineCol, %LineCol* %res, i32 0, i32 0 store i32 %1, i32* %2 %3 = load i32, i32* %col.addr %4 = getelementptr inbounds %LineCol, %LineCol* %res, i32 0, i32 1 store i32 %3, i32* %4 - %5 = load %LineCol*, %LineCol** %_result.addr - call void @ctor.184(%LineCol* %5, %LineCol* %res) - ret void + %5 = load %LineCol, %LineCol* %res + ret %LineCol %5 } ; Function Attrs: inlinehint nounwind -define internal void @mkLocation(%Location* sret %_result) #4 { - %_result.addr = alloca %Location* - store %Location* %_result, %Location** %_result.addr +define internal %Location @mkLocation() #4 { %res = alloca %Location br label %code code: ; preds = %0 - call void @ctor.130(%Location* %res) + call void @ctor.118(%Location* %res) call void @setOne(%Location* %res) - %1 = load %Location*, %Location** %_result.addr - call void @ctor.182(%Location* %1, %Location* %res) - ret void + %1 = load %Location, %Location* %res + ret %Location %1 } ; Function Attrs: inlinehint nounwind define internal void @setOne(%Location* %l) #4 { - %l.addr = alloca %Location* - store %Location* %l, %Location** %l.addr %tmp.this = alloca i32 %tmp.this1 = alloca i32 %tmp.this2 = alloca i32 @@ -31615,54 +28109,45 @@ define internal void @setOne(%Location* %l) #4 { code: ; preds = %0 store i32 1, i32* %tmp.this %1 = load i32, i32* %tmp.this - %2 = load %Location*, %Location** %l.addr - %3 = getelementptr inbounds %Location, %Location* %2, i32 0, i32 1 - %4 = getelementptr inbounds %LineCol, %LineCol* %3, i32 0, i32 0 - store i32 %1, i32* %4 + %2 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 1 + %3 = getelementptr inbounds %LineCol, %LineCol* %2, i32 0, i32 0 + store i32 %1, i32* %3 store i32 1, i32* %tmp.this1 - %5 = load i32, i32* %tmp.this1 - %6 = load %Location*, %Location** %l.addr - %7 = getelementptr inbounds %Location, %Location* %6, i32 0, i32 1 - %8 = getelementptr inbounds %LineCol, %LineCol* %7, i32 0, i32 1 - store i32 %5, i32* %8 + %4 = load i32, i32* %tmp.this1 + %5 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 1 + %6 = getelementptr inbounds %LineCol, %LineCol* %5, i32 0, i32 1 + store i32 %4, i32* %6 store i32 1, i32* %tmp.this2 - %9 = load i32, i32* %tmp.this2 - %10 = load %Location*, %Location** %l.addr - %11 = getelementptr inbounds %Location, %Location* %10, i32 0, i32 2 - %12 = getelementptr inbounds %LineCol, %LineCol* %11, i32 0, i32 0 - store i32 %9, i32* %12 + %7 = load i32, i32* %tmp.this2 + %8 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + %9 = getelementptr inbounds %LineCol, %LineCol* %8, i32 0, i32 0 + store i32 %7, i32* %9 store i32 1, i32* %tmp.this3 - %13 = load i32, i32* %tmp.this3 - %14 = load %Location*, %Location** %l.addr - %15 = getelementptr inbounds %Location, %Location* %14, i32 0, i32 2 - %16 = getelementptr inbounds %LineCol, %LineCol* %15, i32 0, i32 1 - store i32 %13, i32* %16 + %10 = load i32, i32* %tmp.this3 + %11 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + %12 = getelementptr inbounds %LineCol, %LineCol* %11, i32 0, i32 1 + store i32 %10, i32* %12 ret void } ; Function Attrs: inlinehint nounwind -define internal void @mkLocation.627(%Location* sret %_result, %SourceCode %sourceCode) #4 { - %_result.addr = alloca %Location* - store %Location* %_result, %Location** %_result.addr +define internal %Location @mkLocation.615(%SourceCode %sourceCode) #4 { %sourceCode.addr = alloca %SourceCode store %SourceCode %sourceCode, %SourceCode* %sourceCode.addr %res = alloca %Location br label %code code: ; preds = %0 - call void @ctor.130(%Location* %res) + call void @ctor.118(%Location* %res) %1 = getelementptr inbounds %Location, %Location* %res, i32 0, i32 0 - call void @"=.284"(%SourceCode* %1, %SourceCode* %sourceCode.addr) + call void @"=.273"(%SourceCode* %1, %SourceCode* %sourceCode.addr) call void @setOne(%Location* %res) - %2 = load %Location*, %Location** %_result.addr - call void @ctor.182(%Location* %2, %Location* %res) - ret void + %2 = load %Location, %Location* %res + ret %Location %2 } ; Function Attrs: inlinehint nounwind -define internal void @mkLocation.628(%Location* sret %_result, %SourceCode %sourceCode, %LineCol %start, %LineCol %end) #4 { - %_result.addr = alloca %Location* - store %Location* %_result, %Location** %_result.addr +define internal %Location @mkLocation.616(%SourceCode %sourceCode, %LineCol %start, %LineCol %end) #4 { %sourceCode.addr = alloca %SourceCode store %SourceCode %sourceCode, %SourceCode* %sourceCode.addr %start.addr = alloca %LineCol @@ -31673,101 +28158,82 @@ define internal void @mkLocation.628(%Location* sret %_result, %SourceCode %sour br label %code code: ; preds = %0 - call void @ctor.130(%Location* %res) + call void @ctor.118(%Location* %res) %1 = getelementptr inbounds %Location, %Location* %res, i32 0, i32 0 - call void @"=.284"(%SourceCode* %1, %SourceCode* %sourceCode.addr) + call void @"=.273"(%SourceCode* %1, %SourceCode* %sourceCode.addr) %2 = getelementptr inbounds %Location, %Location* %res, i32 0, i32 1 - call void @"=.285"(%LineCol* %2, %LineCol* %start.addr) + call void @"=.274"(%LineCol* %2, %LineCol* %start.addr) %3 = getelementptr inbounds %Location, %Location* %res, i32 0, i32 2 - call void @"=.285"(%LineCol* %3, %LineCol* %end.addr) - %4 = load %Location*, %Location** %_result.addr - call void @ctor.182(%Location* %4, %Location* %res) - ret void + call void @"=.274"(%LineCol* %3, %LineCol* %end.addr) + %4 = load %Location, %Location* %res + ret %Location %4 } ; Function Attrs: inlinehint nounwind -define internal void @copyStart(%Location* %l, %Location* %other) #4 { - %l.addr = alloca %Location* - store %Location* %l, %Location** %l.addr - %other.addr = alloca %Location* - store %Location* %other, %Location** %other.addr +define internal void @copyStart(%Location* %l, %Location %other) #4 { + %other.addr = alloca %Location + store %Location %other, %Location* %other.addr br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %l.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 1 - %3 = load %Location*, %Location** %other.addr - %4 = getelementptr inbounds %Location, %Location* %3, i32 0, i32 1 - call void @"=.285"(%LineCol* %2, %LineCol* %4) + %1 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 1 + %2 = getelementptr inbounds %Location, %Location* %other.addr, i32 0, i32 1 + call void @"=.274"(%LineCol* %1, %LineCol* %2) ret void } ; Function Attrs: inlinehint nounwind -define internal void @setAsStartOf(%Location* %l, %Location* %other) #4 { - %l.addr = alloca %Location* - store %Location* %l, %Location** %l.addr - %other.addr = alloca %Location* - store %Location* %other, %Location** %other.addr +define internal void @setAsStartOf(%Location* %l, %Location %other) #4 { + %other.addr = alloca %Location + store %Location %other, %Location* %other.addr br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %l.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 1 - %3 = load %Location*, %Location** %other.addr - %4 = getelementptr inbounds %Location, %Location* %3, i32 0, i32 1 - call void @"=.285"(%LineCol* %2, %LineCol* %4) - %5 = load %Location*, %Location** %l.addr - %6 = getelementptr inbounds %Location, %Location* %5, i32 0, i32 2 - %7 = load %Location*, %Location** %other.addr - %8 = getelementptr inbounds %Location, %Location* %7, i32 0, i32 1 - call void @"=.285"(%LineCol* %6, %LineCol* %8) + %1 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 1 + %2 = getelementptr inbounds %Location, %Location* %other.addr, i32 0, i32 1 + call void @"=.274"(%LineCol* %1, %LineCol* %2) + %3 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + %4 = getelementptr inbounds %Location, %Location* %other.addr, i32 0, i32 1 + call void @"=.274"(%LineCol* %3, %LineCol* %4) ret void } ; Function Attrs: inlinehint nounwind -define internal void @setAsEndOf(%Location* %l, %Location* %other) #4 { - %l.addr = alloca %Location* - store %Location* %l, %Location** %l.addr - %other.addr = alloca %Location* - store %Location* %other, %Location** %other.addr +define internal void @setAsEndOf(%Location* %l, %Location %other) #4 { + %other.addr = alloca %Location + store %Location %other, %Location* %other.addr br label %code code: ; preds = %0 - %1 = load %Location*, %Location** %l.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 1 - %3 = load %Location*, %Location** %other.addr - %4 = getelementptr inbounds %Location, %Location* %3, i32 0, i32 2 - call void @"=.285"(%LineCol* %2, %LineCol* %4) - %5 = load %Location*, %Location** %l.addr - %6 = getelementptr inbounds %Location, %Location* %5, i32 0, i32 2 - %7 = load %Location*, %Location** %other.addr - %8 = getelementptr inbounds %Location, %Location* %7, i32 0, i32 2 - call void @"=.285"(%LineCol* %6, %LineCol* %8) + %1 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 1 + %2 = getelementptr inbounds %Location, %Location* %other.addr, i32 0, i32 2 + call void @"=.274"(%LineCol* %1, %LineCol* %2) + %3 = getelementptr inbounds %Location, %Location* %l, i32 0, i32 2 + %4 = getelementptr inbounds %Location, %Location* %other.addr, i32 0, i32 2 + call void @"=.274"(%LineCol* %3, %LineCol* %4) ret void } ; Function Attrs: inlinehint nounwind -define internal i1 @"<"(%Location* %lhs, %Location* %rhs) #4 { - %lhs.addr = alloca %Location* - store %Location* %lhs, %Location** %lhs.addr - %rhs.addr = alloca %Location* - store %Location* %rhs, %Location** %rhs.addr +define internal i1 @"<"(%Location %lhs, %Location %rhs) #4 { + %lhs.addr = alloca %Location + store %Location %lhs, %Location* %lhs.addr + %rhs.addr = alloca %Location + store %Location %rhs, %Location* %rhs.addr br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %Location*, %Location** %lhs.addr - %2 = getelementptr inbounds %Location, %Location* %1, i32 0, i32 1 - %3 = getelementptr inbounds %LineCol, %LineCol* %2, i32 0, i32 0 - %4 = load i32, i32* %3 - %5 = load %Location*, %Location** %rhs.addr - %6 = getelementptr inbounds %Location, %Location* %5, i32 0, i32 1 - %7 = getelementptr inbounds %LineCol, %LineCol* %6, i32 0, i32 0 - %8 = load i32, i32* %7 - %9 = icmp slt i32 %4, %8 - br i1 %9, label %if_then, label %if_end + %1 = getelementptr inbounds %Location, %Location* %lhs.addr, i32 0, i32 1 + %2 = getelementptr inbounds %LineCol, %LineCol* %1, i32 0, i32 0 + %3 = load i32, i32* %2 + %4 = getelementptr inbounds %Location, %Location* %rhs.addr, i32 0, i32 1 + %5 = getelementptr inbounds %LineCol, %LineCol* %4, i32 0, i32 0 + %6 = load i32, i32* %5 + %7 = icmp slt i32 %3, %6 + br i1 %7, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 true @@ -31779,16 +28245,14 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %10 = load %Location*, %Location** %lhs.addr - %11 = getelementptr inbounds %Location, %Location* %10, i32 0, i32 1 + %8 = getelementptr inbounds %Location, %Location* %lhs.addr, i32 0, i32 1 + %9 = getelementptr inbounds %LineCol, %LineCol* %8, i32 0, i32 0 + %10 = load i32, i32* %9 + %11 = getelementptr inbounds %Location, %Location* %rhs.addr, i32 0, i32 1 %12 = getelementptr inbounds %LineCol, %LineCol* %11, i32 0, i32 0 %13 = load i32, i32* %12 - %14 = load %Location*, %Location** %rhs.addr - %15 = getelementptr inbounds %Location, %Location* %14, i32 0, i32 1 - %16 = getelementptr inbounds %LineCol, %LineCol* %15, i32 0, i32 0 - %17 = load i32, i32* %16 - %18 = icmp sgt i32 %13, %17 - br i1 %18, label %if_then2, label %if_end3 + %14 = icmp sgt i32 %10, %13 + br i1 %14, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 ret i1 false @@ -31800,16 +28264,14 @@ dumy_block4: ; No predecessors! br label %if_end3 if_block5: ; preds = %if_end3 - %19 = load %Location*, %Location** %lhs.addr - %20 = getelementptr inbounds %Location, %Location* %19, i32 0, i32 1 - %21 = getelementptr inbounds %LineCol, %LineCol* %20, i32 0, i32 1 - %22 = load i32, i32* %21 - %23 = load %Location*, %Location** %rhs.addr - %24 = getelementptr inbounds %Location, %Location* %23, i32 0, i32 1 - %25 = getelementptr inbounds %LineCol, %LineCol* %24, i32 0, i32 1 - %26 = load i32, i32* %25 - %27 = icmp slt i32 %22, %26 - br i1 %27, label %if_then6, label %if_end7 + %15 = getelementptr inbounds %Location, %Location* %lhs.addr, i32 0, i32 1 + %16 = getelementptr inbounds %LineCol, %LineCol* %15, i32 0, i32 1 + %17 = load i32, i32* %16 + %18 = getelementptr inbounds %Location, %Location* %rhs.addr, i32 0, i32 1 + %19 = getelementptr inbounds %LineCol, %LineCol* %18, i32 0, i32 1 + %20 = load i32, i32* %19 + %21 = icmp slt i32 %17, %20 + br i1 %21, label %if_then6, label %if_end7 if_then6: ; preds = %if_block5 ret i1 true @@ -31821,16 +28283,14 @@ dumy_block8: ; No predecessors! br label %if_end7 if_block9: ; preds = %if_end7 - %28 = load %Location*, %Location** %lhs.addr - %29 = getelementptr inbounds %Location, %Location* %28, i32 0, i32 1 - %30 = getelementptr inbounds %LineCol, %LineCol* %29, i32 0, i32 1 - %31 = load i32, i32* %30 - %32 = load %Location*, %Location** %rhs.addr - %33 = getelementptr inbounds %Location, %Location* %32, i32 0, i32 1 - %34 = getelementptr inbounds %LineCol, %LineCol* %33, i32 0, i32 1 - %35 = load i32, i32* %34 - %36 = icmp sgt i32 %31, %35 - br i1 %36, label %if_then10, label %if_end11 + %22 = getelementptr inbounds %Location, %Location* %lhs.addr, i32 0, i32 1 + %23 = getelementptr inbounds %LineCol, %LineCol* %22, i32 0, i32 1 + %24 = load i32, i32* %23 + %25 = getelementptr inbounds %Location, %Location* %rhs.addr, i32 0, i32 1 + %26 = getelementptr inbounds %LineCol, %LineCol* %25, i32 0, i32 1 + %27 = load i32, i32* %26 + %28 = icmp sgt i32 %24, %27 + br i1 %28, label %if_then10, label %if_end11 if_then10: ; preds = %if_block9 ret i1 false @@ -31842,16 +28302,14 @@ dumy_block12: ; No predecessors! br label %if_end11 if_block13: ; preds = %if_end11 - %37 = load %Location*, %Location** %lhs.addr - %38 = getelementptr inbounds %Location, %Location* %37, i32 0, i32 2 - %39 = getelementptr inbounds %LineCol, %LineCol* %38, i32 0, i32 0 - %40 = load i32, i32* %39 - %41 = load %Location*, %Location** %rhs.addr - %42 = getelementptr inbounds %Location, %Location* %41, i32 0, i32 2 - %43 = getelementptr inbounds %LineCol, %LineCol* %42, i32 0, i32 0 - %44 = load i32, i32* %43 - %45 = icmp slt i32 %40, %44 - br i1 %45, label %if_then14, label %if_end15 + %29 = getelementptr inbounds %Location, %Location* %lhs.addr, i32 0, i32 2 + %30 = getelementptr inbounds %LineCol, %LineCol* %29, i32 0, i32 0 + %31 = load i32, i32* %30 + %32 = getelementptr inbounds %Location, %Location* %rhs.addr, i32 0, i32 2 + %33 = getelementptr inbounds %LineCol, %LineCol* %32, i32 0, i32 0 + %34 = load i32, i32* %33 + %35 = icmp slt i32 %31, %34 + br i1 %35, label %if_then14, label %if_end15 if_then14: ; preds = %if_block13 ret i1 true @@ -31863,56 +28321,50 @@ dumy_block16: ; No predecessors! br label %if_end15 if_block17: ; preds = %if_end15 - %46 = load %Location*, %Location** %lhs.addr - %47 = getelementptr inbounds %Location, %Location* %46, i32 0, i32 2 - %48 = getelementptr inbounds %LineCol, %LineCol* %47, i32 0, i32 0 - %49 = load i32, i32* %48 - %50 = load %Location*, %Location** %rhs.addr - %51 = getelementptr inbounds %Location, %Location* %50, i32 0, i32 2 - %52 = getelementptr inbounds %LineCol, %LineCol* %51, i32 0, i32 0 - %53 = load i32, i32* %52 - %54 = icmp sgt i32 %49, %53 - br i1 %54, label %if_then18, label %if_end19 + %36 = getelementptr inbounds %Location, %Location* %lhs.addr, i32 0, i32 2 + %37 = getelementptr inbounds %LineCol, %LineCol* %36, i32 0, i32 0 + %38 = load i32, i32* %37 + %39 = getelementptr inbounds %Location, %Location* %rhs.addr, i32 0, i32 2 + %40 = getelementptr inbounds %LineCol, %LineCol* %39, i32 0, i32 0 + %41 = load i32, i32* %40 + %42 = icmp sgt i32 %38, %41 + br i1 %42, label %if_then18, label %if_end19 if_then18: ; preds = %if_block17 ret i1 false if_end19: ; preds = %dumy_block20, %if_block17 - %55 = load %Location*, %Location** %lhs.addr - %56 = getelementptr inbounds %Location, %Location* %55, i32 0, i32 2 - %57 = getelementptr inbounds %LineCol, %LineCol* %56, i32 0, i32 1 - %58 = load i32, i32* %57 - %59 = load %Location*, %Location** %rhs.addr - %60 = getelementptr inbounds %Location, %Location* %59, i32 0, i32 2 - %61 = getelementptr inbounds %LineCol, %LineCol* %60, i32 0, i32 1 - %62 = load i32, i32* %61 - %63 = icmp slt i32 %58, %62 - ret i1 %63 + %43 = getelementptr inbounds %Location, %Location* %lhs.addr, i32 0, i32 2 + %44 = getelementptr inbounds %LineCol, %LineCol* %43, i32 0, i32 1 + %45 = load i32, i32* %44 + %46 = getelementptr inbounds %Location, %Location* %rhs.addr, i32 0, i32 2 + %47 = getelementptr inbounds %LineCol, %LineCol* %46, i32 0, i32 1 + %48 = load i32, i32* %47 + %49 = icmp slt i32 %45, %48 + ret i1 %49 dumy_block20: ; No predecessors! br label %if_end19 } ; Function Attrs: inlinehint nounwind -define internal i1 @"<.629"(%LineCol* %lhs, %LineCol* %rhs) #4 { - %lhs.addr = alloca %LineCol* - store %LineCol* %lhs, %LineCol** %lhs.addr - %rhs.addr = alloca %LineCol* - store %LineCol* %rhs, %LineCol** %rhs.addr +define internal i1 @"<.617"(%LineCol %lhs, %LineCol %rhs) #4 { + %lhs.addr = alloca %LineCol + store %LineCol %lhs, %LineCol* %lhs.addr + %rhs.addr = alloca %LineCol + store %LineCol %rhs, %LineCol* %rhs.addr br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %LineCol*, %LineCol** %lhs.addr - %2 = getelementptr inbounds %LineCol, %LineCol* %1, i32 0, i32 0 - %3 = load i32, i32* %2 - %4 = load %LineCol*, %LineCol** %rhs.addr - %5 = getelementptr inbounds %LineCol, %LineCol* %4, i32 0, i32 0 - %6 = load i32, i32* %5 - %7 = icmp slt i32 %3, %6 - br i1 %7, label %if_then, label %if_end + %1 = getelementptr inbounds %LineCol, %LineCol* %lhs.addr, i32 0, i32 0 + %2 = load i32, i32* %1 + %3 = getelementptr inbounds %LineCol, %LineCol* %rhs.addr, i32 0, i32 0 + %4 = load i32, i32* %3 + %5 = icmp slt i32 %2, %4 + br i1 %5, label %if_then, label %if_end if_then: ; preds = %if_block ret i1 true @@ -31924,60 +28376,52 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %8 = load %LineCol*, %LineCol** %lhs.addr - %9 = getelementptr inbounds %LineCol, %LineCol* %8, i32 0, i32 0 - %10 = load i32, i32* %9 - %11 = load %LineCol*, %LineCol** %rhs.addr - %12 = getelementptr inbounds %LineCol, %LineCol* %11, i32 0, i32 0 - %13 = load i32, i32* %12 - %14 = icmp sgt i32 %10, %13 - br i1 %14, label %if_then2, label %if_end3 + %6 = getelementptr inbounds %LineCol, %LineCol* %lhs.addr, i32 0, i32 0 + %7 = load i32, i32* %6 + %8 = getelementptr inbounds %LineCol, %LineCol* %rhs.addr, i32 0, i32 0 + %9 = load i32, i32* %8 + %10 = icmp sgt i32 %7, %9 + br i1 %10, label %if_then2, label %if_end3 if_then2: ; preds = %if_block1 ret i1 false if_end3: ; preds = %dumy_block4, %if_block1 - %15 = load %LineCol*, %LineCol** %lhs.addr - %16 = getelementptr inbounds %LineCol, %LineCol* %15, i32 0, i32 1 - %17 = load i32, i32* %16 - %18 = load %LineCol*, %LineCol** %rhs.addr - %19 = getelementptr inbounds %LineCol, %LineCol* %18, i32 0, i32 1 - %20 = load i32, i32* %19 - %21 = icmp slt i32 %17, %20 - ret i1 %21 + %11 = getelementptr inbounds %LineCol, %LineCol* %lhs.addr, i32 0, i32 1 + %12 = load i32, i32* %11 + %13 = getelementptr inbounds %LineCol, %LineCol* %rhs.addr, i32 0, i32 1 + %14 = load i32, i32* %13 + %15 = icmp slt i32 %12, %14 + ret i1 %15 dumy_block4: ; No predecessors! br label %if_end3 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.630(%String* %this, i64 %count, i8 %ch) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal void @ctor.618(%String* %this, i64 %count, i8 %ch) #4 { %count.addr = alloca i64 store i64 %count, i64* %count.addr %ch.addr = alloca i8 store i8 %ch, i8* %ch.addr + %tmp.this = alloca i8 br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = load i64, i64* %count.addr - call void @ctor.191(%String* %1, i64 %2) - %3 = load %String*, %String** %this.addr - %4 = getelementptr inbounds %String, %String* %3, i32 0, i32 0 - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %4 - %6 = call i8* @bytePtr(%"RawPtr[Char]" %5) - %7 = load i8, i8* %ch.addr - %8 = load i64, i64* %count.addr - call void @_spr_memset(i8* %6, i8 %7, i64 %8) + %1 = load i64, i64* %count.addr + call void @ctor.177(%String* %this, i64 %1) + %2 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %3 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %2) + %4 = load i8, i8* %ch.addr + store i8 %4, i8* %tmp.this + %5 = load i8, i8* %tmp.this + %6 = load i64, i64* %count.addr + call void bitcast (void (i8*, i8, i64)* @_spr_memset to void (%UntypedPtr, i8, i64)*)(%UntypedPtr %3, i8 %5, i64 %6) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.631(%String* %this, %"RawPtr[Char]" %_begin, %"RawPtr[Char]" %_end) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal void @ctor.619(%String* %this, %"RawPtr[Char]" %_begin, %"RawPtr[Char]" %_end) #4 { %_begin.addr = alloca %"RawPtr[Char]" store %"RawPtr[Char]" %_begin, %"RawPtr[Char]"* %_begin.addr %_end.addr = alloca %"RawPtr[Char]" @@ -31988,169 +28432,146 @@ define internal void @ctor.631(%String* %this, %"RawPtr[Char]" %_begin, %"RawPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]", %"RawPtr[Char]"* %_end.addr - %2 = load %"RawPtr[Char]", %"RawPtr[Char]"* %_begin.addr - %3 = call i64 @diff(%"RawPtr[Char]" %1, %"RawPtr[Char]" %2) - store i64 %3, i64* %size - %4 = load %String*, %String** %this.addr - %5 = load i64, i64* %size - store i64 %5, i64* %tmp.this - %6 = load i64, i64* %tmp.this - call void @ctor.191(%String* %4, i64 %6) - %7 = load %String*, %String** %this.addr - %8 = getelementptr inbounds %String, %String* %7, i32 0, i32 0 - %9 = load %"RawPtr[Char]", %"RawPtr[Char]"* %8 - %10 = call i8* @bytePtr(%"RawPtr[Char]" %9) - %11 = load %"RawPtr[Char]", %"RawPtr[Char]"* %_begin.addr - %12 = call i8* @bytePtr(%"RawPtr[Char]" %11) - %13 = load i64, i64* %size - store i64 %13, i64* %tmp.this1 - %14 = load i64, i64* %tmp.this1 - call void @_spr_memcpy(i8* %10, i8* %12, i64 %14) + %1 = load %"RawPtr[Char]", %"RawPtr[Char]"* %_begin.addr + %2 = call i64 @diff(%"RawPtr[Char]"* %_end.addr, %"RawPtr[Char]" %1) + store i64 %2, i64* %size + %3 = load i64, i64* %size + store i64 %3, i64* %tmp.this + %4 = load i64, i64* %tmp.this + call void @ctor.177(%String* %this, i64 %4) + %5 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %6 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %5) + %7 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %_begin.addr) + %8 = load i64, i64* %size + store i64 %8, i64* %tmp.this1 + %9 = load i64, i64* %tmp.this1 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %6, %UntypedPtr %7, i64 %9) ret void } ; Function Attrs: inlinehint nounwind define internal i1 @"!="(%String* %this, %String* %other) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %other.addr = alloca %String* - store %String* %other, %String** %other.addr br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = load %String*, %String** %other.addr - %3 = call i1 @"==.343"(%String* %1, %String* %2) - %4 = xor i1 true, %3 - ret i1 %4 + %1 = call i1 @"==.331"(%String* %this, %String* %other) + %2 = xor i1 true, %1 + ret i1 %2 } ; Function Attrs: inlinehint nounwind -define internal i8* @at.632(%String* %this, i64 %index) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal i8* @at.620(%String* %this, i64 %index) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = load i64, i64* %index.addr - store i64 %4, i64* %tmp.this - %5 = load i64, i64* %tmp.this - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %3, i64 %5) - %6 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %7 = call i8* @value(%"RawPtr[Char]" %6) - ret i8* %7 + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %2 = load i64, i64* %index.addr + store i64 %2, i64* %tmp.this + %3 = load i64, i64* %tmp.this + %4 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %1, i64 %3) + store %"RawPtr[Char]" %4, %"RawPtr[Char]"* %"$tmpForRef" + %5 = call i8* @value(%"RawPtr[Char]"* %"$tmpForRef") + ret i8* %5 } ; Function Attrs: inlinehint nounwind -define internal i8* @front.633(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal i8* @front.621(%String* %this) #4 { br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = call i8* @value(%"RawPtr[Char]" %3) - ret i8* %4 + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %2 = call i8* @value(%"RawPtr[Char]"* %1) + ret i8* %2 } ; Function Attrs: inlinehint nounwind -define internal i8* @back.634(%String* %this) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr - %"$tmpC" = alloca %"RawPtr[Char]" +define internal i8* @back.622(%String* %this) #4 { + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 1 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 store i64 -1, i64* %tmp.this - %4 = load i64, i64* %tmp.this - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %3, i64 %4) - %5 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %6 = call i8* @value(%"RawPtr[Char]" %5) - ret i8* %6 + %2 = load i64, i64* %tmp.this + %3 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %1, i64 %2) + store %"RawPtr[Char]" %3, %"RawPtr[Char]"* %"$tmpForRef" + %4 = call i8* @value(%"RawPtr[Char]"* %"$tmpForRef") + ret i8* %4 } ; Function Attrs: inlinehint nounwind -define internal %StringRef @subrange(%String* %this, i64 %index, i64 %num) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal %StringRef @subrange.623(%String* %this, i64 %index, i64 %num) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr %num.addr = alloca i64 store i64 %num, i64* %num.addr %tmp.this = alloca %StringRef - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this1 = alloca i64 - %"$tmpC2" = alloca %"RawPtr[Char]" + %"$tmpForRef2" = alloca %"RawPtr[Char]" %tmp.this3 = alloca i64 br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = getelementptr inbounds %String, %String* %1, i32 0, i32 0 - %3 = load %"RawPtr[Char]", %"RawPtr[Char]"* %2 - %4 = load i64, i64* %index.addr - store i64 %4, i64* %tmp.this1 - %5 = load i64, i64* %tmp.this1 - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %3, i64 %5) - %6 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %7 = call i8* @bytePtr(%"RawPtr[Char]" %6) - %8 = load %String*, %String** %this.addr - %9 = getelementptr inbounds %String, %String* %8, i32 0, i32 0 - %10 = load %"RawPtr[Char]", %"RawPtr[Char]"* %9 - %11 = load i64, i64* %index.addr - %12 = load i64, i64* %num.addr - %13 = add i64 %11, %12 - store i64 %13, i64* %tmp.this3 - %14 = load i64, i64* %tmp.this3 - call void @advance(%"RawPtr[Char]"* %"$tmpC2", %"RawPtr[Char]" %10, i64 %14) - %15 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC2" - %16 = call i8* @bytePtr(%"RawPtr[Char]" %15) - call void @ctor.57(%StringRef* %tmp.this, i8* %7, i8* %16) - %17 = load %StringRef, %StringRef* %tmp.this - ret %StringRef %17 + %1 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %2 = load i64, i64* %index.addr + store i64 %2, i64* %tmp.this1 + %3 = load i64, i64* %tmp.this1 + %4 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %1, i64 %3) + store %"RawPtr[Char]" %4, %"RawPtr[Char]"* %"$tmpForRef" + %5 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %"$tmpForRef") + %6 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %7 = load i64, i64* %index.addr + %8 = load i64, i64* %num.addr + %9 = add i64 %7, %8 + store i64 %9, i64* %tmp.this3 + %10 = load i64, i64* %tmp.this3 + %11 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %6, i64 %10) + store %"RawPtr[Char]" %11, %"RawPtr[Char]"* %"$tmpForRef2" + %12 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %"$tmpForRef2") + call void @ctor.60(%StringRef* %tmp.this, %UntypedPtr %5, %UntypedPtr %12) + %13 = load %StringRef, %StringRef* %tmp.this + %14 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %14) + ret %StringRef %13 + +dumy_block: ; No predecessors! + %15 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %15) + unreachable } ; Function Attrs: inlinehint nounwind define internal void @resize(%String* %this, i64 %n) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr %n.addr = alloca i64 store i64 %n, i64* %n.addr %oldSize = alloca i64 %newEnd = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" %tmp.this = alloca i64 - %"$tmpC" = alloca %"RawPtr[Char]" - %tmp.this4 = alloca i64 - %newEnd5 = alloca %"RawPtr[Char]" - %tmp.this6 = alloca i64 - %"$tmpC11" = alloca %"RawPtr[Char]" + %"$tmpForRef4" = alloca %"RawPtr[Char]" + %tmp.this5 = alloca i64 + %newEnd6 = alloca %"RawPtr[Char]" + %"$tmpForRef7" = alloca %"RawPtr[Char]" + %tmp.this8 = alloca i64 + %"$tmpForRef13" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = call i64 @size.190(%String* %1) - store i64 %2, i64* %oldSize + %1 = call i64 @size.176(%String* %this) + store i64 %1, i64* %oldSize br label %if_block if_block: ; preds = %code - %3 = load i64, i64* %n.addr - %4 = load i64, i64* %oldSize - %5 = icmp eq i64 %3, %4 - br i1 %5, label %if_then, label %if_end + %2 = load i64, i64* %n.addr + %3 = load i64, i64* %oldSize + %4 = icmp eq i64 %2, %3 + br i1 %4, label %if_then, label %if_end if_then: ; preds = %if_block ret void @@ -32162,59 +28583,53 @@ dumy_block: ; No predecessors! br label %if_end if_block1: ; preds = %if_end - %6 = load i64, i64* %n.addr - %7 = load i64, i64* %oldSize - %8 = icmp slt i64 %6, %7 - br i1 %8, label %if_then2, label %if_else + %5 = load i64, i64* %n.addr + %6 = load i64, i64* %oldSize + %7 = icmp slt i64 %5, %6 + br i1 %7, label %if_then2, label %if_else if_then2: ; preds = %if_block1 - %9 = load %String*, %String** %this.addr - %10 = getelementptr inbounds %String, %String* %9, i32 0, i32 0 - %11 = load %"RawPtr[Char]", %"RawPtr[Char]"* %10 - %12 = load i64, i64* %n.addr - store i64 %12, i64* %tmp.this - %13 = load i64, i64* %tmp.this - call void @advance(%"RawPtr[Char]"* %newEnd, %"RawPtr[Char]" %11, i64 %13) + %8 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %9 = load i64, i64* %n.addr + store i64 %9, i64* %tmp.this + %10 = load i64, i64* %tmp.this + %11 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %8, i64 %10) + store %"RawPtr[Char]" %11, %"RawPtr[Char]"* %"$tmpForRef" + call void @ctor.178(%"RawPtr[Char]"* %newEnd, %"RawPtr[Char]"* %"$tmpForRef") br label %while_block if_else: ; preds = %if_block1 - %14 = load %String*, %String** %this.addr - %15 = load i64, i64* %n.addr - call void @reserve(%String* %14, i64 %15) - %16 = load %String*, %String** %this.addr - %17 = getelementptr inbounds %String, %String* %16, i32 0, i32 0 - %18 = load %"RawPtr[Char]", %"RawPtr[Char]"* %17 - %19 = load i64, i64* %n.addr - store i64 %19, i64* %tmp.this6 - %20 = load i64, i64* %tmp.this6 - call void @advance(%"RawPtr[Char]"* %newEnd5, %"RawPtr[Char]" %18, i64 %20) - br label %while_block7 + %12 = load i64, i64* %n.addr + call void @reserve(%String* %this, i64 %12) + %13 = getelementptr inbounds %String, %String* %this, i32 0, i32 0 + %14 = load i64, i64* %n.addr + store i64 %14, i64* %tmp.this8 + %15 = load i64, i64* %tmp.this8 + %16 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %13, i64 %15) + store %"RawPtr[Char]" %16, %"RawPtr[Char]"* %"$tmpForRef7" + call void @ctor.178(%"RawPtr[Char]"* %newEnd6, %"RawPtr[Char]"* %"$tmpForRef7") + br label %while_block9 -if_end3: ; preds = %while_end10, %while_end +if_end3: ; preds = %while_end12, %while_end ret void while_block: ; preds = %while_step, %if_then2 - %21 = load %String*, %String** %this.addr - %22 = getelementptr inbounds %String, %String* %21, i32 0, i32 1 - %23 = call i1 @"==.268"(%"RawPtr[Char]"* %22, %"RawPtr[Char]"* %newEnd) - %24 = xor i1 true, %23 - br i1 %24, label %while_body, label %while_end + %17 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %18 = call i1 @"==.257"(%"RawPtr[Char]"* %17, %"RawPtr[Char]"* %newEnd) + %19 = xor i1 true, %18 + br i1 %19, label %while_body, label %while_end while_body: ; preds = %while_block - %25 = load %String*, %String** %this.addr - %26 = getelementptr inbounds %String, %String* %25, i32 0, i32 1 - %27 = load %String*, %String** %this.addr - %28 = getelementptr inbounds %String, %String* %27, i32 0, i32 1 - %29 = load %"RawPtr[Char]", %"RawPtr[Char]"* %28 - store i64 -1, i64* %tmp.this4 - %30 = load i64, i64* %tmp.this4 - call void @advance(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %29, i64 %30) - call void @"=.200"(%"RawPtr[Char]"* %26, %"RawPtr[Char]"* %"$tmpC") - %31 = load %String*, %String** %this.addr - %32 = getelementptr inbounds %String, %String* %31, i32 0, i32 1 - %33 = load %"RawPtr[Char]", %"RawPtr[Char]"* %32 - %34 = call i8* @value(%"RawPtr[Char]" %33) - %35 = load i8, i8* %34 + %20 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %21 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + store i64 -1, i64* %tmp.this5 + %22 = load i64, i64* %tmp.this5 + %23 = call %"RawPtr[Char]" @advance(%"RawPtr[Char]"* %21, i64 %22) + store %"RawPtr[Char]" %23, %"RawPtr[Char]"* %"$tmpForRef4" + call void @"=.186"(%"RawPtr[Char]"* %20, %"RawPtr[Char]"* %"$tmpForRef4") + %24 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %25 = call i8* @value(%"RawPtr[Char]"* %24) + %26 = load i8, i8* %25 br label %while_step while_step: ; preds = %while_body @@ -32223,84 +28638,76 @@ while_step: ; preds = %while_body while_end: ; preds = %while_block br label %if_end3 -while_block7: ; preds = %while_step9, %if_else - %36 = load %String*, %String** %this.addr - %37 = getelementptr inbounds %String, %String* %36, i32 0, i32 1 - %38 = call i1 @"==.268"(%"RawPtr[Char]"* %37, %"RawPtr[Char]"* %newEnd5) - %39 = xor i1 true, %38 - br i1 %39, label %while_body8, label %while_end10 - -while_body8: ; preds = %while_block7 - %40 = load %String*, %String** %this.addr - %41 = getelementptr inbounds %String, %String* %40, i32 0, i32 1 - %42 = load %"RawPtr[Char]", %"RawPtr[Char]"* %41 - %43 = call i8* @value(%"RawPtr[Char]" %42) - store i8 0, i8* %43 - %44 = load %String*, %String** %this.addr - %45 = getelementptr inbounds %String, %String* %44, i32 0, i32 1 - %46 = load %String*, %String** %this.addr - %47 = getelementptr inbounds %String, %String* %46, i32 0, i32 1 - %48 = load %"RawPtr[Char]", %"RawPtr[Char]"* %47 - call void @advance.269(%"RawPtr[Char]"* %"$tmpC11", %"RawPtr[Char]" %48) - call void @"=.200"(%"RawPtr[Char]"* %45, %"RawPtr[Char]"* %"$tmpC11") - br label %while_step9 - -while_step9: ; preds = %while_body8 - br label %while_block7 - -while_end10: ; preds = %while_block7 +while_block9: ; preds = %while_step11, %if_else + %27 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %28 = call i1 @"==.257"(%"RawPtr[Char]"* %27, %"RawPtr[Char]"* %newEnd6) + %29 = xor i1 true, %28 + br i1 %29, label %while_body10, label %while_end12 + +while_body10: ; preds = %while_block9 + %30 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %31 = call i8* @value(%"RawPtr[Char]"* %30) + store i8 0, i8* %31 + %32 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %33 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %34 = call %"RawPtr[Char]" @advance.258(%"RawPtr[Char]"* %33) + store %"RawPtr[Char]" %34, %"RawPtr[Char]"* %"$tmpForRef13" + call void @"=.186"(%"RawPtr[Char]"* %32, %"RawPtr[Char]"* %"$tmpForRef13") + br label %while_step11 + +while_step11: ; preds = %while_body10 + br label %while_block9 + +while_end12: ; preds = %while_block9 br label %if_end3 } ; Function Attrs: inlinehint nounwind define internal void @insertAfter(%String* %this, i8 %value, %StringRef %pos) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr %value.addr = alloca i8 store i8 %value, i8* %value.addr %pos.addr = alloca %StringRef store %StringRef %pos, %StringRef* %pos.addr %tmp.this = alloca %StringRef - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = load i8, i8* %value.addr - %3 = load %StringRef, %StringRef* %pos.addr - call void @_backPtr(%"RawPtr[Char]"* %"$tmpC", %StringRef %3) - %4 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %5 = call i8* @bytePtr(%"RawPtr[Char]" %4) - %6 = load %String*, %String** %this.addr - %7 = getelementptr inbounds %String, %String* %6, i32 0, i32 1 - %8 = load %"RawPtr[Char]", %"RawPtr[Char]"* %7 - %9 = call i8* @bytePtr(%"RawPtr[Char]" %8) - call void @ctor.57(%StringRef* %tmp.this, i8* %5, i8* %9) - %10 = load %StringRef, %StringRef* %tmp.this - call void @insertBefore.482(%String* %1, i8 %2, %StringRef %10) + %1 = load i8, i8* %value.addr + %2 = load %StringRef, %StringRef* %pos.addr + %3 = call %"RawPtr[Char]" @_backPtr(%StringRef %2) + store %"RawPtr[Char]" %3, %"RawPtr[Char]"* %"$tmpForRef" + %4 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %"$tmpForRef") + %5 = getelementptr inbounds %String, %String* %this, i32 0, i32 1 + %6 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %5) + call void @ctor.60(%StringRef* %tmp.this, %UntypedPtr %4, %UntypedPtr %6) + %7 = load %StringRef, %StringRef* %tmp.this + call void @insertBefore.470(%String* %this, i8 %1, %StringRef %7) + %8 = load %StringRef, %StringRef* %tmp.this + call void @dtor.61(%StringRef %8) ret void } ; Function Attrs: inlinehint nounwind -define internal void @_backPtr(%"RawPtr[Char]"* sret %_result, %StringRef %s) #4 { - %_result.addr = alloca %"RawPtr[Char]"* - store %"RawPtr[Char]"* %_result, %"RawPtr[Char]"** %_result.addr +define internal %"RawPtr[Char]" @_backPtr(%StringRef %s) #4 { %s.addr = alloca %StringRef store %StringRef %s, %StringRef* %s.addr + %tmp.this = alloca %"RawPtr[Char]" + %tmp.this1 = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %"RawPtr[Char]"*, %"RawPtr[Char]"** %_result.addr - %2 = getelementptr inbounds %StringRef, %StringRef* %s.addr, i32 0, i32 1 - %3 = load i8*, i8** %2 - call void @ctor.194(%"RawPtr[Char]"* %1, i8* %3) - ret void + %1 = getelementptr inbounds %StringRef, %StringRef* %s.addr, i32 0, i32 1 + %2 = load %UntypedPtr, %UntypedPtr* %1 + call void @ctor.55(%UntypedPtr* %tmp.this1, %UntypedPtr %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + call void @ctor.180(%"RawPtr[Char]"* %tmp.this, %UntypedPtr %3) + %4 = load %"RawPtr[Char]", %"RawPtr[Char]"* %tmp.this + ret %"RawPtr[Char]" %4 } ; Function Attrs: inlinehint nounwind -define internal void @remove.635(%String* %this, i64 %index) #4 { - %this.addr = alloca %String* - store %String* %this, %String** %this.addr +define internal void @remove.624(%String* %this, i64 %index) #4 { %index.addr = alloca i64 store i64 %index, i64* %index.addr %r = alloca %StringRef @@ -32308,164 +28715,128 @@ define internal void @remove.635(%String* %this, i64 %index) #4 { br label %code code: ; preds = %0 - %1 = load %String*, %String** %this.addr - %2 = call %StringRef @all.485(%String* %1) - call void @ctor.56(%StringRef* %r, %StringRef %2) - %3 = load i64, i64* %index.addr - call void @popFront.60(%StringRef* %r, i64 %3) - %4 = load %String*, %String** %this.addr - %5 = call i64 @size.190(%String* %4) - %6 = load i64, i64* %index.addr - %7 = call i64 @_SizeType_opMinus(i64 %5, i64 %6) + %1 = call %StringRef @all.473(%String* %this) + call void @ctor.59(%StringRef* %r, %StringRef %1) + %2 = load i64, i64* %index.addr + call void @popFront.64(%StringRef* %r, i64 %2) + %3 = call i64 @size.176(%String* %this) + %4 = load i64, i64* %index.addr + %5 = call i64 @_SizeType_opMinus(i64 %3, i64 %4) store i64 1, i64* %tmp.this - %8 = load i64, i64* %tmp.this - %9 = call i64 @_SizeType_opMinus(i64 %7, i64 %8) - call void @popBack.61(%StringRef* %r, i64 %9) - %10 = load %String*, %String** %this.addr - %11 = load %StringRef, %StringRef* %r - call void @remove(%String* %10, %StringRef %11) - ret void -} - -; Function Attrs: inlinehint nounwind -define internal void @"+.636"(%String* sret %_result, %String %x, %String %y) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %x.addr = alloca %String - store %String %x, %String* %x.addr - %y.addr = alloca %String - store %String %y, %String* %y.addr - %sz1 = alloca i64 - %sz2 = alloca i64 - %res = alloca %String - %"$tmpC" = alloca %"RawPtr[Char]" - br label %code - -code: ; preds = %0 - %1 = call i64 @size.190(%String* %x.addr) - store i64 %1, i64* %sz1 - %2 = call i64 @size.190(%String* %y.addr) - store i64 %2, i64* %sz2 - %3 = load i64, i64* %sz1 - %4 = load i64, i64* %sz2 - %5 = add i64 %3, %4 - call void @ctor.191(%String* %res, i64 %5) - %6 = getelementptr inbounds %String, %String* %res, i32 0, i32 0 - %7 = load %"RawPtr[Char]", %"RawPtr[Char]"* %6 - %8 = call i8* @bytePtr(%"RawPtr[Char]" %7) - %9 = getelementptr inbounds %String, %String* %x.addr, i32 0, i32 0 - %10 = load %"RawPtr[Char]", %"RawPtr[Char]"* %9 - %11 = call i8* @bytePtr(%"RawPtr[Char]" %10) - %12 = load i64, i64* %sz1 - call void @_spr_memcpy(i8* %8, i8* %11, i64 %12) - %13 = getelementptr inbounds %String, %String* %res, i32 0, i32 0 - %14 = load %"RawPtr[Char]", %"RawPtr[Char]"* %13 - %15 = load i64, i64* %sz1 - call void @advance.201(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %14, i64 %15) - %16 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %17 = call i8* @bytePtr(%"RawPtr[Char]" %16) - %18 = getelementptr inbounds %String, %String* %y.addr, i32 0, i32 0 - %19 = load %"RawPtr[Char]", %"RawPtr[Char]"* %18 - %20 = call i8* @bytePtr(%"RawPtr[Char]" %19) - %21 = load i64, i64* %sz2 - call void @_spr_memcpy(i8* %17, i8* %20, i64 %21) - %22 = load %String*, %String** %_result.addr - call void @ctor.189(%String* %22, %String* %res) - call void @dtor.261(%String* %res) - ret void - -dumy_block: ; No predecessors! - call void @dtor.261(%String* %res) + %6 = load i64, i64* %tmp.this + %7 = call i64 @_SizeType_opMinus(i64 %5, i64 %6) + call void @popBack.65(%StringRef* %r, i64 %7) + %8 = load %StringRef, %StringRef* %r + call void @remove(%String* %this, %StringRef %8) + %9 = load %StringRef, %StringRef* %r + call void @dtor.61(%StringRef %9) ret void } ; Function Attrs: inlinehint nounwind -define internal void @"+.637"(%String* sret %_result, %String %x, %StringRef %y) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %x.addr = alloca %String - store %String %x, %String* %x.addr - %y.addr = alloca %StringRef - store %StringRef %y, %StringRef* %y.addr +define internal void @"+.625"(%String* sret %_result, %String* %x, %String* %y) #4 { %sz1 = alloca i64 %sz2 = alloca i64 %res = alloca %String - %"$tmpC" = alloca %"RawPtr[Char]" + %"$tmpForRef" = alloca %"RawPtr[Char]" br label %code code: ; preds = %0 - %1 = call i64 @size.190(%String* %x.addr) + %1 = call i64 @size.176(%String* %x) store i64 %1, i64* %sz1 - %2 = call i64 @size(%StringRef* %y.addr) + %2 = call i64 @size.176(%String* %y) store i64 %2, i64* %sz2 %3 = load i64, i64* %sz1 %4 = load i64, i64* %sz2 %5 = add i64 %3, %4 - call void @ctor.191(%String* %res, i64 %5) + call void @ctor.177(%String* %res, i64 %5) %6 = getelementptr inbounds %String, %String* %res, i32 0, i32 0 - %7 = load %"RawPtr[Char]", %"RawPtr[Char]"* %6 - %8 = call i8* @bytePtr(%"RawPtr[Char]" %7) - %9 = getelementptr inbounds %String, %String* %x.addr, i32 0, i32 0 - %10 = load %"RawPtr[Char]", %"RawPtr[Char]"* %9 - %11 = call i8* @bytePtr(%"RawPtr[Char]" %10) + %7 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %6) + %8 = getelementptr inbounds %String, %String* %x, i32 0, i32 0 + %9 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %8) + %10 = load i64, i64* %sz1 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %7, %UntypedPtr %9, i64 %10) + %11 = getelementptr inbounds %String, %String* %res, i32 0, i32 0 %12 = load i64, i64* %sz1 - call void @_spr_memcpy(i8* %8, i8* %11, i64 %12) - %13 = getelementptr inbounds %String, %String* %res, i32 0, i32 0 - %14 = load %"RawPtr[Char]", %"RawPtr[Char]"* %13 - %15 = load i64, i64* %sz1 - call void @advance.201(%"RawPtr[Char]"* %"$tmpC", %"RawPtr[Char]" %14, i64 %15) - %16 = load %"RawPtr[Char]", %"RawPtr[Char]"* %"$tmpC" - %17 = call i8* @bytePtr(%"RawPtr[Char]" %16) - %18 = getelementptr inbounds %StringRef, %StringRef* %y.addr, i32 0, i32 0 - %19 = load i8*, i8** %18 - %20 = load i64, i64* %sz2 - call void @_spr_memcpy(i8* %17, i8* %19, i64 %20) - %21 = load %String*, %String** %_result.addr - call void @ctor.189(%String* %21, %String* %res) - call void @dtor.261(%String* %res) + %13 = call %"RawPtr[Char]" @advance.187(%"RawPtr[Char]"* %11, i64 %12) + store %"RawPtr[Char]" %13, %"RawPtr[Char]"* %"$tmpForRef" + %14 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %"$tmpForRef") + %15 = getelementptr inbounds %String, %String* %y, i32 0, i32 0 + %16 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %15) + %17 = load i64, i64* %sz2 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %14, %UntypedPtr %16, i64 %17) + call void @ctor.175(%String* %_result, %String* %res) + call void @dtor.250(%String* %res) ret void dumy_block: ; No predecessors! - call void @dtor.261(%String* %res) + call void @dtor.250(%String* %res) ret void } -; Function Attrs: alwaysinline nounwind -define internal void @ctor.638(%StringOutputStream* %this, %StringOutputStream* %other) #3 { - %this.addr = alloca %StringOutputStream* - store %StringOutputStream* %this, %StringOutputStream** %this.addr - %other.addr = alloca %StringOutputStream* - store %StringOutputStream* %other, %StringOutputStream** %other.addr +; Function Attrs: inlinehint nounwind +define internal void @"+.626"(%String* sret %_result, %String* %x, %StringRef %y) #4 { + %y.addr = alloca %StringRef + store %StringRef %y, %StringRef* %y.addr + %sz1 = alloca i64 + %sz2 = alloca i64 + %res = alloca %String + %"$tmpForRef" = alloca %"RawPtr[Char]" + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %this.addr - %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 - %3 = load %StringOutputStream*, %StringOutputStream** %other.addr - %4 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %3, i32 0, i32 0 - call void @ctor.189(%String* %2, %String* %4) + %1 = call i64 @size.176(%String* %x) + store i64 %1, i64* %sz1 + %2 = load %StringRef, %StringRef* %y.addr + %3 = call i64 @size(%StringRef %2) + store i64 %3, i64* %sz2 + %4 = load i64, i64* %sz1 + %5 = load i64, i64* %sz2 + %6 = add i64 %4, %5 + call void @ctor.177(%String* %res, i64 %6) + %7 = getelementptr inbounds %String, %String* %res, i32 0, i32 0 + %8 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %7) + %9 = getelementptr inbounds %String, %String* %x, i32 0, i32 0 + %10 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %9) + %11 = load i64, i64* %sz1 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %8, %UntypedPtr %10, i64 %11) + %12 = getelementptr inbounds %String, %String* %res, i32 0, i32 0 + %13 = load i64, i64* %sz1 + %14 = call %"RawPtr[Char]" @advance.187(%"RawPtr[Char]"* %12, i64 %13) + store %"RawPtr[Char]" %14, %"RawPtr[Char]"* %"$tmpForRef" + %15 = call %UntypedPtr @untypedPtr(%"RawPtr[Char]"* %"$tmpForRef") + %16 = getelementptr inbounds %StringRef, %StringRef* %y.addr, i32 0, i32 0 + %17 = load %UntypedPtr, %UntypedPtr* %16 + call void @ctor.55(%UntypedPtr* %tmp.this, %UntypedPtr %17) + %18 = load %UntypedPtr, %UntypedPtr* %tmp.this + %19 = load i64, i64* %sz2 + call void bitcast (void (i8*, i8*, i64)* @_spr_memcpy to void (%UntypedPtr, %UntypedPtr, i64)*)(%UntypedPtr %15, %UntypedPtr %18, i64 %19) + call void @ctor.175(%String* %_result, %String* %res) + call void @dtor.250(%String* %res) + ret void + +dumy_block: ; No predecessors! + call void @dtor.250(%String* %res) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.639"(%StringOutputStream* %this, %StringOutputStream* %other) #3 { - %this.addr = alloca %StringOutputStream* - store %StringOutputStream* %this, %StringOutputStream** %this.addr +define internal void @"=.627"(%StringOutputStream* %this, %StringOutputStream* %other) #3 { %other.addr = alloca %StringOutputStream* store %StringOutputStream* %other, %StringOutputStream** %other.addr br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %this.addr - %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 - %3 = load %StringOutputStream*, %StringOutputStream** %other.addr - %4 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %3, i32 0, i32 0 - %5 = call %String* @"=.290"(%String* %2, %String* %4) + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %this, i32 0, i32 0 + %2 = load %StringOutputStream*, %StringOutputStream** %other.addr + %3 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %2, i32 0, i32 0 + %4 = call %String* @"=.278"(%String* %1, %String* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.640"(%StringOutputStream* %this, %StringOutputStream* %other) #3 { +define internal i1 @"==.628"(%StringOutputStream* %this, %StringOutputStream* %other) #3 { %this.addr = alloca %StringOutputStream* store %StringOutputStream* %this, %StringOutputStream** %this.addr %other.addr = alloca %StringOutputStream* @@ -32477,105 +28848,69 @@ code: ; preds = %0 %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 %3 = load %StringOutputStream*, %StringOutputStream** %other.addr %4 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %3, i32 0, i32 0 - %5 = call i1 @"==.343"(%String* %2, %String* %4) + %5 = call i1 @"==.331"(%String* %2, %String* %4) ret i1 %5 } ; Function Attrs: alwaysinline nounwind -define internal void @"<<<.641"(%StringOutputStream* %this, %String* %s) #3 { - %this.addr = alloca %StringOutputStream* - store %StringOutputStream* %this, %StringOutputStream** %this.addr - %s.addr = alloca %String* - store %String* %s, %String** %s.addr +define internal void @"<<<.629"(%StringOutputStream* %this, %String* %s) #3 { + %"$tmpForRef" = alloca %StringRef br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %this.addr - %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 - %3 = load %String*, %String** %s.addr - %4 = call %StringRef @all.485(%String* %3) - call void @append(%String* %2, %StringRef %4) + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %this, i32 0, i32 0 + %2 = call %StringRef @all.473(%String* %s) + store %StringRef %2, %StringRef* %"$tmpForRef" + call void @append(%String* %1, %StringRef* %"$tmpForRef") ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"<<<.642"(%StringOutputStream* %this, double %x) #3 { - %this.addr = alloca %StringOutputStream* - store %StringOutputStream* %this, %StringOutputStream** %this.addr +define internal void @"<<<.630"(%StringOutputStream* %this, double %x) #3 { %x.addr = alloca double store double %x, double* %x.addr + %"$tmpForRef" = alloca %StringRef %"$tmpC" = alloca %String %tmp.this = alloca i64 br label %code code: ; preds = %0 - %1 = load %StringOutputStream*, %StringOutputStream** %this.addr - %2 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %1, i32 0, i32 0 - %3 = load double, double* %x.addr - %4 = fptoui double %3 to i64 - store i64 %4, i64* %tmp.this - %5 = load i64, i64* %tmp.this - call void @ulongToString(%String* %"$tmpC", i64 %5) - %6 = call %StringRef @all.485(%String* %"$tmpC") - call void @append(%String* %2, %StringRef %6) - call void @dtor.261(%String* %"$tmpC") + %1 = getelementptr inbounds %StringOutputStream, %StringOutputStream* %this, i32 0, i32 0 + %2 = load double, double* %x.addr + %3 = fptoui double %2 to i64 + store i64 %3, i64* %tmp.this + %4 = load i64, i64* %tmp.this + call void @ulongToString(%String* %"$tmpC", i64 %4) + %5 = call %StringRef @all.473(%String* %"$tmpC") + store %StringRef %5, %StringRef* %"$tmpForRef" + call void @append(%String* %1, %StringRef* %"$tmpForRef") + call void @dtor.250(%String* %"$tmpC") ret void } ; Function Attrs: inlinehint nounwind -define internal void @toString.643(%String* sret %_result) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - br label %code - -code: ; preds = %0 - %1 = load %String*, %String** %_result.addr - call void @ctor.137(%String* %1) - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.644(%"ContiguousMemoryRange[LocString]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[LocString]"* - store %"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"** %this.addr +define internal void @toString.631(%String* sret %_result) #4 { br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %1, i32 0, i32 0 - call void @ctor.561(%"RawPtr[LocString]"* %2) - %3 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %3, i32 0, i32 1 - call void @ctor.561(%"RawPtr[LocString]"* %4) + call void @ctor.124(%String* %_result) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.645(%"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"* %other) #3 { - %this.addr = alloca %"ContiguousMemoryRange[LocString]"* - store %"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"** %this.addr - %other.addr = alloca %"ContiguousMemoryRange[LocString]"* - store %"ContiguousMemoryRange[LocString]"* %other, %"ContiguousMemoryRange[LocString]"** %other.addr +define internal void @ctor.632(%"ContiguousMemoryRange[LocString]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %other.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %3, i32 0, i32 0 - call void @ctor.585(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %4) - %5 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %this.addr - %6 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %5, i32 0, i32 1 - %7 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %other.addr - %8 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %7, i32 0, i32 1 - call void @ctor.585(%"RawPtr[LocString]"* %6, %"RawPtr[LocString]"* %8) + %1 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 0 + call void @ctor.551(%"RawPtr[LocString]"* %1) + %2 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 1 + call void @ctor.551(%"RawPtr[LocString]"* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.646(%"ContiguousMemoryRange[LocString]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[LocString]"* - store %"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"** %this.addr +define internal void @dtor.633(%"ContiguousMemoryRange[LocString]"* %this) #3 { br label %code code: ; preds = %0 @@ -32583,29 +28918,25 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.647"(%"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"* %other) #3 { - %this.addr = alloca %"ContiguousMemoryRange[LocString]"* - store %"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"** %this.addr +define internal void @"=.634"(%"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"* %other) #3 { %other.addr = alloca %"ContiguousMemoryRange[LocString]"* store %"ContiguousMemoryRange[LocString]"* %other, %"ContiguousMemoryRange[LocString]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %other.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %3, i32 0, i32 0 - call void @"=.571"(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %4) - %5 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %this.addr + %1 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 0 + %2 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %other.addr + %3 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %2, i32 0, i32 0 + call void @"=.562"(%"RawPtr[LocString]"* %1, %"RawPtr[LocString]"* %3) + %4 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %this, i32 0, i32 1 + %5 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %other.addr %6 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %5, i32 0, i32 1 - %7 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %other.addr - %8 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %7, i32 0, i32 1 - call void @"=.571"(%"RawPtr[LocString]"* %6, %"RawPtr[LocString]"* %8) + call void @"=.562"(%"RawPtr[LocString]"* %4, %"RawPtr[LocString]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.648"(%"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"* %other) #3 { +define internal i1 @"==.635"(%"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"* %other) #3 { %this.addr = alloca %"ContiguousMemoryRange[LocString]"* store %"ContiguousMemoryRange[LocString]"* %this, %"ContiguousMemoryRange[LocString]"** %this.addr %other.addr = alloca %"ContiguousMemoryRange[LocString]"* @@ -32617,7 +28948,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %1, i32 0, i32 0 %3 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %other.addr %4 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %3, i32 0, i32 0 - %5 = call i1 @"==.564"(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %4) + %5 = call i1 @"==.554"(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -32625,7 +28956,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %6, i32 0, i32 1 %8 = load %"ContiguousMemoryRange[LocString]"*, %"ContiguousMemoryRange[LocString]"** %other.addr %9 = getelementptr inbounds %"ContiguousMemoryRange[LocString]", %"ContiguousMemoryRange[LocString]"* %8, i32 0, i32 1 - %10 = call i1 @"==.564"(%"RawPtr[LocString]"* %7, %"RawPtr[LocString]"* %9) + %10 = call i1 @"==.554"(%"RawPtr[LocString]"* %7, %"RawPtr[LocString]"* %9) br label %cond.end cond.false: ; preds = %code @@ -32637,25 +28968,19 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.649(%"ContiguousMemoryRange[Char]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Char]"* - store %"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"** %this.addr +define internal void @ctor.636(%"ContiguousMemoryRange[Char]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %1, i32 0, i32 0 - call void @ctor.138(%"RawPtr[Char]"* %2) - %3 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %3, i32 0, i32 1 - call void @ctor.138(%"RawPtr[Char]"* %4) + %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 0 + call void @ctor.125(%"RawPtr[Char]"* %1) + %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 1 + call void @ctor.125(%"RawPtr[Char]"* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.650(%"ContiguousMemoryRange[Char]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Char]"* - store %"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"** %this.addr +define internal void @dtor.637(%"ContiguousMemoryRange[Char]"* %this) #3 { br label %code code: ; preds = %0 @@ -32663,29 +28988,25 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.651"(%"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"* %other) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Char]"* - store %"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"** %this.addr +define internal void @"=.638"(%"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"* %other) #3 { %other.addr = alloca %"ContiguousMemoryRange[Char]"* store %"ContiguousMemoryRange[Char]"* %other, %"ContiguousMemoryRange[Char]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %other.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %3, i32 0, i32 0 - call void @"=.200"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) - %5 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %this.addr + %1 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 0 + %2 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %other.addr + %3 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %2, i32 0, i32 0 + call void @"=.186"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %3) + %4 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %this, i32 0, i32 1 + %5 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %other.addr %6 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %5, i32 0, i32 1 - %7 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %other.addr - %8 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %7, i32 0, i32 1 - call void @"=.200"(%"RawPtr[Char]"* %6, %"RawPtr[Char]"* %8) + call void @"=.186"(%"RawPtr[Char]"* %4, %"RawPtr[Char]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.652"(%"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"* %other) #3 { +define internal i1 @"==.639"(%"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"* %other) #3 { %this.addr = alloca %"ContiguousMemoryRange[Char]"* store %"ContiguousMemoryRange[Char]"* %this, %"ContiguousMemoryRange[Char]"** %this.addr %other.addr = alloca %"ContiguousMemoryRange[Char]"* @@ -32697,7 +29018,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %1, i32 0, i32 0 %3 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %other.addr %4 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %3, i32 0, i32 0 - %5 = call i1 @"==.268"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) + %5 = call i1 @"==.257"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -32705,7 +29026,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %6, i32 0, i32 1 %8 = load %"ContiguousMemoryRange[Char]"*, %"ContiguousMemoryRange[Char]"** %other.addr %9 = getelementptr inbounds %"ContiguousMemoryRange[Char]", %"ContiguousMemoryRange[Char]"* %8, i32 0, i32 1 - %10 = call i1 @"==.268"(%"RawPtr[Char]"* %7, %"RawPtr[Char]"* %9) + %10 = call i1 @"==.257"(%"RawPtr[Char]"* %7, %"RawPtr[Char]"* %9) br label %cond.end cond.false: ; preds = %code @@ -32717,25 +29038,19 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.653(%"ContiguousMemoryRange[Token]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Token]"* - store %"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"** %this.addr +define internal void @ctor.640(%"ContiguousMemoryRange[Token]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %1, i32 0, i32 0 - call void @ctor.150(%"RawPtr[Token]"* %2) - %3 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %3, i32 0, i32 1 - call void @ctor.150(%"RawPtr[Token]"* %4) + %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 0 + call void @ctor.137(%"RawPtr[Token]"* %1) + %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 1 + call void @ctor.137(%"RawPtr[Token]"* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.654(%"ContiguousMemoryRange[Token]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Token]"* - store %"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"** %this.addr +define internal void @dtor.641(%"ContiguousMemoryRange[Token]"* %this) #3 { br label %code code: ; preds = %0 @@ -32743,29 +29058,25 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.655"(%"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"* %other) #3 { - %this.addr = alloca %"ContiguousMemoryRange[Token]"* - store %"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"** %this.addr +define internal void @"=.642"(%"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"* %other) #3 { %other.addr = alloca %"ContiguousMemoryRange[Token]"* store %"ContiguousMemoryRange[Token]"* %other, %"ContiguousMemoryRange[Token]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %other.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %3, i32 0, i32 0 - call void @"=.212"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %4) - %5 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %this.addr + %1 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 0 + %2 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %other.addr + %3 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %2, i32 0, i32 0 + call void @"=.198"(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %3) + %4 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %this, i32 0, i32 1 + %5 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %other.addr %6 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %5, i32 0, i32 1 - %7 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %other.addr - %8 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %7, i32 0, i32 1 - call void @"=.212"(%"RawPtr[Token]"* %6, %"RawPtr[Token]"* %8) + call void @"=.198"(%"RawPtr[Token]"* %4, %"RawPtr[Token]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.656"(%"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"* %other) #3 { +define internal i1 @"==.643"(%"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"* %other) #3 { %this.addr = alloca %"ContiguousMemoryRange[Token]"* store %"ContiguousMemoryRange[Token]"* %this, %"ContiguousMemoryRange[Token]"** %this.addr %other.addr = alloca %"ContiguousMemoryRange[Token]"* @@ -32777,7 +29088,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %1, i32 0, i32 0 %3 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %other.addr %4 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %3, i32 0, i32 0 - %5 = call i1 @"==.218"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %4) + %5 = call i1 @"==.205"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -32785,7 +29096,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %6, i32 0, i32 1 %8 = load %"ContiguousMemoryRange[Token]"*, %"ContiguousMemoryRange[Token]"** %other.addr %9 = getelementptr inbounds %"ContiguousMemoryRange[Token]", %"ContiguousMemoryRange[Token]"* %8, i32 0, i32 1 - %10 = call i1 @"==.218"(%"RawPtr[Token]"* %7, %"RawPtr[Token]"* %9) + %10 = call i1 @"==.205"(%"RawPtr[Token]"* %7, %"RawPtr[Token]"* %9) br label %cond.end cond.false: ; preds = %code @@ -32797,7 +29108,7 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.657(%"ContiguousMemoryRange[UInt]"* %this, %"RawPtr[UInt]" %f_begin, %"RawPtr[UInt]" %f_end) #3 { +define internal void @ctor.644(%"ContiguousMemoryRange[UInt]"* %this, %"RawPtr[UInt]" %f_begin, %"RawPtr[UInt]" %f_end) #3 { %this.addr = alloca %"ContiguousMemoryRange[UInt]"* store %"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"** %this.addr %f_begin.addr = alloca %"RawPtr[UInt]" @@ -32809,55 +29120,45 @@ define internal void @ctor.657(%"ContiguousMemoryRange[UInt]"* %this, %"RawPtr[U code: ; preds = %0 %1 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %this.addr %2 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %1, i32 0, i32 0 - call void @ctor.230(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %f_begin.addr) + call void @ctor.218(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %f_begin.addr) %3 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %this.addr %4 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %3, i32 0, i32 1 - call void @ctor.230(%"RawPtr[UInt]"* %4, %"RawPtr[UInt]"* %f_end.addr) + call void @ctor.218(%"RawPtr[UInt]"* %4, %"RawPtr[UInt]"* %f_end.addr) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.658(%"ContiguousMemoryRange[UInt]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[UInt]"* - store %"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"** %this.addr +define internal void @ctor.645(%"ContiguousMemoryRange[UInt]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %1, i32 0, i32 0 - call void @ctor.152(%"RawPtr[UInt]"* %2) - %3 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %this.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %3, i32 0, i32 1 - call void @ctor.152(%"RawPtr[UInt]"* %4) + %1 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %this, i32 0, i32 0 + call void @ctor.139(%"RawPtr[UInt]"* %1) + %2 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %this, i32 0, i32 1 + call void @ctor.139(%"RawPtr[UInt]"* %2) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.659(%"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"* %other) #3 { - %this.addr = alloca %"ContiguousMemoryRange[UInt]"* - store %"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"** %this.addr +define internal void @ctor.646(%"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"* %other) #3 { %other.addr = alloca %"ContiguousMemoryRange[UInt]"* store %"ContiguousMemoryRange[UInt]"* %other, %"ContiguousMemoryRange[UInt]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %other.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %3, i32 0, i32 0 - call void @ctor.230(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %4) - %5 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %this.addr + %1 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %this, i32 0, i32 0 + %2 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %other.addr + %3 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %2, i32 0, i32 0 + call void @ctor.218(%"RawPtr[UInt]"* %1, %"RawPtr[UInt]"* %3) + %4 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %this, i32 0, i32 1 + %5 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %other.addr %6 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %5, i32 0, i32 1 - %7 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %other.addr - %8 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %7, i32 0, i32 1 - call void @ctor.230(%"RawPtr[UInt]"* %6, %"RawPtr[UInt]"* %8) + call void @ctor.218(%"RawPtr[UInt]"* %4, %"RawPtr[UInt]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.660(%"ContiguousMemoryRange[UInt]"* %this) #3 { - %this.addr = alloca %"ContiguousMemoryRange[UInt]"* - store %"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"** %this.addr +define internal void @dtor.647(%"ContiguousMemoryRange[UInt]"* %this) #3 { br label %code code: ; preds = %0 @@ -32865,29 +29166,25 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.661"(%"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"* %other) #3 { - %this.addr = alloca %"ContiguousMemoryRange[UInt]"* - store %"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"** %this.addr +define internal void @"=.648"(%"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"* %other) #3 { %other.addr = alloca %"ContiguousMemoryRange[UInt]"* store %"ContiguousMemoryRange[UInt]"* %other, %"ContiguousMemoryRange[UInt]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %this.addr - %2 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %1, i32 0, i32 0 - %3 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %other.addr - %4 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %3, i32 0, i32 0 - call void @"=.225"(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %4) - %5 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %this.addr + %1 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %this, i32 0, i32 0 + %2 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %other.addr + %3 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %2, i32 0, i32 0 + call void @"=.212"(%"RawPtr[UInt]"* %1, %"RawPtr[UInt]"* %3) + %4 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %this, i32 0, i32 1 + %5 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %other.addr %6 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %5, i32 0, i32 1 - %7 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %other.addr - %8 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %7, i32 0, i32 1 - call void @"=.225"(%"RawPtr[UInt]"* %6, %"RawPtr[UInt]"* %8) + call void @"=.212"(%"RawPtr[UInt]"* %4, %"RawPtr[UInt]"* %6) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.662"(%"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"* %other) #3 { +define internal i1 @"==.649"(%"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"* %other) #3 { %this.addr = alloca %"ContiguousMemoryRange[UInt]"* store %"ContiguousMemoryRange[UInt]"* %this, %"ContiguousMemoryRange[UInt]"** %this.addr %other.addr = alloca %"ContiguousMemoryRange[UInt]"* @@ -32899,7 +29196,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %1, i32 0, i32 0 %3 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %other.addr %4 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %3, i32 0, i32 0 - %5 = call i1 @"==.271"(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %4) + %5 = call i1 @"==.260"(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %4) br i1 %5, label %cond.true, label %cond.false cond.true: ; preds = %code @@ -32907,7 +29204,7 @@ cond.true: ; preds = %code %7 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %6, i32 0, i32 1 %8 = load %"ContiguousMemoryRange[UInt]"*, %"ContiguousMemoryRange[UInt]"** %other.addr %9 = getelementptr inbounds %"ContiguousMemoryRange[UInt]", %"ContiguousMemoryRange[UInt]"* %8, i32 0, i32 1 - %10 = call i1 @"==.271"(%"RawPtr[UInt]"* %7, %"RawPtr[UInt]"* %9) + %10 = call i1 @"==.260"(%"RawPtr[UInt]"* %7, %"RawPtr[UInt]"* %9) br label %cond.end cond.false: ; preds = %code @@ -32919,9 +29216,7 @@ cond.end: ; preds = %cond.false, %cond.t } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.663(%"RawPtr[LocString]"* %this) #3 { - %this.addr = alloca %"RawPtr[LocString]"* - store %"RawPtr[LocString]"* %this, %"RawPtr[LocString]"** %this.addr +define internal void @dtor.650(%"RawPtr[Char]"* %this) #3 { br label %code code: ; preds = %0 @@ -32929,9 +29224,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.664(%"RawPtr[Token]"* %this) #3 { - %this.addr = alloca %"RawPtr[Token]"* - store %"RawPtr[Token]"* %this, %"RawPtr[Token]"** %this.addr +define internal void @dtor.651(%"RawPtr[LocString]"* %this) #3 { br label %code code: ; preds = %0 @@ -32939,9 +29232,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.665(%"RawPtr[UInt]"* %this) #3 { - %this.addr = alloca %"RawPtr[UInt]"* - store %"RawPtr[UInt]"* %this, %"RawPtr[UInt]"** %this.addr +define internal void @dtor.652(%"RawPtr[Token]"* %this) #3 { br label %code code: ; preds = %0 @@ -32949,28 +29240,29 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.666(%"NumericRangeInc[Int]"* %this) #3 { - %this.addr = alloca %"NumericRangeInc[Int]"* - store %"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"** %this.addr +define internal void @dtor.653(%"RawPtr[UInt]"* %this) #3 { br label %code code: ; preds = %0 - %1 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %2 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %1, i32 0, i32 0 + ret void +} + +; Function Attrs: alwaysinline nounwind +define internal void @ctor.654(%"NumericRangeInc[Int]"* %this) #3 { + br label %code + +code: ; preds = %0 + %1 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 0 + store i32 0, i32* %1 + %2 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 1 store i32 0, i32* %2 - %3 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %4 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %3, i32 0, i32 1 - store i32 0, i32* %4 - %5 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %6 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %5, i32 0, i32 2 - store i1 false, i1* %6 + %3 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 2 + store i1 false, i1* %3 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.667(%"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"* %other) #3 { - %this.addr = alloca %"NumericRangeInc[Int]"* - store %"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"** %this.addr +define internal void @ctor.655(%"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"* %other) #3 { %other.addr = alloca %"NumericRangeInc[Int]"* store %"NumericRangeInc[Int]"* %other, %"NumericRangeInc[Int]"** %other.addr br label %code @@ -32979,28 +29271,23 @@ code: ; preds = %0 %1 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %other.addr %2 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %1, i32 0, i32 0 %3 = load i32, i32* %2 - %4 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %5 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %4, i32 0, i32 0 - store i32 %3, i32* %5 - %6 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %other.addr - %7 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %6, i32 0, i32 1 - %8 = load i32, i32* %7 - %9 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %10 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %9, i32 0, i32 1 - store i32 %8, i32* %10 - %11 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %other.addr - %12 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %11, i32 0, i32 2 - %13 = load i1, i1* %12 - %14 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %15 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %14, i32 0, i32 2 - store i1 %13, i1* %15 + %4 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 0 + store i32 %3, i32* %4 + %5 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %other.addr + %6 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %5, i32 0, i32 1 + %7 = load i32, i32* %6 + %8 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 1 + store i32 %7, i32* %8 + %9 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %other.addr + %10 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %9, i32 0, i32 2 + %11 = load i1, i1* %10 + %12 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 2 + store i1 %11, i1* %12 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.668"(%"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"* %other) #3 { - %this.addr = alloca %"NumericRangeInc[Int]"* - store %"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"** %this.addr +define internal void @"=.656"(%"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"* %other) #3 { %other.addr = alloca %"NumericRangeInc[Int]"* store %"NumericRangeInc[Int]"* %other, %"NumericRangeInc[Int]"** %other.addr br label %code @@ -33009,26 +29296,23 @@ code: ; preds = %0 %1 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %other.addr %2 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %1, i32 0, i32 0 %3 = load i32, i32* %2 - %4 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %5 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %4, i32 0, i32 0 - store i32 %3, i32* %5 - %6 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %other.addr - %7 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %6, i32 0, i32 1 - %8 = load i32, i32* %7 - %9 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %10 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %9, i32 0, i32 1 - store i32 %8, i32* %10 - %11 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %other.addr - %12 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %11, i32 0, i32 2 - %13 = load i1, i1* %12 - %14 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %this.addr - %15 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %14, i32 0, i32 2 - store i1 %13, i1* %15 + %4 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 0 + store i32 %3, i32* %4 + %5 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %other.addr + %6 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %5, i32 0, i32 1 + %7 = load i32, i32* %6 + %8 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 1 + store i32 %7, i32* %8 + %9 = load %"NumericRangeInc[Int]"*, %"NumericRangeInc[Int]"** %other.addr + %10 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %9, i32 0, i32 2 + %11 = load i1, i1* %10 + %12 = getelementptr inbounds %"NumericRangeInc[Int]", %"NumericRangeInc[Int]"* %this, i32 0, i32 2 + store i1 %11, i1* %12 ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.669"(%"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"* %other) #3 { +define internal i1 @"==.657"(%"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"* %other) #3 { %this.addr = alloca %"NumericRangeInc[Int]"* store %"NumericRangeInc[Int]"* %this, %"NumericRangeInc[Int]"** %this.addr %other.addr = alloca %"NumericRangeInc[Int]"* @@ -33169,36 +29453,29 @@ declare double @llvm.truc.f64(double) declare double @llvm.rint.f64(double) #6 ; Function Attrs: alwaysinline nounwind -define internal void @ctor.670(%"Vector[LocString]"* %this, %"Vector[LocString]"* %other) #3 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr +define internal void @ctor.658(%"Vector[LocString]"* %this, %"Vector[LocString]"* %other) #3 { %other.addr = alloca %"Vector[LocString]"* store %"Vector[LocString]"* %other, %"Vector[LocString]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %1, i32 0, i32 0 - %3 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr - %4 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %3, i32 0, i32 0 - call void @ctor.585(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %4) - %5 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr + %1 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + %2 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr + %3 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %2, i32 0, i32 0 + call void @ctor.576(%"RawPtr[LocString]"* %1, %"RawPtr[LocString]"* %3) + %4 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %5 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr %6 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %5, i32 0, i32 1 - %7 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr - %8 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %7, i32 0, i32 1 - call void @ctor.585(%"RawPtr[LocString]"* %6, %"RawPtr[LocString]"* %8) - %9 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %10 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %9, i32 0, i32 2 - %11 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr - %12 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %11, i32 0, i32 2 - call void @ctor.585(%"RawPtr[LocString]"* %10, %"RawPtr[LocString]"* %12) + call void @ctor.576(%"RawPtr[LocString]"* %4, %"RawPtr[LocString]"* %6) + %7 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 2 + %8 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr + %9 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %8, i32 0, i32 2 + call void @ctor.576(%"RawPtr[LocString]"* %7, %"RawPtr[LocString]"* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.671(%"Vector[LocString]"* %this) #3 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr +define internal void @dtor.659(%"Vector[LocString]"* %this) #3 { br label %code code: ; preds = %0 @@ -33206,34 +29483,29 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.672"(%"Vector[LocString]"* %this, %"Vector[LocString]"* %other) #3 { - %this.addr = alloca %"Vector[LocString]"* - store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr +define internal void @"=.660"(%"Vector[LocString]"* %this, %"Vector[LocString]"* %other) #3 { %other.addr = alloca %"Vector[LocString]"* store %"Vector[LocString]"* %other, %"Vector[LocString]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %1, i32 0, i32 0 - %3 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr - %4 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %3, i32 0, i32 0 - call void @"=.571"(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %4) - %5 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr + %1 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 0 + %2 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr + %3 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %2, i32 0, i32 0 + call void @"=.562"(%"RawPtr[LocString]"* %1, %"RawPtr[LocString]"* %3) + %4 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 1 + %5 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr %6 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %5, i32 0, i32 1 - %7 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr - %8 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %7, i32 0, i32 1 - call void @"=.571"(%"RawPtr[LocString]"* %6, %"RawPtr[LocString]"* %8) - %9 = load %"Vector[LocString]"*, %"Vector[LocString]"** %this.addr - %10 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %9, i32 0, i32 2 - %11 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr - %12 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %11, i32 0, i32 2 - call void @"=.571"(%"RawPtr[LocString]"* %10, %"RawPtr[LocString]"* %12) + call void @"=.562"(%"RawPtr[LocString]"* %4, %"RawPtr[LocString]"* %6) + %7 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %this, i32 0, i32 2 + %8 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr + %9 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %8, i32 0, i32 2 + call void @"=.562"(%"RawPtr[LocString]"* %7, %"RawPtr[LocString]"* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.673"(%"Vector[LocString]"* %this, %"Vector[LocString]"* %other) #3 { +define internal i1 @"==.661"(%"Vector[LocString]"* %this, %"Vector[LocString]"* %other) #3 { %this.addr = alloca %"Vector[LocString]"* store %"Vector[LocString]"* %this, %"Vector[LocString]"** %this.addr %other.addr = alloca %"Vector[LocString]"* @@ -33245,7 +29517,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %1, i32 0, i32 0 %3 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr %4 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %3, i32 0, i32 0 - %5 = call i1 @"==.564"(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %4) + %5 = call i1 @"==.554"(%"RawPtr[LocString]"* %2, %"RawPtr[LocString]"* %4) br i1 %5, label %cond.true1, label %cond.false2 cond.true: ; preds = %cond.end3 @@ -33253,7 +29525,7 @@ cond.true: ; preds = %cond.end3 %7 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %6, i32 0, i32 2 %8 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr %9 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %8, i32 0, i32 2 - %10 = call i1 @"==.564"(%"RawPtr[LocString]"* %7, %"RawPtr[LocString]"* %9) + %10 = call i1 @"==.554"(%"RawPtr[LocString]"* %7, %"RawPtr[LocString]"* %9) br label %cond.end cond.false: ; preds = %cond.end3 @@ -33268,7 +29540,7 @@ cond.true1: ; preds = %code %12 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %11, i32 0, i32 1 %13 = load %"Vector[LocString]"*, %"Vector[LocString]"** %other.addr %14 = getelementptr inbounds %"Vector[LocString]", %"Vector[LocString]"* %13, i32 0, i32 1 - %15 = call i1 @"==.564"(%"RawPtr[LocString]"* %12, %"RawPtr[LocString]"* %14) + %15 = call i1 @"==.554"(%"RawPtr[LocString]"* %12, %"RawPtr[LocString]"* %14) br label %cond.end3 cond.false2: ; preds = %code @@ -33280,36 +29552,29 @@ cond.end3: ; preds = %cond.false2, %cond. } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.674(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #3 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal void @ctor.662(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #3 { %other.addr = alloca %"Vector[Char]"* store %"Vector[Char]"* %other, %"Vector[Char]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %3, i32 0, i32 0 - call void @ctor.192(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) - %5 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %2 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr + %3 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %2, i32 0, i32 0 + call void @ctor.178(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %3) + %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %5 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr %6 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %5, i32 0, i32 1 - %7 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %8 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %7, i32 0, i32 1 - call void @ctor.192(%"RawPtr[Char]"* %6, %"RawPtr[Char]"* %8) - %9 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %10 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %9, i32 0, i32 2 - %11 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %12 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %11, i32 0, i32 2 - call void @ctor.192(%"RawPtr[Char]"* %10, %"RawPtr[Char]"* %12) + call void @ctor.178(%"RawPtr[Char]"* %4, %"RawPtr[Char]"* %6) + %7 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 2 + %8 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr + %9 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %8, i32 0, i32 2 + call void @ctor.178(%"RawPtr[Char]"* %7, %"RawPtr[Char]"* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.675(%"Vector[Char]"* %this) #3 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal void @dtor.663(%"Vector[Char]"* %this) #3 { br label %code code: ; preds = %0 @@ -33317,34 +29582,29 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.676"(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #3 { - %this.addr = alloca %"Vector[Char]"* - store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr +define internal void @"=.664"(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #3 { %other.addr = alloca %"Vector[Char]"* store %"Vector[Char]"* %other, %"Vector[Char]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 - %3 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %3, i32 0, i32 0 - call void @"=.200"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) - %5 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr + %1 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 0 + %2 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr + %3 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %2, i32 0, i32 0 + call void @"=.186"(%"RawPtr[Char]"* %1, %"RawPtr[Char]"* %3) + %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 1 + %5 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr %6 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %5, i32 0, i32 1 - %7 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %8 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %7, i32 0, i32 1 - call void @"=.200"(%"RawPtr[Char]"* %6, %"RawPtr[Char]"* %8) - %9 = load %"Vector[Char]"*, %"Vector[Char]"** %this.addr - %10 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %9, i32 0, i32 2 - %11 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr - %12 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %11, i32 0, i32 2 - call void @"=.200"(%"RawPtr[Char]"* %10, %"RawPtr[Char]"* %12) + call void @"=.186"(%"RawPtr[Char]"* %4, %"RawPtr[Char]"* %6) + %7 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %this, i32 0, i32 2 + %8 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr + %9 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %8, i32 0, i32 2 + call void @"=.186"(%"RawPtr[Char]"* %7, %"RawPtr[Char]"* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.677"(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #3 { +define internal i1 @"==.665"(%"Vector[Char]"* %this, %"Vector[Char]"* %other) #3 { %this.addr = alloca %"Vector[Char]"* store %"Vector[Char]"* %this, %"Vector[Char]"** %this.addr %other.addr = alloca %"Vector[Char]"* @@ -33356,7 +29616,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %1, i32 0, i32 0 %3 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr %4 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %3, i32 0, i32 0 - %5 = call i1 @"==.268"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) + %5 = call i1 @"==.257"(%"RawPtr[Char]"* %2, %"RawPtr[Char]"* %4) br i1 %5, label %cond.true1, label %cond.false2 cond.true: ; preds = %cond.end3 @@ -33364,7 +29624,7 @@ cond.true: ; preds = %cond.end3 %7 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %6, i32 0, i32 2 %8 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr %9 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %8, i32 0, i32 2 - %10 = call i1 @"==.268"(%"RawPtr[Char]"* %7, %"RawPtr[Char]"* %9) + %10 = call i1 @"==.257"(%"RawPtr[Char]"* %7, %"RawPtr[Char]"* %9) br label %cond.end cond.false: ; preds = %cond.end3 @@ -33379,7 +29639,7 @@ cond.true1: ; preds = %code %12 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %11, i32 0, i32 1 %13 = load %"Vector[Char]"*, %"Vector[Char]"** %other.addr %14 = getelementptr inbounds %"Vector[Char]", %"Vector[Char]"* %13, i32 0, i32 1 - %15 = call i1 @"==.268"(%"RawPtr[Char]"* %12, %"RawPtr[Char]"* %14) + %15 = call i1 @"==.257"(%"RawPtr[Char]"* %12, %"RawPtr[Char]"* %14) br label %cond.end3 cond.false2: ; preds = %code @@ -33391,36 +29651,29 @@ cond.end3: ; preds = %cond.false2, %cond. } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.678(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #3 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal void @ctor.666(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #3 { %other.addr = alloca %"Vector[Token]"* store %"Vector[Token]"* %other, %"Vector[Token]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 - %3 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %3, i32 0, i32 0 - call void @ctor.217(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %4) - %5 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %2 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr + %3 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %2, i32 0, i32 0 + call void @ctor.204(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %3) + %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %5 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr %6 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %5, i32 0, i32 1 - %7 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %8 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %7, i32 0, i32 1 - call void @ctor.217(%"RawPtr[Token]"* %6, %"RawPtr[Token]"* %8) - %9 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %10 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %9, i32 0, i32 2 - %11 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %12 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %11, i32 0, i32 2 - call void @ctor.217(%"RawPtr[Token]"* %10, %"RawPtr[Token]"* %12) + call void @ctor.204(%"RawPtr[Token]"* %4, %"RawPtr[Token]"* %6) + %7 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 2 + %8 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr + %9 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %8, i32 0, i32 2 + call void @ctor.204(%"RawPtr[Token]"* %7, %"RawPtr[Token]"* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.679(%"Vector[Token]"* %this) #3 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal void @dtor.667(%"Vector[Token]"* %this) #3 { br label %code code: ; preds = %0 @@ -33428,34 +29681,29 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.680"(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #3 { - %this.addr = alloca %"Vector[Token]"* - store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr +define internal void @"=.668"(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #3 { %other.addr = alloca %"Vector[Token]"* store %"Vector[Token]"* %other, %"Vector[Token]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 - %3 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %3, i32 0, i32 0 - call void @"=.212"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %4) - %5 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr + %1 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 0 + %2 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr + %3 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %2, i32 0, i32 0 + call void @"=.198"(%"RawPtr[Token]"* %1, %"RawPtr[Token]"* %3) + %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 1 + %5 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr %6 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %5, i32 0, i32 1 - %7 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %8 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %7, i32 0, i32 1 - call void @"=.212"(%"RawPtr[Token]"* %6, %"RawPtr[Token]"* %8) - %9 = load %"Vector[Token]"*, %"Vector[Token]"** %this.addr - %10 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %9, i32 0, i32 2 - %11 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr - %12 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %11, i32 0, i32 2 - call void @"=.212"(%"RawPtr[Token]"* %10, %"RawPtr[Token]"* %12) + call void @"=.198"(%"RawPtr[Token]"* %4, %"RawPtr[Token]"* %6) + %7 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %this, i32 0, i32 2 + %8 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr + %9 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %8, i32 0, i32 2 + call void @"=.198"(%"RawPtr[Token]"* %7, %"RawPtr[Token]"* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.681"(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #3 { +define internal i1 @"==.669"(%"Vector[Token]"* %this, %"Vector[Token]"* %other) #3 { %this.addr = alloca %"Vector[Token]"* store %"Vector[Token]"* %this, %"Vector[Token]"** %this.addr %other.addr = alloca %"Vector[Token]"* @@ -33467,7 +29715,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %1, i32 0, i32 0 %3 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr %4 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %3, i32 0, i32 0 - %5 = call i1 @"==.218"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %4) + %5 = call i1 @"==.205"(%"RawPtr[Token]"* %2, %"RawPtr[Token]"* %4) br i1 %5, label %cond.true1, label %cond.false2 cond.true: ; preds = %cond.end3 @@ -33475,7 +29723,7 @@ cond.true: ; preds = %cond.end3 %7 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %6, i32 0, i32 2 %8 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr %9 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %8, i32 0, i32 2 - %10 = call i1 @"==.218"(%"RawPtr[Token]"* %7, %"RawPtr[Token]"* %9) + %10 = call i1 @"==.205"(%"RawPtr[Token]"* %7, %"RawPtr[Token]"* %9) br label %cond.end cond.false: ; preds = %cond.end3 @@ -33490,7 +29738,7 @@ cond.true1: ; preds = %code %12 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %11, i32 0, i32 1 %13 = load %"Vector[Token]"*, %"Vector[Token]"** %other.addr %14 = getelementptr inbounds %"Vector[Token]", %"Vector[Token]"* %13, i32 0, i32 1 - %15 = call i1 @"==.218"(%"RawPtr[Token]"* %12, %"RawPtr[Token]"* %14) + %15 = call i1 @"==.205"(%"RawPtr[Token]"* %12, %"RawPtr[Token]"* %14) br label %cond.end3 cond.false2: ; preds = %code @@ -33502,36 +29750,29 @@ cond.end3: ; preds = %cond.false2, %cond. } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.682(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #3 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr +define internal void @ctor.670(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #3 { %other.addr = alloca %"Vector[UInt]"* store %"Vector[UInt]"* %other, %"Vector[UInt]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 0 - %3 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %3, i32 0, i32 0 - call void @ctor.230(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %4) - %5 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + %2 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr + %3 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %2, i32 0, i32 0 + call void @ctor.218(%"RawPtr[UInt]"* %1, %"RawPtr[UInt]"* %3) + %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %5 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr %6 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %5, i32 0, i32 1 - %7 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %8 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %7, i32 0, i32 1 - call void @ctor.230(%"RawPtr[UInt]"* %6, %"RawPtr[UInt]"* %8) - %9 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %10 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %9, i32 0, i32 2 - %11 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %12 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %11, i32 0, i32 2 - call void @ctor.230(%"RawPtr[UInt]"* %10, %"RawPtr[UInt]"* %12) + call void @ctor.218(%"RawPtr[UInt]"* %4, %"RawPtr[UInt]"* %6) + %7 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 2 + %8 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr + %9 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %8, i32 0, i32 2 + call void @ctor.218(%"RawPtr[UInt]"* %7, %"RawPtr[UInt]"* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.683(%"Vector[UInt]"* %this) #3 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr +define internal void @dtor.671(%"Vector[UInt]"* %this) #3 { br label %code code: ; preds = %0 @@ -33539,34 +29780,29 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.684"(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #3 { - %this.addr = alloca %"Vector[UInt]"* - store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr +define internal void @"=.672"(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #3 { %other.addr = alloca %"Vector[UInt]"* store %"Vector[UInt]"* %other, %"Vector[UInt]"** %other.addr br label %code code: ; preds = %0 - %1 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 0 - %3 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %3, i32 0, i32 0 - call void @"=.225"(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %4) - %5 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr + %1 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 0 + %2 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr + %3 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %2, i32 0, i32 0 + call void @"=.212"(%"RawPtr[UInt]"* %1, %"RawPtr[UInt]"* %3) + %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 1 + %5 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr %6 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %5, i32 0, i32 1 - %7 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %8 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %7, i32 0, i32 1 - call void @"=.225"(%"RawPtr[UInt]"* %6, %"RawPtr[UInt]"* %8) - %9 = load %"Vector[UInt]"*, %"Vector[UInt]"** %this.addr - %10 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %9, i32 0, i32 2 - %11 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr - %12 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %11, i32 0, i32 2 - call void @"=.225"(%"RawPtr[UInt]"* %10, %"RawPtr[UInt]"* %12) + call void @"=.212"(%"RawPtr[UInt]"* %4, %"RawPtr[UInt]"* %6) + %7 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %this, i32 0, i32 2 + %8 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr + %9 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %8, i32 0, i32 2 + call void @"=.212"(%"RawPtr[UInt]"* %7, %"RawPtr[UInt]"* %9) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.685"(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #3 { +define internal i1 @"==.673"(%"Vector[UInt]"* %this, %"Vector[UInt]"* %other) #3 { %this.addr = alloca %"Vector[UInt]"* store %"Vector[UInt]"* %this, %"Vector[UInt]"** %this.addr %other.addr = alloca %"Vector[UInt]"* @@ -33578,7 +29814,7 @@ code: ; preds = %0 %2 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %1, i32 0, i32 0 %3 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr %4 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %3, i32 0, i32 0 - %5 = call i1 @"==.271"(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %4) + %5 = call i1 @"==.260"(%"RawPtr[UInt]"* %2, %"RawPtr[UInt]"* %4) br i1 %5, label %cond.true1, label %cond.false2 cond.true: ; preds = %cond.end3 @@ -33586,7 +29822,7 @@ cond.true: ; preds = %cond.end3 %7 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %6, i32 0, i32 2 %8 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr %9 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %8, i32 0, i32 2 - %10 = call i1 @"==.271"(%"RawPtr[UInt]"* %7, %"RawPtr[UInt]"* %9) + %10 = call i1 @"==.260"(%"RawPtr[UInt]"* %7, %"RawPtr[UInt]"* %9) br label %cond.end cond.false: ; preds = %cond.end3 @@ -33601,7 +29837,7 @@ cond.true1: ; preds = %code %12 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %11, i32 0, i32 1 %13 = load %"Vector[UInt]"*, %"Vector[UInt]"** %other.addr %14 = getelementptr inbounds %"Vector[UInt]", %"Vector[UInt]"* %13, i32 0, i32 1 - %15 = call i1 @"==.271"(%"RawPtr[UInt]"* %12, %"RawPtr[UInt]"* %14) + %15 = call i1 @"==.260"(%"RawPtr[UInt]"* %12, %"RawPtr[UInt]"* %14) br label %cond.end3 cond.false2: ; preds = %code @@ -33620,10 +29856,8 @@ code: ; preds = %0 ret void } -; Function Attrs: alwaysinline nounwind -define internal void @dtor.686(%ErrorReporter* %this) #3 { - %this.addr = alloca %ErrorReporter* - store %ErrorReporter* %this, %ErrorReporter** %this.addr +; Function Attrs: alwaysinline nounwind +define internal void @dtor.674(%ErrorReporter* %this) #3 { br label %code code: ; preds = %0 @@ -33631,29 +29865,24 @@ code: ; preds = %0 } ; Function Attrs: inlinehint nounwind -define internal void @reportError.687(%ErrorReporter %obj, %Location* %loc, %StringRef %msg) #4 { - %obj.addr = alloca %ErrorReporter - store %ErrorReporter %obj, %ErrorReporter* %obj.addr - %loc.addr = alloca %Location* - store %Location* %loc, %Location** %loc.addr +define internal void @reportError.675(%ErrorReporter* %obj, %Location %loc, %StringRef %msg) #4 { + %loc.addr = alloca %Location + store %Location %loc, %Location* %loc.addr %msg.addr = alloca %StringRef store %StringRef %msg, %StringRef* %msg.addr br label %code code: ; preds = %0 - %1 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %obj.addr, i32 0, i32 1 - %2 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %obj.addr, i32 0, i32 0 + %1 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %obj, i32 0, i32 1 + %2 = getelementptr inbounds %ErrorReporter, %ErrorReporter* %obj, i32 0, i32 0 %3 = load %UntypedPtr, %UntypedPtr* %2 - %4 = load %Location*, %Location** %loc.addr - %5 = load %StringRef, %StringRef* %msg.addr - call void @"().451"(%"FunctionPtr3[Void, UntypedPtr, @Location, StringRef]"* %1, %UntypedPtr %3, %Location* %4, %StringRef %5) + %4 = load %StringRef, %StringRef* %msg.addr + call void @"().438"(%"FunctionPtr3[Void, UntypedPtr, Location const, StringRef]"* %1, %UntypedPtr %3, %Location* %loc.addr, %StringRef %4) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.688(%AstBuilder* %this) #3 { - %this.addr = alloca %AstBuilder* - store %AstBuilder* %this, %AstBuilder** %this.addr +define internal void @dtor.676(%AstBuilder* %this) #3 { br label %code code: ; preds = %0 @@ -33831,229 +30060,104 @@ define internal i32 @systemCall(%StringRef %cmd) #4 { br label %code code: ; preds = %0 - %1 = call i8* @cStr(%StringRef* %cmd.addr) - %2 = call i32 bitcast (void (i8*)* @system to i32 (i8*)*)(i8* %1) - ret i32 %2 -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.689(%File* %this) #3 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr - br label %code - -code: ; preds = %0 - %1 = load %File*, %File** %this.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - store i8* null, i8** %2 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @ctor.690(%File* %this, %File* %other) #3 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr - %other.addr = alloca %File* - store %File* %other, %File** %other.addr - br label %code - -code: ; preds = %0 - %1 = load %File*, %File** %other.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %File*, %File** %this.addr - %5 = getelementptr inbounds %File, %File* %4, i32 0, i32 0 - store i8* %3, i8** %5 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @dtor.691(%File* %this) #3 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr - br label %code - -code: ; preds = %0 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal void @"=.692"(%File* %this, %File* %other) #3 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr - %other.addr = alloca %File* - store %File* %other, %File** %other.addr - br label %code - -code: ; preds = %0 - %1 = load %File*, %File** %other.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %File*, %File** %this.addr - %5 = getelementptr inbounds %File, %File* %4, i32 0, i32 0 - store i8* %3, i8** %5 - ret void -} - -; Function Attrs: alwaysinline nounwind -define internal i1 @"==.693"(%File* %this, %File* %other) #3 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr - %other.addr = alloca %File* - store %File* %other, %File** %other.addr - br label %code - -code: ; preds = %0 - %1 = load %File*, %File** %this.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %File*, %File** %other.addr - %5 = getelementptr inbounds %File, %File* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i1 @implOpRefEQ(i8* %3, i8* %6) - ret i1 %7 -} - -; Function Attrs: inlinehint nounwind -define internal void @ctor.694(%File* %this) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr - br label %code - -code: ; preds = %0 - %1 = load %File*, %File** %this.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - store i8* null, i8** %2 - %3 = load %File*, %File** %this.addr - %4 = getelementptr inbounds %File, %File* %3, i32 0, i32 0 - store i8* null, i8** %4 - ret void + %1 = load %StringRef, %StringRef* %cmd.addr + %2 = call i8* @cStr(%StringRef %1) + %3 = call i32 bitcast (void (i8*)* @system to i32 (i8*)*)(i8* %2) + ret i32 %3 } ; Function Attrs: inlinehint nounwind -define internal void @ctor.695(%File* %this, i8* %handle) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr - %handle.addr = alloca i8* - store i8* %handle, i8** %handle.addr +define internal void @ctor.677(%File* %this) #4 { br label %code code: ; preds = %0 - %1 = load %File*, %File** %this.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - store i8* null, i8** %2 - %3 = load i8*, i8** %handle.addr - %4 = load %File*, %File** %this.addr - %5 = getelementptr inbounds %File, %File* %4, i32 0, i32 0 - store i8* %3, i8** %5 + %1 = getelementptr inbounds %File, %File* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.696(%File* %this, %File* %other) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr - %other.addr = alloca %File* - store %File* %other, %File** %other.addr +define internal void @ctor.678(%File* %this, %File* %other) #4 { + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %File*, %File** %this.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - store i8* null, i8** %2 - %3 = load %File*, %File** %other.addr - %4 = getelementptr inbounds %File, %File* %3, i32 0, i32 0 - %5 = load i8*, i8** %4 - %6 = load %File*, %File** %this.addr - %7 = getelementptr inbounds %File, %File* %6, i32 0, i32 0 - store i8* %5, i8** %7 - %8 = load %File*, %File** %other.addr - %9 = getelementptr inbounds %File, %File* %8, i32 0, i32 0 - store i8* null, i8** %9 + %1 = getelementptr inbounds %File, %File* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %1) + %2 = getelementptr inbounds %File, %File* %this, i32 0, i32 0 + %3 = getelementptr inbounds %File, %File* %other, i32 0, i32 0 + call void @"="(%UntypedPtr* %2, %UntypedPtr* %3) + %4 = getelementptr inbounds %File, %File* %other, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %tmp.this) + call void @"="(%UntypedPtr* %4, %UntypedPtr* %tmp.this) ret void } ; Function Attrs: inlinehint nounwind -define internal void @dtor.697(%File* %this) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr +define internal void @dtor.679(%File* %this) #4 { br label %code code: ; preds = %0 - %1 = load %File*, %File** %this.addr - call void @close(%File* %1) + call void @close(%File* %this) ret void } ; Function Attrs: inlinehint nounwind define internal void @close(%File* %this) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 br label %if_block if_block: ; preds = %code - %1 = load %File*, %File** %this.addr - %2 = call i1 @isOpen(%File* %1) - br i1 %2, label %if_then, label %if_end + %1 = call i1 @isOpen(%File* %this) + br i1 %1, label %if_then, label %if_end if_then: ; preds = %if_block - %3 = load %File*, %File** %this.addr - %4 = getelementptr inbounds %File, %File* %3, i32 0, i32 0 - %5 = load i8*, i8** %4 - call void @fclose(i8* %5) + %2 = load %File, %File* %this + call void @fclose(%File %2) br label %if_end if_end: ; preds = %if_then, %if_block - %6 = load %File*, %File** %this.addr - %7 = getelementptr inbounds %File, %File* %6, i32 0, i32 0 - store i8* null, i8** %7 + %3 = getelementptr inbounds %File, %File* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %tmp.this) + call void @"="(%UntypedPtr* %3, %UntypedPtr* %tmp.this) ret void } ; Function Attrs: inlinehint nounwind define internal i1 @isOpen(%File* %this) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %File*, %File** %this.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = call i1 @implOpRefNE(i8* %3, i8* null) - ret i1 %4 + %1 = getelementptr inbounds %File, %File* %this, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %tmp.this) + %2 = call i1 @"==.326"(%UntypedPtr* %1, %UntypedPtr* %tmp.this) + %3 = xor i1 true, %2 + ret i1 %3 } -declare void @fclose(i8*) +declare void @fclose(%File) ; Function Attrs: inlinehint nounwind -define internal void @"=.698"(%File* %this, %File* %other) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr - %other.addr = alloca %File* - store %File* %other, %File** %other.addr +define internal void @"=.680"(%File* %this, %File* %other) #4 { + %tmp.this = alloca %UntypedPtr br label %code code: ; preds = %0 - %1 = load %File*, %File** %other.addr - %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 - %3 = load i8*, i8** %2 - %4 = load %File*, %File** %this.addr - %5 = getelementptr inbounds %File, %File* %4, i32 0, i32 0 - store i8* %3, i8** %5 - %6 = load %File*, %File** %other.addr - %7 = getelementptr inbounds %File, %File* %6, i32 0, i32 0 - store i8* null, i8** %7 + %1 = getelementptr inbounds %File, %File* %this, i32 0, i32 0 + %2 = getelementptr inbounds %File, %File* %other, i32 0, i32 0 + call void @"="(%UntypedPtr* %1, %UntypedPtr* %2) + %3 = getelementptr inbounds %File, %File* %other, i32 0, i32 0 + call void @ctor.56(%UntypedPtr* %tmp.this) + call void @"="(%UntypedPtr* %3, %UntypedPtr* %tmp.this) ret void } ; Function Attrs: inlinehint nounwind -define internal void @openFile(%File* sret %_result, %StringRef %filename, %StringRef %mode) #4 { - %_result.addr = alloca %File* - store %File* %_result, %File** %_result.addr +define internal %File @openFile(%StringRef %filename, %StringRef %mode) #4 { %filename.addr = alloca %StringRef store %StringRef %filename, %StringRef* %filename.addr %mode.addr = alloca %StringRef @@ -34061,186 +30165,184 @@ define internal void @openFile(%File* sret %_result, %StringRef %filename, %Stri br label %code code: ; preds = %0 - %1 = load %File*, %File** %_result.addr - %2 = call i8* @cStr(%StringRef* %filename.addr) - %3 = call i8* @cStr(%StringRef* %mode.addr) - %4 = call i8* @fopen(i8* %2, i8* %3) - call void @ctor.695(%File* %1, i8* %4) - ret void + %1 = load %StringRef, %StringRef* %filename.addr + %2 = call i8* @cStr(%StringRef %1) + %3 = load %StringRef, %StringRef* %mode.addr + %4 = call i8* @cStr(%StringRef %3) + %5 = call %File @fopen(i8* %2, i8* %4) + ret %File %5 } ; Function Attrs: inlinehint nounwind -define internal i32 @flush.699(%File* %this) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr +define internal i32 @flush.681(%File* %this) #4 { br label %code code: ; preds = %0 - %1 = load %File*, %File** %this.addr - %2 = call i1 @isOpen(%File* %1) - br i1 %2, label %cond_alt1, label %cond_alt2 + %1 = call i1 @isOpen(%File* %this) + br i1 %1, label %cond_alt1, label %cond_alt2 cond_alt1: ; preds = %code - %3 = load %File*, %File** %this.addr - %4 = getelementptr inbounds %File, %File* %3, i32 0, i32 0 - %5 = load i8*, i8** %4 - %6 = call i32 bitcast (i32 (%struct._IO_FILE*)* @fflush to i32 (i8*)*)(i8* %5) + %2 = load %File, %File* %this + %3 = call i32 bitcast (i32 (%struct._IO_FILE*)* @fflush to i32 (%File)*)(%File %2) br label %cond_end cond_alt2: ; preds = %code br label %cond_end cond_end: ; preds = %cond_alt2, %cond_alt1 - %cond = phi i32 [ %6, %cond_alt1 ], [ -1, %cond_alt2 ] + %cond = phi i32 [ %3, %cond_alt1 ], [ -1, %cond_alt2 ] ret i32 %cond } ; Function Attrs: inlinehint nounwind define internal void @readLine(%String* sret %_result, %File* %this) #4 { - %_result.addr = alloca %String* - store %String* %_result, %String** %_result.addr - %this.addr = alloca %File* - store %File* %this, %File** %this.addr %res = alloca %String %tmp.this = alloca i64 %cstr = alloca i8* - %tmp.this1 = alloca i64 + %tmp.this1 = alloca %UntypedPtr + %tmp.this2 = alloca i64 br label %code code: ; preds = %0 store i64 256, i64* %tmp.this %1 = load i64, i64* %tmp.this - call void @ctor.191(%String* %res, i64 %1) - store i64 0, i64* %tmp.this1 - %2 = load i64, i64* %tmp.this1 - %3 = call i8* @"().344"(%String* %res, i64 %2) - %4 = load %File*, %File** %this.addr - %5 = getelementptr inbounds %File, %File* %4, i32 0, i32 0 - %6 = load i8*, i8** %5 - %7 = call i8* @fgets(i8* %3, i32 256, i8* %6) - store i8* %7, i8** %cstr + call void @ctor.177(%String* %res, i64 %1) + store i64 0, i64* %tmp.this2 + %2 = load i64, i64* %tmp.this2 + %3 = call i8* @"().332"(%String* %res, i64 %2) + call void @ctor.67(%UntypedPtr* %tmp.this1, i8* %3) + %4 = load %UntypedPtr, %UntypedPtr* %tmp.this1 + %5 = load %File, %File* %this + %6 = call i8* @fgets(%UntypedPtr %4, i32 256, %File %5) + store i8* %6, i8** %cstr br label %if_block if_block: ; preds = %code - %8 = load i8*, i8** %cstr - %9 = call i1 @implOpRefEQ(i8* %8, i8* null) - br i1 %9, label %if_then, label %if_else + %7 = load i8*, i8** %cstr + %8 = call i1 @implOpRefEQ(i8* %7, i8* null) + br i1 %8, label %if_then, label %if_else if_then: ; preds = %if_block call void @clear(%String* %res) br label %if_end if_else: ; preds = %if_block - %10 = load i8*, i8** %cstr - %11 = call i64 @cStringLen(i8* %10) - call void @resize(%String* %res, i64 %11) + %9 = load i8*, i8** %cstr + %10 = call i64 @cStringLen(i8* %9) + call void @resize(%String* %res, i64 %10) br label %if_end if_end: ; preds = %if_else, %if_then - %12 = load %String*, %String** %_result.addr - call void @ctor.189(%String* %12, %String* %res) - call void @dtor.261(%String* %res) + call void @ctor.175(%String* %_result, %String* %res) + call void @dtor.250(%String* %res) ret void dumy_block: ; No predecessors! - call void @dtor.261(%String* %res) + call void @dtor.250(%String* %res) ret void } -declare i8* @fgets(i8*, i32, i8*) +declare i8* @fgets(%UntypedPtr, i32, %File) ; Function Attrs: inlinehint nounwind define internal i32 @write(%File* %this, %StringRef %data) #4 { - %this.addr = alloca %File* - store %File* %this, %File** %this.addr %data.addr = alloca %StringRef store %StringRef %data, %StringRef* %data.addr %res = alloca i32 - %tmp.this = alloca i32 + %tmp.this = alloca %UntypedPtr %tmp.this1 = alloca i32 + %tmp.this2 = alloca i32 br label %code code: ; preds = %0 %1 = getelementptr inbounds %StringRef, %StringRef* %data.addr, i32 0, i32 0 - %2 = load i8*, i8** %1 - store i32 1, i32* %tmp.this - %3 = load i32, i32* %tmp.this - %4 = call i64 @size(%StringRef* %data.addr) - %5 = trunc i64 %4 to i32 - store i32 %5, i32* %tmp.this1 - %6 = load i32, i32* %tmp.this1 - %7 = load %File*, %File** %this.addr - %8 = getelementptr inbounds %File, %File* %7, i32 0, i32 0 - %9 = load i8*, i8** %8 - %10 = call i32 @fwrite(i8* %2, i32 %3, i32 %6, i8* %9) + %2 = load %UntypedPtr, %UntypedPtr* %1 + call void @ctor.55(%UntypedPtr* %tmp.this, %UntypedPtr %2) + %3 = load %UntypedPtr, %UntypedPtr* %tmp.this + store i32 1, i32* %tmp.this1 + %4 = load i32, i32* %tmp.this1 + %5 = load %StringRef, %StringRef* %data.addr + %6 = call i64 @size(%StringRef %5) + %7 = trunc i64 %6 to i32 + store i32 %7, i32* %tmp.this2 + %8 = load i32, i32* %tmp.this2 + %9 = load %File, %File* %this + %10 = call i32 @fwrite(%UntypedPtr %3, i32 %4, i32 %8, %File %9) store i32 %10, i32* %res %11 = load i32, i32* %res ret i32 %11 } -declare i32 @fwrite(i8*, i32, i32, i8*) +declare i32 @fwrite(%UntypedPtr, i32, i32, %File) ; Function Attrs: inlinehint nounwind -define internal void @all.700(%FileRange* sret %_result, %File* %this) #4 { - %_result.addr = alloca %FileRange* - store %FileRange* %_result, %FileRange** %_result.addr - %this.addr = alloca %File* - store %File* %this, %File** %this.addr +define internal i32 @size.682(%File* %this) #4 { + %tmp.this = alloca i64 + %res = alloca i32 + br label %code + +code: ; preds = %0 + %1 = load %File, %File* %this + store i64 0, i64* %tmp.this + %2 = load i64, i64* %tmp.this + call void @fseek(%File %1, i64 %2, i32 2) + %3 = load %File, %File* %this + %4 = call i64 @ftell(%File %3) + %5 = trunc i64 %4 to i32 + store i32 %5, i32* %res + %6 = load %File, %File* %this + call void @rewind(%File %6) + %7 = load i32, i32* %res + ret i32 %7 +} + +declare void @fseek(%File, i64, i32) + +declare i64 @ftell(%File) + +declare void @rewind(%File) + +; Function Attrs: inlinehint nounwind +define internal void @all.683(%FileRange* sret %_result, %File* %this) #4 { br label %code code: ; preds = %0 - %1 = load %FileRange*, %FileRange** %_result.addr - %2 = load %File*, %File** %this.addr - call void @ctor.701(%FileRange* %1, %File* %2) + call void @ctor.684(%FileRange* %_result, %File* %this) ret void } ; Function Attrs: inlinehint nounwind -define internal void @ctor.701(%FileRange* %this, %File* %file) #4 { - %this.addr = alloca %FileRange* - store %FileRange* %this, %FileRange** %this.addr - %file.addr = alloca %File* - store %File* %file, %File** %file.addr +define internal void @ctor.684(%FileRange* %this, %File* %file) #4 { br label %code code: ; preds = %0 - %1 = load %FileRange*, %FileRange** %this.addr - %2 = getelementptr inbounds %FileRange, %FileRange* %1, i32 0, i32 0 - store %File* null, %File** %2 - %3 = load %FileRange*, %FileRange** %this.addr - %4 = getelementptr inbounds %FileRange, %FileRange* %3, i32 0, i32 1 - store i1 false, i1* %4 - %5 = load %File*, %File** %file.addr - %6 = load %FileRange*, %FileRange** %this.addr - %7 = getelementptr inbounds %FileRange, %FileRange* %6, i32 0, i32 0 - store %File* %5, %File** %7 - %8 = load %FileRange*, %FileRange** %this.addr - %9 = getelementptr inbounds %FileRange, %FileRange* %8, i32 0, i32 1 - store i1 true, i1* %9 - %10 = load %FileRange*, %FileRange** %this.addr - %11 = getelementptr inbounds %FileRange, %FileRange* %10, i32 0, i32 2 - store i8 0, i8* %11 + %1 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 0 + store %File* null, %File** %1 + %2 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 1 + store i1 false, i1* %2 + %3 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 0 + store %File* %file, %File** %3 + %4 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 1 + store i1 true, i1* %4 + %5 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 2 + store i8 0, i8* %5 br label %if_block if_block: ; preds = %code - %12 = load %FileRange*, %FileRange** %this.addr - %13 = getelementptr inbounds %FileRange, %FileRange* %12, i32 0, i32 0 - %14 = load %File*, %File** %13 - %15 = call i1 @isEof(%File* %14) - %16 = xor i1 true, %15 - br i1 %16, label %if_then, label %if_end + %6 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 0 + %7 = load %File*, %File** %6 + %8 = call i1 @isEof(%File* %7) + %9 = xor i1 true, %8 + br i1 %9, label %if_then, label %if_end if_then: ; preds = %if_block - %17 = load %FileRange*, %FileRange** %this.addr - %18 = getelementptr inbounds %FileRange, %FileRange* %17, i32 0, i32 0 - %19 = load %File*, %File** %18 - %20 = call i8 @readChar(%File* %19) - %21 = load %FileRange*, %FileRange** %this.addr - %22 = getelementptr inbounds %FileRange, %FileRange* %21, i32 0, i32 2 - store i8 %20, i8* %22 - %23 = load %FileRange*, %FileRange** %this.addr - %24 = getelementptr inbounds %FileRange, %FileRange* %23, i32 0, i32 1 - store i1 false, i1* %24 + %10 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 0 + %11 = load %File*, %File** %10 + %12 = call i8 @readChar(%File* %11) + %13 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 2 + store i8 %12, i8* %13 + %14 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 1 + store i1 false, i1* %14 br label %if_end if_end: ; preds = %if_then, %if_block @@ -34248,28 +30350,21 @@ if_end: ; preds = %if_then, %if_block } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.702(%FileRange* %this) #3 { - %this.addr = alloca %FileRange* - store %FileRange* %this, %FileRange** %this.addr +define internal void @ctor.685(%FileRange* %this) #3 { br label %code code: ; preds = %0 - %1 = load %FileRange*, %FileRange** %this.addr - %2 = getelementptr inbounds %FileRange, %FileRange* %1, i32 0, i32 0 - store %File* null, %File** %2 - %3 = load %FileRange*, %FileRange** %this.addr - %4 = getelementptr inbounds %FileRange, %FileRange* %3, i32 0, i32 1 - store i1 false, i1* %4 - %5 = load %FileRange*, %FileRange** %this.addr - %6 = getelementptr inbounds %FileRange, %FileRange* %5, i32 0, i32 2 - store i8 0, i8* %6 + %1 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 0 + store %File* null, %File** %1 + %2 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 1 + store i1 false, i1* %2 + %3 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 2 + store i8 0, i8* %3 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.703(%FileRange* %this, %FileRange* %other) #3 { - %this.addr = alloca %FileRange* - store %FileRange* %this, %FileRange** %this.addr +define internal void @ctor.686(%FileRange* %this, %FileRange* %other) #3 { %other.addr = alloca %FileRange* store %FileRange* %other, %FileRange** %other.addr br label %code @@ -34278,28 +30373,23 @@ code: ; preds = %0 %1 = load %FileRange*, %FileRange** %other.addr %2 = getelementptr inbounds %FileRange, %FileRange* %1, i32 0, i32 0 %3 = load %File*, %File** %2 - %4 = load %FileRange*, %FileRange** %this.addr - %5 = getelementptr inbounds %FileRange, %FileRange* %4, i32 0, i32 0 - store %File* %3, %File** %5 - %6 = load %FileRange*, %FileRange** %other.addr - %7 = getelementptr inbounds %FileRange, %FileRange* %6, i32 0, i32 1 - %8 = load i1, i1* %7 - %9 = load %FileRange*, %FileRange** %this.addr - %10 = getelementptr inbounds %FileRange, %FileRange* %9, i32 0, i32 1 - store i1 %8, i1* %10 - %11 = load %FileRange*, %FileRange** %other.addr - %12 = getelementptr inbounds %FileRange, %FileRange* %11, i32 0, i32 2 - %13 = load i8, i8* %12 - %14 = load %FileRange*, %FileRange** %this.addr - %15 = getelementptr inbounds %FileRange, %FileRange* %14, i32 0, i32 2 - store i8 %13, i8* %15 + %4 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 0 + store %File* %3, %File** %4 + %5 = load %FileRange*, %FileRange** %other.addr + %6 = getelementptr inbounds %FileRange, %FileRange* %5, i32 0, i32 1 + %7 = load i1, i1* %6 + %8 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 1 + store i1 %7, i1* %8 + %9 = load %FileRange*, %FileRange** %other.addr + %10 = getelementptr inbounds %FileRange, %FileRange* %9, i32 0, i32 2 + %11 = load i8, i8* %10 + %12 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 2 + store i8 %11, i8* %12 ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.704(%FileRange* %this) #3 { - %this.addr = alloca %FileRange* - store %FileRange* %this, %FileRange** %this.addr +define internal void @dtor.687(%FileRange* %this) #3 { br label %code code: ; preds = %0 @@ -34307,9 +30397,7 @@ code: ; preds = %0 } ; Function Attrs: alwaysinline nounwind -define internal void @"=.705"(%FileRange* %this, %FileRange* %other) #3 { - %this.addr = alloca %FileRange* - store %FileRange* %this, %FileRange** %this.addr +define internal void @"=.688"(%FileRange* %this, %FileRange* %other) #3 { %other.addr = alloca %FileRange* store %FileRange* %other, %FileRange** %other.addr br label %code @@ -34318,26 +30406,23 @@ code: ; preds = %0 %1 = load %FileRange*, %FileRange** %other.addr %2 = getelementptr inbounds %FileRange, %FileRange* %1, i32 0, i32 0 %3 = load %File*, %File** %2 - %4 = load %FileRange*, %FileRange** %this.addr - %5 = getelementptr inbounds %FileRange, %FileRange* %4, i32 0, i32 0 - store %File* %3, %File** %5 - %6 = load %FileRange*, %FileRange** %other.addr - %7 = getelementptr inbounds %FileRange, %FileRange* %6, i32 0, i32 1 - %8 = load i1, i1* %7 - %9 = load %FileRange*, %FileRange** %this.addr - %10 = getelementptr inbounds %FileRange, %FileRange* %9, i32 0, i32 1 - store i1 %8, i1* %10 - %11 = load %FileRange*, %FileRange** %other.addr - %12 = getelementptr inbounds %FileRange, %FileRange* %11, i32 0, i32 2 - %13 = load i8, i8* %12 - %14 = load %FileRange*, %FileRange** %this.addr - %15 = getelementptr inbounds %FileRange, %FileRange* %14, i32 0, i32 2 - store i8 %13, i8* %15 + %4 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 0 + store %File* %3, %File** %4 + %5 = load %FileRange*, %FileRange** %other.addr + %6 = getelementptr inbounds %FileRange, %FileRange* %5, i32 0, i32 1 + %7 = load i1, i1* %6 + %8 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 1 + store i1 %7, i1* %8 + %9 = load %FileRange*, %FileRange** %other.addr + %10 = getelementptr inbounds %FileRange, %FileRange* %9, i32 0, i32 2 + %11 = load i8, i8* %10 + %12 = getelementptr inbounds %FileRange, %FileRange* %this, i32 0, i32 2 + store i8 %11, i8* %12 ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.706"(%FileRange* %this, %FileRange* %other) #3 { +define internal i1 @"==.689"(%FileRange* %this, %FileRange* %other) #3 { %this.addr = alloca %FileRange* store %FileRange* %this, %FileRange** %this.addr %other.addr = alloca %FileRange* @@ -34392,128 +30477,104 @@ cond.end3: ; preds = %cond.false2, %cond. } ; Function Attrs: inlinehint nounwind -define internal i1 @isEmpty.707(%FileRange* %s) #4 { - %s.addr = alloca %FileRange* - store %FileRange* %s, %FileRange** %s.addr +define internal i1 @isEmpty.690(%FileRange* %s) #4 { br label %code code: ; preds = %0 - %1 = load %FileRange*, %FileRange** %s.addr - %2 = getelementptr inbounds %FileRange, %FileRange* %1, i32 0, i32 1 - %3 = load i1, i1* %2 - ret i1 %3 + %1 = getelementptr inbounds %FileRange, %FileRange* %s, i32 0, i32 1 + %2 = load i1, i1* %1 + ret i1 %2 } ; Function Attrs: inlinehint nounwind -define internal i8 @front.708(%FileRange* %s) #4 { - %s.addr = alloca %FileRange* - store %FileRange* %s, %FileRange** %s.addr +define internal i8 @front.691(%FileRange* %s) #4 { br label %code code: ; preds = %0 - %1 = load %FileRange*, %FileRange** %s.addr - %2 = getelementptr inbounds %FileRange, %FileRange* %1, i32 0, i32 2 - %3 = load i8, i8* %2 - ret i8 %3 + %1 = getelementptr inbounds %FileRange, %FileRange* %s, i32 0, i32 2 + %2 = load i8, i8* %1 + ret i8 %2 } ; Function Attrs: inlinehint nounwind -define internal void @popFront.709(%FileRange* %s) #4 { - %s.addr = alloca %FileRange* - store %FileRange* %s, %FileRange** %s.addr +define internal void @popFront.692(%FileRange* %s) #4 { br label %code code: ; preds = %0 - %1 = load %FileRange*, %FileRange** %s.addr - %2 = getelementptr inbounds %FileRange, %FileRange* %1, i32 0, i32 0 - %3 = load %File*, %File** %2 - %4 = call i8 @readChar(%File* %3) - %5 = load %FileRange*, %FileRange** %s.addr - %6 = getelementptr inbounds %FileRange, %FileRange* %5, i32 0, i32 2 - store i8 %4, i8* %6 + %1 = getelementptr inbounds %FileRange, %FileRange* %s, i32 0, i32 0 + %2 = load %File*, %File** %1 + %3 = call i8 @readChar(%File* %2) + %4 = getelementptr inbounds %FileRange, %FileRange* %s, i32 0, i32 2 + store i8 %3, i8* %4 br label %if_block if_block: ; preds = %code - %7 = load %FileRange*, %FileRange** %s.addr - %8 = getelementptr inbounds %FileRange, %FileRange* %7, i32 0, i32 0 - %9 = load %File*, %File** %8 - %10 = call i1 @isEof(%File* %9) - br i1 %10, label %if_then, label %if_end + %5 = getelementptr inbounds %FileRange, %FileRange* %s, i32 0, i32 0 + %6 = load %File*, %File** %5 + %7 = call i1 @isEof(%File* %6) + br i1 %7, label %if_then, label %if_end if_then: ; preds = %if_block - %11 = load %FileRange*, %FileRange** %s.addr - %12 = getelementptr inbounds %FileRange, %FileRange* %11, i32 0, i32 1 - store i1 true, i1* %12 + %8 = getelementptr inbounds %FileRange, %FileRange* %s, i32 0, i32 1 + store i1 true, i1* %8 br label %if_end if_end: ; preds = %if_then, %if_block ret void } -declare i32 @fread(i8*, i32, i32, i8*) +declare i32 @fread(%UntypedPtr, i32, i32, %File) ; Function Attrs: alwaysinline nounwind -define internal void @ctor.710(%FileCharSource* %this) #3 { - %this.addr = alloca %FileCharSource* - store %FileCharSource* %this, %FileCharSource** %this.addr +define internal void @ctor.693(%FileCharSource* %this) #3 { br label %code code: ; preds = %0 - %1 = load %FileCharSource*, %FileCharSource** %this.addr - %2 = getelementptr inbounds %FileCharSource, %FileCharSource* %1, i32 0, i32 0 - call void @ctor.694(%File* %2) + %1 = getelementptr inbounds %FileCharSource, %FileCharSource* %this, i32 0, i32 0 + call void @ctor.677(%File* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @ctor.711(%FileCharSource* %this, %FileCharSource* %other) #3 { - %this.addr = alloca %FileCharSource* - store %FileCharSource* %this, %FileCharSource** %this.addr +define internal void @ctor.694(%FileCharSource* %this, %FileCharSource* %other) #3 { %other.addr = alloca %FileCharSource* store %FileCharSource* %other, %FileCharSource** %other.addr br label %code code: ; preds = %0 - %1 = load %FileCharSource*, %FileCharSource** %this.addr - %2 = getelementptr inbounds %FileCharSource, %FileCharSource* %1, i32 0, i32 0 - %3 = load %FileCharSource*, %FileCharSource** %other.addr - %4 = getelementptr inbounds %FileCharSource, %FileCharSource* %3, i32 0, i32 0 - call void @ctor.696(%File* %2, %File* %4) + %1 = getelementptr inbounds %FileCharSource, %FileCharSource* %this, i32 0, i32 0 + %2 = load %FileCharSource*, %FileCharSource** %other.addr + %3 = getelementptr inbounds %FileCharSource, %FileCharSource* %2, i32 0, i32 0 + call void @ctor.678(%File* %1, %File* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @dtor.712(%FileCharSource* %this) #3 { - %this.addr = alloca %FileCharSource* - store %FileCharSource* %this, %FileCharSource** %this.addr +define internal void @dtor.695(%FileCharSource* %this) #3 { br label %code code: ; preds = %0 - %1 = load %FileCharSource*, %FileCharSource** %this.addr - %2 = getelementptr inbounds %FileCharSource, %FileCharSource* %1, i32 0, i32 0 - call void @dtor.697(%File* %2) + %1 = getelementptr inbounds %FileCharSource, %FileCharSource* %this, i32 0, i32 0 + call void @dtor.679(%File* %1) ret void } ; Function Attrs: alwaysinline nounwind -define internal void @"=.713"(%FileCharSource* %this, %FileCharSource* %other) #3 { - %this.addr = alloca %FileCharSource* - store %FileCharSource* %this, %FileCharSource** %this.addr +define internal void @"=.696"(%FileCharSource* %this, %FileCharSource* %other) #3 { %other.addr = alloca %FileCharSource* store %FileCharSource* %other, %FileCharSource** %other.addr br label %code code: ; preds = %0 - %1 = load %FileCharSource*, %FileCharSource** %this.addr - %2 = getelementptr inbounds %FileCharSource, %FileCharSource* %1, i32 0, i32 0 - %3 = load %FileCharSource*, %FileCharSource** %other.addr - %4 = getelementptr inbounds %FileCharSource, %FileCharSource* %3, i32 0, i32 0 - call void @"=.698"(%File* %2, %File* %4) + %1 = getelementptr inbounds %FileCharSource, %FileCharSource* %this, i32 0, i32 0 + %2 = load %FileCharSource*, %FileCharSource** %other.addr + %3 = getelementptr inbounds %FileCharSource, %FileCharSource* %2, i32 0, i32 0 + call void @"=.680"(%File* %1, %File* %3) ret void } ; Function Attrs: alwaysinline nounwind -define internal i1 @"==.714"(%FileCharSource* %this, %FileCharSource* %other) #3 { +define internal i1 @"==.697"(%FileCharSource* %this, %FileCharSource* %other) #3 { %this.addr = alloca %FileCharSource* store %FileCharSource* %this, %FileCharSource** %this.addr %other.addr = alloca %FileCharSource* @@ -34525,21 +30586,35 @@ code: ; preds = %0 %2 = getelementptr inbounds %FileCharSource, %FileCharSource* %1, i32 0, i32 0 %3 = load %FileCharSource*, %FileCharSource** %other.addr %4 = getelementptr inbounds %FileCharSource, %FileCharSource* %3, i32 0, i32 0 - %5 = call i1 @"==.693"(%File* %2, %File* %4) + %5 = call i1 @"==.698"(%File* %2, %File* %4) + ret i1 %5 +} + +; Function Attrs: alwaysinline nounwind +define internal i1 @"==.698"(%File* %this, %File* %other) #3 { + %this.addr = alloca %File* + store %File* %this, %File** %this.addr + %other.addr = alloca %File* + store %File* %other, %File** %other.addr + br label %code + +code: ; preds = %0 + %1 = load %File*, %File** %this.addr + %2 = getelementptr inbounds %File, %File* %1, i32 0, i32 0 + %3 = load %File*, %File** %other.addr + %4 = getelementptr inbounds %File, %File* %3, i32 0, i32 0 + %5 = call i1 @"==.326"(%UntypedPtr* %2, %UntypedPtr* %4) ret i1 %5 } ; Function Attrs: inlinehint nounwind define internal i1 @isValid(%FileCharSource* %this) #4 { - %this.addr = alloca %FileCharSource* - store %FileCharSource* %this, %FileCharSource** %this.addr br label %code code: ; preds = %0 - %1 = load %FileCharSource*, %FileCharSource** %this.addr - %2 = getelementptr inbounds %FileCharSource, %FileCharSource* %1, i32 0, i32 0 - %3 = call i1 @isOpen(%File* %2) - ret i1 %3 + %1 = getelementptr inbounds %FileCharSource, %FileCharSource* %this, i32 0, i32 0 + %2 = call i1 @isOpen(%File* %1) + ret i1 %2 } attributes #0 = { alwaysinline } diff --git a/src/SparrowFrontend/Grammar/parserIf.spr b/src/SparrowFrontend/Grammar/parserIf.spr index b45557e0..d039f8b2 100644 --- a/src/SparrowFrontend/Grammar/parserIf.spr +++ b/src/SparrowFrontend/Grammar/parserIf.spr @@ -12,7 +12,7 @@ datatype ParserContext _layoutDecoder: _LayoutDecoderType _parser: _ParserType -fun ctor(this: @ParserContext, chars: CharSource, loc: Location, astBuilder: @AstBuilder, reporter: ErrorReporter) +fun ctor(this: !ParserContext, chars: CharSource, loc: Location, astBuilder: AstBuilder, reporter: ErrorReporter) _scanner.ctor(chars, reporter, loc) _layoutDecoder.ctor(_scanner, reporter) _parser.ctor(_layoutDecoder, astBuilder, reporter) @@ -20,28 +20,28 @@ fun ctor(this: @ParserContext, chars: CharSource, loc: Location, astBuilder: @As // Used by the compiler [noInline] [native("spr_parserIf_createParser")] - fun createParser(chars: CharSource, loc: @Location, astBuilder: @AstBuilder, reporter: ErrorReporter): @ParserContext + fun createParser(chars: CharSource, loc: Location const, astBuilder: !AstBuilder, reporter: ErrorReporter): @ParserContext var res: @ParserContext = new(ParserContext, chars, loc, astBuilder, reporter) return res [native("spr_parserIf_createParserFile")] - fun createParserFile(filename: StringRef, loc: @Location, astBuilder: @AstBuilder, reporter: ErrorReporter): @ParserContext + fun createParserFile(filename: StringRef, loc: Location const, astBuilder: !AstBuilder, reporter: ErrorReporter): @ParserContext var fileCharSource: @FileCharSource = new(FileCharSource, filename) return createParser(mkCharSource(fileCharSource), loc, astBuilder, reporter) [native("spr_parserIf_createParserStringRef")] - fun createParserStringRef(code: StringRef, loc: @Location, astBuilder: @AstBuilder, reporter: ErrorReporter): @ParserContext + fun createParserStringRef(code: StringRef, loc: Location const, astBuilder: !AstBuilder, reporter: ErrorReporter): @ParserContext var stringCharSource: @StringCharSource = new(StringCharSource, code) return createParser(mkCharSource(stringCharSource), loc, astBuilder, reporter) [native("spr_parserIf_destroyParser")] - fun destroyParser(ctx: @ParserContext) + fun destroyParser(ctx: !ParserContext) delete(ctx) [native("spr_parserIf_nextToken")] - fun nextToken(ctx: @ParserContext, outToken: @Token) + fun nextToken(ctx: !ParserContext, outToken: !Token) outToken = (ctx._scanner++) [native("spr_parserIf_parseModule")] - fun parseModule(ctx: @ParserContext): Node = ctx._parser parseModule + fun parseModule(ctx: !ParserContext): Node = ctx._parser parseModule [native("spr_parserIf_parseExpression")] - fun parseExpression(ctx: @ParserContext): Node = ctx._parser parseExpression + fun parseExpression(ctx: !ParserContext): Node = ctx._parser parseExpression diff --git a/src/SparrowFrontend/Grammar/rangeWithLookahead.spr b/src/SparrowFrontend/Grammar/rangeWithLookahead.spr index 30a8dc61..75342b48 100644 --- a/src/SparrowFrontend/Grammar/rangeWithLookahead.spr +++ b/src/SparrowFrontend/Grammar/rangeWithLookahead.spr @@ -16,7 +16,7 @@ datatype RangeWithLookahead(baseRangeType: Type) if Range(#$baseRangeType) source: baseRangeType buffer: Vector(RetType) -fun ctor(this: @RangeWithLookahead, src: this._RangeType) +fun ctor(this: !RangeWithLookahead, src: this._RangeType) this.source = src this.buffer ctor this.buffer reserve 10 @@ -25,15 +25,15 @@ fun ctor(this: @RangeWithLookahead, src: this._RangeType) if !!source buffer += (source++) -fun isEmpty(this: @RangeWithLookahead): Bool = buffer.isEmpty -fun front(this: @RangeWithLookahead): RetType = buffer.front -fun popFront(this: @RangeWithLookahead) +fun isEmpty(this: RangeWithLookahead): Bool = buffer.isEmpty +fun front(this: RangeWithLookahead): RetType = buffer.front +fun popFront(this: !RangeWithLookahead) buffer remove 0 // Add a new element in the buffer if the buffer is empty if (buffer.isEmpty) && !!source buffer += (source++) -fun peek(this: @RangeWithLookahead, n: UInt): RetType +fun peek(this: !RangeWithLookahead, n: UInt): RetType // If not enough elements in the buffer, add them now while n >= buffer.size && !!source buffer += (source++) @@ -42,7 +42,7 @@ fun peek(this: @RangeWithLookahead, n: UInt): RetType else return RetType() // not enough elements in the source -fun hasLessThan(this: @RangeWithLookahead, n: UInt): Bool +fun hasLessThan(this: !RangeWithLookahead, n: UInt): Bool // Try to fill the buffer with the amount of elements while n >= buffer.size && !!source buffer += (source++) diff --git a/src/SparrowFrontend/Grammar/scanner.spr b/src/SparrowFrontend/Grammar/scanner.spr index 15aa000b..d3968ee5 100644 --- a/src/SparrowFrontend/Grammar/scanner.spr +++ b/src/SparrowFrontend/Grammar/scanner.spr @@ -25,9 +25,9 @@ package _ImplLSCR source: sourceType location: @Location - fun isEmpty(this: @LocationSyncCharRange) = source.isEmpty - fun front(this: @LocationSyncCharRange) = source.front - fun popFront(this: @LocationSyncCharRange) + fun isEmpty(this: LocationSyncCharRange) = source.isEmpty + fun front(this: LocationSyncCharRange) = source.front + fun popFront(this: !LocationSyncCharRange) if *source == '\n'.char location addLines 1 else @@ -59,8 +59,8 @@ datatype SparrowScanner /// If true, also emit whitespace & comment tokens _emitWitespace: Bool -fun ctor(this: @SparrowScanner, chars: CharSource, errorReporter: ErrorReporter, \ - iniLocation: @Location, emitWitespace: Bool = false) +fun ctor(this: !SparrowScanner, chars: CharSource, errorReporter: ErrorReporter, \ + iniLocation: Location, emitWitespace: Bool = false) this._curLocation ctor iniLocation this._bufferedSource ctor chars this._src.ctor(RangeWithLookahead(BufferedCharSourceRange)(_bufferedSource.all), _curLocation) @@ -69,13 +69,13 @@ fun ctor(this: @SparrowScanner, chars: CharSource, errorReporter: ErrorReporter, this._errorReporter ctor errorReporter this._emitWitespace = emitWitespace -fun isEmpty(this: @SparrowScanner) = false -fun front(this: @SparrowScanner): Token +fun isEmpty(this: SparrowScanner) = false +fun front(this: !SparrowScanner): Token if !_tokenIsComputed _tokenIsComputed = true this.popFront return _curToken -fun popFront(this: @SparrowScanner) +fun popFront(this: !SparrowScanner) if _src.isEmpty _src.location stepOver _curToken.type = tkEND @@ -88,41 +88,41 @@ fun popFront(this: @SparrowScanner) package _Impl - fun reportError(this: @SparrowScanner, msg: @String) + fun reportError(this: SparrowScanner, msg: String) _errorReporter.reportError(_src.location, msg) /// Peeks at the next char; we assume that at least the cur char is valid /// Returns Char(0) if no next char is available - fun peekChar(this: @SparrowScanner): Char + fun peekChar(this: !SparrowScanner): Char return _src.source peek 1 - fun peekChar(this: @SparrowScanner, n: UInt): Char + fun peekChar(this: !SparrowScanner, n: UInt): Char return _src.source peek n /// Check if the source to has less than the given number of characters - fun hasLessThan(this: @SparrowScanner, n: UInt): Bool + fun hasLessThan(this: !SparrowScanner, n: UInt): Bool return _src.source hasLessThan n /// Advances the input stream while the predicate matches /// Captures every character that matches - fun advanceAndCapture(this: @SparrowScanner, pred: AnyType) + fun advanceAndCapture(this: !SparrowScanner, pred: AnyType) while !!_src && pred(*_src) ; _src.popFront _curToken.data += *_src /// Advances and captures 1 char - fun advanceAndCapture1(this: @SparrowScanner) + fun advanceAndCapture1(this: !SparrowScanner) _curToken.data += *_src _src.popFront /// Same as above, but do not capture '_'; we advance past it - fun advanceAndCaptureDigit(this: @SparrowScanner, pred: AnyType) + fun advanceAndCaptureDigit(this: !SparrowScanner, pred: AnyType) while !!_src && (pred(*_src) || *_src == '_'.char) ; _src.popFront if *_src != '_'.char _curToken.data += *_src /// Computes the next token, for the current characters in the source stream. /// Stores the token in _curToken - fun nextToken(this: @SparrowScanner): TokenType + fun nextToken(this: !SparrowScanner): TokenType var loc: @Location = _src.location @@ -267,7 +267,7 @@ package _Impl /// /// If this is called to parse just a '.' without any follow-up operator chars, /// this will return false - fun parseOperator(this: @SparrowScanner): Bool + fun parseOperator(this: !SparrowScanner): Bool var ch = *_src // Operators @@ -291,7 +291,7 @@ package _Impl /// Parse an identifier; we know that we start with a letter or underscore /// Also checked for reserved keywords - fun parseIdentifer(this: @SparrowScanner): TokenType + fun parseIdentifer(this: !SparrowScanner): TokenType // Match the following: // Identifier {IdLetters} | {IdLettersOp} // IdLetters ({Letter} | '_') ({Letter} | '_' | {Digit})* @@ -337,6 +337,7 @@ package _Impl else if data == "finally" return tkFINALLY else if data == "for" return tkFOR else if data == "import" return tkIMPORT + else if data == "let" return tkLET else if data == "module" return tkMODULE else if data == "null" return tkNULLCT else if data == "package" return tkPACKAGE @@ -350,7 +351,7 @@ package _Impl else return tkIDENTIFIER /// Parse a numeric constant (decimal, octal, hex, binary, floating) - fun parseNumeric(this: @SparrowScanner): TokenType + fun parseNumeric(this: !SparrowScanner): TokenType var isLong = false var isUnsigned = false var isFloating = false @@ -435,7 +436,7 @@ package _Impl fun getDigitVal(c: Char) = (Int(c) - Int('0'.char)) fun getXdigitVal(c: Char) = ife(isDigit(c), Int(c) - Int('0'.char), 10 + Int(toLower(c)) - Int('a'.char)) - fun consumeDigits(r: @Range, base: ULong, capture: @String): ULong + fun consumeDigits(r: !Range, base: ULong, capture: !String): ULong var res: ULong = 0 if base == 16 while !!r && (isXdigit(*r) || *r == '_'.char) ; r.popFront @@ -451,7 +452,7 @@ package _Impl res += getDigitVal(*r) return res - fun checkEscapeChar(this: @SparrowScanner): Bool + fun checkEscapeChar(this: !SparrowScanner): Bool var ch = *_src if ch == '\\'.char ch = ++_src @@ -485,7 +486,7 @@ package _Impl return true return false - fun parseString(this: @SparrowScanner, endChar: Char): TokenType + fun parseString(this: !SparrowScanner, endChar: Char): TokenType _src.popFront if this hasLessThan 1 this reportError "End of file found inside string literal" @@ -505,7 +506,7 @@ package _Impl return tkSTRING_LITERAL - fun parseStringNE(this: @SparrowScanner): TokenType + fun parseStringNE(this: !SparrowScanner): TokenType _src advance 2 // Get all the characters from the string diff --git a/src/SparrowFrontend/Grammar/stringCharSource.spr b/src/SparrowFrontend/Grammar/stringCharSource.spr index e9bc9813..bc8afccd 100644 --- a/src/SparrowFrontend/Grammar/stringCharSource.spr +++ b/src/SparrowFrontend/Grammar/stringCharSource.spr @@ -6,7 +6,7 @@ import std.ranges, std.string datatype StringCharSource _content: StringRef -fun readChars(this: @StringCharSource, dest: @String, numChars: Int) +fun readChars(this: !StringCharSource, dest: !String, numChars: Int) var sz: Int = _content.size var toRead = ife(numChars < sz, numChars, sz) for i = 0..sz diff --git a/src/SparrowFrontend/Grammar/token.spr b/src/SparrowFrontend/Grammar/token.spr index 3182f8a6..d2f35356 100644 --- a/src/SparrowFrontend/Grammar/token.spr +++ b/src/SparrowFrontend/Grammar/token.spr @@ -26,45 +26,46 @@ using tkIMPORT = TokenType(3) using tkCONCEPT = TokenType(4) using tkDATATYPE = TokenType(5) using tkFUN = TokenType(6) -using tkPACKAGE = TokenType(7) -using tkUSING = TokenType(8) -using tkVAR = TokenType(9) -using tkBREAK = TokenType(10) -using tkCATCH = TokenType(11) -using tkCONTINUE = TokenType(12) -using tkFINALLY = TokenType(13) -using tkFOR = TokenType(14) -using tkIF = TokenType(15) -using tkRETURN = TokenType(16) -using tkTHROW = TokenType(17) -using tkTRY = TokenType(18) -using tkWHILE = TokenType(19) -using tkFALSE = TokenType(20) -using tkNULLCT = TokenType(21) -using tkTRUE = TokenType(22) -using tkELSE = TokenType(23) -using tkLCURLY = TokenType(24) -using tkRCURLY = TokenType(25) -using tkLBRACKET = TokenType(26) -using tkRBRACKET = TokenType(27) -using tkLPAREN = TokenType(28) -using tkRPAREN = TokenType(29) -using tkCOLON = TokenType(30) -using tkSEMICOLON = TokenType(31) -using tkCOMMA = TokenType(32) -using tkDOT = TokenType(33) -using tkBACKSQUOTE = TokenType(34) -using tkEQUAL = TokenType(35) -using tkIDENTIFIER = TokenType(36) -using tkOPERATOR = TokenType(37) -using tkCHAR_LITERAL = TokenType(38) -using tkSTRING_LITERAL = TokenType(39) -using tkINT_LITERAL = TokenType(40) -using tkLONG_LITERAL = TokenType(41) -using tkUINT_LITERAL = TokenType(42) -using tkULONG_LITERAL = TokenType(43) -using tkFLOAT_LITERAL = TokenType(44) -using tkDOUBLE_LITERAL = TokenType(45) +using tkLET = TokenType(7) +using tkPACKAGE = TokenType(8) +using tkUSING = TokenType(9) +using tkVAR = TokenType(10) +using tkBREAK = TokenType(11) +using tkCATCH = TokenType(12) +using tkCONTINUE = TokenType(13) +using tkFINALLY = TokenType(14) +using tkFOR = TokenType(15) +using tkIF = TokenType(16) +using tkRETURN = TokenType(17) +using tkTHROW = TokenType(18) +using tkTRY = TokenType(19) +using tkWHILE = TokenType(20) +using tkFALSE = TokenType(21) +using tkNULLCT = TokenType(22) +using tkTRUE = TokenType(23) +using tkELSE = TokenType(24) +using tkLCURLY = TokenType(25) +using tkRCURLY = TokenType(26) +using tkLBRACKET = TokenType(27) +using tkRBRACKET = TokenType(28) +using tkLPAREN = TokenType(29) +using tkRPAREN = TokenType(30) +using tkCOLON = TokenType(31) +using tkSEMICOLON = TokenType(32) +using tkCOMMA = TokenType(33) +using tkDOT = TokenType(34) +using tkBACKSQUOTE = TokenType(35) +using tkEQUAL = TokenType(36) +using tkIDENTIFIER = TokenType(37) +using tkOPERATOR = TokenType(38) +using tkCHAR_LITERAL = TokenType(39) +using tkSTRING_LITERAL = TokenType(40) +using tkINT_LITERAL = TokenType(41) +using tkLONG_LITERAL = TokenType(42) +using tkUINT_LITERAL = TokenType(43) +using tkULONG_LITERAL = TokenType(44) +using tkFLOAT_LITERAL = TokenType(45) +using tkDOUBLE_LITERAL = TokenType(46) using tkLINECONTINUE = TokenType(253) using tkCOMMENT = TokenType(254) @@ -80,6 +81,7 @@ fun _asString(t: TokenType): String else if t == tkFUN return "'fun'" else if t == tkPACKAGE return "'package'" else if t == tkUSING return "'using'" + else if t == tkLET return "'let'" else if t == tkVAR return "'var'" else if t == tkBREAK return "'break'" else if t == tkCATCH return "'catch'" @@ -121,6 +123,6 @@ fun _asString(t: TokenType): String else if t == tkCOMMENT return "comment" else if t == tkWHITESPACE return "whitespace" -fun >>(t: TokenType, os: @OutStream) +fun >>(t: TokenType, os: !OutStream) os << (t _asString) diff --git a/src/SparrowFrontend/Helpers/CommonCode.cpp b/src/SparrowFrontend/Helpers/CommonCode.cpp index fa457cf4..0bf48a17 100644 --- a/src/SparrowFrontend/Helpers/CommonCode.cpp +++ b/src/SparrowFrontend/Helpers/CommonCode.cpp @@ -179,10 +179,10 @@ Node* SprFrontend::createFunctionCall( args1.insert(args1.begin(), arg); Node* funCall = Feather_mkFunCall(loc, fun, all(args1)); - res = createTempVarConstruct(loc, context, funCall, tmpVar); + res = createTempVarConstruct(loc, context, funCall, tmpVar, tmpVarRef); - // TODO: Check why we cannot return a reference when the result is a type - if (resType == StdDef::typeRefType) + // TODO (types): Check why we cannot return a reference when the result is a type + if (Feather::categoryToRefIfPresent(resType) == StdDef::typeRefType) res = Feather_mkMemLoad(loc, res); } else { Node* funCall = Feather_mkFunCall(loc, fun, args); @@ -199,28 +199,28 @@ Node* SprFrontend::createFunctionCall( return res; } -Node* SprFrontend::createTempVarConstruct( - const Location& loc, CompilationContext* context, Node* constructAction, Node* var) { +Node* SprFrontend::createTempVarConstruct(const Location& loc, CompilationContext* context, + Node* constructAction, Node* var, Node* varRef) { CHECK(loc, constructAction->nodeKind == nkFeatherExpFunCall); Node* funCall = constructAction; CHECK(loc, Nest_nodeArraySize(funCall->children) != 0); - Node* thisArg = at(funCall->children, 0); - if (!Nest_computeType(thisArg)) + if (!varRef) { + varRef = Feather_mkVarRef(loc, var); + Nest_setContext(varRef, context); + } + if (!Nest_computeType(varRef)) return nullptr; // Create a temp destruct action with the call of the destructor Node* destructAction = nullptr; - if (!Feather_isCt(thisArg)) { - Node* dtorCall = createDtorCall(loc, context, thisArg); + if (!Feather_isCt(varRef)) { + Node* dtorCall = createDtorCall(loc, context, varRef); if (dtorCall) destructAction = Feather_mkTempDestructAction(loc, dtorCall); } - // The result of the expressions - Node* result = Feather_mkVarRef(loc, var); // Return a var-ref to the temporary object - Node* res = - Feather_mkNodeList(loc, fromIniList({var, constructAction, destructAction, result})); + Feather_mkNodeList(loc, fromIniList({var, constructAction, destructAction, varRef})); Nest_setContext(res, context); if (!Nest_computeType(res)) return nullptr; diff --git a/src/SparrowFrontend/Helpers/CommonCode.h b/src/SparrowFrontend/Helpers/CommonCode.h index 1703577f..ba5ae703 100644 --- a/src/SparrowFrontend/Helpers/CommonCode.h +++ b/src/SparrowFrontend/Helpers/CommonCode.h @@ -16,8 +16,8 @@ Node* createFunctionCall( const Location& loc, CompilationContext* context, Node* fun, Nest_NodeRange args); /// Create a temporary variable structure given the construct action for the given variable -Node* createTempVarConstruct( - const Location& loc, CompilationContext* context, Node* constructAction, Node* var); +Node* createTempVarConstruct(const Location& loc, CompilationContext* context, + Node* constructAction, Node* var, Node* varRef = nullptr); /// Assuming the given node points to a function, creates a FunPtr object to refer to that function Node* createFunPtr(Node* funNode); diff --git a/src/SparrowFrontend/Helpers/Ct.cpp b/src/SparrowFrontend/Helpers/Ct.cpp index 328987b7..b906e84e 100644 --- a/src/SparrowFrontend/Helpers/Ct.cpp +++ b/src/SparrowFrontend/Helpers/Ct.cpp @@ -17,8 +17,8 @@ template ValueType evalValue(Node* node, Type expectedExpTy node = Nest_ctEval(node); Type t = Feather::removeCategoryIfPresent(Type(node->type)); if (!Nest::sameTypeIgnoreMode(t, expectedExpType)) - REP_INTERNAL(node->location, "Invalid value; found expression of type %1%, expected %2%") % - node->type % expectedExpType; + REP_INTERNAL(node->location, "Invalid value; expected type %1%; found %2% (%3%)") % + expectedExpType % node->type % Nest_toStringEx(node); CHECK(node->location, node->nodeKind == nkFeatherExpCtValue); ValueType* val = node ? Feather_getCtValueData(node) : nullptr; if (!val) diff --git a/src/SparrowFrontend/Helpers/DeclsHelpers.cpp b/src/SparrowFrontend/Helpers/DeclsHelpers.cpp index 8b6c8b8c..f47a9c13 100644 --- a/src/SparrowFrontend/Helpers/DeclsHelpers.cpp +++ b/src/SparrowFrontend/Helpers/DeclsHelpers.cpp @@ -148,6 +148,7 @@ Nest_NodeArray SprFrontend::expandDecls(Nest_NodeRange decls, Node* seenFrom) { } // Make sure we run again for the newly replaced decl + // NOLINTNEXTLINE goto run_loop_again; } } diff --git a/src/SparrowFrontend/Helpers/Generics.cpp b/src/SparrowFrontend/Helpers/Generics.cpp index 817b43b0..d6049e79 100644 --- a/src/SparrowFrontend/Helpers/Generics.cpp +++ b/src/SparrowFrontend/Helpers/Generics.cpp @@ -325,7 +325,6 @@ bool isConceptParam(Type paramType, NodeHandle boundValue) { return isConceptType(paramType) || paramType.mode() != modeCt; } - IterativeInstantiationBuilder::IterativeInstantiationBuilder( InstantiationsSet instSet, int numParams, EvalMode finalEvalMode, bool isCtGeneric) : instSet_(instSet) diff --git a/src/SparrowFrontend/Helpers/Generics.h b/src/SparrowFrontend/Helpers/Generics.h index d340a50d..5cb5c9f5 100644 --- a/src/SparrowFrontend/Helpers/Generics.h +++ b/src/SparrowFrontend/Helpers/Generics.h @@ -257,5 +257,4 @@ class IterativeInstantiationBuilder { NodeHandle existingBoundVal(int idx) const; }; - } // namespace SprFrontend diff --git a/src/SparrowFrontend/Helpers/Impl/Intrinsics.cpp b/src/SparrowFrontend/Helpers/Impl/Intrinsics.cpp index 788f6202..63762559 100644 --- a/src/SparrowFrontend/Helpers/Impl/Intrinsics.cpp +++ b/src/SparrowFrontend/Helpers/Impl/Intrinsics.cpp @@ -77,6 +77,15 @@ NodeHandle impl_typeChangeRefCount( return createTypeNode(context, loc, res); } +NodeHandle impl_typeRemoveCat(CompilationContext* context, const Location& loc, NodeRange args) { + CHECK(loc, args.size() == 1); + Type t = getType(args[0]); + + Type res = removeCategoryIfPresent(t); + + return createTypeNode(context, loc, res); +} + NodeHandle impl_typeIsBitcopiable( CompilationContext* context, const Location& loc, NodeRange args) { CHECK(loc, args.size() == 1); @@ -129,6 +138,33 @@ NodeHandle impl_rt(CompilationContext* context, const Location& loc, NodeRange a return createTypeNode(context, loc, t); } +NodeHandle impl_const(CompilationContext* context, const Location& loc, NodeRange args) { + Type t = getType(args[0]); + if (!t.hasStorage()) + REP_ERROR(loc, "Cannot apply 'const' to a type without storage"); + else + t = ConstType::get(TypeWithStorage(t)); + return createTypeNode(context, loc, t); +} + +NodeHandle impl_mut(CompilationContext* context, const Location& loc, NodeRange args) { + Type t = getType(args[0]); + if (!t.hasStorage()) + REP_ERROR(loc, "Cannot apply 'mut' to a type without storage"); + else + t = MutableType::get(TypeWithStorage(t)); + return createTypeNode(context, loc, t); +} + +NodeHandle impl_tmp(CompilationContext* context, const Location& loc, NodeRange args) { + Type t = getType(args[0]); + if (!t.hasStorage()) + REP_ERROR(loc, "Cannot apply 'tmp' to a type without storage"); + else + t = TempType::get(TypeWithStorage(t)); + return createTypeNode(context, loc, t); +} + NodeHandle impl_convertsTo(CompilationContext* context, const Location& loc, NodeRange args) { CHECK(loc, args.size() == 2); Type t1 = getType(args[0]); @@ -216,6 +252,8 @@ NodeHandle SprFrontend::handleIntrinsic(Feather::FunctionDecl fun, CompilationCo return impl_typeChangeMode(context, loc, args); if (nativeName == "$typeChangeRefCount") return impl_typeChangeRefCount(context, loc, args); + if (nativeName == "$typeRemoveCat") + return impl_typeRemoveCat(context, loc, args); if (nativeName == "$typeIsBitcopiable") return impl_typeIsBitcopiable(context, loc, args); if (nativeName == "$typeEQ") @@ -226,6 +264,12 @@ NodeHandle SprFrontend::handleIntrinsic(Feather::FunctionDecl fun, CompilationCo return impl_ct(context, loc, args); if (nativeName == "$rt") return impl_rt(context, loc, args); + if (nativeName == "$const") + return impl_const(context, loc, args); + if (nativeName == "$mut") + return impl_mut(context, loc, args); + if (nativeName == "$tmp") + return impl_tmp(context, loc, args); if (nativeName == "$convertsTo") return impl_convertsTo(context, loc, args); if (nativeName == "$staticBuffer") diff --git a/src/SparrowFrontend/Helpers/SprTypeTraits.cpp b/src/SparrowFrontend/Helpers/SprTypeTraits.cpp index d2a2696b..818fa71a 100644 --- a/src/SparrowFrontend/Helpers/SprTypeTraits.cpp +++ b/src/SparrowFrontend/Helpers/SprTypeTraits.cpp @@ -274,7 +274,7 @@ Node* SprFrontend::createTypeNode(CompilationContext* context, const Location& l return res; } -Type SprFrontend::getAutoType(Node* typeNode, int numRefs, EvalMode evalMode) { +Type SprFrontend::getAutoType(Node* typeNode, int numRefs, int kind, EvalMode evalMode) { Type t1 = typeNode->type; // Nothing to do for non-data-like storage types @@ -287,12 +287,23 @@ Type SprFrontend::getAutoType(Node* typeNode, int numRefs, EvalMode evalMode) { // it // This is a data-like type, so we can directly reduce it to the right datatype - return DataType::get(t.referredNode(), numRefs, evalMode); + t = DataType::get(t.referredNode(), numRefs, evalMode); + if (kind == typeKindMutable) + return MutableType::get(t); + else if (kind == typeKindConst) + return ConstType::get(t); + else if (kind == typeKindTemp) + return TempType::get(t); + return t; } -bool SprFrontend::isConceptType(Type t) { return t.kind() == typeKindConcept; } +bool SprFrontend::isConceptType(Type t) { + return Feather::removeCategoryIfPresent(t).kind() == typeKindConcept; +} -bool SprFrontend::isConceptType(Type t, int& numRefs) { +bool SprFrontend::isConceptType(Type t, int& numRefs, int& kind) { + kind = t.kind(); + t = Feather::removeCategoryIfPresent(t); if (t.kind() == typeKindConcept) { numRefs = int(t.numReferences()); return true; @@ -322,3 +333,8 @@ bool SprFrontend::isBitCopiable(Type type) { return false; return type.referredNode() && type.referredNode().hasProperty(propBitCopiable); } + +bool SprFrontend::shouldMakeParamConst(Type type) { + return type.hasStorage() && type.numReferences() == 0 && !Feather::isCategoryType(type) && + type.mode() != modeCt && !isBitCopiable(type); +} diff --git a/src/SparrowFrontend/Helpers/SprTypeTraits.h b/src/SparrowFrontend/Helpers/SprTypeTraits.h index d69c03d7..2bdfe48b 100644 --- a/src/SparrowFrontend/Helpers/SprTypeTraits.h +++ b/src/SparrowFrontend/Helpers/SprTypeTraits.h @@ -34,11 +34,12 @@ Node* createTypeNode(CompilationContext* context, const Location& loc, Type t); /// Gets the type to be used when auto is found for a node; removes category type, but tries to /// preserve references -Type getAutoType(Node* typeNode, int numRefs = 0, EvalMode evalMode = modeRt); +Type getAutoType(Node* typeNode, int numRefs = 0, int kind = 0, EvalMode evalMode = modeRt); -/// Tests if this an concept or concept-ref type +/// Tests if this an concept type. +/// This includes mutable or const concepts, or refenrece concepts bool isConceptType(Type t); -bool isConceptType(Type t, int& numRefs); +bool isConceptType(Type t, int& numRefs, int& kind); /// Creates a new type from the original type, with the specified reference count Type changeRefCount(Type type, int numRef, const Location& loc = Location()); @@ -47,4 +48,13 @@ Type changeRefCount(Type type, int numRef, const Location& loc = Location()); //! This returns true for native types and for references bool isBitCopiable(Type type); +//! Checks if we need to make the parameter with the given type const +//! We are making const the following parameters: +//! - datatype params +//! - type doesn't have a category already +//! - type doesn't have references +//! - type is RT +//! - type is not bitcopiable +bool shouldMakeParamConst(Type type); + } // namespace SprFrontend \ No newline at end of file diff --git a/src/SparrowFrontend/IntMods.cpp b/src/SparrowFrontend/IntMods.cpp index 366fc22e..c32396f9 100644 --- a/src/SparrowFrontend/IntMods.cpp +++ b/src/SparrowFrontend/IntMods.cpp @@ -46,7 +46,10 @@ Node* addAssociatedFun(Node* parent, const string& name, Node* body, NodeVector sprParams; sprParams.reserve(params.size()); for (auto param : params) { - sprParams.push_back(mkSprParameter(loc, StringRef(param.second), param.first)); + auto p = mkSprParameter(loc, StringRef(param.second), param.first); + if (param.first.mode() == modeCt) + Nest_setPropertyInt(p, propNoAutoConst, 1); + sprParams.push_back(p); } Node* parameters = sprParams.empty() ? nullptr : Feather_mkNodeList(loc, all(sprParams)); Node* ret = @@ -93,7 +96,7 @@ Node* generateAssociatedFun( Node* body = Feather_mkLocalSpace(loc, {}); for (Node* field : cls->children) { // Left-hand side: field-ref to the current field - Node* lhs = Feather_mkFieldRef(loc, Feather_mkMemLoad(loc, thisRef), field); + Node* lhs = Feather_mkFieldRef(loc, thisRef, field); // Right-hand side Node* rhs = @@ -116,7 +119,7 @@ Node* generateAssociatedFun( vector> params; params.reserve(2); - params.emplace_back(Feather::addRef(Feather::DataType(cls->type)), string("this")); + params.emplace_back(Feather::MutableType::get(Feather::DataType(cls->type)), string("this")); if (otherParam) params.emplace_back(otherParam, string("other")); @@ -259,6 +262,11 @@ bool hasCtorCall(Node* inSpace, bool checkThis, Node* forField) { if (Nest_nodeArraySize(n->children) == 0) continue; Node* thisArg = at(n->children, 0); + if (!Nest_semanticCheck(thisArg)) + continue; + thisArg = Nest_explanation(thisArg); + if (!thisArg) + continue; // Check for this to be passed as argument if (checkThis) { diff --git a/src/SparrowFrontend/Mods.cpp b/src/SparrowFrontend/Mods.cpp index d2ad6f72..c2cd45ae 100644 --- a/src/SparrowFrontend/Mods.cpp +++ b/src/SparrowFrontend/Mods.cpp @@ -76,8 +76,8 @@ void ModConvert_beforeComputeType(Nest_Modifier*, Node* node) { void ModNoDefault_beforeComputeType(Nest_Modifier*, Node* node) { /// Check to apply only to datatypes or functions if (node->nodeKind != nkSparrowDeclSprFunction && node->nodeKind != nkSparrowDeclSprDatatype) - REP_INTERNAL(node->location, - "noDefault modifier can be applied only to datatypes or functions (applied to %1%)") % + REP_INTERNAL(node->location, "noDefault modifier can be applied only to datatypes or " + "functions (applied to %1%)") % Nest_nodeKindName(node); Nest_setPropertyInt(node, propNoDefault, 1); @@ -152,7 +152,8 @@ Nest_Modifier _convertMod = {modTypeBeforeComputeType, &ModConvert_beforeCompute Nest_Modifier _noDefaultMod = {modTypeBeforeComputeType, &ModNoDefault_beforeComputeType}; Nest_Modifier _initCtorMod = {modTypeBeforeComputeType, ModInitCtor_beforeComputeType}; Nest_Modifier _bitCopiableMod = {modTypeBeforeComputeType, &ModBitCopiable_beforeComputeType}; -Nest_Modifier _autoBitCopiableMod = {modTypeBeforeComputeType, &ModAutoBitCopiable_beforeComputeType}; +Nest_Modifier _autoBitCopiableMod = { + modTypeBeforeComputeType, &ModAutoBitCopiable_beforeComputeType}; Nest_Modifier _macroMod = {modTypeBeforeComputeType, &ModMacro_beforeComputeType}; Nest_Modifier _noInlineMod = {modTypeBeforeComputeType, &ModNoInline_beforeComputeType}; diff --git a/src/SparrowFrontend/Nodes/Decl.cpp b/src/SparrowFrontend/Nodes/Decl.cpp index f58b8d78..90b2e0fd 100644 --- a/src/SparrowFrontend/Nodes/Decl.cpp +++ b/src/SparrowFrontend/Nodes/Decl.cpp @@ -10,6 +10,7 @@ #include "SparrowFrontend/Helpers/StdDef.h" #include "SparrowFrontend/Helpers/Generics.h" #include "SparrowFrontend/Services/IConvertService.h" +#include "SparrowFrontend/SprDebug.h" #include "Feather/Utils/cppif/FeatherNodes.hpp" @@ -140,6 +141,13 @@ Type computeVarType( if (typeNode) { typeNode.setPropertyExpl(propAllowDeclExp, 1); t = getType(typeNode); + if (t.hasStorage() && !Feather::isCategoryType(t)) { + TypeWithStorage tt = TypeWithStorage(t); + if (parent.hasProperty("addConst")) + t = Feather::ConstType::get(tt); + // else + // t = Feather::MutableType::get(tt); + } if (!t) return {}; } else { @@ -151,7 +159,8 @@ Type computeVarType( // Should we get the type from the initialization expression? bool getTypeFromInit = !t; int numRefs = 0; - if (t && isConceptType(t, numRefs)) + int kind = typeKindData; + if (t && isConceptType(t, numRefs, kind)) getTypeFromInit = true; if (getTypeFromInit) { if (!init) @@ -171,7 +180,7 @@ Type computeVarType( init.type(); } - t = getAutoType(init, numRefs); + t = getAutoType(init, numRefs, kind); } else return {}; } @@ -454,7 +463,15 @@ NodeHandle PackageDecl::semanticCheckImpl(PackageDecl node) { DEFINE_NODE_COMMON_IMPL(VariableDecl, DeclNode) -VariableDecl VariableDecl::create( +VariableDecl VariableDecl::createConst( + const Location& loc, StringRef name, NodeHandle typeNode, NodeHandle init) { + if (!typeNode && !init) + REP_ERROR(loc, "Cannot create variable without a type and without an initializer"); + auto res = createDeclNode(loc, name, NodeRange({typeNode, init})); + res.setProperty("addConst", 1); + return res; +} +VariableDecl VariableDecl::createMut( const Location& loc, StringRef name, NodeHandle typeNode, NodeHandle init) { if (!typeNode && !init) REP_ERROR(loc, "Cannot create variable without a type and without an initializer"); @@ -484,7 +501,7 @@ Type VariableDecl::computeTypeImpl(VariableDecl node) { // Get the type of the variable Type t = computeVarType(node, node.childrenContext(), typeNode, init); - if (!t) + if (!t && !t.hasStorage()) return {}; // If the type of the variable indicates a variable that can only be CT, change the evalMode @@ -507,7 +524,7 @@ Type VariableDecl::computeTypeImpl(VariableDecl node) { if (varKind == varLocal && node.context()->evalMode == modeRt && t.mode() == modeCt) varKind = varGlobal; - bool isRef = t.numReferences() > 0; + bool isRef = Feather::removeCategoryIfPresent(t).numReferences() > 0; // Generate the initialization and destruction calls NodeHandle ctorCall; @@ -516,7 +533,17 @@ Type VariableDecl::computeTypeImpl(VariableDecl node) { if (Feather::isDataLikeType(t) && (init || !isRef)) { ASSERT(resultingVar.type()); - varRef = Feather::VarRefExp::create(loc, resultingVar); + // Create a var-ref object to refer to the variable to be initialized/destructed. + NodeHandle varRef = Feather::VarRefExp::create(loc, resultingVar); + + // If the variable is const, cast the constness away for initialization & destruction + if (resultingVar.type().kind() == Feather_getConstTypeKind()) { + TypeWithStorage t = Feather::ConstType(resultingVar.type()).base(); + t = Feather::MutableType::get(t); + auto typeNode = Feather::TypeNode::create(loc, t); + varRef = Feather::BitcastExp::create(loc, typeNode, varRef); + } + varRef.setContext(node.childrenContext()); if (!isRef) { @@ -664,7 +691,7 @@ Type DataTypeDecl::computeTypeImpl(DataTypeDecl node) { resultingStruct.addChildren(all(fields)); // Check for autoBitcopiable - if ( node.hasProperty(propAutoBitCopiable)) { + if (node.hasProperty(propAutoBitCopiable)) { bool allAreBitcopiable = true; for (auto f : fields) { ASSERT(f->type); @@ -908,8 +935,9 @@ Type SprFunctionDecl::computeTypeImpl(SprFunctionDecl node) { if (!preserveRetAbi) { ASSERT(returnType); const Location& retLoc = returnType.location(); - auto resParam = Feather::VarDecl::create(retLoc, StringRef("_result"), - Feather::TypeNode::create(retLoc, Feather::addRef(TypeWithStorage(resType)))); + auto resParamType = Feather::MutableType::get(TypeWithStorage(resType)); + auto resParam = Feather::VarDecl::create( + retLoc, StringRef("_result"), Feather::TypeNode::create(retLoc, resParamType)); resParam.setContext(node.childrenContext()); resultingFun.addParameter(resParam, true); resultingFun.setProperty(propResultParam, resParam); @@ -985,6 +1013,10 @@ Type ParameterDecl::computeTypeImpl(ParameterDecl node) { if (!t) return {}; + // Should with make this parameter const? + if (shouldMakeParamConst(t) && !node.hasProperty(propNoAutoConst)) + t = Feather::ConstType::get(TypeWithStorage(t)); + auto resultingParam = Feather::VarDecl::create(loc, node.name(), Feather::TypeNode::create(loc, t)); resultingParam.setMode(node.effectiveMode()); @@ -1021,9 +1053,7 @@ ConceptDecl ConceptDecl::create(const Location& loc, StringRef name, StringRef p StringRef ConceptDecl::paramName() const { return getCheckPropertyString("spr.paramName"); } -InstantiationsSet ConceptDecl::instantiationsSet() const { - return InstantiationsSet(children()[2]); -}; +InstantiationsSet ConceptDecl::instantiationsSet() const { return {children()[2]}; }; void ConceptDecl::setContextForChildrenImpl(ConceptDecl node) { commonSetContextForChildren(node, ContextChangeType::withSymTab); diff --git a/src/SparrowFrontend/Nodes/Decl.hpp b/src/SparrowFrontend/Nodes/Decl.hpp index e8df3821..5fa160c1 100644 --- a/src/SparrowFrontend/Nodes/Decl.hpp +++ b/src/SparrowFrontend/Nodes/Decl.hpp @@ -141,7 +141,7 @@ struct PackageDecl : Feather::DeclNode { NodeHandle body() const { return children()[0]; }; //! Returns the node containing the parameters - NodeList parameters() const { return NodeList(children()[1]); }; + NodeList parameters() const { return {children()[1]}; }; //! Returns the if clause node NodeHandle ifClause() const { return children()[2]; }; @@ -186,9 +186,13 @@ struct VariableDecl : Feather::DeclNode { * typeNode or init can be null. But one of them needs to be valid. If the given typeNode is * null, the type of the variable is deduced from the initializer. * + * This adds an extra const/mut to the type received as typenode. + * * @return The desired node */ - static VariableDecl create( + static VariableDecl createConst( + const Location& loc, StringRef name, NodeHandle typeNode, NodeHandle init); + static VariableDecl createMut( const Location& loc, StringRef name, NodeHandle typeNode, NodeHandle init); //! Same as the other create, but uses a direct type instead of a type node static VariableDecl create( @@ -201,9 +205,7 @@ struct VariableDecl : Feather::DeclNode { //! Returns the resulting Feather VarDecl object. //! A Sparrow variable will always be implemented in terms for a Feather VarDecl node - Feather::VarDecl resultingVar() const { - return Feather::VarDecl(getCheckPropertyNode("spr.resultingVar")); - } + Feather::VarDecl resultingVar() const { return {getCheckPropertyNode("spr.resultingVar")}; } private: static void setContextForChildrenImpl(VariableDecl node); @@ -247,10 +249,10 @@ struct DataTypeDecl : Feather::DeclNode { NodeHandle underlyingData, NodeHandle ifClause, NodeList body); //! Returns the body of the data type (fields + using decls) - NodeList body() const { return NodeList(children()[1]); }; + NodeList body() const { return {children()[1]}; }; //! Returns the parameters given to the data type declarations (for generic datatypes) - NodeList parameters() const { return NodeList(children()[0]); }; + NodeList parameters() const { return {children()[0]}; }; //! Returns the if clause for the data type declaration (for generic datatypes) NodeHandle ifClause() const { return children()[2]; }; @@ -332,7 +334,7 @@ struct SprFunctionDecl : Feather::DeclNode { NodeHandle returnType, NodeHandle body, NodeHandle ifClause = {}); //! Returns the parameters of the function - NodeList parameters() const { return NodeList(children()[0]); }; + NodeList parameters() const { return {children()[0]}; }; //! Returns the return type of the function (if any) NodeHandle returnType() const { return children()[1]; }; diff --git a/src/SparrowFrontend/Nodes/Exp.cpp b/src/SparrowFrontend/Nodes/Exp.cpp index e6ad0706..fc449ad7 100644 --- a/src/SparrowFrontend/Nodes/Exp.cpp +++ b/src/SparrowFrontend/Nodes/Exp.cpp @@ -497,6 +497,7 @@ SearchScopes buildSearchScopes(CompilationContext* nodeCtx, StringRef operation, // Step 1: Try to find an operator that match in the class of the base expression if (searchInside) { + ASSERT(base); mode = base.type().mode(); ctx = baseDecl.childrenContext(); ASSERT(ctx); diff --git a/src/SparrowFrontend/Nodes/Exp.hpp b/src/SparrowFrontend/Nodes/Exp.hpp index 422d4329..8a7895d7 100644 --- a/src/SparrowFrontend/Nodes/Exp.hpp +++ b/src/SparrowFrontend/Nodes/Exp.hpp @@ -168,7 +168,7 @@ struct FunApplication : NodeHandle { NodeHandle base() const { return children()[0]; }; //! Returns the node-list of arguments - NodeList arguments() const { return NodeList(children()[1]); }; + NodeList arguments() const { return {children()[1]}; }; private: static NodeHandle semanticCheckImpl(FunApplication node); @@ -320,7 +320,7 @@ struct LambdaExp : NodeHandle { NodeHandle body, NodeHandle bodyExp, NodeList closureParams); //! Returns the parameters - NodeList parameters() const { return NodeList(referredNodes()[0]); }; + NodeList parameters() const { return {referredNodes()[0]}; }; //! Returns the return type of the lambda NodeHandle returnType() const { return referredNodes()[1]; }; @@ -329,7 +329,7 @@ struct LambdaExp : NodeHandle { NodeHandle body() const { return referredNodes()[2]; }; //! Returns the closure params - NodeList closureParams() const { return NodeList(referredNodes()[3]); }; + NodeList closureParams() const { return {referredNodes()[3]}; }; private: static NodeHandle semanticCheckImpl(LambdaExp node); diff --git a/src/SparrowFrontend/Nodes/Generics.cpp b/src/SparrowFrontend/Nodes/Generics.cpp index ea5039e4..3d034fdb 100644 --- a/src/SparrowFrontend/Nodes/Generics.cpp +++ b/src/SparrowFrontend/Nodes/Generics.cpp @@ -39,7 +39,7 @@ GenericPackage GenericPackage::create( return res; } -InstantiationsSet GenericPackage::instSet() const { return InstantiationsSet(children()[0]); } +InstantiationsSet GenericPackage::instSet() const { return {children()[0]}; } NodeHandle GenericPackage::semanticCheckImpl(GenericPackage node) { return Feather::Nop::create(node.location()); @@ -71,7 +71,7 @@ GenericDatatype GenericDatatype::create( return res; } -InstantiationsSet GenericDatatype::instSet() const { return InstantiationsSet(children()[0]); } +InstantiationsSet GenericDatatype::instSet() const { return {children()[0]}; } NodeHandle GenericDatatype::semanticCheckImpl(GenericDatatype node) { return Feather::Nop::create(node.location()); @@ -94,7 +94,7 @@ GenericFunction GenericFunction::create( return res; } -InstantiationsSet GenericFunction::instSet() const { return InstantiationsSet(children()[0]); } +InstantiationsSet GenericFunction::instSet() const { return {children()[0]}; } NodeHandle GenericFunction::semanticCheckImpl(GenericFunction node) { return Feather::Nop::create(node.location()); diff --git a/src/SparrowFrontend/Nodes/Generics.hpp b/src/SparrowFrontend/Nodes/Generics.hpp index 70a44f55..04793906 100644 --- a/src/SparrowFrontend/Nodes/Generics.hpp +++ b/src/SparrowFrontend/Nodes/Generics.hpp @@ -35,7 +35,7 @@ struct GenericPackage : Feather::DeclNode { InstantiationsSet instSet() const; //! Returns the original package - PackageDecl original() const { return PackageDecl(referredNodes()[0]); } + PackageDecl original() const { return {referredNodes()[0]}; } private: static NodeHandle semanticCheckImpl(GenericPackage node); @@ -64,7 +64,7 @@ struct GenericDatatype : Feather::DeclNode { InstantiationsSet instSet() const; //! Returns the original datatype decl - DataTypeDecl original() const { return DataTypeDecl(referredNodes()[0]); } + DataTypeDecl original() const { return {referredNodes()[0]}; } private: static NodeHandle semanticCheckImpl(GenericDatatype node); @@ -95,7 +95,7 @@ struct GenericFunction : Feather::DeclNode { InstantiationsSet instSet() const; //! Returns the original function decl - SprFunctionDecl original() const { return SprFunctionDecl(referredNodes()[0]); } + SprFunctionDecl original() const { return {referredNodes()[0]}; } //! Returns the original params of the function NodeRangeT originalParams() const { @@ -137,7 +137,7 @@ struct Instantiation : NodeHandle { static Instantiation create(const Location& loc, NodeRange boundValues, NodeRange boundVars); //! Returns the node list containing all the bound variables - NodeList boundVarsNode() const { return NodeList(children()[0]); } + NodeList boundVarsNode() const { return {children()[0]}; } //! Returns the bound values (immutable access) NodeRange boundValues() const { return referredNodes(); } @@ -205,7 +205,7 @@ struct InstantiationsSet : NodeHandle { void addInstantiation(Instantiation inst); //! Returns the parent node - Feather::DeclNode parentNode() const { return Feather::DeclNode(referredNodes()[0]); } + Feather::DeclNode parentNode() const { return {referredNodes()[0]}; } //! Returns the range of parameters for this instantiation set NodeRangeT params() const { return NodeRangeT(referredNodes()[1].children()); diff --git a/src/SparrowFrontend/Nodes/Module.hpp b/src/SparrowFrontend/Nodes/Module.hpp index b20ac6cd..51037073 100644 --- a/src/SparrowFrontend/Nodes/Module.hpp +++ b/src/SparrowFrontend/Nodes/Module.hpp @@ -57,7 +57,7 @@ struct Module : Feather::DeclNode { NodeHandle moduleName() const { return children()[0]; }; //! Returns the node with the declarations of the module - NodeList decls() const { return NodeList(children()[1]); }; + NodeList decls() const { return {children()[1]}; }; private: static void setContextForChildrenImpl(Module node); @@ -113,7 +113,7 @@ struct ImportName : Feather::DeclNode { NodeHandle moduleName() const { return children()[0]; }; //! Returns the imported decls names - NodeList importedDeclNames() const { return NodeList(children()[1]); }; + NodeList importedDeclNames() const { return {children()[1]}; }; //! Returns the alias we set to the imported module StringRef name() const { return getPropertyStringDeref("name"); }; diff --git a/src/SparrowFrontend/Nodes/SparrowNodes.cpp b/src/SparrowFrontend/Nodes/SparrowNodes.cpp index 30b05ad5..01e794fb 100644 --- a/src/SparrowFrontend/Nodes/SparrowNodes.cpp +++ b/src/SparrowFrontend/Nodes/SparrowNodes.cpp @@ -118,16 +118,6 @@ Node* SprFrontend::mkSprPackage( return PackageDecl::create(loc, name, children, params, ifClause); } -Node* SprFrontend::mkSprVariable( - const Location& loc, Nest_StringRef name, Node* typeNode, Node* init) { - return VariableDecl::create(loc, name, typeNode, init); -} - -Node* SprFrontend::mkSprVariable( - const Location& loc, Nest_StringRef name, TypeRef type, Node* init) { - return VariableDecl::create(loc, name, type, init); -} - Node* SprFrontend::mkSprDatatype(const Location& loc, Nest_StringRef name, Node* parameters, Node* underlyingData, Node* ifClause, Node* children) { return DataTypeDecl::create(loc, name, parameters, underlyingData, ifClause, children); diff --git a/src/SparrowFrontend/Nodes/SparrowNodes.h b/src/SparrowFrontend/Nodes/SparrowNodes.h index 2c697738..b8518d0d 100644 --- a/src/SparrowFrontend/Nodes/SparrowNodes.h +++ b/src/SparrowFrontend/Nodes/SparrowNodes.h @@ -89,10 +89,6 @@ Nest_Node* mkImportName(const Nest_Location& loc, Nest_Node* moduleName, Nest_Node* mkSprUsing(const Nest_Location& loc, Nest_StringRef alias, Nest_Node* usingNode); Nest_Node* mkSprPackage(const Nest_Location& loc, Nest_StringRef name, Nest_Node* children, Nest_Node* params = nullptr, Nest_Node* ifClause = nullptr); -Nest_Node* mkSprVariable( - const Nest_Location& loc, Nest_StringRef name, Nest_Node* typeNode, Nest_Node* init); -Nest_Node* mkSprVariable( - const Nest_Location& loc, Nest_StringRef name, Nest_TypeRef type, Nest_Node* init); Nest_Node* mkSprDatatype(const Nest_Location& loc, Nest_StringRef name, Nest_Node* parameters, Nest_Node* underlyingData, Nest_Node* ifClause, Nest_Node* children); Nest_Node* mkSprField( diff --git a/src/SparrowFrontend/Nodes/SprProperties.h b/src/SparrowFrontend/Nodes/SprProperties.h index 3ceea572..254fbb33 100644 --- a/src/SparrowFrontend/Nodes/SprProperties.h +++ b/src/SparrowFrontend/Nodes/SprProperties.h @@ -22,4 +22,5 @@ constexpr const char* propSprLiteralData = "spr.literalData"; constexpr const char* propSprOperation = "spr.operation"; constexpr const char* propBitCopiable = "spr.bitcopiable"; constexpr const char* propAutoBitCopiable = "spr.autoBitcopiable"; +constexpr const char* propNoAutoConst = "spr.noAutoConst"; } // namespace SprFrontend diff --git a/src/SparrowFrontend/Nodes/Stmt.cpp b/src/SparrowFrontend/Nodes/Stmt.cpp index 01534165..1e0415dd 100644 --- a/src/SparrowFrontend/Nodes/Stmt.cpp +++ b/src/SparrowFrontend/Nodes/Stmt.cpp @@ -77,7 +77,7 @@ NodeHandle ForStmt::semanticCheckImpl(ForStmt node) { // if is not present, we will use '$rangeType.RetType' // Variable to hold the range - initialize it with the range node - auto rangeVar = VariableDecl::create( + auto rangeVar = VariableDecl::createMut( loc, "$rangeVar", Identifier::create(loc, StringRef("Range")), range); if (ctFor) rangeVar.setMode(modeCt); @@ -99,7 +99,7 @@ NodeHandle ForStmt::semanticCheckImpl(ForStmt node) { // the iteration variable auto init = OperatorCall::create(loc, rangeVarRef, StringRef("front"), nullptr); - auto iterVar = VariableDecl::create(node.location(), node.name(), typeNode, init); + auto iterVar = VariableDecl::createMut(node.location(), node.name(), typeNode, init); if (ctFor) iterVar.setMode(modeCt); @@ -165,7 +165,7 @@ NodeHandle ReturnStmt::semanticCheckImpl(ReturnStmt node) { if (resultParam) { // Create a ctor to construct the result parameter with the expression received const Location& l = resultParam.location(); - auto thisArg = Feather::MemLoadExp::create(l, Feather::VarRefExp::create(l, resultParam)); + auto thisArg = Feather::VarRefExp::create(l, resultParam); thisArg.setContext(node.context()); NodeHandle action = createCtorCall(l, node.context(), thisArg, exp); if (!action) diff --git a/src/SparrowFrontend/Services/Callable/CallableHelpers.cpp b/src/SparrowFrontend/Services/Callable/CallableHelpers.cpp index 0ce91f9c..d947dcec 100644 --- a/src/SparrowFrontend/Services/Callable/CallableHelpers.cpp +++ b/src/SparrowFrontend/Services/Callable/CallableHelpers.cpp @@ -159,8 +159,8 @@ void getBoundValuesClassic(SmallVector& boundVals, NodeRange args) { boundVals.clear(); boundVals.reserve(args.size()); - for (int i = 0; i < args.size(); ++i) { - auto arg = args[i]; + for (auto i : args) { + auto arg = i; // Evaluate the node and add the resulting CtValue as a bound argument if (!arg.computeType()) { diff --git a/src/SparrowFrontend/Services/Callable/CallableHelpers.h b/src/SparrowFrontend/Services/Callable/CallableHelpers.h index e53c25bc..ad802f60 100644 --- a/src/SparrowFrontend/Services/Callable/CallableHelpers.h +++ b/src/SparrowFrontend/Services/Callable/CallableHelpers.h @@ -17,7 +17,6 @@ struct ParameterDecl; bool shouldUseCt(Feather::DeclNode decl, bool autoCt, Range argTypes, EvalMode evalMode); bool shouldUseCt(Feather::DeclNode decl, bool autoCt, Range args, EvalMode evalMode); - /** * @brief Completes the given 'args' with the default values found in the given parameters * diff --git a/src/SparrowFrontend/Services/Callable/FunctionCallable.cpp b/src/SparrowFrontend/Services/Callable/FunctionCallable.cpp index 8bd02aec..ae79ceb1 100644 --- a/src/SparrowFrontend/Services/Callable/FunctionCallable.cpp +++ b/src/SparrowFrontend/Services/Callable/FunctionCallable.cpp @@ -191,7 +191,7 @@ NodeHandle FunctionCallable::generateCall(const CCLoc& ccloc) { int FunctionCallable::numParams() const { int res = params_.size(); - return implicitArgType_ ? res-1 : res; + return implicitArgType_ ? res - 1 : res; } Type FunctionCallable::paramType(int idx) const { diff --git a/src/SparrowFrontend/Services/Callable/GenericFunctionCallable.cpp b/src/SparrowFrontend/Services/Callable/GenericFunctionCallable.cpp index 517a2842..42bffe6f 100644 --- a/src/SparrowFrontend/Services/Callable/GenericFunctionCallable.cpp +++ b/src/SparrowFrontend/Services/Callable/GenericFunctionCallable.cpp @@ -98,6 +98,7 @@ NodeHandle getBoundVal(NodeHandle arg, ParameterDecl param, Type paramType, Eval Type boundValType; bool isCtConcept = false; int numRefs = 0; + int kind = typeKindData; if (!param.type()) { // If we are here this is a dependent param // @@ -108,9 +109,9 @@ NodeHandle getBoundVal(NodeHandle arg, ParameterDecl param, Type paramType, Eval // A concept param will ensure the creation of a final param. if (paramType.mode() != modeCt || (origEvalMode == modeRt && finalEvalMode == modeCt)) boundValType = paramType; - } else if (isConceptType(paramType, numRefs)) { + } else if (isConceptType(paramType, numRefs, kind)) { // Deduce the type for boundVal for regular concept types - boundValType = getAutoType(arg, numRefs, paramType.mode()); + boundValType = getAutoType(arg, numRefs, kind, paramType.mode()); isCtConcept = paramType.mode() == modeCt; } @@ -214,6 +215,10 @@ ConversionType GenericFunctionCallable::canCall(const CCLoc& ccloc, NodeRange ar return convNone; } + // Should we make the param const? + if (shouldMakeParamConst(paramType)) + paramType = Feather::ConstType::get(TypeWithStorage(paramType)); + Type argType = args_[i].type(); ASSERT(argType); NodeHandle& arg = args_[i]; diff --git a/src/SparrowFrontend/Services/Concepts/ConceptsServiceImpl.cpp b/src/SparrowFrontend/Services/Concepts/ConceptsServiceImpl.cpp index 390f0ba6..a6e213a1 100644 --- a/src/SparrowFrontend/Services/Concepts/ConceptsServiceImpl.cpp +++ b/src/SparrowFrontend/Services/Concepts/ConceptsServiceImpl.cpp @@ -18,6 +18,9 @@ bool ConceptsServiceImpl::conceptIsFulfilled(ConceptDecl concept, Type type) { if (!Feather::isDataLikeType(type)) return false; + // Remove any category and any reference from the given type + type = Feather::removeAllRefs(TypeWithStorage(type)); + if (!concept.isSemanticallyChecked() || !instSet) REP_INTERNAL(concept.location(), "Invalid concept"); ASSERT(instSet); diff --git a/src/SparrowFrontend/Services/Convert/ConversionResult.cpp b/src/SparrowFrontend/Services/Convert/ConversionResult.cpp index 049b037a..e8824db7 100644 --- a/src/SparrowFrontend/Services/Convert/ConversionResult.cpp +++ b/src/SparrowFrontend/Services/Convert/ConversionResult.cpp @@ -41,7 +41,7 @@ ConversionType bestConv(ConversionType lhs, ConversionType rhs) { return (ConversionType)max(lhs, rhs); } -ConversionResult::ConversionResult() {} +ConversionResult::ConversionResult() = default; ConversionResult::ConversionResult(ConversionType convType) : convType_(convType) {} diff --git a/src/SparrowFrontend/Services/Convert/ConvertServiceImpl.cpp b/src/SparrowFrontend/Services/Convert/ConvertServiceImpl.cpp index 34a3dc9a..f0c22a5b 100644 --- a/src/SparrowFrontend/Services/Convert/ConvertServiceImpl.cpp +++ b/src/SparrowFrontend/Services/Convert/ConvertServiceImpl.cpp @@ -147,8 +147,34 @@ bool ConvertServiceImpl::checkConversionToConcept(ConversionResult& res, ASSERT(src); ASSERT(dest); - // Case 1: data-like -> concept (concept) - if (Feather::isDataLikeType(src)) { + TypeWithStorage srcBase = baseType(src); + TypeWithStorage destBase = baseType(dest); + + // Case 1: concept -> concept + if (srcBase.kind() == typeKindConcept) { + if (src.numReferences() != dest.numReferences()) + return false; + + // Iteratively search the base concept to find our dest type + src = srcBase; + while (src != destBase) { + ConceptDecl conceptNode = ConceptDecl(ConceptType(src).decl()); + if (!conceptNode) + return false; + ConceptType baseType = g_ConceptsService->baseConceptType(conceptNode); + if (!baseType || baseType == src) + return false; // Not found; cannot convert + src = baseType.changeMode(src.mode(), conceptNode.location()); + } + + // TODO (types): Fix this after fixing references + + res.addConversion(convDirect); + return true; + } + + // Case 2: data-like -> concept (concept) + else if (Feather::isDataLikeType(src)) { // Treat the destination type kind as data-like int destTypeKind = dest.kind(); @@ -182,26 +208,6 @@ bool ConvertServiceImpl::checkConversionToConcept(ConversionResult& res, return true; } - // Case 2: concept -> concept - if (src.kind() == typeKindConcept) { - if (src.numReferences() != dest.numReferences()) - return false; - - // Iteratively search the base concept to find our dest type - while (src != dest) { - ConceptDecl conceptNode = ConceptDecl(ConceptType(src).decl()); - if (!conceptNode) - return false; - ConceptType baseType = g_ConceptsService->baseConceptType(conceptNode); - if (!baseType || baseType == src) - return false; // Not found; cannot convert - src = baseType.changeMode(src.mode(), conceptNode.location()); - } - - res.addConversion(convDirect); - return true; - } - return false; } @@ -326,16 +332,28 @@ bool ConvertServiceImpl::adjustReferences(ConversionResult& res, TypeWithStorage }; constexpr ConvType conversions[4][4] = { - {direct, addCat, none, none}, // from plain - {removeCat, direct, none, none}, // from const - {removeCat, catCast, direct, catCast}, // from mutable - {removeCat, catCast, catCast, direct} // from temp + {direct, addCat, none, none}, // from plain + {removeCat, direct, none, none}, // from const + {removeCat, catCast, direct, none}, // from mutable + {removeCat, catCast, catCast, direct} // from temp }; // to: plain, const, mutable, temp int srcIdx = typeKindToIndex(src.kind()); int destIdx = typeKindToIndex(destKind); ConvType conv = conversions[srcIdx][destIdx]; + // TODO (types): Remove this after finalizing mutables + // A reference can be converted to mutable + if (srcIdx == 0 && destIdx == 2 && srcRefsBase > destRefsBase) { + for (int i = destRefsBase; i < srcRefsBase - 1; i++) { + src = removeCatOrRef(src); + res.addConversion(convImplicit, ConvAction(ActionType::dereference, src)); + } + ASSERT(src.numReferences() == destRefsBase + 1); + src = MutableType::get(removeRef(src)); + res.addConversion(convImplicit, ConvAction(ActionType::bitcast, src)); + return true; + } if (conv == none) return false; diff --git a/src/SparrowFrontend/SparrowFrontendTypes.cpp b/src/SparrowFrontend/SparrowFrontendTypes.cpp index 18f35e5a..60fb2335 100644 --- a/src/SparrowFrontend/SparrowFrontendTypes.cpp +++ b/src/SparrowFrontend/SparrowFrontendTypes.cpp @@ -67,7 +67,7 @@ ConceptType::ConceptType(Nest::TypeRef type) } ConceptType ConceptType::get(Nest::NodeHandle decl, int numReferences, Nest::EvalMode mode) { - return ConceptType(getConceptType(decl, numReferences, mode)); + return {getConceptType(decl, numReferences, mode)}; } Nest::NodeHandle ConceptType::decl() const { return referredNode(); } diff --git a/src/SparrowFrontend/SparrowFrontendTypes.hpp b/src/SparrowFrontend/SparrowFrontendTypes.hpp index 3646ebfe..18fd6ccd 100644 --- a/src/SparrowFrontend/SparrowFrontendTypes.hpp +++ b/src/SparrowFrontend/SparrowFrontendTypes.hpp @@ -44,7 +44,7 @@ struct ConceptType : TypeWithStorage { //! @copydoc Type::changeMode ConceptType changeMode(Nest::EvalMode mode, Nest::Location loc = Nest::Location{}) { - return ConceptType(Type::changeMode(mode, loc)); + return {Type::changeMode(mode, loc)}; } }; diff --git a/src/SparrowFrontend/SprDebug.cpp b/src/SparrowFrontend/SprDebug.cpp index f23a9272..f4af46ea 100644 --- a/src/SparrowFrontend/SprDebug.cpp +++ b/src/SparrowFrontend/SprDebug.cpp @@ -160,22 +160,22 @@ void printNodeImpl(Node* node, int mode) { printf("}"); return; case nkRelFeatherGlobalConstructAction: - printf("GlobalDestructAction("); + printf("GlobalConstructAction("); printNodeImpl(at(node->children, 0), 2); printf(")"); return; case nkRelFeatherGlobalDestructAction: - printf("GlobalConstructAction("); + printf("GlobalDestructAction("); printNodeImpl(at(node->children, 0), 2); printf(")"); return; case nkRelFeatherScopeDestructAction: - printf("GlobalScopeDestructAction("); + printf("ScopeDestructAction("); printNodeImpl(at(node->children, 0), 2); printf(")"); return; case nkRelFeatherTempDestructAction: - printf("GlobalTempDestructAction("); + printf("TempDestructAction("); printNodeImpl(at(node->children, 0), 2); printf(")"); return; diff --git a/tests/Basic/Auto.spr b/tests/Basic/Auto.spr index a6ecbccc..e7fefa8a 100644 --- a/tests/Basic/Auto.spr +++ b/tests/Basic/Auto.spr @@ -10,7 +10,7 @@ fun f1(x: AnyType) if typeOf(x) == Int x = 10 // Takes a reference as a parameter -fun f2(x: @AnyType) if typeOf(x) == (Int@) +fun f2(x: !AnyType) if typeOf(x) == !Int writeLn('ref') x = 20 diff --git a/tests/Basic/CallCtorDtor.spr b/tests/Basic/CallCtorDtor.spr index e24dfc4f..43017348 100644 --- a/tests/Basic/CallCtorDtor.spr +++ b/tests/Basic/CallCtorDtor.spr @@ -3,47 +3,47 @@ // Test purpose: Test calling ctor & dtor for objects datatype MyObj - v: Int + v: Int; -fun ctor(this: @MyObj) - writeLn("MyObj.ctor()") -fun ctor(this: @MyObj, i: Int) - write("MyObj.ctor("); write(i); writeLn(")") -fun ctor(this: @MyObj, i,j: Int) - write("MyObj.ctor("); write(i); write(", "); write(j); writeLn(")") -fun ctor(this: @MyObj, src: @MyObj) - writeLn("MyObj.ctor(copy)") +fun ctor(this: !MyObj) + writeLn("MyObj.ctor()"); +fun ctor(this: !MyObj, i: Int) + write("MyObj.ctor("); write(i); writeLn(")"); +fun ctor(this: !MyObj, i,j: Int) + write("MyObj.ctor("); write(i); write(", "); write(j); writeLn(")"); +fun ctor(this: !MyObj, src: MyObj) + writeLn("MyObj.ctor(copy)"); -fun dtor(this: @MyObj) - writeLn("MyObj.dtor") +fun dtor(this: !MyObj) + writeLn("MyObj.dtor"); -fun reconstruct(this: @MyObj) +fun reconstruct(this: !MyObj) this.dtor() this.ctor(100) datatype Pair - first, second: MyObj + first, second: MyObj; -fun ctor(this: @Pair) +fun ctor(this: !Pair) first.ctor() second.ctor() writeLn("Pair.ctor()") -fun ctor(this: @Pair, i,j: Int) +fun ctor(this: !Pair, i,j: Int) first.ctor(i) second.ctor(j) write("Pair.ctor("); write(i); write(", "); write(j); writeLn(")") -fun ctor(this: @Pair, src: Pair@) +fun ctor(this: !Pair, src: Pair) first.ctor(src.first) second.ctor(src.second) writeLn("Pair.ctor(copy)") -fun dtor(this: @Pair) - writeLn("Pair.dtor") +fun dtor(this: !Pair) + writeLn("Pair.dtor"); [native("test")] fun test(n: Int) ; - var x: MyObj - var x1 = MyObj(1) - var x2 = MyObj(1,2) + let x: MyObj + let x1 = MyObj(1) + let x2 = MyObj(1,2) writeLn("---") var x: MyObj x.dtor() @@ -52,13 +52,14 @@ fun dtor(this: @Pair) var x: MyObj x.reconstruct() writeLn("---") - var x: Pair - var x1 = Pair(15,16) + let x: Pair + let x1 = Pair(15,16) writeLn("---") var p: @MyObj = reinterpretCast(@MyObj, mallocRt(sizeOf(MyObj))) p.ctor(10) p.dtor() free(reinterpretCast(@Byte, p)) + ; /*<<") var z: AlmostEmpty writeLn(">") @@ -164,7 +164,7 @@ fun test5 var x = Empty() x.ctor(Empty()) - var y = AlmostEmpty() + let y = AlmostEmpty() writeLn(">") var z: AlmostEmpty writeLn("assign:") diff --git a/tests/Basic/Generics.spr b/tests/Basic/Generics.spr index 0afa67e5..ec812337 100644 --- a/tests/Basic/Generics.spr +++ b/tests/Basic/Generics.spr @@ -8,7 +8,7 @@ fun f1(t: Type, i: Int): Int return tmp + i fun f2(t: Type) - var tmp: t + let tmp: t write('S') write('i') write('z') @@ -22,9 +22,9 @@ datatype MyVector(t: Type) using glob = _MyVectorHelper(t).glob package _MyVectorHelper(t: Type) - var glob: t + var glob: t; -fun print(this: @MyVector) +fun print(this: !MyVector) write(start) write(' ') write('-') @@ -32,7 +32,7 @@ fun print(this: @MyVector) writeLn(end) fun valSize(x: AnyType): SizeType - return sizeOf(x) + return sizeOf(x); [native("test")] fun test(n: Int) writeLn(f1(Int, 4)) @@ -42,9 +42,9 @@ fun valSize(x: AnyType): SizeType f2(Byte) if ( Int == Double ) - writeLn('F') + writeLn('F'); if ( Int == Int ) - write('O'); writeLn('K') + write('O'); writeLn('K'); var v1: MyVector(Int) v1.start = 4 diff --git a/tests/Basic/IfClause.spr b/tests/Basic/IfClause.spr index 09da5ee6..ad7c02b6 100644 --- a/tests/Basic/IfClause.spr +++ b/tests/Basic/IfClause.spr @@ -108,10 +108,10 @@ fun separ() writeLn('-') [native("test")] fun test(n: Int) - var a: Pair(Int, Int) - var b: Pair(Double, Double) - var c: Pair(Int, Pair(Int, Int)) - var d: Pair(Pair(Double, Double), Pair(Double, Double)) + let a: Pair(Int, Int) + let b: Pair(Double, Double) + let c: Pair(Int, Pair(Int, Int)) + let d: Pair(Pair(Double, Double), Pair(Double, Double)) f(1) f(3.14) diff --git a/tests/Basic/ImplicitFunCall.spr b/tests/Basic/ImplicitFunCall.spr index 218bda0d..db321a19 100644 --- a/tests/Basic/ImplicitFunCall.spr +++ b/tests/Basic/ImplicitFunCall.spr @@ -22,7 +22,7 @@ fun f2(i: Int) { writeLn("inside f2()"); } writeLn("---") - var foo: Foo + let foo: Foo foo.a foo.b diff --git a/tests/Basic/ObjectCopy.spr b/tests/Basic/ObjectCopy.spr index 1e37c865..65b2ce81 100644 --- a/tests/Basic/ObjectCopy.spr +++ b/tests/Basic/ObjectCopy.spr @@ -3,18 +3,18 @@ datatype MyType x: Int -fun ctor(this: @MyType) +fun ctor(this: !MyType) writeLn("ctor()") -fun ctor(this: @MyType, i: Int) +fun ctor(this: !MyType, i: Int) x = i write("ctor("); write(x); writeLn(")") -fun ctor(this, other: @MyType) +fun ctor(this: !MyType, other: MyType) x = other.x write("copy ctor("); write(x); writeLn(")") -fun dtor(this: @MyType) +fun dtor(this: !MyType) write("dtor-"); writeLn(x) -fun =(this, other: @MyType) +fun =(this, other: !MyType) write("assign("); write(other.x); writeLn(")") x = other.x @@ -22,7 +22,7 @@ fun f1: MyType return MyType(101) fun f2 = MyType(102) fun f3: MyType - var x = MyType(103) + let x = MyType(103) return x [native("test")] fun test(n: Int) @@ -33,12 +33,12 @@ fun f3: MyType else if n == 5; test5 fun test1 - var o1: MyType - var o2: MyType = 1 + let o1: MyType + let o2: MyType = 1 MyType(10) MyType(o2) - var o3 = o1 - var o4 = MyType(100) + let o3 = o1 + let o4 = MyType(100) writeLn("done") /*<<>>*/ fun test2 - var x = MyType(10) + let x = MyType(10) /*<<>>*/ fun test4 - var x = f1() + let x = f1() /*<<>>*/ fun test5 - var x = f3() + let x = f3() /*<<>>*/ fun test2 - var x = MyType(10) + let x = MyType(10); /*<<>>*/ fun test4 - var x = f1() + let x = f1(); /*<<>>*/ fun test5 - var x = f3() + let x = f3(); // NRVO will reduce onece more the ctor call - right now we have an extra copy /*<<0 ; n=n-1 - res = res * x + res = res * x; return res fun pow4(x: Double, n: Int): Double var res: Double res = 1.0 while n>0 ; n-=1 - res *= x + res *= x; return res datatype MyInt - x: Int + x: Int; -fun ctor(this: @MyInt) { x = 0; } -fun ctor(this: @MyInt, other: MyInt) { x = other.x; } +fun ctor(this: !MyInt) { x = 0; } +fun ctor(this: !MyInt, other: MyInt) { x = other.x; } fun + (x,y: MyInt): MyInt var res: MyInt @@ -54,18 +56,18 @@ fun * (x,y: MyInt): MyInt return res fun < (x,y: MyInt): Bool - return x.x < y.x + return x.x < y.x; fun = (x: MyInt@, y: MyInt) - x.x = y.x + x.x = y.x; package NearClass datatype MyInt2 - x: Int + x: Int; - fun ctor(this: @MyInt2) { x = 0; } - fun ctor(this: @MyInt2, other: MyInt2) { x = other.x; } + fun ctor(this: !MyInt2) { x = 0; } + fun ctor(this: !MyInt2, other: MyInt2) { x = other.x; } fun + (l, r: MyInt2): MyInt2 var res: MyInt2 @@ -78,20 +80,20 @@ package NearClass return res fun < (l, r: MyInt2): Bool - return l.x < r.x + return l.x < r.x; - fun = (this: @MyInt2, other: MyInt2) - this.x = other.x + fun = (this: !MyInt2, other: MyInt2) + this.x = other.x; using NearClass.MyInt2 fun + (x,y: MyInt2): MyInt2 - var res: MyInt2 + let res: MyInt2 writeLn("failure") return res fun * (x,y: MyInt2): MyInt2 - var res: MyInt2 + let res: MyInt2 writeLn("failure") return res @@ -100,7 +102,7 @@ fun < (x,y: MyInt2): Bool return false fun = (x: MyInt2@, y: MyInt2) - writeLn("failure") + writeLn("failure"); [native("test")] fun test(n: Int) writeLn(pow1(2.0, 0)) diff --git a/tests/Basic/Overload.spr b/tests/Basic/Overload.spr index 8ffb9364..6a2288de 100644 --- a/tests/Basic/Overload.spr +++ b/tests/Basic/Overload.spr @@ -4,38 +4,41 @@ concept AnyType(x) // Always true fun f1(x: Int) { writeLn("f1(Int)"); } fun f1(x: Double) { writeLn("f1(Double)"); } -fun f1(x: Int@) { writeLn("f1(Int@)"); } -fun f1(x: Double@) { writeLn("f1(Double@)"); } -fun f1(x: AnyType) { writeLn("f1(AnyType)"); } +fun f1(x: !Int) { writeLn("f1(!Int)"); } +fun f1(x: !Double) { writeLn("f1(!Double)"); } +fun f1(x: @Int) { writeLn("f1(@Int)"); } +fun f1(x: @Double) { writeLn("f1(@Double)"); } +//fun f1(x: AnyType) { writeLn("f1(AnyType)"); } +fun f1(x: !AnyType) { writeLn("f1(!AnyType)"); } fun f1(x: @AnyType) { writeLn("f1(@AnyType)"); } fun f2(x: Int, y: Int) { writeLn("f2(Int, Int)"); } fun f2(x: Double, y: Double) { writeLn("f2(Double, Double)"); } fun f2(x: AnyType, y: AnyType) { writeLn("f2(AnyType, AnyType)"); } -fun f2(x: Int@, y: Int@) { writeLn("f2(Int@, Int@)"); } -fun f2(x: Double@, y: Double@) { writeLn("f2(Double@, Double@)"); } -fun f2(x: @AnyType, y: @AnyType) { writeLn("f2(@AnyType, @AnyType)"); } +fun f2(x: !Int, y: !Int) { writeLn("f2(!Int, !Int)"); } +fun f2(x: !Double, y: !Double) { writeLn("f2(!Double, !Double)"); } +//fun f2(x: !AnyType, y: !AnyType) { writeLn("f2(!AnyType, !AnyType)"); } fun f3(x: Int, y: Int) { writeLn("f3(Int, Int)"); } fun f3(x: Double, y: Double) { writeLn("f3(Double, Double)"); } -fun f3(x: AnyType, y: AnyType) if typeOf(x)==typeOf(y) { writeLn("f3(AnyType, AnyType)"); } -fun f3(x: Int@, y: Int@) { writeLn("f3(Int@, Int@)"); } -fun f3(x: Double@, y: Double@) { writeLn("f3(Double@, Double@)"); } -fun f3(x: @AnyType, y: @AnyType) if typeOf(x)==typeOf(y){ writeLn("f3(@AnyType, @AnyType)"); } +//fun f3(x: AnyType, y: AnyType) if typeOf(x)==typeOf(y) { writeLn("f3(AnyType, AnyType)"); } +fun f3(x: !Int, y: !Int) { writeLn("f3(!Int, !Int)"); } +fun f3(x: !Double, y: !Double) { writeLn("f3(!Double, !Double)"); } +fun f3(x: !AnyType, y: !AnyType) if typeOf(x)==typeOf(y){ writeLn("f3(!AnyType, !AnyType)"); } -var a = Short(1) -var b = 10 -var c = 3.14 -var ra: Short@ = a -var rb: Int@ = b -var rc: Double@ = c +let a = Short(1) +let b = 10 +let c = 3.14 +let ra: !Short = a +let rb: !Int = b +let rc: !Double = c fun getShort(): Short { return Short(1); } fun getInt(): Int { return 10; } fun getDouble(): Double { return 3.14; } -fun getShortRef(): Short@ { return ra; } -fun getIntRef(): Int@ { return rb; } -fun getDoubleRef(): Double@ { return rc; } +fun getShortRef(): !Short { return ra; } +fun getIntRef(): !Int { return rb; } +fun getDoubleRef(): !Double { return rc; } [native("test")] fun test(n: Int) f1(a) @@ -80,29 +83,29 @@ fun getDoubleRef(): Double@ { return rc; } //f3(c,Short(1)); /*<<>>*/ \ No newline at end of file diff --git a/tests/Basic/SameName.spr b/tests/Basic/SameName.spr index 8232dd0f..0065ca59 100644 --- a/tests/Basic/SameName.spr +++ b/tests/Basic/SameName.spr @@ -1,19 +1,19 @@ //!! -t "SparrowImplicitLib.spr" -fno-main datatype myName - x: Int + x: Int; -fun ctor(this: @myName, x: Int) // ERROR ERROR - this.x = x +fun ctor(this: !myName, x: Int) // ERROR ERROR + this.x = x; fun myName = 10 fun myName(x: Int) = x fun myName(x,y: Int) = x+y [native("test")] fun test(n: Int) - var y: myName = 5 // E RROR + let y: myName = 5 // E RROR writeLn(y.x) // E RROR - var myName = 7 + let myName = 7 writeLn(myName) writeLn(myName()) // E RROR writeLn(myName(15)) // E RROR diff --git a/tests/Basic/SparrowImplicitLib.spr b/tests/Basic/SparrowImplicitLib.spr index 13013a1d..5072be73 100644 --- a/tests/Basic/SparrowImplicitLib.spr +++ b/tests/Basic/SparrowImplicitLib.spr @@ -822,9 +822,9 @@ define void @_Type_copy_ctor(i8** %$this, i8* %other) datatype Type {} [ct, protected] - [native("_Type_ctor")] fun ctor(this: @Type) - [native("_Type_copy_ctor")] fun ctor(this: @Type, other: Type) - //fun dtor(this: @Type) {} + [native("_Type_ctor")] fun ctor(this: !Type) + [native("_Type_copy_ctor")] fun ctor(this: !Type, other: Type) + //fun dtor(this: !Type) {} [noDefault] datatype Uninitialized {} @@ -856,219 +856,219 @@ define void @_Type_copy_ctor(i8** %$this, i8* %other) fun ctor(this, other: Null) {} fun dtor(this: Null) {} - [native("_zero_init_1")] fun ctor(this: @Bool) - [native("_ass_1_1")] fun ctor(this: @Bool, src: Bool) - fun dtor(this: @Bool) {} - [autoCt, native("_ass_1_1")] fun = (this: @Bool, other: Bool): Bool - - [native("_zero_init_8")] fun ctor(this: @Byte) - [native("_ass_8_8")] fun ctor(this: @Byte, src: Byte) - [native("_ass_8_8")] fun ctor(this: @Byte, src: Char) - [native("_ass_8_8")] fun ctor(this: @Byte, src: UByte) - [native("_ass_8_16")] fun ctor(this: @Byte, src: Short) - [native("_ass_8_16")] fun ctor(this: @Byte, src: UShort) - [native("_ass_8_32")] fun ctor(this: @Byte, src: Int) - [native("_ass_8_32")] fun ctor(this: @Byte, src: UInt) - [native("_ass_8_64")] fun ctor(this: @Byte, src: Long) - [native("_ass_8_64")] fun ctor(this: @Byte, src: ULong) - [native("_ass_8_64")] fun ctor(this: @Byte, src: SizeType) - [native("_ass_8_64")] fun ctor(this: @Byte, src: DiffType) - [native("_ass_i8_f")] fun ctor(this: @Byte, src: Float) - [native("_ass_i8_d")] fun ctor(this: @Byte, src: Double) + [native("_zero_init_1")] fun ctor(this: !Bool) + [native("_ass_1_1")] fun ctor(this: !Bool, src: Bool) + fun dtor(this: !Bool) {} + [autoCt, native("_ass_1_1")] fun = (this: !Bool, other: Bool): Bool + + [native("_zero_init_8")] fun ctor(this: !Byte) + [native("_ass_8_8")] fun ctor(this: !Byte, src: Byte) + [native("_ass_8_8")] fun ctor(this: !Byte, src: Char) + [native("_ass_8_8")] fun ctor(this: !Byte, src: UByte) + [native("_ass_8_16")] fun ctor(this: !Byte, src: Short) + [native("_ass_8_16")] fun ctor(this: !Byte, src: UShort) + [native("_ass_8_32")] fun ctor(this: !Byte, src: Int) + [native("_ass_8_32")] fun ctor(this: !Byte, src: UInt) + [native("_ass_8_64")] fun ctor(this: !Byte, src: Long) + [native("_ass_8_64")] fun ctor(this: !Byte, src: ULong) + [native("_ass_8_64")] fun ctor(this: !Byte, src: SizeType) + [native("_ass_8_64")] fun ctor(this: !Byte, src: DiffType) + [native("_ass_i8_f")] fun ctor(this: !Byte, src: Float) + [native("_ass_i8_d")] fun ctor(this: !Byte, src: Double) fun dtor(this: Byte) {} - [native("_ass_8_8")] fun = (this: @Byte, other: Byte) - - [native("_zero_init_8")] fun ctor(this: @UByte) - [native("_ass_8_8"), convert] fun ctor(this: @UByte, src: Byte) - [native("_ass_8_8")] fun ctor(this: @UByte, src: UByte) - [native("_ass_8_16")] fun ctor(this: @UByte, src: Short) - [native("_ass_8_16")] fun ctor(this: @UByte, src: UShort) - [native("_ass_8_32")] fun ctor(this: @UByte, src: Int) - [native("_ass_8_32")] fun ctor(this: @UByte, src: UInt) - [native("_ass_8_64")] fun ctor(this: @UByte, src: Long) - [native("_ass_8_64")] fun ctor(this: @UByte, src: ULong) - [native("_ass_8_64")] fun ctor(this: @UByte, src: SizeType) - [native("_ass_8_64")] fun ctor(this: @UByte, src: DiffType) - [native("_ass_u8_f")] fun ctor(this: @UByte, src: Float) - [native("_ass_u8_d")] fun ctor(this: @UByte, src: Double) + [native("_ass_8_8")] fun = (this: !Byte, other: Byte) + + [native("_zero_init_8")] fun ctor(this: !UByte) + [native("_ass_8_8"), convert] fun ctor(this: !UByte, src: Byte) + [native("_ass_8_8")] fun ctor(this: !UByte, src: UByte) + [native("_ass_8_16")] fun ctor(this: !UByte, src: Short) + [native("_ass_8_16")] fun ctor(this: !UByte, src: UShort) + [native("_ass_8_32")] fun ctor(this: !UByte, src: Int) + [native("_ass_8_32")] fun ctor(this: !UByte, src: UInt) + [native("_ass_8_64")] fun ctor(this: !UByte, src: Long) + [native("_ass_8_64")] fun ctor(this: !UByte, src: ULong) + [native("_ass_8_64")] fun ctor(this: !UByte, src: SizeType) + [native("_ass_8_64")] fun ctor(this: !UByte, src: DiffType) + [native("_ass_u8_f")] fun ctor(this: !UByte, src: Float) + [native("_ass_u8_d")] fun ctor(this: !UByte, src: Double) fun dtor(this: UByte) {} - [native("_ass_8_8")] fun = (this: @UByte, other: UByte) - - [native("_zero_init_16")] fun ctor(this: @Short) - [native("_ass_16_8s"), convert] fun ctor(this: @Short, src: Byte) - [native("_ass_16_8z"), convert] fun ctor(this: @Short, src: UByte) - [native("_ass_16_16")] fun ctor(this: @Short, src: Short) - [native("_ass_16_16")] fun ctor(this: @Short, src: UShort) - [native("_ass_16_32")] fun ctor(this: @Short, src: Int) - [native("_ass_16_32")] fun ctor(this: @Short, src: UInt) - [native("_ass_16_64")] fun ctor(this: @Short, src: Long) - [native("_ass_16_64")] fun ctor(this: @Short, src: ULong) - [native("_ass_16_64")] fun ctor(this: @Short, src: SizeType) - [native("_ass_16_64")] fun ctor(this: @Short, src: DiffType) - [native("_ass_i16_f")] fun ctor(this: @Short, src: Float) - [native("_ass_i16_d")] fun ctor(this: @Short, src: Double) + [native("_ass_8_8")] fun = (this: !UByte, other: UByte) + + [native("_zero_init_16")] fun ctor(this: !Short) + [native("_ass_16_8s"), convert] fun ctor(this: !Short, src: Byte) + [native("_ass_16_8z"), convert] fun ctor(this: !Short, src: UByte) + [native("_ass_16_16")] fun ctor(this: !Short, src: Short) + [native("_ass_16_16")] fun ctor(this: !Short, src: UShort) + [native("_ass_16_32")] fun ctor(this: !Short, src: Int) + [native("_ass_16_32")] fun ctor(this: !Short, src: UInt) + [native("_ass_16_64")] fun ctor(this: !Short, src: Long) + [native("_ass_16_64")] fun ctor(this: !Short, src: ULong) + [native("_ass_16_64")] fun ctor(this: !Short, src: SizeType) + [native("_ass_16_64")] fun ctor(this: !Short, src: DiffType) + [native("_ass_i16_f")] fun ctor(this: !Short, src: Float) + [native("_ass_i16_d")] fun ctor(this: !Short, src: Double) fun dtor(this: Short) {} - [native("_ass_16_16")] fun = (this: @Short, other: Short) - - [native("_zero_init_16")] fun ctor(this: @UShort) - [native("_ass_16_8z"), convert] fun ctor(this: @UShort, src: Byte) - [native("_ass_16_8z"), convert] fun ctor(this: @UShort, src: UByte) - [native("_ass_16_16"), convert] fun ctor(this: @UShort, src: Short) - [native("_ass_16_16")] fun ctor(this: @UShort, src: UShort) - [native("_ass_16_32")] fun ctor(this: @UShort, src: Int) - [native("_ass_16_32")] fun ctor(this: @UShort, src: UInt) - [native("_ass_16_64")] fun ctor(this: @UShort, src: Long) - [native("_ass_16_64")] fun ctor(this: @UShort, src: ULong) - [native("_ass_16_64")] fun ctor(this: @UShort, src: SizeType) - [native("_ass_16_64")] fun ctor(this: @UShort, src: DiffType) - [native("_ass_u16_f")] fun ctor(this: @UShort, src: Float) - [native("_ass_u16_d")] fun ctor(this: @UShort, src: Double) + [native("_ass_16_16")] fun = (this: !Short, other: Short) + + [native("_zero_init_16")] fun ctor(this: !UShort) + [native("_ass_16_8z"), convert] fun ctor(this: !UShort, src: Byte) + [native("_ass_16_8z"), convert] fun ctor(this: !UShort, src: UByte) + [native("_ass_16_16"), convert] fun ctor(this: !UShort, src: Short) + [native("_ass_16_16")] fun ctor(this: !UShort, src: UShort) + [native("_ass_16_32")] fun ctor(this: !UShort, src: Int) + [native("_ass_16_32")] fun ctor(this: !UShort, src: UInt) + [native("_ass_16_64")] fun ctor(this: !UShort, src: Long) + [native("_ass_16_64")] fun ctor(this: !UShort, src: ULong) + [native("_ass_16_64")] fun ctor(this: !UShort, src: SizeType) + [native("_ass_16_64")] fun ctor(this: !UShort, src: DiffType) + [native("_ass_u16_f")] fun ctor(this: !UShort, src: Float) + [native("_ass_u16_d")] fun ctor(this: !UShort, src: Double) fun dtor(this: UShort) {} - [native("_ass_16_16")] fun = (this: @UShort, other: UShort) - - [native("_zero_init_32")] fun ctor(this: @Int) - [native("_ass_32_8s"), convert] fun ctor(this: @Int, src: Byte) - [native("_ass_32_8z"), convert] fun ctor(this: @Int, src: UByte) - [native("_ass_32_16s"), convert] fun ctor(this: @Int, src: Short) - [native("_ass_32_16z"), convert] fun ctor(this: @Int, src: UShort) - [native("_ass_32_32")] fun ctor(this: @Int, src: Int) - [native("_ass_32_32")] fun ctor(this: @Int, src: UInt) - [native("_ass_32_64")] fun ctor(this: @Int, src: Long) - [native("_ass_32_64")] fun ctor(this: @Int, src: ULong) - [native("_ass_32_64")] fun ctor(this: @Int, src: SizeType) - [native("_ass_32_64")] fun ctor(this: @Int, src: DiffType) - [native("_ass_i32_f")] fun ctor(this: @Int, src: Float) - [native("_ass_i32_d")] fun ctor(this: @Int, src: Double) - [native("_ass_32_8z")] fun ctor(this: @Int, src: Char) + [native("_ass_16_16")] fun = (this: !UShort, other: UShort) + + [native("_zero_init_32")] fun ctor(this: !Int) + [native("_ass_32_8s"), convert] fun ctor(this: !Int, src: Byte) + [native("_ass_32_8z"), convert] fun ctor(this: !Int, src: UByte) + [native("_ass_32_16s"), convert] fun ctor(this: !Int, src: Short) + [native("_ass_32_16z"), convert] fun ctor(this: !Int, src: UShort) + [native("_ass_32_32")] fun ctor(this: !Int, src: Int) + [native("_ass_32_32")] fun ctor(this: !Int, src: UInt) + [native("_ass_32_64")] fun ctor(this: !Int, src: Long) + [native("_ass_32_64")] fun ctor(this: !Int, src: ULong) + [native("_ass_32_64")] fun ctor(this: !Int, src: SizeType) + [native("_ass_32_64")] fun ctor(this: !Int, src: DiffType) + [native("_ass_i32_f")] fun ctor(this: !Int, src: Float) + [native("_ass_i32_d")] fun ctor(this: !Int, src: Double) + [native("_ass_32_8z")] fun ctor(this: !Int, src: Char) fun dtor(this: Int) {} - [native("_ass_32_32")] fun = (this: @Int, other: Int) - - [native("_zero_init_32")] fun ctor(this: @UInt) - [native("_ass_32_8z"), convert] fun ctor(this: @UInt, src: Byte) - [native("_ass_32_8z"), convert] fun ctor(this: @UInt, src: UByte) - [native("_ass_32_16z"), convert] fun ctor(this: @UInt, src: Short) - [native("_ass_32_16z"), convert] fun ctor(this: @UInt, src: UShort) - [native("_ass_32_32"), convert] fun ctor(this: @UInt, src: Int) - [native("_ass_32_32")] fun ctor(this: @UInt, src: UInt) - [native("_ass_32_64")] fun ctor(this: @UInt, src: Long) - [native("_ass_32_64")] fun ctor(this: @UInt, src: ULong) - [native("_ass_32_64")] fun ctor(this: @UInt, src: SizeType) - [native("_ass_32_64")] fun ctor(this: @UInt, src: DiffType) - [native("_ass_u32_f")] fun ctor(this: @UInt, src: Float) - [native("_ass_u32_d")] fun ctor(this: @UInt, src: Double) + [native("_ass_32_32")] fun = (this: !Int, other: Int) + + [native("_zero_init_32")] fun ctor(this: !UInt) + [native("_ass_32_8z"), convert] fun ctor(this: !UInt, src: Byte) + [native("_ass_32_8z"), convert] fun ctor(this: !UInt, src: UByte) + [native("_ass_32_16z"), convert] fun ctor(this: !UInt, src: Short) + [native("_ass_32_16z"), convert] fun ctor(this: !UInt, src: UShort) + [native("_ass_32_32"), convert] fun ctor(this: !UInt, src: Int) + [native("_ass_32_32")] fun ctor(this: !UInt, src: UInt) + [native("_ass_32_64")] fun ctor(this: !UInt, src: Long) + [native("_ass_32_64")] fun ctor(this: !UInt, src: ULong) + [native("_ass_32_64")] fun ctor(this: !UInt, src: SizeType) + [native("_ass_32_64")] fun ctor(this: !UInt, src: DiffType) + [native("_ass_u32_f")] fun ctor(this: !UInt, src: Float) + [native("_ass_u32_d")] fun ctor(this: !UInt, src: Double) fun dtor(this: UInt) {} - [native("_ass_32_32")] fun = (this: @UInt, other: UInt) - - [native("_zero_init_64")] fun ctor(this: @Long) - [native("_ass_64_8s"), convert] fun ctor(this: @Long, src: Byte) - [native("_ass_64_8z"), convert] fun ctor(this: @Long, src: UByte) - [native("_ass_64_16s"), convert] fun ctor(this: @Long, src: Short) - [native("_ass_64_16z"), convert] fun ctor(this: @Long, src: UShort) - [native("_ass_64_32s"), convert] fun ctor(this: @Long, src: Int) - [native("_ass_64_32z"), convert] fun ctor(this: @Long, src: UInt) - [native("_ass_64_64")] fun ctor(this: @Long, src: Long) - [native("_ass_64_64")] fun ctor(this: @Long, src: ULong) - [native("_ass_64_64"), convert] fun ctor(this: @Long, src: SizeType) - [native("_ass_64_64"), convert] fun ctor(this: @Long, src: DiffType) - [native("_ass_i64_f")] fun ctor(this: @Long, src: Float) - [native("_ass_i64_d")] fun ctor(this: @Long, src: Double) + [native("_ass_32_32")] fun = (this: !UInt, other: UInt) + + [native("_zero_init_64")] fun ctor(this: !Long) + [native("_ass_64_8s"), convert] fun ctor(this: !Long, src: Byte) + [native("_ass_64_8z"), convert] fun ctor(this: !Long, src: UByte) + [native("_ass_64_16s"), convert] fun ctor(this: !Long, src: Short) + [native("_ass_64_16z"), convert] fun ctor(this: !Long, src: UShort) + [native("_ass_64_32s"), convert] fun ctor(this: !Long, src: Int) + [native("_ass_64_32z"), convert] fun ctor(this: !Long, src: UInt) + [native("_ass_64_64")] fun ctor(this: !Long, src: Long) + [native("_ass_64_64")] fun ctor(this: !Long, src: ULong) + [native("_ass_64_64"), convert] fun ctor(this: !Long, src: SizeType) + [native("_ass_64_64"), convert] fun ctor(this: !Long, src: DiffType) + [native("_ass_i64_f")] fun ctor(this: !Long, src: Float) + [native("_ass_i64_d")] fun ctor(this: !Long, src: Double) fun dtor(this: Long) {} - [native("_ass_64_64")] fun = (this: @Long, other: Long) - - [native("_zero_init_64")] fun ctor(this: @ULong) - [native("_ass_64_8z"), convert] fun ctor(this: @ULong, src: Byte) - [native("_ass_64_8z"), convert] fun ctor(this: @ULong, src: UByte) - [native("_ass_64_16z"), convert] fun ctor(this: @ULong, src: Short) - [native("_ass_64_16z"), convert] fun ctor(this: @ULong, src: UShort) - [native("_ass_64_32z"), convert] fun ctor(this: @ULong, src: Int) - [native("_ass_64_32z"), convert] fun ctor(this: @ULong, src: UInt) - [native("_ass_64_64"), convert] fun ctor(this: @ULong, src: Long) - [native("_ass_64_64")] fun ctor(this: @ULong, src: ULong) - [native("_ass_64_64"), convert] fun ctor(this: @ULong, src: SizeType) - [native("_ass_64_64"), convert] fun ctor(this: @ULong, src: DiffType) - [native("_ass_u64_f")] fun ctor(this: @ULong, src: Float) - [native("_ass_u64_d")] fun ctor(this: @ULong, src: Double) - fun dtor(this: @ULong) {} - [native("_ass_64_64")] fun = (this: @ULong, other: ULong) - - [native("_zero_init_64")] fun ctor(this: @SizeType) - [native("_ass_64_8z"), convert] fun ctor(this: @SizeType, src: Byte) - [native("_ass_64_8z"), convert] fun ctor(this: @SizeType, src: UByte) - [native("_ass_64_16z"), convert] fun ctor(this: @SizeType, src: Short) - [native("_ass_64_16z"), convert] fun ctor(this: @SizeType, src: UShort) - [native("_ass_64_32z"), convert] fun ctor(this: @SizeType, src: Int) - [native("_ass_64_32z"), convert] fun ctor(this: @SizeType, src: UInt) - [native("_ass_64_64")] fun ctor(this: @SizeType, src: Long) - [native("_ass_64_64")] fun ctor(this: @SizeType, src: ULong) - [native("_ass_64_64")] fun ctor(this: @SizeType, src: SizeType) - [native("_ass_64_64"), convert] fun ctor(this: @SizeType, src: DiffType) - [native("_ass_u64_f")] fun ctor(this: @SizeType, src: Float) - [native("_ass_u64_d")] fun ctor(this: @SizeType, src: Double) + [native("_ass_64_64")] fun = (this: !Long, other: Long) + + [native("_zero_init_64")] fun ctor(this: !ULong) + [native("_ass_64_8z"), convert] fun ctor(this: !ULong, src: Byte) + [native("_ass_64_8z"), convert] fun ctor(this: !ULong, src: UByte) + [native("_ass_64_16z"), convert] fun ctor(this: !ULong, src: Short) + [native("_ass_64_16z"), convert] fun ctor(this: !ULong, src: UShort) + [native("_ass_64_32z"), convert] fun ctor(this: !ULong, src: Int) + [native("_ass_64_32z"), convert] fun ctor(this: !ULong, src: UInt) + [native("_ass_64_64"), convert] fun ctor(this: !ULong, src: Long) + [native("_ass_64_64")] fun ctor(this: !ULong, src: ULong) + [native("_ass_64_64"), convert] fun ctor(this: !ULong, src: SizeType) + [native("_ass_64_64"), convert] fun ctor(this: !ULong, src: DiffType) + [native("_ass_u64_f")] fun ctor(this: !ULong, src: Float) + [native("_ass_u64_d")] fun ctor(this: !ULong, src: Double) + fun dtor(this: !ULong) {} + [native("_ass_64_64")] fun = (this: !ULong, other: ULong) + + [native("_zero_init_64")] fun ctor(this: !SizeType) + [native("_ass_64_8z"), convert] fun ctor(this: !SizeType, src: Byte) + [native("_ass_64_8z"), convert] fun ctor(this: !SizeType, src: UByte) + [native("_ass_64_16z"), convert] fun ctor(this: !SizeType, src: Short) + [native("_ass_64_16z"), convert] fun ctor(this: !SizeType, src: UShort) + [native("_ass_64_32z"), convert] fun ctor(this: !SizeType, src: Int) + [native("_ass_64_32z"), convert] fun ctor(this: !SizeType, src: UInt) + [native("_ass_64_64")] fun ctor(this: !SizeType, src: Long) + [native("_ass_64_64")] fun ctor(this: !SizeType, src: ULong) + [native("_ass_64_64")] fun ctor(this: !SizeType, src: SizeType) + [native("_ass_64_64"), convert] fun ctor(this: !SizeType, src: DiffType) + [native("_ass_u64_f")] fun ctor(this: !SizeType, src: Float) + [native("_ass_u64_d")] fun ctor(this: !SizeType, src: Double) fun dtor(this: SizeType) {} - [native("_ass_64_64")] fun = (this: @SizeType, other: SizeType) - - [native("_zero_init_64")] fun ctor(this: @DiffType) - [native("_ass_64_8s"), convert] fun ctor(this: @DiffType, src: Byte) - [native("_ass_64_8z"), convert] fun ctor(this: @DiffType, src: UByte) - [native("_ass_64_16s"), convert] fun ctor(this: @DiffType, src: Short) - [native("_ass_64_16z"), convert] fun ctor(this: @DiffType, src: UShort) - [native("_ass_64_32s"), convert] fun ctor(this: @DiffType, src: Int) - [native("_ass_64_32z"), convert] fun ctor(this: @DiffType, src: UInt) - [native("_ass_64_64")] fun ctor(this: @DiffType, src: Long) - [native("_ass_64_64")] fun ctor(this: @DiffType, src: ULong) - [native("_ass_64_64")] fun ctor(this: @DiffType, src: SizeType) - [native("_ass_64_64")] fun ctor(this: @DiffType, src: DiffType) - [native("_ass_i64_f")] fun ctor(this: @DiffType, src: Float) - [native("_ass_i64_d")] fun ctor(this: @DiffType, src: Double) + [native("_ass_64_64")] fun = (this: !SizeType, other: SizeType) + + [native("_zero_init_64")] fun ctor(this: !DiffType) + [native("_ass_64_8s"), convert] fun ctor(this: !DiffType, src: Byte) + [native("_ass_64_8z"), convert] fun ctor(this: !DiffType, src: UByte) + [native("_ass_64_16s"), convert] fun ctor(this: !DiffType, src: Short) + [native("_ass_64_16z"), convert] fun ctor(this: !DiffType, src: UShort) + [native("_ass_64_32s"), convert] fun ctor(this: !DiffType, src: Int) + [native("_ass_64_32z"), convert] fun ctor(this: !DiffType, src: UInt) + [native("_ass_64_64")] fun ctor(this: !DiffType, src: Long) + [native("_ass_64_64")] fun ctor(this: !DiffType, src: ULong) + [native("_ass_64_64")] fun ctor(this: !DiffType, src: SizeType) + [native("_ass_64_64")] fun ctor(this: !DiffType, src: DiffType) + [native("_ass_i64_f")] fun ctor(this: !DiffType, src: Float) + [native("_ass_i64_d")] fun ctor(this: !DiffType, src: Double) fun dtor(this: DiffType) {} - [native("_ass_64_64")] fun = (this: @DiffType, other: DiffType) - - [native("_zero_init_f")] fun ctor(this: @Float) - [native("_ass_f_i8"), convert] fun ctor(this: @Float, src: Byte) - [native("_ass_f_u8"), convert] fun ctor(this: @Float, src: UByte) - [native("_ass_f_i16"), convert] fun ctor(this: @Float, src: Short) - [native("_ass_f_u16"), convert] fun ctor(this: @Float, src: UShort) - [native("_ass_f_i32"), convert] fun ctor(this: @Float, src: Int) - [native("_ass_f_u32"), convert] fun ctor(this: @Float, src: UInt) - [native("_ass_f_i64"), convert] fun ctor(this: @Float, src: Long) - [native("_ass_f_u64"), convert] fun ctor(this: @Float, src: ULong) - [native("_ass_f_i64"), convert] fun ctor(this: @Float, src: SizeType) - [native("_ass_f_u64"), convert] fun ctor(this: @Float, src: DiffType) - [native("_ass_f_f")] fun ctor(this: @Float, src: Float) - [native("_ass_f_d")] fun ctor(this: @Float, src: Double) + [native("_ass_64_64")] fun = (this: !DiffType, other: DiffType) + + [native("_zero_init_f")] fun ctor(this: !Float) + [native("_ass_f_i8"), convert] fun ctor(this: !Float, src: Byte) + [native("_ass_f_u8"), convert] fun ctor(this: !Float, src: UByte) + [native("_ass_f_i16"), convert] fun ctor(this: !Float, src: Short) + [native("_ass_f_u16"), convert] fun ctor(this: !Float, src: UShort) + [native("_ass_f_i32"), convert] fun ctor(this: !Float, src: Int) + [native("_ass_f_u32"), convert] fun ctor(this: !Float, src: UInt) + [native("_ass_f_i64"), convert] fun ctor(this: !Float, src: Long) + [native("_ass_f_u64"), convert] fun ctor(this: !Float, src: ULong) + [native("_ass_f_i64"), convert] fun ctor(this: !Float, src: SizeType) + [native("_ass_f_u64"), convert] fun ctor(this: !Float, src: DiffType) + [native("_ass_f_f")] fun ctor(this: !Float, src: Float) + [native("_ass_f_d")] fun ctor(this: !Float, src: Double) fun dtor(this: Float) {} - [native("_ass_f_f")] fun = (this: @Float, other: Float) - - [native("_zero_init_d")] fun ctor(this: @Double) - [native("_ass_d_i8"), convert] fun ctor(this: @Double, src: Byte) - [native("_ass_d_u8"), convert] fun ctor(this: @Double, src: UByte) - [native("_ass_d_i16"), convert] fun ctor(this: @Double, src: Short) - [native("_ass_d_u16"), convert] fun ctor(this: @Double, src: UShort) - [native("_ass_d_i32"), convert] fun ctor(this: @Double, src: Int) - [native("_ass_d_u32"), convert] fun ctor(this: @Double, src: UInt) - [native("_ass_d_i64"), convert] fun ctor(this: @Double, src: Long) - [native("_ass_d_u64"), convert] fun ctor(this: @Double, src: ULong) - [native("_ass_d_i64"), convert] fun ctor(this: @Double, src: SizeType) - [native("_ass_d_u64"), convert] fun ctor(this: @Double, src: DiffType) - [native("_ass_d_f"), convert] fun ctor(this: @Double, src: Float) - [native("_ass_d_d")] fun ctor(this: @Double, src: Double) + [native("_ass_f_f")] fun = (this: !Float, other: Float) + + [native("_zero_init_d")] fun ctor(this: !Double) + [native("_ass_d_i8"), convert] fun ctor(this: !Double, src: Byte) + [native("_ass_d_u8"), convert] fun ctor(this: !Double, src: UByte) + [native("_ass_d_i16"), convert] fun ctor(this: !Double, src: Short) + [native("_ass_d_u16"), convert] fun ctor(this: !Double, src: UShort) + [native("_ass_d_i32"), convert] fun ctor(this: !Double, src: Int) + [native("_ass_d_u32"), convert] fun ctor(this: !Double, src: UInt) + [native("_ass_d_i64"), convert] fun ctor(this: !Double, src: Long) + [native("_ass_d_u64"), convert] fun ctor(this: !Double, src: ULong) + [native("_ass_d_i64"), convert] fun ctor(this: !Double, src: SizeType) + [native("_ass_d_u64"), convert] fun ctor(this: !Double, src: DiffType) + [native("_ass_d_f"), convert] fun ctor(this: !Double, src: Float) + [native("_ass_d_d")] fun ctor(this: !Double, src: Double) fun dtor(this: Double) {} - [native("_ass_d_d")] fun = (this: @Double, other: Double) - - [native("_zero_init_8")] fun ctor(this: @Char) - [native("_ass_8_8")] fun ctor(this: @Char, src: Char) - [native("_ass_8_8")] fun ctor(this: @Char, src: Byte) - [native("_ass_8_8")] fun ctor(this: @Char, src: UByte) - [native("_ass_8_16")] fun ctor(this: @Char, src: Short) - [native("_ass_8_16")] fun ctor(this: @Char, src: UShort) - [native("_ass_8_32")] fun ctor(this: @Char, src: Int) - [native("_ass_8_32")] fun ctor(this: @Char, src: UInt) - [native("_ass_8_64")] fun ctor(this: @Char, src: Long) - [native("_ass_8_64")] fun ctor(this: @Char, src: ULong) - [native("_ass_8_64")] fun ctor(this: @Char, src: SizeType) - [native("_ass_8_64")] fun ctor(this: @Char, src: DiffType) + [native("_ass_d_d")] fun = (this: !Double, other: Double) + + [native("_zero_init_8")] fun ctor(this: !Char) + [native("_ass_8_8")] fun ctor(this: !Char, src: Char) + [native("_ass_8_8")] fun ctor(this: !Char, src: Byte) + [native("_ass_8_8")] fun ctor(this: !Char, src: UByte) + [native("_ass_8_16")] fun ctor(this: !Char, src: Short) + [native("_ass_8_16")] fun ctor(this: !Char, src: UShort) + [native("_ass_8_32")] fun ctor(this: !Char, src: Int) + [native("_ass_8_32")] fun ctor(this: !Char, src: UInt) + [native("_ass_8_64")] fun ctor(this: !Char, src: Long) + [native("_ass_8_64")] fun ctor(this: !Char, src: ULong) + [native("_ass_8_64")] fun ctor(this: !Char, src: SizeType) + [native("_ass_8_64")] fun ctor(this: !Char, src: DiffType) fun dtor(this: Char) {} - [native("_ass_8_8")] fun = (this: @Char, other: Char) + [native("_ass_8_8")] fun = (this: !Char, other: Char) [noDefault, bitcopiable, native("StringRef")] datatype StringRef @@ -1076,52 +1076,45 @@ datatype StringRef end: @Byte [protected] - fun ctor(this: @StringRef) + fun ctor(this: !StringRef) begin := null end := null - fun ctor(this: @StringRef, size: SizeType) + fun ctor(this: !StringRef, size: SizeType) begin := malloc(size + intToSizeType(1)) end := ptrAdd(begin, size) end = intToByte(0) - fun ctor(this: @StringRef, other: StringRef) + fun ctor(this: !StringRef, other: StringRef) begin := other.begin end := other.end fun dtor(this: StringRef) {} fun size(this: StringRef): SizeType - return ptrDiff(end, begin) + return ptrDiff(end, begin); fun getChar(this: StringRef, i: SizeType): Char - return reinterpretCast(@Char, ptrAdd(begin, i)) + return reinterpretCast(@Char, ptrAdd(begin, i)); fun == (this, other: StringRef): Bool - var s = this.size() + let s = this.size() if ( s != other.size() ) return false var i: SizeType = 0 while i= stop -fun front(this: @MyRange): Int +fun isEmpty(this: !MyRange): Bool = curVal >= stop +fun front(this: !MyRange): Int return curVal -fun popFront(this: @MyRange) +fun popFront(this: !MyRange) curVal = curVal+1 [native("test")] @@ -59,7 +59,7 @@ fun test(n: Int) useAsVar writeLn("---") - var r = MyRange(0, 10) + let r = MyRange(0, 10) if r.isEmpty writeLn('isEmpty') for x = r diff --git a/tests/Basic/TypeTraits.spr b/tests/Basic/TypeTraits.spr index 3c4ffe47..55b274cd 100644 --- a/tests/Basic/TypeTraits.spr +++ b/tests/Basic/TypeTraits.spr @@ -3,36 +3,36 @@ concept AnyType(x) // Always true fun typeTest(x: AnyType) if typeOf(x) == Char - writeLn("Char passed") + writeLn("Char passed"); fun typeTest(x: AnyType) if typeOf(x) == Int - writeLn("Int passed") + writeLn("Int passed"); fun typeTest(x: AnyType) if typeOf(x) == Double - writeLn("Double passed") + writeLn("Double passed"); -fun typeTest(x: @AnyType) if typeOf(x) == (@Char) - writeLn("@Char passed") +fun typeTest(x: @AnyType) if typeOf(x) == @Char + writeLn("@Char passed"); -fun typeTest(x: @AnyType) if typeOf(x) == (Int@) - writeLn("Int@ passed") +fun typeTest(x: @AnyType) if typeOf(x) == @Int + writeLn("Int@ passed"); -fun typeTest(x: @AnyType) if typeOf(x) == (Double@) - writeLn("Double@ passed") +fun typeTest(x: @AnyType) if typeOf(x) == @Double + writeLn("Double@ passed"); fun testRef(x: AnyType) //if 0==typeNumRef(typeOf(x)) - writeLn("non-ref") + writeLn("non-ref"); fun testRef(x: @AnyType) //if 0!=typeNumRef(typeOf(x)) - writeLn("ref") + writeLn("ref"); [native("test")] fun test(n: Int) - var a = 'a'.getChar(0) - var b = 10 - var c = 3.14 - var ra: @Char = a - var rb: Int@ = b - var rc: Double@ = c + let a = 'a'.getChar(0) + let b = 10 + let c = 3.14 + let ra: @Char = a + let rb: Int@ = b + let rc: Double@ = c writeLn(sizeOf('a'.getChar(0))) writeLn(sizeOf(10)) diff --git a/tests/Basic/TypeVar.spr b/tests/Basic/TypeVar.spr index e5ac580f..b165d6f9 100644 --- a/tests/Basic/TypeVar.spr +++ b/tests/Basic/TypeVar.spr @@ -1,13 +1,13 @@ //!! -t "SparrowImplicitLib.spr" -fno-main -[ct] var t: Type = Int -[ct] var u: Type +[ct] let t: Type = Int +[ct] let u: Type -var x: t = 3 -//var y: u = 3; +let x: t = 3 +//let y: u = 3; [native("test")] fun test(n: Int) - writeLn(x) + writeLn(x); /*<<>>*/ + +/*<<>>*/ + +/*<<>>*/ + +/*<<>>*/ diff --git a/tests/Basic/datatype/generic.spr b/tests/Basic/datatype/generic.spr index 879896b4..1868c58f 100644 --- a/tests/Basic/datatype/generic.spr +++ b/tests/Basic/datatype/generic.spr @@ -3,7 +3,7 @@ // Test purpose: generic datatypes test concept AnyType(x) -fun ctor(this: @AnyType, nothing: Uninitialized) {} +fun ctor(this: !AnyType, nothing: Uninitialized) {} fun writeLnBool(val: Bool) if val @@ -42,24 +42,24 @@ fun Pair2(first, second: AnyType): Pair2(typeOf(first)) return res [native("test")] fun test(n: Int) - var pi = Pair(Int, 1, 2) + let pi = Pair(Int, 1, 2) writeLn(pi.first) writeLn(pi.second) writeLn("---") - var pd = Pair(Double, 1.1, 2.2) + let pd = Pair(Double, 1.1, 2.2) writeLn(pd.first) writeLn(pd.second) writeLn("---") - var pb = Pair(false, true) + let pb = Pair(false, true) writeLnBool(pb.first) writeLnBool(pb.second) writeLn("---") - var p2 = Pair2(1, 2) + let p2 = Pair2(1, 2) writeLn(p2.data.second) writeLn("---") - var p3 = Pair3(Int)(3, 4) + let p3 = Pair3(Int)(3, 4) writeLn(p3.second) [ct] if p3.ValueType != Int writeLn('FAILURE') diff --git a/tests/Basic/datatype/initCtor.spr b/tests/Basic/datatype/initCtor.spr index d4a1f77d..1d1d80d4 100644 --- a/tests/Basic/datatype/initCtor.spr +++ b/tests/Basic/datatype/initCtor.spr @@ -6,24 +6,24 @@ datatype Tracer _val: Int -fun ctor(this: @Tracer) +fun ctor(this: !Tracer) _val ctor writeLn('Tracer.ctor()') [convert] -fun ctor(this: @Tracer, val: Int) +fun ctor(this: !Tracer, val: Int) _val ctor val write('Tracer.ctor(') write(val) writeLn(')') -fun ctor(this, other: @Tracer) +fun ctor(this, other: !Tracer) _val ctor other._val write('Tracer.copy_ctor(') write(_val) writeLn(')') -fun dtor(this: @Tracer) +fun dtor(this: !Tracer) write('Tracer.dtor ') writeLn(_val) @@ -45,18 +45,18 @@ datatype S3 [native("test")] fun test(n: Int) ; - var o1: S1 + let o1: S1 writeLn('---') - var o1: S2 + let o1: S2 writeLn('-') - var o2: S2 = 100 + let o2: S2 = 100 writeLn('-') writeLn('---') - var o1: S3 + let o1: S3 writeLn('------') - var o1 = S1(50, 60) + let o1 = S1(50, 60) writeLn('-') - var o2 = o1 + let o2 = o1 writeLn('-') /*<<>>*/ diff --git a/tests/Basic/datatype/syntax.spr b/tests/Basic/datatype/syntax.spr index f11580f2..10345e86 100644 --- a/tests/Basic/datatype/syntax.spr +++ b/tests/Basic/datatype/syntax.spr @@ -40,31 +40,31 @@ datatype GenericIf2(t: Type) if t != Int [native("test")] fun test(n: Int) ; - var o1: Empty - var o2: Empty2 - var o3: Empty3 + let o1: Empty + let o2: Empty2 + let o3: Empty3 writeLn(sizeOf(o1)) writeLn(sizeOf(o2)) writeLn(sizeOf(o3)) writeLn('---') - var o1: WithFields - var o2: WithFields2 + let o1: WithFields + let o2: WithFields2 writeLn(sizeOf(o1)) writeLn(sizeOf(o2)) writeLn('---') - var o1: WithInit + let o1: WithInit writeLn(sizeOf(o1)) writeLn('---') - var o1: WithUsing + let o1: WithUsing writeLn(sizeOf(o1)) writeLn('---') - var o1: Generic(Double) - var o2: Generic2(Char) + let o1: Generic(Double) + let o2: Generic2(Char) writeLn(sizeOf(o1)) writeLn(sizeOf(o2)) writeLn('---') - var o1: GenericIf(Int) - var o2: GenericIf2(Char) + let o1: GenericIf(Int) + let o2: GenericIf2(Char) writeLn(sizeOf(o1)) writeLn(sizeOf(o2)) diff --git a/tests/Basic/exp/dotOper.spr b/tests/Basic/exp/dotOper.spr index 88de76b7..4907049f 100644 --- a/tests/Basic/exp/dotOper.spr +++ b/tests/Basic/exp/dotOper.spr @@ -16,10 +16,10 @@ package A [initCtor] datatype MyObj x: Int -fun print(this: @MyObj) +fun print(this: !MyObj) write("MyObj.print: ") writeLn(x) -fun print(this: @MyObj, x: Int) +fun print(this: !MyObj, x: Int) write("MyObj.print: ") writeLn(x) diff --git a/tests/Basic/vars/typeCatFieldsErr.spr b/tests/Basic/vars/typeCatFieldsErr.spr new file mode 100644 index 00000000..0214960a --- /dev/null +++ b/tests/Basic/vars/typeCatFieldsErr.spr @@ -0,0 +1,24 @@ +//!! -t "../SparrowImplicitLib.spr" -fno-main -dump-assembly + +datatype MyObj + x: Int + +fun assign(dest: !Int, src: Int) + dest = src + +fun access + let a: MyObj + let b: !MyObj + let c: MyObj tmp + + writeLn(a.x) + writeLn(b.x) + writeLn(c.x) + + assign(a.x, 3) // ERROR + assign(b.x, 5) + assign(c.x, 7) + +[native("test")] +fun test(n: Int) + access diff --git a/tests/Basic/vars/typeCatVarsErr.spr b/tests/Basic/vars/typeCatVarsErr.spr new file mode 100644 index 00000000..e93420c5 --- /dev/null +++ b/tests/Basic/vars/typeCatVarsErr.spr @@ -0,0 +1,88 @@ +//!! -t "../SparrowImplicitLib.spr" -fno-main + +datatype MyObj = Int + +fun =(this: !MyObj, other: MyObj) + this.data = other.data + +fun =(this: !MyObj, val: Int) + this.data = val + +fun takesPlain(this: MyObj) +fun takesConst(this: MyObj const) +fun takesMut(this: MyObj mut) +fun takesTmp(this: MyObj tmp) + +fun decls + var a: MyObj + var b: MyObj mut + var c: MyObj const + var d: MyObj tmp + var b1: !MyObj + + a = 9 + b = 9 + c = 9 // ERROR + d = 9 + b1 = 9 + +fun declsInit + var a: MyObj = 1 + var b: MyObj mut = 2 + var c: MyObj const = 3 + var d: MyObj tmp = 4 + var b1: !MyObj = 5 + + a = 9 + b = 9 + c = 9 // ERROR + d = 9 + b1 = 9 + +fun funCall + var plainObj: MyObj + var constObj: MyObj const + var mutObj: MyObj mut + var tmpObj: MyObj tmp + + takesPlain(plainObj) + takesPlain(constObj) + takesPlain(mutObj) + takesPlain(tmpObj) + + takesConst(plainObj) + takesConst(constObj) + takesConst(mutObj) + takesConst(tmpObj) + + takesMut(plainObj) + takesMut(constObj) // ERROR + takesMut(mutObj) + takesMut(tmpObj) + + takesTmp(plainObj) // ERROR + takesTmp(constObj) // ERROR + takesTmp(mutObj) // ERROR + takesTmp(tmpObj) + +fun letDecls + let a: MyObj + let b: !MyObj + let c: MyObj tmp + + a = 9 // ERROR + b = 9 + c = 9 + takesMut(a) // ERROR + takesMut(b) + takesMut(c) + takesTmp(a) // ERROR + takesTmp(b) // ERROR + takesTmp(c) + +[native("test")] +fun test(n: Int) + decls + declsInit + funCall + letDecls diff --git a/tests/Basic2/Axioms.spr b/tests/Basic2/Axioms.spr index 348f8be1..cbe9ab73 100644 --- a/tests/Basic2/Axioms.spr +++ b/tests/Basic2/Axioms.spr @@ -24,26 +24,26 @@ fun lessEqual(x,y: Ordered) = (x<=y) == !(y=y) == !(x>>*/ \ No newline at end of file diff --git a/tests/Basic2/Conditional.spr b/tests/Basic2/Conditional.spr index a1c2f8b2..53b60ec8 100644 --- a/tests/Basic2/Conditional.spr +++ b/tests/Basic2/Conditional.spr @@ -1,10 +1,10 @@ //!! datatype MyObj - a: Int + a: Int; -fun ctor(this: @MyObj, i: Int) { a = i; cout << "ctor(" << a << ")" << endl; } -fun ctor(this: @MyObj, other: MyObj) { a = other.a; cout << "copy ctor(" << a << ")" << endl; } +fun ctor(this: !MyObj, i: Int) { a = i; cout << "ctor(" << a << ")" << endl; } +fun ctor(this: !MyObj, other: MyObj) { a = other.a; cout << "copy ctor(" << a << ")" << endl; } fun dtor(this: MyObj) { cout << "dtor" << endl; } fun print(this: MyObj) { cout << "print(" << a << ")" << endl; } @@ -33,20 +33,20 @@ fun test4(b: Bool) cout << "after" << endl fun testDifferentTypes1(cond: Bool) - var s: Short = 11 - var b: Byte = 13 + let s: Short = 11 + let b: Byte = 13 cout << ife(cond, s, b) << endl [ct] if ( typeOf(ife(cond, s, b)) != Int ) - cout << "FAIL 1" << endl + cout << "FAIL 1" << endl; [ct] if ( typeOf(ife(cond, 1.0, 1)) != Double ) - cout << "FAIL 2" << endl + cout << "FAIL 2" << endl; [ct] if ( typeOf(ife(cond, 1.0f, 1)) != Float ) - cout << "FAIL 3" << endl + cout << "FAIL 3" << endl; [ct] if ( typeOf(ife(cond, ULong(1), Long(1))) != ULong ) - cout << "FAIL 4" << endl + cout << "FAIL 4" << endl; fun sprMain test1(true) diff --git a/tests/Basic2/CtFor.spr b/tests/Basic2/CtFor.spr index aa129994..f5feee6a 100644 --- a/tests/Basic2/CtFor.spr +++ b/tests/Basic2/CtFor.spr @@ -10,37 +10,40 @@ import std.vector _min, _max: Int fun front(this: MyRange) = _min - fun popFront(this: @MyRange) { _min += 1; } + fun popFront(this: !MyRange) { _min += 1; } fun isEmpty(this: MyRange) = _min > _max fun test1() [ct] for i = MyRange(0, 4) - cout << ctEval(i) << endl + cout << ctEval(i) << endl; + ; [ct] fun fact(n: Int): Int if ( n < 2 ) - return 1 + return 1; else - return n*fact(n-1) + return n*fact(n-1); fun test2() [ct] for i = 0..5 - cout << ctEval(fact(i)) << endl + cout << ctEval(fact(i)) << endl; + ; [ct] fun createVector(min, max: Int): Vector(Int) - var v = Vector(Int)(min..max) + let v = Vector(Int)(min..max) return v fun test3() - [ct] var v = createVector(10, 15) + [ct] let v = createVector(10, 15) [ct] for el = v.all() - cout << ctEval(el) << endl + cout << ctEval(el) << endl; + ; fun sprMain - var x = 10 - var y = 2 - [ct] var yy = 2 + let x = 10 + let y = 2 + [ct] let yy = 2 test1() cout << "---" << endl diff --git a/tests/Basic2/CtRtCalls.spr b/tests/Basic2/CtRtCalls.spr index 528df7d1..4cc2acc7 100644 --- a/tests/Basic2/CtRtCalls.spr +++ b/tests/Basic2/CtRtCalls.spr @@ -1,28 +1,28 @@ //!! [rt] fun mallocRt() - var pi: @Int = reinterpretCast(@Int, malloc(sizeOf(Int))) + var pi: @Int = malloc(sizeOf(Int)).asRefOf(Int) pi = 10 cout << pi << endl - free(reinterpretCast(@Byte, pi)) + free(UntypedPtr(pi)) [ct] fun mallocCt() - var pi: @Int = reinterpretCast(@Int, malloc(sizeOf(Int))) + var pi: @Int = malloc(sizeOf(Int)).asRefOf(Int) pi = 11 cout << pi << endl - free(reinterpretCast(@Byte, pi)) + free(UntypedPtr(pi)) fun mallocRtCt() - var pi: @Int = reinterpretCast(@Int, malloc(sizeOf(Int))) + var pi: @Int = malloc(sizeOf(Int)).asRefOf(Int) pi = 12 cout << pi << endl - free(reinterpretCast(@Byte, pi)) + free(UntypedPtr(pi)) fun rtCaller() - mallocRtCt() + mallocRtCt(); [ct] fun ctCaller() - mallocRtCt() + mallocRtCt(); fun test1() mallocRt() @@ -34,9 +34,9 @@ fun test2() ctCaller() // Display 12 at compile-time fun sprMain - var x = 10 - var y = 2 - [ct] var yy = 2 + let x = 10 + let y = 2 + [ct] let yy = 2 test1() cout << "---" << endl diff --git a/tests/Basic2/CtRtParam.spr b/tests/Basic2/CtRtParam.spr index c2383066..b2ac5c64 100644 --- a/tests/Basic2/CtRtParam.spr +++ b/tests/Basic2/CtRtParam.spr @@ -15,24 +15,24 @@ fun apply(f: AnyType, n: Int ct) f() apply(f, n-1) else - cout << " @ct" << endl + cout << " @ct" << endl; fun apply(f: AnyType, n: Int rt) for i = 0..n - f() + f(); cout << " @rt" << endl fun sprMain - var x = 10 - var y = 2 - [ct] var yy = 2 + let x = 10 + let y = 2 + [ct] let yy = 2 cout << doCompute(x, y) << endl cout << doCompute(x, yy) << endl cout << "---" << endl - var n = 5 + let n = 5 apply((fun {cout << 'x';}), 5) apply((fun {cout << 'x';}), n) diff --git a/tests/Basic2/CtWhile.spr b/tests/Basic2/CtWhile.spr index 510f43f1..145805a5 100644 --- a/tests/Basic2/CtWhile.spr +++ b/tests/Basic2/CtWhile.spr @@ -6,34 +6,37 @@ import std.vector fun test1() [ct] var i=0 [ct] while i<5; i++ - cout << ctEval(i) << endl + cout << ctEval(i) << endl; + ; [ct] fun fact(n: Int): Int if ( n < 2 ) - return 1 + return 1; else - return n*fact(n-1) + return n*fact(n-1); fun test2() [ct] var i=0 [ct] while i<5; i++ - cout << ctEval(fact(i)) << endl + cout << ctEval(fact(i)) << endl; + ; [ct] fun createVector(min, max: Int): Vector(Int) - var v = Vector(Int)(min..max) + let v = Vector(Int)(min..max) return v fun test3() - [ct] var v = createVector(10, 15) + [ct] let v = createVector(10, 15) [ct] var i=0 [ct] while i " << r0 << endl - var f1 = \stdFun - var r1 = f1("Hello, world!") + let f1 = \stdFun + let r1 = f1("Hello, world!") cout << " => " << r1 << endl /*<<< Basic testing of FunctionPtr(1) stdFunInt(10) called => 100 @@ -43,12 +43,12 @@ stdFun(Hello, world!) called => stdFun >>>*/ fun test2 - var f0 = \(stdFunInt) - var r0 = f0(10) + let f0 = \(stdFunInt) + let r0 = f0(10) cout << " => " << r0 << endl - var f1 = \(stdFun) - var r1 = f1("Hello, world!") + let f1 = \(stdFun) + let r1 = f1("Hello, world!") cout << " => " << r1 << endl /*<<< FunctionPtr applied to parenthesis(2) stdFunInt(10) called => 100 @@ -56,12 +56,12 @@ stdFun(Hello, world!) called => stdFun >>>*/ fun test3 - var f0 = \(f(0)) - var r0 = f0(10) + let f0 = \(f(0)) + let r0 = f0(10) cout << ' => ' << r0 << '\n' - var f1 = \(f(3.14)) - var r1 = f1(2.71) + let f1 = \(f(3.14)) + let r1 = f1(2.71) cout << ' => ' << r1 << '\n' /*<<< FunctionPtr applied to overloaded function(3) f(Int) called => 10 @@ -69,12 +69,12 @@ f(Double) called => 2.71 >>>*/ fun test4 - var f0 = \f(0) - var r0 = f0(10) + let f0 = \f(0) + let r0 = f0(10) cout << ' => ' << r0 << '\n' - var f1 = \f(3.14) - var r1 = f1(2.71) + let f1 = \f(3.14) + let r1 = f1(2.71) cout << ' => ' << r1 << '\n' /*<<< FunctionPtr applied to overloaded function - no parens(4) f(Int) called => 10 diff --git a/tests/Basic2/GenericFunRef.spr b/tests/Basic2/GenericFunRef.spr index 4de94954..f6e4c65b 100644 --- a/tests/Basic2/GenericFunRef.spr +++ b/tests/Basic2/GenericFunRef.spr @@ -2,20 +2,20 @@ import std.ranges -fun <<(os: @OutStream, r: Range): typeOf(os) if typeOf(r) != StringRef +fun <<(os: !OutStream, r: Range): typeOf(os) if typeOf(r) != StringRef var first = true cout << "(" for x = r if ( !first ) - cout << ", " + cout << ", "; first = false cout << x cout << ")" return os fun sprMain - var r1 = (1...5) map (fun n = repeat(n*n, n)) - var r2 = r1 map \rangeSize + let r1 = (1...5) map (fun n = repeat(n*n, n)) + let r2 = r1 map \rangeSize cout << r1 << endl cout << r2 << endl diff --git a/tests/Basic2/GenericPackage.spr b/tests/Basic2/GenericPackage.spr index 9232ab61..ab0f3ce2 100644 --- a/tests/Basic2/GenericPackage.spr +++ b/tests/Basic2/GenericPackage.spr @@ -5,14 +5,14 @@ import std.ranges datatype TypePrint(t: Type) using T = t -fun ctor(this: @TypePrint) +fun ctor(this: !TypePrint) cout << 'TypePrint.ctor ' << TypeOp.description(T) << endl package GenPackage(t: Type) using MyType = t rt // Causes a global print for all the instantiations - var printer: TypePrint(t) + let printer: TypePrint(t) fun getType: StringRef = TypeOp.description(MyType) diff --git a/tests/Basic2/InstSpeed.spr b/tests/Basic2/InstSpeed.spr index 0ce86109..8e02f960 100644 --- a/tests/Basic2/InstSpeed.spr +++ b/tests/Basic2/InstSpeed.spr @@ -15,215 +15,215 @@ datatype Generic(t: Type, idx: Int ct) //fun dtor(this: @Generic) // cout << "dtor " << idx << endl -fun ctor(this: @Generic, n: Int) +fun ctor(this: !Generic, n: Int) x ctor (n + _idx) cout << "ctor " << _idx << endl -fun dtor(this: @Generic) +fun dtor(this: !Generic) cout << "dtor " << _idx << endl fun sprMain - var v00: Generic(Int, 00) = 999 - var v01: Generic(Int, 01) = 999 - var v02: Generic(Int, 02) = 999 - var v03: Generic(Int, 03) = 999 - var v04: Generic(Int, 04) = 999 - var v05: Generic(Int, 05) = 999 - var v06: Generic(Int, 06) = 999 - var v07: Generic(Int, 07) = 999 - var v08: Generic(Int, 08) = 999 - var v09: Generic(Int, 09) = 999 - //var v10: Generic(Int, 10) = 999 - //var v11: Generic(Int, 11) = 999 - //var v12: Generic(Int, 12) = 999 - //var v13: Generic(Int, 13) = 999 - //var v14: Generic(Int, 14) = 999 - //var v15: Generic(Int, 15) = 999 - //var v16: Generic(Int, 16) = 999 - //var v17: Generic(Int, 17) = 999 - //var v18: Generic(Int, 18) = 999 - //var v19: Generic(Int, 19) = 999 - //var v20: Generic(Int, 20) = 999 - //var v21: Generic(Int, 21) = 999 - //var v22: Generic(Int, 22) = 999 - //var v23: Generic(Int, 23) = 999 - //var v24: Generic(Int, 24) = 999 - //var v25: Generic(Int, 25) = 999 - //var v26: Generic(Int, 26) = 999 - //var v27: Generic(Int, 27) = 999 - //var v28: Generic(Int, 28) = 999 - //var v29: Generic(Int, 29) = 999 - //var v30: Generic(Int, 30) = 999 - //var v31: Generic(Int, 31) = 999 - //var v32: Generic(Int, 32) = 999 - //var v33: Generic(Int, 33) = 999 - //var v34: Generic(Int, 34) = 999 - //var v35: Generic(Int, 35) = 999 - //var v36: Generic(Int, 36) = 999 - //var v37: Generic(Int, 37) = 999 - //var v38: Generic(Int, 38) = 999 - //var v39: Generic(Int, 39) = 999 - //var v40: Generic(Int, 40) = 999 - //var v41: Generic(Int, 41) = 999 - //var v42: Generic(Int, 42) = 999 - //var v43: Generic(Int, 43) = 999 - //var v44: Generic(Int, 44) = 999 - //var v45: Generic(Int, 45) = 999 - //var v46: Generic(Int, 46) = 999 - //var v47: Generic(Int, 47) = 999 - //var v48: Generic(Int, 48) = 999 - //var v49: Generic(Int, 49) = 999 - //var v50: Generic(Int, 50) = 999 - //var v51: Generic(Int, 51) = 999 - //var v52: Generic(Int, 52) = 999 - //var v53: Generic(Int, 53) = 999 - //var v54: Generic(Int, 54) = 999 - //var v55: Generic(Int, 55) = 999 - //var v56: Generic(Int, 56) = 999 - //var v57: Generic(Int, 57) = 999 - //var v58: Generic(Int, 58) = 999 - //var v59: Generic(Int, 59) = 999 - //var v60: Generic(Int, 60) = 999 - //var v61: Generic(Int, 61) = 999 - //var v62: Generic(Int, 62) = 999 - //var v63: Generic(Int, 63) = 999 - //var v64: Generic(Int, 64) = 999 - //var v65: Generic(Int, 65) = 999 - //var v66: Generic(Int, 66) = 999 - //var v67: Generic(Int, 67) = 999 - //var v68: Generic(Int, 68) = 999 - //var v69: Generic(Int, 69) = 999 - //var v00: Generic(Int, 70) = 999 - //var v71: Generic(Int, 71) = 999 - //var v72: Generic(Int, 72) = 999 - //var v73: Generic(Int, 73) = 999 - //var v74: Generic(Int, 74) = 999 - //var v75: Generic(Int, 75) = 999 - //var v76: Generic(Int, 76) = 999 - //var v77: Generic(Int, 77) = 999 - //var v78: Generic(Int, 78) = 999 - //var v79: Generic(Int, 79) = 999 - //var v70: Generic(Int, 80) = 999 - //var v81: Generic(Int, 81) = 999 - //var v82: Generic(Int, 82) = 999 - //var v83: Generic(Int, 83) = 999 - //var v84: Generic(Int, 84) = 999 - //var v85: Generic(Int, 85) = 999 - //var v86: Generic(Int, 86) = 999 - //var v87: Generic(Int, 87) = 999 - //var v88: Generic(Int, 88) = 999 - //var v89: Generic(Int, 89) = 999 - //var v90: Generic(Int, 90) = 999 - //var v91: Generic(Int, 91) = 999 - //var v92: Generic(Int, 92) = 999 - //var v93: Generic(Int, 93) = 999 - //var v94: Generic(Int, 94) = 999 - //var v95: Generic(Int, 95) = 999 - //var v96: Generic(Int, 96) = 999 - //var v97: Generic(Int, 97) = 999 - //var v98: Generic(Int, 98) = 999 - //var v99: Generic(Int, 99) = 999 + let v00: Generic(Int, 00) = 999 + let v01: Generic(Int, 01) = 999 + let v02: Generic(Int, 02) = 999 + let v03: Generic(Int, 03) = 999 + let v04: Generic(Int, 04) = 999 + let v05: Generic(Int, 05) = 999 + let v06: Generic(Int, 06) = 999 + let v07: Generic(Int, 07) = 999 + let v08: Generic(Int, 08) = 999 + let v09: Generic(Int, 09) = 999 + //let v10: Generic(Int, 10) = 999 + //let v11: Generic(Int, 11) = 999 + //let v12: Generic(Int, 12) = 999 + //let v13: Generic(Int, 13) = 999 + //let v14: Generic(Int, 14) = 999 + //let v15: Generic(Int, 15) = 999 + //let v16: Generic(Int, 16) = 999 + //let v17: Generic(Int, 17) = 999 + //let v18: Generic(Int, 18) = 999 + //let v19: Generic(Int, 19) = 999 + //let v20: Generic(Int, 20) = 999 + //let v21: Generic(Int, 21) = 999 + //let v22: Generic(Int, 22) = 999 + //let v23: Generic(Int, 23) = 999 + //let v24: Generic(Int, 24) = 999 + //let v25: Generic(Int, 25) = 999 + //let v26: Generic(Int, 26) = 999 + //let v27: Generic(Int, 27) = 999 + //let v28: Generic(Int, 28) = 999 + //let v29: Generic(Int, 29) = 999 + //let v30: Generic(Int, 30) = 999 + //let v31: Generic(Int, 31) = 999 + //let v32: Generic(Int, 32) = 999 + //let v33: Generic(Int, 33) = 999 + //let v34: Generic(Int, 34) = 999 + //let v35: Generic(Int, 35) = 999 + //let v36: Generic(Int, 36) = 999 + //let v37: Generic(Int, 37) = 999 + //let v38: Generic(Int, 38) = 999 + //let v39: Generic(Int, 39) = 999 + //let v40: Generic(Int, 40) = 999 + //let v41: Generic(Int, 41) = 999 + //let v42: Generic(Int, 42) = 999 + //let v43: Generic(Int, 43) = 999 + //let v44: Generic(Int, 44) = 999 + //let v45: Generic(Int, 45) = 999 + //let v46: Generic(Int, 46) = 999 + //let v47: Generic(Int, 47) = 999 + //let v48: Generic(Int, 48) = 999 + //let v49: Generic(Int, 49) = 999 + //let v50: Generic(Int, 50) = 999 + //let v51: Generic(Int, 51) = 999 + //let v52: Generic(Int, 52) = 999 + //let v53: Generic(Int, 53) = 999 + //let v54: Generic(Int, 54) = 999 + //let v55: Generic(Int, 55) = 999 + //let v56: Generic(Int, 56) = 999 + //let v57: Generic(Int, 57) = 999 + //let v58: Generic(Int, 58) = 999 + //let v59: Generic(Int, 59) = 999 + //let v60: Generic(Int, 60) = 999 + //let v61: Generic(Int, 61) = 999 + //let v62: Generic(Int, 62) = 999 + //let v63: Generic(Int, 63) = 999 + //let v64: Generic(Int, 64) = 999 + //let v65: Generic(Int, 65) = 999 + //let v66: Generic(Int, 66) = 999 + //let v67: Generic(Int, 67) = 999 + //let v68: Generic(Int, 68) = 999 + //let v69: Generic(Int, 69) = 999 + //let v00: Generic(Int, 70) = 999 + //let v71: Generic(Int, 71) = 999 + //let v72: Generic(Int, 72) = 999 + //let v73: Generic(Int, 73) = 999 + //let v74: Generic(Int, 74) = 999 + //let v75: Generic(Int, 75) = 999 + //let v76: Generic(Int, 76) = 999 + //let v77: Generic(Int, 77) = 999 + //let v78: Generic(Int, 78) = 999 + //let v79: Generic(Int, 79) = 999 + //let v70: Generic(Int, 80) = 999 + //let v81: Generic(Int, 81) = 999 + //let v82: Generic(Int, 82) = 999 + //let v83: Generic(Int, 83) = 999 + //let v84: Generic(Int, 84) = 999 + //let v85: Generic(Int, 85) = 999 + //let v86: Generic(Int, 86) = 999 + //let v87: Generic(Int, 87) = 999 + //let v88: Generic(Int, 88) = 999 + //let v89: Generic(Int, 89) = 999 + //let v90: Generic(Int, 90) = 999 + //let v91: Generic(Int, 91) = 999 + //let v92: Generic(Int, 92) = 999 + //let v93: Generic(Int, 93) = 999 + //let v94: Generic(Int, 94) = 999 + //let v95: Generic(Int, 95) = 999 + //let v96: Generic(Int, 96) = 999 + //let v97: Generic(Int, 97) = 999 + //let v98: Generic(Int, 98) = 999 + //let v99: Generic(Int, 99) = 999 - //var v100: Generic(Int, 100) = 999 - //var v101: Generic(Int, 101) = 999 - //var v102: Generic(Int, 102) = 999 - //var v103: Generic(Int, 103) = 999 - //var v104: Generic(Int, 104) = 999 - //var v105: Generic(Int, 105) = 999 - //var v106: Generic(Int, 106) = 999 - //var v107: Generic(Int, 107) = 999 - //var v108: Generic(Int, 108) = 999 - //var v109: Generic(Int, 109) = 999 - //var v110: Generic(Int, 110) = 999 - //var v111: Generic(Int, 111) = 999 - //var v112: Generic(Int, 112) = 999 - //var v113: Generic(Int, 113) = 999 - //var v114: Generic(Int, 114) = 999 - //var v115: Generic(Int, 115) = 999 - //var v116: Generic(Int, 116) = 999 - //var v117: Generic(Int, 117) = 999 - //var v118: Generic(Int, 118) = 999 - //var v119: Generic(Int, 119) = 999 - //var v120: Generic(Int, 120) = 999 - //var v121: Generic(Int, 121) = 999 - //var v122: Generic(Int, 122) = 999 - //var v123: Generic(Int, 123) = 999 - //var v124: Generic(Int, 124) = 999 - //var v125: Generic(Int, 125) = 999 - //var v126: Generic(Int, 126) = 999 - //var v127: Generic(Int, 127) = 999 - //var v128: Generic(Int, 128) = 999 - //var v129: Generic(Int, 129) = 999 - //var v130: Generic(Int, 130) = 999 - //var v131: Generic(Int, 131) = 999 - //var v132: Generic(Int, 132) = 999 - //var v133: Generic(Int, 133) = 999 - //var v134: Generic(Int, 134) = 999 - //var v135: Generic(Int, 135) = 999 - //var v136: Generic(Int, 136) = 999 - //var v137: Generic(Int, 137) = 999 - //var v138: Generic(Int, 138) = 999 - //var v139: Generic(Int, 139) = 999 - //var v140: Generic(Int, 140) = 999 - //var v141: Generic(Int, 141) = 999 - //var v142: Generic(Int, 142) = 999 - //var v143: Generic(Int, 143) = 999 - //var v144: Generic(Int, 144) = 999 - //var v145: Generic(Int, 145) = 999 - //var v146: Generic(Int, 146) = 999 - //var v147: Generic(Int, 147) = 999 - //var v148: Generic(Int, 148) = 999 - //var v149: Generic(Int, 149) = 999 - //var v150: Generic(Int, 150) = 999 - //var v151: Generic(Int, 151) = 999 - //var v152: Generic(Int, 152) = 999 - //var v153: Generic(Int, 153) = 999 - //var v154: Generic(Int, 154) = 999 - //var v155: Generic(Int, 155) = 999 - //var v156: Generic(Int, 156) = 999 - //var v157: Generic(Int, 157) = 999 - //var v158: Generic(Int, 158) = 999 - //var v159: Generic(Int, 159) = 999 - //var v160: Generic(Int, 160) = 999 - //var v161: Generic(Int, 161) = 999 - //var v162: Generic(Int, 162) = 999 - //var v163: Generic(Int, 163) = 999 - //var v164: Generic(Int, 164) = 999 - //var v165: Generic(Int, 165) = 999 - //var v166: Generic(Int, 166) = 999 - //var v167: Generic(Int, 167) = 999 - //var v168: Generic(Int, 168) = 999 - //var v169: Generic(Int, 169) = 999 - //var v100: Generic(Int, 170) = 999 - //var v171: Generic(Int, 171) = 999 - //var v172: Generic(Int, 172) = 999 - //var v173: Generic(Int, 173) = 999 - //var v174: Generic(Int, 174) = 999 - //var v175: Generic(Int, 175) = 999 - //var v176: Generic(Int, 176) = 999 - //var v177: Generic(Int, 177) = 999 - //var v178: Generic(Int, 178) = 999 - //var v179: Generic(Int, 179) = 999 - //var v170: Generic(Int, 180) = 999 - //var v181: Generic(Int, 181) = 999 - //var v182: Generic(Int, 182) = 999 - //var v183: Generic(Int, 183) = 999 - //var v184: Generic(Int, 184) = 999 - //var v185: Generic(Int, 185) = 999 - //var v186: Generic(Int, 186) = 999 - //var v187: Generic(Int, 187) = 999 - //var v188: Generic(Int, 188) = 999 - //var v189: Generic(Int, 189) = 999 - //var v190: Generic(Int, 190) = 999 - //var v191: Generic(Int, 191) = 999 - //var v192: Generic(Int, 192) = 999 - //var v193: Generic(Int, 193) = 999 - //var v194: Generic(Int, 194) = 999 - //var v195: Generic(Int, 195) = 999 - //var v196: Generic(Int, 196) = 999 - //var v197: Generic(Int, 197) = 999 - //var v198: Generic(Int, 198) = 999 - //var v199: Generic(Int, 199) = 999 + //let v100: Generic(Int, 100) = 999 + //let v101: Generic(Int, 101) = 999 + //let v102: Generic(Int, 102) = 999 + //let v103: Generic(Int, 103) = 999 + //let v104: Generic(Int, 104) = 999 + //let v105: Generic(Int, 105) = 999 + //let v106: Generic(Int, 106) = 999 + //let v107: Generic(Int, 107) = 999 + //let v108: Generic(Int, 108) = 999 + //let v109: Generic(Int, 109) = 999 + //let v110: Generic(Int, 110) = 999 + //let v111: Generic(Int, 111) = 999 + //let v112: Generic(Int, 112) = 999 + //let v113: Generic(Int, 113) = 999 + //let v114: Generic(Int, 114) = 999 + //let v115: Generic(Int, 115) = 999 + //let v116: Generic(Int, 116) = 999 + //let v117: Generic(Int, 117) = 999 + //let v118: Generic(Int, 118) = 999 + //let v119: Generic(Int, 119) = 999 + //let v120: Generic(Int, 120) = 999 + //let v121: Generic(Int, 121) = 999 + //let v122: Generic(Int, 122) = 999 + //let v123: Generic(Int, 123) = 999 + //let v124: Generic(Int, 124) = 999 + //let v125: Generic(Int, 125) = 999 + //let v126: Generic(Int, 126) = 999 + //let v127: Generic(Int, 127) = 999 + //let v128: Generic(Int, 128) = 999 + //let v129: Generic(Int, 129) = 999 + //let v130: Generic(Int, 130) = 999 + //let v131: Generic(Int, 131) = 999 + //let v132: Generic(Int, 132) = 999 + //let v133: Generic(Int, 133) = 999 + //let v134: Generic(Int, 134) = 999 + //let v135: Generic(Int, 135) = 999 + //let v136: Generic(Int, 136) = 999 + //let v137: Generic(Int, 137) = 999 + //let v138: Generic(Int, 138) = 999 + //let v139: Generic(Int, 139) = 999 + //let v140: Generic(Int, 140) = 999 + //let v141: Generic(Int, 141) = 999 + //let v142: Generic(Int, 142) = 999 + //let v143: Generic(Int, 143) = 999 + //let v144: Generic(Int, 144) = 999 + //let v145: Generic(Int, 145) = 999 + //let v146: Generic(Int, 146) = 999 + //let v147: Generic(Int, 147) = 999 + //let v148: Generic(Int, 148) = 999 + //let v149: Generic(Int, 149) = 999 + //let v150: Generic(Int, 150) = 999 + //let v151: Generic(Int, 151) = 999 + //let v152: Generic(Int, 152) = 999 + //let v153: Generic(Int, 153) = 999 + //let v154: Generic(Int, 154) = 999 + //let v155: Generic(Int, 155) = 999 + //let v156: Generic(Int, 156) = 999 + //let v157: Generic(Int, 157) = 999 + //let v158: Generic(Int, 158) = 999 + //let v159: Generic(Int, 159) = 999 + //let v160: Generic(Int, 160) = 999 + //let v161: Generic(Int, 161) = 999 + //let v162: Generic(Int, 162) = 999 + //let v163: Generic(Int, 163) = 999 + //let v164: Generic(Int, 164) = 999 + //let v165: Generic(Int, 165) = 999 + //let v166: Generic(Int, 166) = 999 + //let v167: Generic(Int, 167) = 999 + //let v168: Generic(Int, 168) = 999 + //let v169: Generic(Int, 169) = 999 + //let v100: Generic(Int, 170) = 999 + //let v171: Generic(Int, 171) = 999 + //let v172: Generic(Int, 172) = 999 + //let v173: Generic(Int, 173) = 999 + //let v174: Generic(Int, 174) = 999 + //let v175: Generic(Int, 175) = 999 + //let v176: Generic(Int, 176) = 999 + //let v177: Generic(Int, 177) = 999 + //let v178: Generic(Int, 178) = 999 + //let v179: Generic(Int, 179) = 999 + //let v170: Generic(Int, 180) = 999 + //let v181: Generic(Int, 181) = 999 + //let v182: Generic(Int, 182) = 999 + //let v183: Generic(Int, 183) = 999 + //let v184: Generic(Int, 184) = 999 + //let v185: Generic(Int, 185) = 999 + //let v186: Generic(Int, 186) = 999 + //let v187: Generic(Int, 187) = 999 + //let v188: Generic(Int, 188) = 999 + //let v189: Generic(Int, 189) = 999 + //let v190: Generic(Int, 190) = 999 + //let v191: Generic(Int, 191) = 999 + //let v192: Generic(Int, 192) = 999 + //let v193: Generic(Int, 193) = 999 + //let v194: Generic(Int, 194) = 999 + //let v195: Generic(Int, 195) = 999 + //let v196: Generic(Int, 196) = 999 + //let v197: Generic(Int, 197) = 999 + //let v198: Generic(Int, 198) = 999 + //let v199: Generic(Int, 199) = 999 /* <<>>*/ \ No newline at end of file diff --git a/tests/Basic2/Lambda.spr b/tests/Basic2/Lambda.spr index 7f94e579..5a5bf121 100644 --- a/tests/Basic2/Lambda.spr +++ b/tests/Basic2/Lambda.spr @@ -5,16 +5,16 @@ fun fact(n: Int): Int else return n*fact(n-1) datatype FactFun - + ; fun ()(this: FactFun, n: Int) = fact(n) fun doCall(f: AnyType, val: Int): Int - return f(val) + return f(val); fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1; test1 else if n == 2; test2 @@ -44,9 +44,9 @@ fun test1 >>>*/ fun test2 - var x = 10 - var y = 11 - var z = 12 + let x = 10 + let y = 11 + let z = 12 cout << doCall((fun.{x} n = n*n + x), 5) << endl cout << doCall((fun.{x, y, z} n = n*n + x+y+z), 5) << endl cout << doCall((fun.{x,y,z} n = n*n), 5) << endl @@ -58,15 +58,15 @@ fun test2 >>>*/ datatype Test - x: Int = 10 + x: Int = 10; fun doTest1(this: Test) - cout << doCall((fun n = n*n), 5) << endl + cout << doCall((fun n = n*n), 5) << endl; fun doTest2(this: Test) - cout << doCall((fun.{x} n = n*n + x), 5) << endl + cout << doCall((fun.{x} n = n*n + x), 5) << endl; fun test3 - var t: Test + let t: Test t doTest1 t doTest2 @@ -76,7 +76,7 @@ fun test3 >>>*/ fun test4 - cout << doCall(\fact, 5) << endl + cout << doCall(\fact, 5) << endl; /*<<>>*/ diff --git a/tests/Basic2/LogicalAndOr.spr b/tests/Basic2/LogicalAndOr.spr index 0d00d4f2..0c68d1e7 100644 --- a/tests/Basic2/LogicalAndOr.spr +++ b/tests/Basic2/LogicalAndOr.spr @@ -11,29 +11,29 @@ fun getF: Bool return false datatype BoolValue - b: Bool + b: Bool; -fun ctor(this: @BoolValue, b: Bool) +fun ctor(this: !BoolValue, b: Bool) this.b ctor b cout << "C" if ( b ) - cout << "t" + cout << "t"; else - cout << "f" - cout << '.' + cout << "f"; + cout << '.'; fun dtor(this: BoolValue) cout << "D" if ( b ) - cout << "t" + cout << "t"; else - cout << "f" - cout << '.' + cout << "f"; + cout << '.'; fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1; test1 else if n == 2; test2 @@ -42,8 +42,8 @@ fun sprMain else if n == 5; test5 fun test1 - var t = true - var f = false + let t = true + let f = false cout << (t || t) << endl cout << (t || f) << endl @@ -76,8 +76,8 @@ false >>>*/ fun test2 - var t = true - var f = false + let t = true + let f = false cout << (t && t) << endl cout << (t && f) << endl diff --git a/tests/Basic2/Regular.spr b/tests/Basic2/Regular.spr index 73160190..1ffc057b 100644 --- a/tests/Basic2/Regular.spr +++ b/tests/Basic2/Regular.spr @@ -1,42 +1,44 @@ //!! concept Regular(x) if ( - isValid(x.ctor()) // Default construction - && isValid(x.ctor(x)) // Copy construction - && isValid(x.dtor()) // Destruction - && typeOf(x == x) == Bool // Equality is defined + isValid(TypeOp.removeCat(typeOf(x))()) // Default construction + && isValid(TypeOp.removeCat(typeOf(x))(x)) // Copy construction + && isValid(TypeOp.removeCat(typeOf(x))().dtor()) // Destruction + && typeOf(x == x) == Bool // Equality is defined ) [noDefault, convert] datatype NullType + ; -fun ctor(this: @NullType) {} -[convert] fun ctor(this: @NullType, other: AnyType) {} +fun ctor(this: !NullType) {} +[convert] fun ctor(this: !NullType, other: AnyType) {} fun dtor(this: NullType) {} fun ==(this, other: NullType) = true fun ==(this, other: AnyType) = false fun testRegular(x: Regular) - cout << TypeOp.description(typeOf(x)) << " is Regular\n" + cout << TypeOp.description(typeOf(x)) << " is Regular\n"; fun testRegular(x: AnyType) if !Regular(x) - cout << TypeOp.description(typeOf(x)) << " is not Regular\n" + cout << TypeOp.description(typeOf(x)) << " is not Regular\n"; datatype MyType - + ; // Operators are implicitly defined package Isolated [noDefault] datatype EmptyType + ; fun sprMain testRegular(1) testRegular(1.0) - var o: NullType - var o1: MyType - var o2: Isolated.EmptyType + let o: NullType + let o1: MyType + let o2: Isolated.EmptyType testRegular(o) testRegular(o1) testRegular(o2) diff --git a/tests/Basic2/Swappable.spr b/tests/Basic2/Swappable.spr index 115a6c68..c6c09011 100644 --- a/tests/Basic2/Swappable.spr +++ b/tests/Basic2/Swappable.spr @@ -2,12 +2,12 @@ concept Swappable(x) if isValid(x.swap(x)) -[autoCt] fun swap(a, b: @AnyType) if typeOf(a) == typeOf(b) && !Swappable(a) +[autoCt] fun swap(a, b: !AnyType) if typeOf(a) == typeOf(b) && !Swappable(a) cout << "Simple swap called" << endl - var tmp = a + let tmp = a a = b b = tmp -[autoCt] fun swap(a, b: @Swappable) if typeOf(a) == typeOf(b) +[autoCt] fun swap(a, b: !Swappable) if typeOf(a) == typeOf(b) cout << "Fast swap called" << endl a.swap(b) @@ -18,8 +18,8 @@ package Inner [initCtor] datatype MyType2 val: Int - fun swap(this, other: @MyType2) - var tmp = val + fun swap(this, other: !MyType2) + let tmp = val val = other.val other.val = tmp @@ -44,6 +44,7 @@ fun sprMain cout << x.val << ", " << y.val << endl swap(x, y) cout << x.val << ", " << y.val << endl + ; /*<<>>*/ + +fun test5 + var a: Int + var b: Int const + var c: Int mut + var d: !Int + var e: Int tmp + + printHeader() + printType(typeOf(a)) + printType(typeOf(b)) + printType(typeOf(c)) + printType(typeOf(d)) + printType(typeOf(e)) + printType(Int) + printType(Int const) + printType(Int mut) + printType(!Int) + printType(Int tmp) + +/*<<>>*/ + diff --git a/tests/BenchmarkGame/fannkuchredux.spr b/tests/BenchmarkGame/fannkuchredux.spr index 02a535ef..547a8d70 100644 --- a/tests/BenchmarkGame/fannkuchredux.spr +++ b/tests/BenchmarkGame/fannkuchredux.spr @@ -12,14 +12,14 @@ fun fannkuch(n: Int): Int while r>0 (1...r) copy count.subrange(0, r) for i = 0..n - perm(i) = perm1(i) + perm(i) = perm1(i); // Count flips and update max and checksum var f = 0 var k = perm(0) while k != 0 for i = 0..(k+1)/2 - swap(perm(i), perm(k-i)) + swap(perm(i), perm(k-i)); k = perm(0) ++f if f>flips; flips = f @@ -32,9 +32,9 @@ fun fannkuch(n: Int): Int if ( r == n ) cout << checksum << endl return flips - var p0 = perm1(0) + let p0 = perm1(0) for i = 0..r - perm1(i) = perm1(i+1) + perm1(i) = perm1(i+1); perm1(r) = p0 --count(r) @@ -44,8 +44,8 @@ fun fannkuch(n: Int): Int return flips fun sprMain - var n = programArgs(1) asInt - var r = fannkuch(n) + let n = programArgs(1) asInt + let r = fannkuch(n) cout << "Pfannkuchen(" << n << ") = " << r << endl /*<<ONE Homo sapiens alu\n" write(alu.all cycle, n*2) diff --git a/tests/BenchmarkGame/fastaredux.spr b/tests/BenchmarkGame/fastaredux.spr index f587cee3..0da9c16b 100644 --- a/tests/BenchmarkGame/fastaredux.spr +++ b/tests/BenchmarkGame/fastaredux.spr @@ -5,16 +5,18 @@ import std.algorithms import std.string import std.tuple -fun write(r: Range, length: Int) if isValid(Char(r.front)) +fun write(r: Range, length: Int) if isValid(Char(#$r.RetType)) using lineLength = 60 + var rc = r var line: String = lineLength for n = length..0 ../ (-lineLength) - var len = min(n, lineLength) + let len = min(n, lineLength) for i = 0..len - line(i) = (r++) + line(i) = (rc++); if ( len < lineLength ) - line.resize(len) - cout << line << "\n" + line.resize(len); + cout << line << "\n"; + ; var seed: Int = 42 fun nextRandom: Double @@ -27,26 +29,30 @@ datatype RandTableRange using numEntries = 4095 lookup: Array((Float rt)*(Char rt)) -fun ctor(this: @RandTableRange, data: Range) +fun ctor(this: !RandTableRange, other: RandTableRange) + this.lookup ctor other.lookup + +fun ctor(this: !RandTableRange, data: Range) + var datac = data lookup.ctor(numEntries+1) for i = 0...numEntries - while i > data.front().v1*numEntries - data.popFront() - lookup(i) = data.front - -fun isEmpty(this: @RandTableRange) = false -fun popFront(this: @RandTableRange) {} -fun front(this: @RandTableRange): Char - var r = nextRandom + while i > datac.front().v1*numEntries + datac.popFront() + lookup(i) = datac.front + +fun isEmpty(this: !RandTableRange) = false +fun popFront(this: !RandTableRange) {} +fun front(this: !RandTableRange): Char + let r = nextRandom var idx: SizeType = r*numEntries while lookup(idx).v1 < r - ++idx - return lookup(idx).v2 + ++idx; + return lookup(idx).v2; fun sprMain - var n = (programArgs(1) asInt) + let n = (programArgs(1) asInt) - var alu: String = ( + let alu: String = ( "GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG" + "GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA" + "CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT" + @@ -55,13 +61,13 @@ fun sprMain "AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC" + "AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA") - var iubStr: String = "acgtBDHKMNRSVWY" - var iubDist = values(0.27f, 0.12f, 0.12f, 0.27f) ++ repeat(0.02f, 11) - var iubCum = scanLeft(0.0f, iubDist, (fun acc,v = acc+v)) + let iubStr: String = "acgtBDHKMNRSVWY" + let iubDist = values(0.27f, 0.12f, 0.12f, 0.27f) ++ repeat(0.02f, 11) + let iubCum = scanLeft(0.0f, iubDist, (fun acc,v = acc+v)) - var homoSapiensStr: String = "acgt" - var hsDist = values(0.3029549426680f, 0.1979883004921f, 0.1975473066391f, 0.3015094502008f) - var hsCum = scanLeft(0.0f, hsDist, (fun acc,v = acc+v)) + let homoSapiensStr: String = "acgt" + let hsDist = values(0.3029549426680f, 0.1979883004921f, 0.1975473066391f, 0.3015094502008f) + let hsCum = scanLeft(0.0f, hsDist, (fun acc,v = acc+v)) cout << ">ONE Homo sapiens alu\n" write(alu.all cycle, n*2) diff --git a/tests/BenchmarkGame/meteor.spr b/tests/BenchmarkGame/meteor.spr index 2e82bc1a..769e8057 100644 --- a/tests/BenchmarkGame/meteor.spr +++ b/tests/BenchmarkGame/meteor.spr @@ -147,12 +147,12 @@ datatype Direction using ENE = Direction(11) using numValues = 12 -fun ctor(this: @Direction, id: Int) - this.id ctor id +fun ctor(this: !Direction, id: Int) + this.id ctor id; var pieceDef: StaticArray2d(Direction, 10, 4) -fun setPiece(p: @StaticArray(Direction, 4), a, b, c, d: Direction) +fun setPiece(p: !StaticArray(Direction, 4), a, b, c, d: Direction) { p(0) = a; p(1) = b; p(2) = c; p(3) = d; } fun ctor @@ -199,7 +199,7 @@ fun flip(dir: Direction) = Direction((Direction.numValues-dir.id) % Direction.nu * out_of_bounds function first. */ fun shift(cell: Byte, dir: Direction): Byte - var oddRow: Bool = (cell/5) % 2 != 0 + let oddRow: Bool = (cell/5) % 2 != 0 using Direction.* if ( dir == E ) return cell + Byte(1) @@ -229,8 +229,8 @@ fun shift(cell: Byte, dir: Direction): Byte * location or not. */ fun outOfBounds(cell: Byte, dir: Direction): Bool - var col = cell % 5 - var colEx = cell % 10 + let col = cell % 5 + let colEx = cell % 10 using Direction.* if ( dir == E ) return col==4 else if ( dir == ESE ) return colEx==4 || colEx==8 || colEx==9 || cell>=45 @@ -249,15 +249,15 @@ fun outOfBounds(cell: Byte, dir: Direction): Bool /* Rotate a piece 60 degrees clockwise */ fun rotatePiece(piece: Int) for p: @Direction = pieceDef(piece).all - p = rotate(p) + p = rotate(p); /* Flip a piece along the horizontal axis */ fun flipPiece(piece: Int) for p: @Direction = pieceDef(piece).all - p = flip(p) + p = flip(p); /* Convenience function to quickly calculate all of the indices for a piece */ -fun calcCellIndices(cell: @StaticArray(Byte, 5), piece: Int, index: Byte) +fun calcCellIndices(cell: !StaticArray(Byte, 5), piece: Int, index: Byte) var hasOddDir = false //for i = 0..4 //{ @@ -268,8 +268,8 @@ fun calcCellIndices(cell: @StaticArray(Byte, 5), piece: Int, index: Byte) if ( hasOddDir ) cout << "Piece: " << piece << ": " for i = 0..4 - cout << ' ' << pieceDef(piece)(i).id - cout << endl + cout << ' ' << pieceDef(piece)(i).id; + cout << endl; cell(0) = index cell(1) = shift(cell(0), pieceDef(piece)(0)) cell(2) = shift(cell(1), pieceDef(piece)(1)) @@ -277,18 +277,18 @@ fun calcCellIndices(cell: @StaticArray(Byte, 5), piece: Int, index: Byte) cell(4) = shift(cell(3), pieceDef(piece)(3)) /* Convenience function to quickly calculate if a piece fits on the board */ -fun cellsFitOnBoard(cell: @StaticArray(Byte, 5), piece: Int): Bool +fun cellsFitOnBoard(cell: !StaticArray(Byte, 5), piece: Int): Bool return(!outOfBounds(cell(0), pieceDef(piece)(0)) && !outOfBounds(cell(1), pieceDef(piece)(1)) && !outOfBounds(cell(2), pieceDef(piece)(2)) && !outOfBounds(cell(3), pieceDef(piece)(3)) - ) + ); /* Returns the lowest index of the cells of a piece. * I use the lowest index that a piece occupies as the index for looking up * the piece in the solve function. */ -fun minimumOfCells(cell: @StaticArray(Byte, 5)): Byte +fun minimumOfCells(cell: !StaticArray(Byte, 5)): Byte // TODO: Use algo here var minimum = cell(0) minimum = Byte(ife(cell(1) < minimum, cell(1), minimum)) @@ -301,20 +301,20 @@ fun minimumOfCells(cell: @StaticArray(Byte, 5)): Byte * Used to later reduce the amount of time searching for open cells in the * solve function. */ -fun firstEmptyCell(cell: @StaticArray(Byte, 5), min: Byte): Byte +fun firstEmptyCell(cell: !StaticArray(Byte, 5), min: Byte): Byte while ( min == cell(0) || min == cell(1) || min == cell(2) || min == cell(3) || min == cell(4) ) - ++min - return min + ++min; + return min; /* Generate the unsigned long long int that will later be anded with the * board to determine if it fits. */ -fun bitmaskFromCells(cell: @StaticArray(Byte, 5)): ULong +fun bitmaskFromCells(cell: !StaticArray(Byte, 5)): ULong var pieceMask: ULong for c = cell.all - pieceMask !|!= (ULong(1L) !<>! Byte(1)) !|! Byte(0x10) - var block = (row1 !^! row2) !&! row2 !&! ((row1 !^! row2Shift) !&! row2Shift) + row2Shift = (row2 !>>! Byte(1)) !|! Byte(0x10); + let block = (row1 !^! row2) !&! row2 !&! ((row1 !^! row2Shift) !&! row2Shift) /* Test for groups of 0's */ var inZeroes = false var groupOkay = false @@ -417,14 +419,16 @@ fun rowsBad(row1, row2: Byte, even: Bool): Bool if ( (row1 !&! (1 !<= 40 ) - return false - var currentTriple: Int = (board !>>! ((cell / 5) * 5)) !&! TRIPLE_MASK + return false; + let currentTriple: Int = (board !>>! ((cell / 5) * 5)) !&! TRIPLE_MASK if ( (cell / 5 % 2) != 0 ) - return badOddTriple(currentTriple) + return badOddTriple(currentTriple); else - return badEvenTriple(currentTriple) + return badEvenTriple(currentTriple); /* The recursive solve algorithm. Try to place each permutation in the upper- * leftmost empty cell. Mark off available pieces as it goes along. @@ -502,7 +507,7 @@ var solNums: StaticArray(Byte, nPieces) var solMasks: StaticArray(ULong, nPieces) var solutions: StaticArray2d(Byte, 2100, nPositions) var solutionCount = 0 -var maxSolutions = 2100 +let maxSolutions = 2100 fun recordSolution for solNo = 0..10 @@ -513,22 +518,23 @@ fun recordSolution /* Board rotated 180 degrees is a solution too! */ solutions(solutionCount+1)(49-index) = solNums(solNo) solMask = solMask !>>! 1 + ; solutionCount += 2 fun solve(depth, cell: Int) if ( solutionCount >= maxSolutions ) - return + return; while (board !&! (1L !<>>*/ \ No newline at end of file diff --git a/tests/Bugs/GenericWithCtConcept.spr b/tests/Bugs/GenericWithCtConcept.spr index 2910459e..e6938934 100644 --- a/tests/Bugs/GenericWithCtConcept.spr +++ b/tests/Bugs/GenericWithCtConcept.spr @@ -8,10 +8,10 @@ concept MyConcept(x) fun getCtData(val: Int): TestData return TestData(val) -fun testConcept(x: @MyConcept) +fun testConcept(x: MyConcept) ; -fun copyFromtCt(dest: @MyConcept, src: MyConcept ct) +fun copyFromtCt(dest: !MyConcept, src: MyConcept ct) dest.data = src.data fun sprMain diff --git a/tests/Bugs/NullConstant.spr b/tests/Bugs/NullConstant.spr index 3252bff9..a0fc02c8 100644 --- a/tests/Bugs/NullConstant.spr +++ b/tests/Bugs/NullConstant.spr @@ -1,6 +1,6 @@ fun sprMain - var p: @Int = null + let p: @Int = null cout << (p === null) << endl cout << (p !== null) << endl diff --git a/tests/Bugs/SpecializationOnCt.spr b/tests/Bugs/SpecializationOnCt.spr index ee17d137..ace5d28c 100644 --- a/tests/Bugs/SpecializationOnCt.spr +++ b/tests/Bugs/SpecializationOnCt.spr @@ -1,15 +1,15 @@ fun f(x: Int) - cout << "RT: f(" << x << ")\n" + cout << "RT: f(" << x << ")\n"; fun f(x: Int ct) - cout << "CT: f(" << x << ")\n" + cout << "CT: f(" << x << ")\n"; fun g(x: Int, y: Int) - cout << "RT: g(" << x << ", " << y << ")\n" + cout << "RT: g(" << x << ", " << y << ")\n"; fun g(x: Int ct, y: Int) - cout << "CT: g(" << x << ", " << y << ")\n" + cout << "CT: g(" << x << ", " << y << ")\n"; fun regexMatch(re, str: StringRef): Bool cout << "RT: regexMatch(" << re << ", " << str << ")\n" @@ -20,7 +20,7 @@ fun regexMatch(re: StringRef ct, str: StringRef): Bool return false fun sprMain - var n = 5 + let n = 5 f(n) f(6) @@ -28,8 +28,8 @@ fun sprMain g(n, n) g(6, n) - var str = "mumu" - [ct] var strCt = "bubu" + let str = "mumu" + [ct] let strCt = "bubu" regexMatch(str, "testStr") regexMatch(strCt, "testStr") /*<< numKeys - keysPerBucket /= 2 - var numBuckets = (numKeys-1)/keysPerBucket + UInt(1) + keysPerBucket /= 2; + let numBuckets = (numKeys-1)/keysPerBucket + UInt(1) this.displacements.ctor(numBuckets, 0) var numOp = 0 @@ -71,11 +71,11 @@ fun ctor(this: @MinPerfHash, keys: @Vector(String), extraSpace: Double) // Split the keys into buckets for key: @AnyType = keys.all() //cout << "Key: " << key.asStringRef() << "\n"; - var pos = _Impl.doHash(key.asStringRef(), _Impl.hashSeed) % numBuckets + let pos = _Impl.doHash(key.asStringRef(), _Impl.hashSeed) % numBuckets keysToBuckets(pos).pushBack(key.asStringRef()) // Sort the buckets in failing order according to their size - sort(keysToBuckets.all(), (fun (lhs, rhs: @Vector(StringRef)) = lhs.size() > rhs.size())) + sort(keysToBuckets.all(), (fun (lhs, rhs: !Vector(StringRef)) = lhs.size() > rhs.size())) var placedKeys: Bitset = numValues // Bitset with the positions in the final array that are occupied var slots: Vector(UInt) // Local - the slots (in the final array) to be occupied by iterating bucket @@ -84,9 +84,9 @@ fun ctor(this: @MinPerfHash, keys: @Vector(String), extraSpace: Double) // Here we process buckets that have at least 2 keys in them var b = 0 while b < numBuckets; ++b - var bucket: @AnyType = keysToBuckets(b) + let bucket: @AnyType = keysToBuckets(b) if ( bucket.size() <= 1 ) - break + break; var d = 1 // The displacement for this bucket slots.clear() @@ -95,8 +95,8 @@ fun ctor(this: @MinPerfHash, keys: @Vector(String), extraSpace: Double) // keys in this bucket without conflicts with keys from previous buckets. var item = 0 while item < bucket.size() - var slot: UInt = _Impl.doHash(bucket(item), d) % numValues - var slotAlreadyUsed = !find(slots.all(), slot).isEmpty() + let slot: UInt = _Impl.doHash(bucket(item), d) % numValues + let slotAlreadyUsed = !find(slots.all(), slot).isEmpty() ++numOp if ( placedKeys.testBit(slot) || slotAlreadyUsed ) // We have a conflict; try another displacement and start over @@ -115,19 +115,19 @@ fun ctor(this: @MinPerfHash, keys: @Vector(String), extraSpace: Double) // We found a displacement that works for the current bucket (it doesn't yield overlaps with previous buckets) displacements(_Impl.doHash(bucket(0), _Impl.hashSeed) % numBuckets) = d for i=0..bucket.size() - placedKeys.setBit(slots(i)) + placedKeys.setBit(slots(i)); // Now process the buckets with 1 key in them. // To speed up processing, directly assign them an item; use a negative index as a discriminator var emptySlot = 0 while b < numBuckets; ++b - var bucket: @AnyType = keysToBuckets(b) + let bucket: @AnyType = keysToBuckets(b) if ( bucket.size() == 0 ) - break + break; // Find an empty slot, iteratively - all the slots until 'emptySlot' are guaranteed to be occupied while placedKeys.testBit(emptySlot) - ++emptySlot + ++emptySlot; // We subtract one to ensure it's negative even if the zero-th slot was used. displacements(_Impl.doHash(bucket(0), _Impl.hashSeed) % numBuckets) = -emptySlot-1 @@ -136,163 +136,161 @@ fun ctor(this: @MinPerfHash, keys: @Vector(String), extraSpace: Double) //_dumpBuckets("buckets final, ", keysToBuckets); //cout << "Executed: " << numOp << " operations\n"; -fun ctorFromCt(this: @MinPerfHash, src: MinPerfHash ct) +fun ctorFromCt(this: !MinPerfHash, src: MinPerfHash ct) numKeys ctor src.numKeys numValues ctor src.numValues - [ct] var dispStrCt = StringRef(src.displacements.begin_.bytePtr(), src.displacements.end_.bytePtr()) - var dispStr = dispStrCt + [ct] let dispStrCt = StringRef(src.displacements.begin_.bytePtr(), src.displacements.end_.bytePtr()) + let dispStr = dispStrCt displacements ctor ContiguousMemoryRange(UInt)(RawPtr(UInt).fromBytePtr(dispStr.begin), RawPtr(UInt).fromBytePtr(dispStr.end)) -fun search(this: @MinPerfHash, key: StringRef): UInt +fun search(this: !MinPerfHash, key: StringRef): UInt // Get the displacement from the table... - var d = displacements(_Impl.doHash(key, _Impl.hashSeed) % displacements.size()) + let d = displacements(_Impl.doHash(key, _Impl.hashSeed) % displacements.size()) // If the displacement is negative, directly return; otherwise compute the final hash return ife(d<0, Int(-d-1), Int(_Impl.doHash(key, d) % numValues)) -fun ()(this: @MinPerfHash, key: StringRef) = this.search(key) +fun ()(this: !MinPerfHash, key: StringRef) = this.search(key) -fun _dumpBuckets(this: @MinPerfHash, prefix: StringRef, bucketKeys: @Array(Vector(StringRef))) +fun _dumpBuckets(this: !MinPerfHash, prefix: StringRef, bucketKeys: !Array(Vector(StringRef))) if ( bucketKeys.size() != displacements.size() ) cout << "FAILURE: bucket size mismatch\n" os.exit(-1) cout << prefix << "size="<0 ; cout << ", " cout << bucketKeys(i)(j) - cout << "\n" - cout << ")\n\n" + cout << "\n"; + cout << ")\n\n"; -fun _dumpDisplacements(this: @MinPerfHash, prefix: StringRef) +fun _dumpDisplacements(this: !MinPerfHash, prefix: StringRef) cout << prefix << "size="<= numVals ) - cout << "FAILURE: Hash " << h << " is too big (max: " << size << ")\n" + cout << "FAILURE: Hash " << h << " is too big (max: " << size << ")\n"; - usedHashs.setBit(h) + usedHashs.setBit(h); fun testRt(testRepCount, totalRepCount, keysToLoad: Int) cout << "test RT\n" // Read the keys from the file - var keysRt = readFileLines(keysFilename, keysToLoad) + let keysRt = readFileLines(keysFilename, keysToLoad) // Repeat the work, and test for performance for i = 0..totalRepCount // Build the hash - var hash = minPerfHash(keysRt) + let hash = minPerfHash(keysRt) // Test the keys, several times for j = 0..testRepCount - checkHashIsOk(hash, keysRt) + checkHashIsOk(hash, keysRt); [ct] if ( testType == 1 ) fun testCt(testRepCount, totalRepCount: Int, maxKeys: UInt ct) cout << "test CT\n" // Read the keys from the file - [ct] var keysCt = readFileLines(keysFilename, maxKeys) - var keysRt = readFileLines(keysFilename, maxKeys) + [ct] let keysCt = readFileLines(keysFilename, maxKeys) + let keysRt = readFileLines(keysFilename, maxKeys) // Repeat the work, and test for performance for i = 0..totalRepCount // Build the hash - [ct] var hashCt = minPerfHash(keysCt) - var hash = hashCt + [ct] let hashCt = minPerfHash(keysCt) + let hash = hashCt // Test the keys, several times for j = 0..testRepCount - checkHashIsOk(hash, keysRt) + checkHashIsOk(hash, keysRt); [ct] if ( testType == 2 ) fun testCtVsRtPerf(testRepCount, totalRepCount: Int) cout << "test CT/RT speedup\n" - var timerKeys: Timer - [ct] var keysCt = readFileLines(keysFilename, maxKeys) - var keysRt = readFileLines(keysFilename, maxKeys) + let timerKeys: Timer + [ct] let keysCt = readFileLines(keysFilename, maxKeys) + let keysRt = readFileLines(keysFilename, maxKeys) cout << "Reading keys time: " << timerKeys.elapsed() << "\n" var timerRt: Timer for i = 0..totalRepCount // Build the hash - var hash = minPerfHash(keysRt) + let hash = minPerfHash(keysRt) // Test the keys, several times for j = 0..testRepCount - checkHashIsOk(hash, keysRt) - var tRt = timerRt.elapsed() + checkHashIsOk(hash, keysRt); + let tRt = timerRt.elapsed() cout << "Total RT time: " << tRt << "\n" var timerCt: Timer for i = 0..totalRepCount // Build the hash - [ct] var hashCt = minPerfHash(keysCt) - var hash = hashCt + [ct] let hashCt = minPerfHash(keysCt) + let hash = hashCt // Test the keys, several times for j = 0..testRepCount - checkHashIsOk(hash, keysRt) - var tCt = timerCt.elapsed() + checkHashIsOk(hash, keysRt); + let tCt = timerCt.elapsed() cout << "Total CT time: " << tCt << "\n" cout << "Speedup = " << tRt/tCt << "\n\n" @@ -318,7 +316,7 @@ fun getMonths: Vector(String) // if ( programArgs.size() > 1 ) testRepCount = asInt(programArgs(1)); // if ( programArgs.size() > 2 ) totalRepCount = asInt(programArgs(2)); -// var words = readFileLines("months-test"); +// let words = readFileLines("months-test"); // var hist1 = StaticArray(Int, 13)(0); // var hist2 = StaticArray(Int, 13)(0); @@ -339,17 +337,17 @@ fun getMonths: Vector(String) // else if ( w.asStringRef() == "November" ) ++hist1(10); // else if ( w.asStringRef() == "December" ) ++hist1(11); // else ++hist1(12); -// var tRt = timerRt.elapsed(); +// let tRt = timerRt.elapsed(); // cout << "if-clauses time: " << tRt << "\n"; // // Build the hash -// [ct] var hashCt = minPerfHashSet(getMonths()); -// var hash = hashCt; +// [ct] let hashCt = minPerfHashSet(getMonths()); +// let hash = hashCt; // var timerCt: Timer; // for i = 0..(totalRepCount*testRepCount) // for w: @AnyType = words.all() -// var idx = hash.search(w.asStringRef()); +// let idx = hash.search(w.asStringRef()); // if ( idx == hashCt.search("January") ) ++hist2(0); // else if ( idx == hashCt.search("February") ) ++hist2(1); // else if ( idx == hashCt.search("March") ) ++hist2(2); @@ -364,7 +362,7 @@ fun getMonths: Vector(String) // else if ( idx == hashCt.search("December") ) ++hist2(11); // else ++hist2(12); // -// var tCt = timerCt.elapsed(); +// let tCt = timerCt.elapsed(); // cout << "MinPerfHash time: " << tCt << "\n"; // cout << "Speedup = " << tRt/tCt << "\n\n"; @@ -385,17 +383,17 @@ fun sprMain [ct] if ( testType == 3 ) if ( testNum == 1 ) - testRt(testRepCount, totalRepCount, keysCount) + testRt(testRepCount, totalRepCount, keysCount); else [ct] for i=startKeysNum..endKeysNum../stepKeysNum if ( keysCount == ctEval(i) ) - testCt(testRepCount, totalRepCount, i) + testCt(testRepCount, totalRepCount, i); else [ct] if ( testType == 0 ) - testRt(testRepCount, totalRepCount, keysCount) + testRt(testRepCount, totalRepCount, keysCount); else [ct] if ( testType == 1 ) - testCt(testRepCount, totalRepCount, numKeys) + testCt(testRepCount, totalRepCount, numKeys); else - testCtVsRtPerf(testRepCount, totalRepCount) + testCtVsRtPerf(testRepCount, totalRepCount); //testIfVsPefHash(programArgs); /*<<= buf.size()/2 ) - return String() + return String(); var dstIdx = 0 - var dst: @Char = buf.at(0) for i=0 .. strSize - var ch = re.at(i) + let ch = re.at(i) if ( ch == '('.char ) if ( nAtom > 1 ) --nAtom buf(dstIdx++) = '.'.char if ( parenIdx >= 100 ) //cout << "Parenthesis index is above 100\n"; - return String() + return String(); paren(parenIdx++) = (Int*Int)(nAlt, nAtom) nAlt = 0 nAtom = 0 else if ( ch == '|'.char ) if ( nAtom == 0 ) //cout << "No atoms is zero at alternation\n"; - return String() + return String(); while --nAtom > 0 - buf(dstIdx++) = '.'.char - nAlt++ + buf(dstIdx++) = '.'.char; + nAlt++; else if ( ch == ')'.char ) if ( parenIdx == 0 || nAtom == 0 ) //cout << "Invalid state at closing parenthesis (parenIdx:" << parenIdx << ", nAtom:" << nAtom << ")\n"; - return String() + return String(); while --nAtom > 0 - buf(dstIdx++) = '.'.char + buf(dstIdx++) = '.'.char; while nAlt > 0 ; --nAlt - buf(dstIdx++) = '|'.char + buf(dstIdx++) = '|'.char; --parenIdx nAlt = paren(parenIdx).v1 nAtom = paren(parenIdx).v2 @@ -80,8 +79,8 @@ fun re2post(re: StringRef): String else if ( ch == '*'.char || ch == '+'.char || ch == '?'.char ) if ( nAtom == 0 ) //cout << "Zero atoms at char" << ch << "\n"; - return String() - buf(dstIdx++) = ch + return String(); + buf(dstIdx++) = ch; else if ( nAtom > 1 ) --nAtom @@ -91,11 +90,11 @@ fun re2post(re: StringRef): String if ( parenIdx != 0 ) //cout << "Parenthesis don't close correctly\n"; - return String() + return String(); while --nAtom > 0 - buf(dstIdx++) = '.'.char + buf(dstIdx++) = '.'.char; while nAlt > 0 ; --nAlt - buf(dstIdx++) = '|'.char + buf(dstIdx++) = '|'.char; buf(dstIdx) = Char(0) return String(mkRawPtr(buf(0)), mkRawPtr(buf(dstIdx))) @@ -106,30 +105,30 @@ datatype NfaStatesFactory _matchState: NfaState ///< The match state _pages: Vector(RawPtr(NfaState)) ///< Pointers to the memory pages containing the actual NFA states -fun ctor(this: @NfaStatesFactory) +fun ctor(this: !NfaStatesFactory) _numStates ctor 0 - var nullObj: Ptr(NfaState) + let nullObj: Ptr(NfaState) _matchState.ctor(NfaState.match, nullObj, nullObj) -fun dtor(this: @NfaStatesFactory) +fun dtor(this: !NfaStatesFactory) // Release the memory occupied by the states for page = _pages.all() - page freePtr + page freePtr; -fun getCharState(this: @NfaStatesFactory, c: Char) = this._alloc(Int(c), Ptr(NfaState)(), Ptr(NfaState)()) -fun getSplitState(this: @NfaStatesFactory, s1, s2: Ptr(NfaState)) = this._alloc(NfaState.split, s1, s2) -fun getSplitState(this: @NfaStatesFactory, s1: Ptr(NfaState)) = this._alloc(NfaState.split, s1, Ptr(NfaState)()) -fun getMatchState(this: @NfaStatesFactory) = Ptr(NfaState)(_matchState) +fun getCharState(this: !NfaStatesFactory, c: Char) = this._alloc(Int(c), Ptr(NfaState)(), Ptr(NfaState)()) +fun getSplitState(this: !NfaStatesFactory, s1, s2: Ptr(NfaState)) = this._alloc(NfaState.split, s1, s2) +fun getSplitState(this: !NfaStatesFactory, s1: Ptr(NfaState)) = this._alloc(NfaState.split, s1, Ptr(NfaState)()) +fun getMatchState(this: !NfaStatesFactory) = Ptr(NfaState)(_matchState) -fun _alloc(this: @NfaStatesFactory, c: Int, out1, out2: Ptr(NfaState)): Ptr(NfaState) +fun _alloc(this: !NfaStatesFactory, c: Int, out1, out2: Ptr(NfaState)): Ptr(NfaState) using _statesPerPage = 100 if ( _numStates >= _statesPerPage*_pages.size() ) - var p = allocRawPtr(NfaState, _statesPerPage) + let p = allocRawPtr(NfaState, _statesPerPage) _pages.pushBack(p) - var idx = _numStates % _statesPerPage + let idx = _numStates % _statesPerPage ++_numStates - var state: Ptr(NfaState) = _pages.back().advance(idx).value() + let state: Ptr(NfaState) = _pages.back().advance(idx).value() state.get().ctor(c, out1, out2) return state @@ -153,25 +152,25 @@ fun isMatch(this: NfaState) = c == NfaState.match datatype OutPtrList /// Pointer to the next element. /// This actually represents two things: one the pointer to the next element, and the actual data that needs to be filled - _next: Ptr(OutPtrList) + _next: Ptr(OutPtrList); /// Construct the out-ptr list from a single out-ptr reference -fun ctor(this: @OutPtrList, outPtr: @Ptr(NfaState)) - _next ctor reinterpretPtr(OutPtrList, Ptr(Ptr(NfaState))(outPtr)) +fun ctor(this: !OutPtrList, outPtr: !Ptr(NfaState)) + _next ctor reinterpretPtr(OutPtrList, Ptr(Ptr(NfaState))(outPtr)); /// Append to this list another list of out-pointers -fun append(this: @OutPtrList, other: OutPtrList) +fun append(this: !OutPtrList, other: OutPtrList) var p = _next while p.get()._next isSet - p = p.get()._next - p.get()._next = other._next + p = p.get()._next; + p.get()._next = other._next; /// Set the final value to all the out-pointers from this list /// After calling this method, the list will be actually destroyed (as we right the exact pointers that are used to chain the nodes) -fun setFinalValue(this: @OutPtrList, finalPtr: Ptr(NfaState)) +fun setFinalValue(this: !OutPtrList, finalPtr: Ptr(NfaState)) var p = _next while p isSet - var _next = p.get()._next + let _next = p.get()._next reinterpretPtr(Ptr(NfaState), p).get() = finalPtr p = _next @@ -182,52 +181,52 @@ datatype NfaFragment start: Ptr(NfaState) ///< Start state of the NFA frament outPtrChain: OutPtrList ///< Chain of out-pointers for this fragment that need to be set to the next state -fun ctor(this: @NfaFragment, start: Ptr(NfaState), outPtrChain: @OutPtrList) +fun ctor(this: !NfaFragment, start: Ptr(NfaState), outPtrChain: !OutPtrList) this.start ctor start this.outPtrChain ctor outPtrChain -fun getChar(nfaStatesFactory: @NfaStatesFactory, c: Char): NfaFragment - var s = nfaStatesFactory.getCharState(c) +fun getChar(nfaStatesFactory: !NfaStatesFactory, c: Char): NfaFragment + let s = nfaStatesFactory.getCharState(c) return NfaFragment(s, OutPtrList(s.get().out1)) -fun getConcatenation(nfaStatesFactory: @NfaStatesFactory, e1, e2: @NfaFragment): NfaFragment +fun getConcatenation(nfaStatesFactory: !NfaStatesFactory, e1, e2: !NfaFragment): NfaFragment e1.outPtrChain.setFinalValue(e2.start) // e1 fragment is finalized by e2 fragment return NfaFragment(e1.start, e2.outPtrChain) -fun getAlternation(nfaStatesFactory: @NfaStatesFactory, e1, e2: @NfaFragment): NfaFragment - var splitState = nfaStatesFactory.getSplitState(e1.start, e2.start) +fun getAlternation(nfaStatesFactory: !NfaStatesFactory, e1, e2: !NfaFragment): NfaFragment + let splitState = nfaStatesFactory.getSplitState(e1.start, e2.start) e1.outPtrChain.append(e2.outPtrChain) // Consider both chains return NfaFragment(splitState, e1.outPtrChain) -fun getOptional(nfaStatesFactory: @NfaStatesFactory, e: @NfaFragment): NfaFragment - var splitState = nfaStatesFactory.getSplitState(e.start) +fun getOptional(nfaStatesFactory: !NfaStatesFactory, e: !NfaFragment): NfaFragment + let splitState = nfaStatesFactory.getSplitState(e.start) e.outPtrChain.append(OutPtrList(splitState.get().out2)) // Add second output of the split state to the out-ptr chain return NfaFragment(splitState, e.outPtrChain) -fun getZeroOrMore(nfaStatesFactory: @NfaStatesFactory, e: @NfaFragment): NfaFragment - var splitState = nfaStatesFactory.getSplitState(e.start) +fun getZeroOrMore(nfaStatesFactory: !NfaStatesFactory, e: !NfaFragment): NfaFragment + let splitState = nfaStatesFactory.getSplitState(e.start) e.outPtrChain.setFinalValue(splitState) // Out pointers of the fragment are connected back to the split state return NfaFragment(splitState, OutPtrList(splitState.get().out2)) -fun getOneOrMore(nfaStatesFactory: @NfaStatesFactory, e: @NfaFragment): NfaFragment - var splitState = nfaStatesFactory.getSplitState(e.start) +fun getOneOrMore(nfaStatesFactory: !NfaStatesFactory, e: !NfaFragment): NfaFragment + let splitState = nfaStatesFactory.getSplitState(e.start) e.outPtrChain.setFinalValue(splitState) // Out pointers of the fragment are connected back to the split state return NfaFragment(e.start, OutPtrList(splitState.get().out2)) /// Finalize the current NFA fragment by ending it with a match Nfa state -fun finalize(this: @NfaFragment, nfaStatesFactory: @NfaStatesFactory) - outPtrChain.setFinalValue(nfaStatesFactory.getMatchState()) +fun finalize(this: !NfaFragment, nfaStatesFactory: !NfaStatesFactory) + outPtrChain.setFinalValue(nfaStatesFactory.getMatchState()); -fun nfaFromPostfix(nfaStatesFactory: @NfaStatesFactory, postfix: @StringRef): Ptr(NfaState) +fun nfaFromPostfix(nfaStatesFactory: !NfaStatesFactory, postfix: StringRef): Ptr(NfaState) if ( postfix.size() == 0 ) - return Ptr(NfaState)() + return Ptr(NfaState)(); var stack: StaticArray(NfaFragment, 1000) var stackIdx = 0 //cout << "Postfix to parse: '" << postfix << "'\n"; for i = 0 .. Int(postfix.size()) - var ch = postfix(i) + let ch = postfix(i) var e1, e2: NfaFragment if ( ch == '.'.char ) // Concatenate @@ -248,11 +247,11 @@ fun nfaFromPostfix(nfaStatesFactory: @NfaStatesFactory, postfix: @StringRef): Pt e1 = stack(--stackIdx) stack(stackIdx++) = getOneOrMore(nfaStatesFactory, e1) else - stack(stackIdx++) = getChar(nfaStatesFactory, ch) + stack(stackIdx++) = getChar(nfaStatesFactory, ch); var e = stack(--stackIdx) if ( stackIdx != 0 ) - return Ptr(NfaState)() + return Ptr(NfaState)(); e.finalize(nfaStatesFactory) return e.start @@ -261,10 +260,10 @@ datatype NfaNodeList id: Int isMatch: Bool -fun ctor(this: @NfaNodeList, noNfaNodes: Int) - nodes.reserve(noNfaNodes) +fun ctor(this: !NfaNodeList, noNfaNodes: Int) + nodes.reserve(noNfaNodes); -fun ctor(this, other: @NfaNodeList) // move ctor +fun ctor(this, other: !NfaNodeList) // move ctor this.id ctor other.id this.isMatch ctor other.isMatch this.nodes ctor @@ -272,11 +271,11 @@ fun ctor(this, other: @NfaNodeList) // move ctor //this.nodes ctor other.nodes; [protected] - fun ==(this, other: @NfaNodeList): Bool - return this.isMatch == other.isMatch && this.nodes == other.nodes + fun ==(this, other: !NfaNodeList): Bool + return this.isMatch == other.isMatch && this.nodes == other.nodes; /// Initialize the list to be the epsilon-closure of the given node -fun initFromState(this: @NfaNodeList, id: Int, start: Ptr(NfaState)) +fun initFromState(this: !NfaNodeList, id: Int, start: Ptr(NfaState)) this.id = id this.isMatch = false nodes.clear() @@ -284,27 +283,27 @@ fun initFromState(this: @NfaNodeList, id: Int, start: Ptr(NfaState)) sort(nodes.all()) /// Initialize the list as to be the result of moving from the previous list with the given char -fun initAsNextList(this: @NfaNodeList, id: Int, prev: @NfaNodeList, c: Int) +fun initAsNextList(this: !NfaNodeList, id: Int, prev: !NfaNodeList, c: Int) this.id = id this.isMatch = false nodes.clear() for node = prev.nodes.all() if ( node.get().c == c ) - this._addState(node.get().out1) - sort(nodes.all()) + this._addState(node.get().out1); + sort(nodes.all()); -fun print(this: @NfaNodeList) +fun print(this: !NfaNodeList) cout << "NFA node list " << id if ( this.isMatch ) - cout << " (match)" + cout << " (match)"; cout << ":" for n = nodes.all() - cout << " " << n.get().c << " " << mkStreamRefWrapper(n.get()) - cout << "\n" + cout << " " << n.get().c << " " << UntypedPtr(n.get()); + cout << "\n"; -fun _addState(this: @NfaNodeList, state: Ptr(NfaState)) +fun _addState(this: !NfaNodeList, state: Ptr(NfaState)) if ( (state isNull) || state.get().listId == id ) - return + return; var s: @NfaState = state.get() @@ -318,9 +317,9 @@ fun _addState(this: @NfaNodeList, state: Ptr(NfaState)) nodes.pushBack(state) datatype Transition - start, end, ch: Int + start, end, ch: Int; -fun ctor(this: @Transition, start, end, ch: Int) +fun ctor(this: !Transition, start, end, ch: Int) this.start ctor start this.end ctor end this.ch ctor ch @@ -332,7 +331,7 @@ datatype DfaState nfaNodes: NfaNodeList isMatch: Bool -fun ctor(this: @DfaState, nfaNodes: @NfaNodeList) // moves the nodes list +fun ctor(this: !DfaState, nfaNodes: !NfaNodeList) // moves the nodes list next ctor -1 this.nfaNodes ctor nfaNodes this.isMatch ctor nfaNodes.isMatch @@ -341,21 +340,21 @@ datatype Automaton nfaStatesFactory: NfaStatesFactory dfaStates: Vector(DfaState) -fun ctor(this: @Automaton, re: StringRef) +fun ctor(this: !Automaton, re: StringRef) // Convert the regex from infix to postfix notation - var post = re2post(re) + let post = re2post(re) if ( post.size() == 0 ) cout << "Bad regular expression: " << re << endl return /// Convert the postfix form into a NFA - var nfaStart = nfaFromPostfix(nfaStatesFactory, post.asStringRef()) + let nfaStart = nfaFromPostfix(nfaStatesFactory, post.asStringRef()) if ( nfaStart.isNull() ) cout << "error in post2nfa for regexp: " << re << endl return // Create the DFA states - this.createDfaStates(nfaStart) + this.createDfaStates(nfaStart); // Print some statistics //cout << "We have " << nfaStatesFactory._numStates << " NFA states\n"; @@ -363,46 +362,46 @@ fun ctor(this: @Automaton, re: StringRef) //for i=0..dfaStates.size() // cout << "DFA state " << i << " has " << dfaStates(i).nfaNodes.nodes.size() << " NFA states\n"; -fun ctorFromCt(this: @Automaton, src: Automaton ct) +fun ctorFromCt(this: !Automaton, src: Automaton ct) nfaStatesFactory ctor dfaStates ctor dfaStates resize src.dfaStates.size() - [ct] var transitions = src.getTransitions() + [ct] let transitions = src.getTransitions() [ct] for tr = transitions all //cout << ctEval(tr.start) << ".." << ctEval(tr.end) << "/" << ctEval(tr.ch) << endl; - dfaStates.at(ctEval(tr.start)).next.at(ctEval(tr.ch)) = ctEval(tr.end) + dfaStates.at(ctEval(tr.start)).next.at(ctEval(tr.ch)) = ctEval(tr.end); [ct] for st = 0 .. src.dfaStates.size() [ct] if ( ctEval(src.dfaStates.at(st).isMatch) ) - dfaStates.at(ctEval(st)).isMatch = true + dfaStates.at(ctEval(st)).isMatch = true; //cout << "State " << ctEval(st) << " is matching" << endl; [ct] -fun getTransitions(this: @Automaton): Vector(Transition) +fun getTransitions(this: Automaton): Vector(Transition) var res: Vector(Transition) for st = 0..(dfaStates.size()-1) for ch = 0..255 - var nextState = dfaStates.at(st).next.at(ch) + let nextState = dfaStates.at(st).next.at(ch) if ( nextState >= 0 ) - res.pushBack(Transition(Int(st), nextState, ch)) - return res + res.pushBack(Transition(Int(st), nextState, ch)); + return res; -fun match(this: @Automaton, str: StringRef): Bool +fun match(this: !Automaton, str: StringRef): Bool if ( dfaStates isEmpty ) - return false + return false; var curStateIdx = 0 for i=0 .. str.size - var c = Int(str(i)) - var nextStateIdx = dfaStates(curStateIdx).next(c) + let c = Int(str(i)) + let nextStateIdx = dfaStates(curStateIdx).next(c) //cout << "Match: in DFA state " << curStateIdx << "; moving to DFA state " << nextStateIdx << " after char " << c << endl; if ( nextStateIdx < 0 ) - return false - curStateIdx = nextStateIdx - return dfaStates(curStateIdx).isMatch + return false; + curStateIdx = nextStateIdx; + return dfaStates(curStateIdx).isMatch; -fun createDfaStates(this: @Automaton, start: Ptr(NfaState)) - var noNfaNodes = nfaStatesFactory._numStates +fun createDfaStates(this: !Automaton, start: Ptr(NfaState)) + let noNfaNodes = nfaStatesFactory._numStates var tmpList = NfaNodeList(noNfaNodes) var exploredChars = Bitset(256) @@ -428,11 +427,11 @@ fun createDfaStates(this: @Automaton, start: Ptr(NfaState)) // Try to go trough all possible transitions (NFA states with actual characters) for nfaState = dfaStates(i).nfaNodes.nodes.all() if ( nfaState.get().isMatch() || nfaState.get().isSplit() ) - continue + continue; - var c = nfaState.get().c + let c = nfaState.get().c if ( exploredChars.testBit(c) ) - continue + continue; exploredChars.setBit(c) @@ -457,37 +456,37 @@ fun createDfaStates(this: @Automaton, start: Ptr(NfaState)) // cout << "State " << Int(dfaStates.size()-1) << " is a match state\n"; fun regexMatch(re, str: StringRef): Bool - var automaton = Automaton(re) + let automaton = Automaton(re) return automaton.match(str) fun regexMatch(re: StringRef ct, str: StringRef): Bool cout << "At CT\n" - [ct] var automatonCt = Automaton(re) + [ct] let automatonCt = Automaton(re) var automaton = automatonCt return automaton.match(str) fun testRe(re, str: StringRef) if ( regexMatch(re, str) ) - cout << str << " match " << re << endl + cout << str << " match " << re << endl; else - cout << str << " no match " << re << endl + cout << str << " no match " << re << endl; fun testReCt(re: StringRef ct, str: StringRef) if ( regexMatch(re, str) ) - cout << str << " match " << re << endl + cout << str << " match " << re << endl; else - cout << str << " no match " << re << endl + cout << str << " no match " << re << endl; fun timedTest(re, str: String, k, repCount: Int) var matchCount = 0 var timer: time.Timer for i = 0..repCount if ( regexMatch(re.asStringRef(), str.asStringRef()) ) - ++matchCount - var duration = timer elapsed + ++matchCount; + let duration = timer elapsed if ( matchCount != repCount ) - cout << "Failed to match '" << str.asStringRef() << "' to regex '" << re.asStringRef() << "'\n" - cout << k << ": " << duration << endl + cout << "Failed to match '" << str.asStringRef() << "' to regex '" << re.asStringRef() << "'\n"; + cout << k << ": " << duration << endl; fun testRt(re: StringRef, testRepCount, totalRepCount: Int, testStrings: Range) cout << "'" << re << "'\t RT regex\n" @@ -496,21 +495,21 @@ fun testRt(re: StringRef, testRepCount, totalRepCount: Int, testStrings: Range) for j = 0..testRepCount for ts = programArgs - var res = automaton.match(ts) + let res = automaton.match(ts) if ( !res ) - cout << "String '" << ts << "' doesn't match regular expression '" << re << "'\n" + cout << "String '" << ts << "' doesn't match regular expression '" << re << "'\n"; fun testCt(re: StringRef ct, testRepCount, totalRepCount: Int, testStrings: Range) cout << "'" << re << "'\t CT regex\n" for i = 0..totalRepCount - [ct] var automatonCt = Automaton(re) + [ct] let automatonCt = Automaton(re) var automaton = automatonCt for j = 0..testRepCount for ts = testStrings - var res = automaton.match(ts) + let res = automaton.match(ts) if ( !res ) - cout << "String '" << ts << "' doesn't match regular expression '" << re << "'\n" + cout << "String '" << ts << "' doesn't match regular expression '" << re << "'\n"; [ct] if ( testType == 1 ) fun testCtVsRtPerf(ctRe: StringRef ct, str: StringRef, repCount: Int) @@ -522,13 +521,13 @@ fun testCtVsRtPerf(ctRe: StringRef ct, str: StringRef, repCount: Int) var cnt = 0 var timerCt: time.Timer testCt(ctRe, 1, repCount, testStrings.all()) - var tCt = timerCt.elapsed() + let tCt = timerCt.elapsed() cout << "Compile-time:\t" << ctRe << "\t\t" << str << "\t\t" << repCount << "\t\t" << cnt << "\t\t" << tCt << endl cnt = 0 var timerRt: time.Timer testRt(rtRe, 1, repCount, testStrings.all()) - var tRt = timerRt.elapsed() + let tRt = timerRt.elapsed() cout << "Run-time:\t" << rtRe << "\t\t" << str << "\t\t" << repCount << "\t\t" << cnt << "\t\t" << tRt << endl cout << "Speedup = " << tRt/tCt << "\n\n" @@ -602,9 +601,9 @@ fun getReOfType(reType, n: Int): String fun sprMain [ct] if ( testType == 0 ) - autoTest() + autoTest(); else [ct] if ( testType == 1 ) - [ct] var re = getReOfType(4, 8) + [ct] let re = getReOfType(4, 8) //testCtVsRtPerf("a?a?a?aaa", "aaaaaa", 100000); testCtVsRtPerf(re.asStringRef(), "aaaaaaaaaaaaaaaa", 1000) else [ct] if ( testType == 2 ) @@ -626,17 +625,17 @@ fun sprMain programArgs.popFront() if ( progType == 1 ) - var re = getReOfType(reType, reLen) + let re = getReOfType(reType, reLen) testRt(re.asStringRef(), testRepCount, totalRepCount) else [ct] for t=1..4 [ct] for n=5..26 if ( reType == ctEval(t) && reLen == ctEval(n) ) - [ct] var re = getReOfType(t, n) + [ct] let re = getReOfType(t, n) testCt(re.asStringRef(), testRepCount, totalRepCount) [ct] for n=5..11 if ( reType == 4 && reLen == ctEval(n) ) - [ct] var re = getReOfType(4, n) + [ct] let re = getReOfType(4, n) testCt(re.asStringRef(), testRepCount, totalRepCount) else [ct] if ( testType == 3 ) - timedTest("(a|b)?"**100 + "(a|b)"**100 + "z", "a"**100 + "z", 1, 1000) + timedTest("(a|b)?"**100 + "(a|b)"**100 + "z", "a"**100 + "z", 1, 1000); diff --git a/tests/Examples/Speak.spr b/tests/Examples/Speak.spr index 26c203d9..7d854247 100644 --- a/tests/Examples/Speak.spr +++ b/tests/Examples/Speak.spr @@ -1,12 +1,12 @@ import os = os -[ct] var hello = "Hello, world!" -[ct] var name = "I am the Sparrow compiler!" -[ct] var smart = "Unlike other compilers, I am smart." -[ct] var canDo = "I can run any kind of algorithm and I can execute any kind of program during compilation." -[ct] var exampl = "For example, in this program I composed a text at compile time and called an external program to synthesize it." -[ct] var more = "As you will shortly see, I can do much more." -[ct] var exit = "Now, I will let my dear friend Lucian to continue the presentation. Thank you, and good bye!" +[ct] let hello = "Hello, world!" +[ct] let name = "I am the Sparrow compiler!" +[ct] let smart = "Unlike other compilers, I am smart." +[ct] let canDo = "I can run any kind of algorithm and I can execute any kind of program during compilation." +[ct] let exampl = "For example, in this program I composed a text at compile time and called an external program to synthesize it." +[ct] let more = "As you will shortly see, I can do much more." +[ct] let exit = "Now, I will let my dear friend Lucian to continue the presentation. Thank you, and good bye!" [ct] fun getMessage = hello+" "+name+" "+smart+" "+canDo+" "+exampl+" "+more+" "+exit diff --git a/tests/Frontend/Operators.spr b/tests/Frontend/Operators.spr index 0ba41dcd..a1bfca8e 100644 --- a/tests/Frontend/Operators.spr +++ b/tests/Frontend/Operators.spr @@ -18,12 +18,12 @@ fun +++:(l,r: Int): Int cout << l << " +++: " << r << " = " << (l+r) << endl return l+r -fun +++(x: @Int): Int +fun +++(x: !Int): Int var r = x x += 1 return r -fun inc(x: @Int): Int +fun inc(x: !Int): Int var r = x x += 1 return r @@ -33,8 +33,8 @@ using oper_assoc_:: = -1 fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1 ; test1 else if n == 2 ; test2 @@ -148,7 +148,7 @@ fun test6 >>>*/ fun test7 - var x: StringRef = "42" + let x: StringRef = "42" cout << ( x size ) << endl cout << ( x front ) << endl /*<<>>*/ fun test11 - var x = 3 - var y = 4 - var z = 5 + let x = 3 + let y = 4 + let z = 5 cout << ( x..y ) << endl cout << ( x..y..z ) << endl /*<<" -fun ctor(this: @NodeImpl, l: Location, kind: StringRef) +fun ctor(this: !NodeImpl, l: Location, kind: StringRef) this.kind ctor kind this.loc ctor l // cout << "Parsed: " << kind << endl -fun ctor(this: @NodeImpl, l: Location, kind: StringRef, r: Range) +fun ctor(this: !NodeImpl, l: Location, kind: StringRef, r: Range) this.kind ctor kind this.loc ctor l children ctor r // cout << "Parsed: " << kind << endl -fun ctor(this: @NodeImpl, l: Location, kind: StringRef, r: Range, name: StringRef) +fun ctor(this: !NodeImpl, l: Location, kind: StringRef, r: Range, name: StringRef) this.kind ctor kind this.loc ctor l this.name ctor name children ctor r // cout << "Parsed: " << kind << endl -fun toImpl(n: Node): @NodeImpl = ife(n.data.data !== null, reinterpretCast(@NodeImpl, n.data.data), _nullNodeImpl) -fun toNode(impl: @NodeImpl) = Node(UntypedPtr(reinterpretCast(@Byte, impl))) +fun toImpl(n: Node): @NodeImpl + if n.data.data !== null + return reinterpretCast(@NodeImpl, n.data.data) + else + return _nullNodeImpl +fun toNode(impl: !NodeImpl) = Node(UntypedPtr(impl)) -fun >> (n: @NodeImpl, os: @OutStream) +fun >> (n: NodeImpl, os: !OutStream) os << n.kind if !(n.children isEmpty) os << "(" @@ -54,7 +58,7 @@ fun createNode(l: Location, kind: StringRef, children: Range, name: StringRef): datatype MyAstBuilder -fun addToNodeList(this: @MyAstBuilder, nl, newNode: Node): Node +fun addToNodeList(this: !MyAstBuilder, nl, newNode: Node): Node if nl isSet if newNode isSet (nl toImpl).children += newNode @@ -62,83 +66,85 @@ fun addToNodeList(this: @MyAstBuilder, nl, newNode: Node): Node nl = createNode((newNode toImpl).loc, "nodeList", repeat(newNode, 1)) return nl -fun mkModifiers(this: @MyAstBuilder, loc: @Location, main, mods: Node) \ +fun mkModifiers(this: !MyAstBuilder, loc: !Location, main, mods: Node) \ = ife(mods isSet, createNode(loc, "modifiers", values(main, mods)), main) -fun mkModule(this: @MyAstBuilder, loc: @Location, moduleName, decls: Node) \ +fun mkModule(this: !MyAstBuilder, loc: !Location, moduleName, decls: Node) \ = createNode(loc, "module", values(moduleName, decls)) -fun mkImportName(this: @MyAstBuilder, loc: @Location, alias: StringRef, toImport, decls: Node) \ +fun mkImportName(this: !MyAstBuilder, loc: !Location, alias: StringRef, toImport, decls: Node) \ = createNode(loc, "importName", values(toImport, decls), alias) -fun mkUsing(this: @MyAstBuilder, loc: @Location, alias: StringRef, usingNode: Node) \ +fun mkUsing(this: !MyAstBuilder, loc: !Location, alias: StringRef, usingNode: Node) \ = createNode(loc, "using", repeat(usingNode, 1), alias) -fun mkPackage(this: @MyAstBuilder, loc: @Location, name: StringRef, children, params, ifClause: Node) \ +fun mkPackage(this: !MyAstBuilder, loc: !Location, name: StringRef, children, params, ifClause: Node) \ = createNode(loc, "package", repeat(children, 1), name) -fun mkDatatype(this: @MyAstBuilder, loc: @Location, name: StringRef, params, underlyingData, ifClause, children: Node) \ +fun mkDatatype(this: !MyAstBuilder, loc: !Location, name: StringRef, params, underlyingData, ifClause, children: Node) \ = createNode(loc, "datatype", values(params, underlyingData, ifClause, children), name) -fun mkField(this: @MyAstBuilder, loc: @Location, name: StringRef, typeNode, init: Node): Node \ +fun mkField(this: !MyAstBuilder, loc: !Location, name: StringRef, typeNode, init: Node): Node \ = createNode(loc, "field", values(typeNode, init), name) -fun mkConcept(this: @MyAstBuilder, loc: @Location, name, paramName: StringRef, baseConcept, ifClause: Node) \ +fun mkConcept(this: !MyAstBuilder, loc: !Location, name, paramName: StringRef, baseConcept, ifClause: Node) \ = createNode(loc, "concept", values(baseConcept, ifClause), name) -fun mkVar(this: @MyAstBuilder, loc: @Location, name: StringRef, typeNode, init: Node) \ +fun mkLet(this: !MyAstBuilder, loc: !Location, name: StringRef, typeNode, init: Node) \ + = createNode(loc, "let", values(typeNode, init), name) +fun mkVar(this: !MyAstBuilder, loc: !Location, name: StringRef, typeNode, init: Node) \ = createNode(loc, "var", values(typeNode, init), name) -fun mkParameter(this: @MyAstBuilder, loc: @Location, name: StringRef, typeNode, init: Node) \ +fun mkParameter(this: !MyAstBuilder, loc: !Location, name: StringRef, typeNode, init: Node) \ = createNode(loc, "param", values(typeNode, init), name) -fun mkFun(this: @MyAstBuilder, loc: @Location, name: StringRef, formals, retType, body, bodyExp, ifClause: Node) \ +fun mkFun(this: !MyAstBuilder, loc: !Location, name: StringRef, formals, retType, body, bodyExp, ifClause: Node) \ = createNode(loc, "fun", values(formals, retType, body, bodyExp, ifClause), name) -fun mkParenthesisExpr(this: @MyAstBuilder, expr: Node) \ +fun mkParenthesisExpr(this: !MyAstBuilder, expr: Node) \ = createNode((expr toImpl).loc, "paren", repeat(expr, 1)) -fun mkPostfixOp(this: @MyAstBuilder, loc: @Location, base: Node, op: StringRef) \ +fun mkPostfixOp(this: !MyAstBuilder, loc: !Location, base: Node, op: StringRef) \ = createNode(loc, "postfix", values(base, createNode(loc, op))) -fun mkInfixOp(this: @MyAstBuilder, loc: @Location, lhs: Node, op: StringRef, rhs: Node) \ +fun mkInfixOp(this: !MyAstBuilder, loc: !Location, lhs: Node, op: StringRef, rhs: Node) \ = createNode(loc, "infix", values(lhs, createNode(loc, op), rhs)) -fun mkPrefixOp(this: @MyAstBuilder, loc: @Location, op: StringRef, base: Node) \ +fun mkPrefixOp(this: !MyAstBuilder, loc: !Location, op: StringRef, base: Node) \ = createNode(loc, "prefix", values(createNode(loc, op), base)) -fun mkIdentifier(this: @MyAstBuilder, loc: @Location, id: StringRef) \ +fun mkIdentifier(this: !MyAstBuilder, loc: !Location, id: StringRef) \ = createNode(loc, id) -fun mkCompoundExpr(this: @MyAstBuilder, loc: @Location, base: Node, id: StringRef) \ +fun mkCompoundExpr(this: !MyAstBuilder, loc: !Location, base: Node, id: StringRef) \ = createNode(loc, "compoundExpr", values(base, createNode(loc, id))) -fun mkStarExpr(this: @MyAstBuilder, loc: @Location, base: Node, id: StringRef) \ +fun mkStarExpr(this: !MyAstBuilder, loc: !Location, base: Node, id: StringRef) \ = createNode(loc, "starExpr", values(base, createNode(loc, id))) -fun mkDotExpr(this: @MyAstBuilder, loc: @Location, base: Node, id: StringRef) \ +fun mkDotExpr(this: !MyAstBuilder, loc: !Location, base: Node, id: StringRef) \ = createNode(loc, "dotExpr", values(base, createNode(loc, id))) -fun mkFunAppExpr(this: @MyAstBuilder, loc: @Location, base, args: Node) \ +fun mkFunAppExpr(this: !MyAstBuilder, loc: !Location, base, args: Node) \ = createNode(loc, "funApp", values(base, args)) -fun mkLambdaExpr(this: @MyAstBuilder, loc: @Location, closureParams, formals, retType, body, bodyExpr: Node) \ +fun mkLambdaExpr(this: !MyAstBuilder, loc: !Location, closureParams, formals, retType, body, bodyExpr: Node) \ = createNode(loc, "lambda", values(closureParams, formals, retType, body, bodyExpr)) -fun mkNullLiteral(this: @MyAstBuilder, loc: @Location) \ +fun mkNullLiteral(this: !MyAstBuilder, loc: !Location) \ = createNode(loc, "null") -fun mkBoolLiteral(this: @MyAstBuilder, loc: @Location, val: Bool) \ +fun mkBoolLiteral(this: !MyAstBuilder, loc: !Location, val: Bool) \ = createNode(loc, "boolLit") -fun mkIntLiteral(this: @MyAstBuilder, loc: @Location, val: Int) \ +fun mkIntLiteral(this: !MyAstBuilder, loc: !Location, val: Int) \ = createNode(loc, "intLit") -fun mkUIntLiteral(this: @MyAstBuilder, loc: @Location, val: UInt) \ +fun mkUIntLiteral(this: !MyAstBuilder, loc: !Location, val: UInt) \ = createNode(loc, "uintLit") -fun mkLongLiteral(this: @MyAstBuilder, loc: @Location, val: Long) \ +fun mkLongLiteral(this: !MyAstBuilder, loc: !Location, val: Long) \ = createNode(loc, "longLit") -fun mkULongLiteral(this: @MyAstBuilder, loc: @Location, val: ULong) \ +fun mkULongLiteral(this: !MyAstBuilder, loc: !Location, val: ULong) \ = createNode(loc, "ulongLit") -fun mkFloatLiteral(this: @MyAstBuilder, loc: @Location, val: Float) \ +fun mkFloatLiteral(this: !MyAstBuilder, loc: !Location, val: Float) \ = createNode(loc, "floatLit") -fun mkDoubleLiteral(this: @MyAstBuilder, loc: @Location, val: Double) \ +fun mkDoubleLiteral(this: !MyAstBuilder, loc: !Location, val: Double) \ = createNode(loc, "doubleLit") -fun mkCharLiteral(this: @MyAstBuilder, loc: @Location, val: Char) \ +fun mkCharLiteral(this: !MyAstBuilder, loc: !Location, val: Char) \ = createNode(loc, "charLit") -fun mkStringLiteral(this: @MyAstBuilder, loc: @Location, data: StringRef) \ +fun mkStringLiteral(this: !MyAstBuilder, loc: !Location, data: StringRef) \ = createNode(loc, "stringLit") -fun mkBlockStmt(this: @MyAstBuilder, loc: @Location, stmts: Node) \ +fun mkBlockStmt(this: !MyAstBuilder, loc: !Location, stmts: Node) \ = createNode(loc, "block", repeat(stmts, 1)) -fun mkIfStmt(this: @MyAstBuilder, loc: @Location, expr, thenClause, elseClause: Node) \ +fun mkIfStmt(this: !MyAstBuilder, loc: !Location, expr, thenClause, elseClause: Node) \ = createNode(loc, "if", values(expr, thenClause, elseClause)) -fun mkForStmt(this: @MyAstBuilder, loc: @Location, id: StringRef, typeNode, range, action: Node) \ +fun mkForStmt(this: !MyAstBuilder, loc: !Location, id: StringRef, typeNode, range, action: Node) \ = createNode(loc, "for", values(createNode(loc, id), typeNode, range, action)) -fun mkWhileStmt(this: @MyAstBuilder, loc: @Location, expr, stepAction, body: Node) \ +fun mkWhileStmt(this: !MyAstBuilder, loc: !Location, expr, stepAction, body: Node) \ = createNode(loc, "while", values(expr, stepAction, body)) -fun mkBreakStmt(this: @MyAstBuilder, loc: @Location) \ +fun mkBreakStmt(this: !MyAstBuilder, loc: !Location) \ = createNode(loc, "break") -fun mkContinueStmt(this: @MyAstBuilder, loc: @Location) \ +fun mkContinueStmt(this: !MyAstBuilder, loc: !Location) \ = createNode(loc, "continue") -fun mkReturnStmt(this: @MyAstBuilder, loc: @Location, expr: Node) \ +fun mkReturnStmt(this: !MyAstBuilder, loc: !Location, expr: Node) \ = createNode(loc, "return", repeat(expr, 1)) fun sprMain @@ -182,25 +188,25 @@ fun test2 var code = "1 2 3 4 5 0xff, 0b101, 0777, 0789, .123 0.123 1.123 12.34e2f 123_456 1_2.3_4" doScan(mkCharSource(StringCharSource(code))) /*<<>>*/ @@ -208,33 +214,33 @@ fun test3 var code = "a b c d e if then else abc_def _1 _a a1 a@#$ a.b.c ab.bc.cd abc.*" doScan(mkCharSource(StringCharSource(code))) /*<<>>*/ @@ -242,14 +248,14 @@ fun test4 var code = ". .. ... !!! .* # !@#$%^&*-+=" doScan(mkCharSource(StringCharSource(code))) /*<<>>*/ @@ -257,9 +263,9 @@ fun test5 var code = "\"abcd\" 'a' <{abc\\nop}>" doScan(mkCharSource(StringCharSource(code))) /*<<>>*/ diff --git a/tests/Imports/HeaderA.spr b/tests/Imports/HeaderA.spr index caa0a843..603eab9d 100644 --- a/tests/Imports/HeaderA.spr +++ b/tests/Imports/HeaderA.spr @@ -1,2 +1,2 @@ -var a = Int(1) +let a = Int(1) diff --git a/tests/Imports/HeaderB.spr b/tests/Imports/HeaderB.spr index 2677d94c..4fe13de0 100644 --- a/tests/Imports/HeaderB.spr +++ b/tests/Imports/HeaderB.spr @@ -1,2 +1,2 @@ -var b = Int(2) +let b = Int(2) diff --git a/tests/Imports/HeaderC.spr b/tests/Imports/HeaderC.spr index b62e9ea1..62ab7465 100644 --- a/tests/Imports/HeaderC.spr +++ b/tests/Imports/HeaderC.spr @@ -1,4 +1,4 @@ import HeaderA import HeaderB -var c = Int(3) +let c = Int(3) diff --git a/tests/Imports/HeaderD.spr b/tests/Imports/HeaderD.spr index b69832ec..79bab30e 100644 --- a/tests/Imports/HeaderD.spr +++ b/tests/Imports/HeaderD.spr @@ -1,4 +1,4 @@ import HeaderA import HeaderC -var d = Int(4) +let d = Int(4) diff --git a/tests/Logic/FibOptTest.spr b/tests/Logic/FibOptTest.spr index 8c835a6f..59bf80f6 100644 --- a/tests/Logic/FibOptTest.spr +++ b/tests/Logic/FibOptTest.spr @@ -1,7 +1,7 @@ //!! import logic.prologFrontend -fun fib_native(p_1: Int, p_2: @Int): Bool +fun fib_native(p_1: Int, p_2: !Int): Bool var l2_X2: Int = Uninitialized() var l2_Y2: Int = Uninitialized() var l2_X1: Int = Uninitialized() @@ -13,15 +13,15 @@ fun fib_native(p_1: Int, p_2: @Int): Bool datatype fib_pred_wrapper p_1: LInt p_2: LInt -fun ctor(this: @fib_pred_wrapper, p_1: @LInt, p_2: @LInt) +fun ctor(this: !fib_pred_wrapper, p_1: !LInt, p_2: !LInt) this.p_1 ctor p_1 this.p_2 ctor p_2 -fun ()(this: @fib_pred_wrapper): Bool +fun ()(this: !fib_pred_wrapper): Bool if ( p_1.isNull() ) return false p_2 = Int() return fib_native(p_1.get(), p_2.get()) -fun fib(p_1: @LInt, p_2: @LInt): Predicate = fib_pred_wrapper(p_1, p_2) +fun fib(p_1: !LInt, p_2: !LInt): Predicate = fib_pred_wrapper(p_1, p_2) fun sprMain if ( programArgs.size() < 2 ) diff --git a/tests/Logic/FibTest.spr b/tests/Logic/FibTest.spr index d67a8d3b..7a57d355 100644 --- a/tests/Logic/FibTest.spr +++ b/tests/Logic/FibTest.spr @@ -1,7 +1,7 @@ //!! import logic.prologFrontend -fun fib(p_1: @LInt, p_2: @LInt): Predicate +fun fib(p_1: !LInt, p_2: !LInt): Predicate var l2_X2: LInt var l2_Y2: LInt var l2_X1: LInt diff --git a/tests/Logic/LogicTest.spr b/tests/Logic/LogicTest.spr index aa17347f..7ef43567 100644 --- a/tests/Logic/LogicTest.spr +++ b/tests/Logic/LogicTest.spr @@ -3,20 +3,20 @@ import logic.predicates //import assert; import os = os -fun male(x: @LStr) = x /=/ "castor" || x /=/ "zeus" +fun male(x: !LStr) = x /=/ "castor" || x /=/ "zeus" -fun female(x: @LStr) = x /=/ "leda" || x /=/ "clytaemnestra" +fun female(x: !LStr) = x /=/ "leda" || x /=/ "clytaemnestra" -fun person(x: @LStr) = male(x) || female(x) +fun person(x: !LStr) = male(x) || female(x) fun parents(father, mother, child: LRef(String)) \ = father /=/ "zeus" && mother /=/ "leda" && child /=/ "castor" \ - || father /=/ "zeus" && mother /=/ "leda" && child /=/ "clytaemnestra" + || father /=/ "zeus" && mother /=/ "leda" && child /=/ "clytaemnestra"; fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1; test1 else if n == 2; test2 @@ -26,14 +26,14 @@ fun sprMain fun test1 if ( male("zeus")() ) - cout << "Zeus is male\n" + cout << "Zeus is male\n"; else - cout << "Zeus is not male\n" + cout << "Zeus is not male\n"; if ( female("zeus")() ) - cout << "Zeus is female\n" + cout << "Zeus is female\n"; else - cout << "Zeus is not female\n" + cout << "Zeus is not female\n"; /*<<< Basic testing with all values defined(1) Zeus is male Zeus is not female @@ -42,16 +42,18 @@ Zeus is not female fun test2 var x: LStr [ct] if ( isValid(logicDebug) ) - cout << "Result constructed: x=" << x << endl + cout << "Result constructed: x=" << x << endl; var pred = male(x) while pred() [ct] if ( isValid(logicDebug) ) - cout << "In while, x=" << x << endl + cout << "In while, x=" << x << endl; if ( x.isSet() ) - cout << "Found male: " << x.get() << endl << flush + cout << "Found male: " << x.get() << endl << flush; else cout << "Invalid male found!" << endl << flush os.exit(1) + ; + ; /*<<< Exploring male space(2) Found male: castor Found male: zeus @@ -62,7 +64,8 @@ fun test3 var pred = female(x) while pred() //assert(x.isSet()); - cout << "Found female: " << x.get() << endl << flush + cout << "Found female: " << x.get() << endl << flush; + ; /*<<< Exploring female space(3) Found female: leda @@ -74,7 +77,8 @@ fun test4 var pred = person(x) while pred() //assert(x.isSet()); - cout << "Found person: " << x.get() << endl << flush + cout << "Found person: " << x.get() << endl << flush; + ; /*<<< Exploring person space(4) Found person: castor @@ -90,7 +94,8 @@ fun test5 //assert(father.isSet()); //assert(mother.isSet()); //assert(child.isSet()); - cout << "Parent relation: (" << father.get() << " + " << mother.get() << ") = " << child.get() << endl << flush + cout << "Parent relation: (" << father.get() << " + " << mother.get() << ") = " << child.get() << endl << flush; + ; /*<<< Parenting(5) Parent relation: (zeus + leda) = castor diff --git a/tests/Logic/Parents.spr b/tests/Logic/Parents.spr index ec17c4a4..eba5edf3 100644 --- a/tests/Logic/Parents.spr +++ b/tests/Logic/Parents.spr @@ -3,7 +3,7 @@ import logic.predicates import logic.recurse //import assert; -fun children(child, parent: @LStr) = ( +fun children(child, parent: !LStr) = ( child /=/ "Sam" && parent /=/ "Mary" || child /=/ "Denise" && parent /=/ "Mary" || child /=/ "Sam" && parent /=/ "Frank" @@ -11,7 +11,7 @@ fun children(child, parent: @LStr) = ( || child /=/ "Frank" && parent /=/ "Gary" ) -fun gender(name, g: @LStr) = ( +fun gender(name, g: !LStr) = ( name /=/ "Frank" && g /=/ "male" || name /=/ "Sam" && g /=/ "male" || name /=/ "Mary" && g /=/ "female" @@ -19,15 +19,15 @@ fun gender(name, g: @LStr) = ( || name /=/ "Gary" && g /=/ "male" ) -fun male(name: @LStr) = gender(name, "male") -fun female(name: @LStr) = gender(name, "female") +fun male(name: !LStr) = gender(name, "male") +fun female(name: !LStr) = gender(name, "female") -fun parent(parent, child: @LStr) = children(child, parent) +fun parent(parent, child: !LStr) = children(child, parent) -fun father(name, child: @LStr) = children(child, name) && gender(name, "male") -fun mother(name, child: @LStr) = children(child, name) && gender(name, "female") +fun father(name, child: !LStr) = children(child, name) && gender(name, "male") +fun mother(name, child: !LStr) = children(child, name) && gender(name, "female") -fun ancestor(a, c: @LStr): Predicate +fun ancestor(a, c: !LStr): Predicate var parent: LStr return children(c, a) \ || children(c, parent) && rec(\ancestor, a, parent) diff --git a/tests/Logic/Solar.spr b/tests/Logic/Solar.spr index 4d98c55c..2742ec3c 100644 --- a/tests/Logic/Solar.spr +++ b/tests/Logic/Solar.spr @@ -2,7 +2,7 @@ import logic.predicates //import assert; -fun orbits(a, b: @LStr) = ( +fun orbits(a, b: !LStr) = ( a /=/ "Mercury" && b /=/ "Sun" || a /=/ "Venus" && b /=/ "Sun" || a /=/ "Earth" && b /=/ "Sun" @@ -12,9 +12,9 @@ fun orbits(a, b: @LStr) = ( || a /=/ "Deimos" && b /=/ "Mars" ) -fun planet(p: @LStr) = orbits(p, "Sun") +fun planet(p: !LStr) = orbits(p, "Sun") -fun satellite(s: @LStr): Predicate +fun satellite(s: !LStr): Predicate var p: LStr return orbits(s, p) && planet(p) diff --git a/tests/Par/AtomicTest.spr b/tests/Par/AtomicTest.spr index 704aee65..68219054 100644 --- a/tests/Par/AtomicTest.spr +++ b/tests/Par/AtomicTest.spr @@ -12,104 +12,104 @@ import std.compilerInfo [native("rand")] fun rand(): Int [native("srand")] fun srand(seed: UInt) - [native("time")] fun time(timer: @Int): Int + [native("time")] fun time(timer: !Int): Int datatype UserDefined lo, hi: Short - fun ctor(this: @UserDefined, val: Int) + fun ctor(this: !UserDefined, val: Int) lo = Short(val % 0xffff) hi = Short(val / 0xffff) fun >> (os: OutStream) os << "(" << hi << "," << lo << ")" fun testOneLoad(t: Type, val: AnyType) - var atomic: t Atomic = val + let atomic: t Atomic = val assertEq(atomic load, val) fun testLoadNumeric(t: Type, count: Int) for i=0..count - var val: t = rand() + let val: t = rand() testOneLoad(t, val) fun testLoadPtr(t: Type, count: Int) for i=0..count - var val: t = rand() + let val: t = rand() var p: t Ptr = new(t, val) testOneLoad(t Ptr, p) p release - fun testOneStore(atomic: AnyType, val: AnyType) + fun testOneStore(atomic: !AnyType, val: AnyType) atomic store val assertEq(atomic load, val) fun testStoreNumeric(t: Type, count: Int) var atomic: t Atomic for i=0..count - var val: t = rand() + let val: t = rand() testOneStore(atomic, val) fun testStorePtr(t: Type, count: Int) var atomic: (t Ptr) Atomic for i=0..count - var val: t = rand() + let val: t = rand() var p: t Ptr = new(t, val) testOneStore(atomic, p) p release - fun testOneFetchAndStore(atomic: AnyType, val1, val2: AnyType) + fun testOneFetchAndStore(atomic: !AnyType, val1, val2: AnyType) atomic store val1 assertEq(atomic load, val1) - var x = atomic fetchAndStore val2 + let x = atomic fetchAndStore val2 assertEq(atomic load, val2) assertEq(x, val1) fun testFetchAndStoreNumeric(t: Type, count: Int) var atomic: t Atomic for i=0..count - var val1: t = rand() - var val2: t = rand() + let val1: t = rand() + let val2: t = rand() testOneFetchAndStore(atomic, val1, val2) fun testFetchAndStorePtr(t: Type, count: Int) var atomic: (t Ptr) Atomic for i=0..count - var val1: t = rand() - var val2: t = rand() + let val1: t = rand() + let val2: t = rand() var p1: t Ptr = new(t, val1) var p2: t Ptr = new(t, val2) testOneFetchAndStore(atomic, p1, p2) p2 release p1 release - fun testOneFetchAndAdd(atomic: AnyType, val, add: AnyType) + fun testOneFetchAndAdd(atomic: !AnyType, val, add: AnyType) atomic store val assertEq(atomic load, val) - var x = atomic fetchAndAdd add + let x = atomic fetchAndAdd add assertEq(atomic load, val+add) assertEq(x, val) fun testFetchAndAddNumeric(t: Type, count: Int) var atomic: t Atomic for i=0..count - var val: t = rand() - var add: t = rand() + let val: t = rand() + let add: t = rand() testOneFetchAndAdd(atomic, val, add) - fun testOneCompareAndSwap(atomic: AnyType, val1, val2: AnyType) + fun testOneCompareAndSwap(atomic: !AnyType, val1, val2: AnyType) if val1 == val2 return atomic store val1 assertEq(atomic load, val1) - var x1 = compareAndSwap(atomic, val2, val2) + let x1 = compareAndSwap(atomic, val2, val2) assertEq(atomic load, val1, "CAS shouldn't change the value") assertTrue(!x1, "CAS should return false if not changing the value") - var x2 = compareAndSwap(atomic, val2, val1) + let x2 = compareAndSwap(atomic, val2, val1) assertEq(atomic load, val2, "CAS should change the value") assertTrue(x2, "CAS should return true when value is changed") fun testCompareAndSwapNumeric(t: Type, count: Int) var atomic: t Atomic for i=0..count - var val1: t = rand() - var val2: t = rand() + let val1: t = rand() + let val2: t = rand() testOneCompareAndSwap(atomic, val1, val2) fun testCompareAndSwapPtr(t: Type, count: Int) var atomic: (t Ptr) Atomic for i=0..count - var val1: t = rand() - var val2: t = rand() + let val1: t = rand() + let val2: t = rand() var p1: t Ptr = new(t, val1) var p2: t Ptr = new(t, val2) testOneCompareAndSwap(atomic, p1, p2) @@ -144,7 +144,7 @@ import std.compilerInfo fun sprMain if programArgs.size() < 2 return - var n = programArgs(1) asInt + let n = programArgs(1) asInt // Initialize random number generator srand(time(null)) diff --git a/tests/Par/LocksTest.spr b/tests/Par/LocksTest.spr index b3013d2b..8f215d22 100644 --- a/tests/Par/LocksTest.spr +++ b/tests/Par/LocksTest.spr @@ -21,12 +21,12 @@ import std.compilerInfo sleep(waitTime) --numUsers - fun doProtectedJob(mutex: @Lockable, useTryLock: Bool = false) + fun doProtectedJob(mutex: !Lockable, useTryLock: Bool = false) if !useTryLock - var lock: ScopedLock(typeOf(mutex)) = mutex + let lock: ScopedLock(typeOf(mutex)) = mutex doCoreJob(1) else - var lock: ScopedTryLock(typeOf(mutex)) = mutex + let lock: ScopedTryLock(typeOf(mutex)) = mutex if lock.isLocked doCoreJob(3) @@ -34,7 +34,7 @@ import std.compilerInfo amountOfWork: Int useTryLock: Bool - fun ()(this: @Worker) + fun ()(this: !Worker) for i = 0..amountOfWork doProtectedJob(normalMutex, useTryLock) //if !useTryLock @@ -44,18 +44,18 @@ import std.compilerInfo amountOfWork, numWorkers, numTryWorkers: Int threads: (Thread Ptr) Vector - fun ctor(this: @WorkManager, amountOfWork, numWorkers, numTryWorkers: Int) + fun ctor(this: !WorkManager, amountOfWork, numWorkers, numTryWorkers: Int) this.amountOfWork ctor amountOfWork this.numWorkers ctor numWorkers this.numTryWorkers ctor numTryWorkers for i=0..numWorkers - var p: Thread Ptr = new(Thread, Worker(amountOfWork, false)) + let p: Thread Ptr = new(Thread, Worker(amountOfWork, false)) threads.pushBack(p) for i=0..numTryWorkers - var p: Thread Ptr = new(Thread, Worker(amountOfWork, true)) + let p: Thread Ptr = new(Thread, Worker(amountOfWork, true)) threads.pushBack(p) - fun dtor(this: @WorkManager) + fun dtor(this: !WorkManager) for t = threads.all t.get join t.release @@ -66,11 +66,11 @@ import std.compilerInfo fun sprMain if programArgs.size() < 4 return - var amountOfWork = programArgs(1) asInt - var numWorkers = programArgs(2) asInt - var numTryWorkers = programArgs(3) asInt + let amountOfWork = programArgs(1) asInt + let numWorkers = programArgs(2) asInt + let numTryWorkers = programArgs(3) asInt - var work = WorkManager(amountOfWork, numWorkers, numTryWorkers) + let work = WorkManager(amountOfWork, numWorkers, numTryWorkers) else fun sprMain ; diff --git a/tests/Par/ParForTest.spr b/tests/Par/ParForTest.spr index 0d94d5cc..f2681813 100644 --- a/tests/Par/ParForTest.spr +++ b/tests/Par/ParForTest.spr @@ -13,7 +13,7 @@ import std.compilerInfo var outOfOrderCount: Int Atomic fun foo(x: Int) - var curIdx = counter++ + let curIdx = counter++ if ( curIdx != x ) outOfOrderCount++ sleep(0) @@ -21,7 +21,7 @@ import std.compilerInfo fun sprMain if ( programArgs.size() < 2 ) return - var n = programArgs(1) asInt + let n = programArgs(1) asInt 0..n parFor \foo diff --git a/tests/Par/SemaphoreTest.spr b/tests/Par/SemaphoreTest.spr index 0ffa9753..23098ff2 100644 --- a/tests/Par/SemaphoreTest.spr +++ b/tests/Par/SemaphoreTest.spr @@ -13,7 +13,7 @@ import std.compilerInfo var numUsers: Int Atomic = 0 var numExecutions: Int Atomic = 0 - fun doJob(sem: @Semaphore, waitTime: Int) + fun doJob(sem: !Semaphore, waitTime: Int) sem acquire ++numUsers //cout << (numUsers load) << ' ' @@ -27,7 +27,7 @@ import std.compilerInfo sem: @Semaphore amountOfWork: Int - fun ()(this: @Worker) + fun ()(this: !Worker) for i = 0..amountOfWork doJob(sem, i % 5 + 1) assertGe(numExecutions load, amountOfWork, "all our job should be executed") @@ -37,14 +37,14 @@ import std.compilerInfo amountOfWork, numWorkers: Int threads: (Thread Ptr) Vector - fun ctor(this: @WorkManager, sem: @Semaphore, amountOfWork, numWorkers: Int) + fun ctor(this: !WorkManager, sem: !Semaphore, amountOfWork, numWorkers: Int) this.amountOfWork ctor amountOfWork this.numWorkers ctor numWorkers for i=0..numWorkers - var p: Thread Ptr = new(Thread, Worker(sem, amountOfWork)) + let p: Thread Ptr = new(Thread, Worker(sem, amountOfWork)) threads.pushBack(p) - fun dtor(this: @WorkManager) + fun dtor(this: !WorkManager) for t = threads.all t.get join t.release @@ -53,14 +53,14 @@ import std.compilerInfo if programArgs.size() < 4 return numResources = (programArgs(1) asInt) - var amountOfWork = programArgs(2) asInt - var numWorkers = programArgs(3) asInt + let amountOfWork = programArgs(2) asInt + let numWorkers = programArgs(3) asInt // Initialize the semaphore var sem: Semaphore = numResources // Do the work - var work = WorkManager(sem, amountOfWork, numWorkers) + let work = WorkManager(sem, amountOfWork, numWorkers) else fun sprMain ; diff --git a/tests/Par/TaskTest.spr b/tests/Par/TaskTest.spr index 0d42c1d4..df9328e4 100644 --- a/tests/Par/TaskTest.spr +++ b/tests/Par/TaskTest.spr @@ -22,26 +22,26 @@ import std.compilerInfo n: Long result: @Long - fun ctor(this: @FibTask, n: Long, result: @Long) + fun ctor(this: !FibTask, n: Long, result: @Long) this.n ctor n this.result := result [ct] if isValidAndTrue(useDescriptions) this.prefix.desc = this.description [ct] if isValidAndTrue(useDescriptions) - fun description(task: @FibTask): String + fun description(task: !FibTask): String var res: String = "Fib " res += intToString(Int(task.n)) return res - fun execute(task: @FibTask) + fun execute(task: !FibTask) if task.n < cutoff task.result = serialFib(task.n) else // Create the children tasks var x, y: Long - var t1 = FibTask(task.n-1, x) - var t2 = FibTask(task.n-2, y) + let t1 = FibTask(task.n-1, x) + let t2 = FibTask(task.n-2, y) spawnAndWait(task, t1, t2) @@ -59,17 +59,17 @@ import std.compilerInfo n: Long result: @Long - fun ctor(this: @FibTask, n: Long, result: @Long) + fun ctor(this: !FibTask, n: Long, result: @Long) this.n ctor n this.result := result [ct] if isValidAndTrue(useDescriptions) - fun description(task: @FibTask): String + fun description(task: !FibTask): String var res: String = "Fib " res += intToString(Int(task.n)) return res - fun execute(task: @FibTask) + fun execute(task: !FibTask) if task.n < cutoff task.result = serialFib(task.n) else @@ -95,51 +95,51 @@ import std.compilerInfo datatype FibTask prefix: TaskPrefix n: Long - result: @Long + result: Long Ptr - fun ctor(this: @FibTask, n: Long, result: @Long) + fun ctor(this: !FibTask, n: Long, result: Long Ptr) this.n ctor n - this.result := result + this.result ctor result [ct] if isValidAndTrue(useDescriptions) - fun description(task: @FibTask): String + fun description(task: !FibTask): String var res: String = "Fib " res += intToString(Int(task.n)) return res - fun execute(task: @FibTask) + fun execute(task: !FibTask) if task.n < cutoff - task.result = serialFib(task.n) + task.result.get = serialFib(task.n) else var cont: @FibContTask = new(FibContTask, task.n, task.result) setContinuation(task, cont) - var t1: @FibTask = new(FibTask, task.n-1, cont.s1) - var t2: @FibTask = new(FibTask, task.n-2, cont.s2) + var t1: @FibTask = new(FibTask, task.n-1, (Long Ptr)(cont.s1)) + var t2: @FibTask = new(FibTask, task.n-2, (Long Ptr)(cont.s2)) spawn(cont, t1, t2) datatype FibContTask prefix: TaskPrefix n: Long s1, s2: Long - result: @Long + result: Long Ptr - fun ctor(this: @FibContTask, n, result: @Long) + fun ctor(this: !FibContTask, n: Long, result: Long Ptr) this.n ctor n - this.result := result + this.result ctor result [ct] if isValidAndTrue(useDescriptions) - fun description(task: @FibContTask): String + fun description(task: !FibContTask): String var res: String = "Cont " res += intToString(Int(task.n)) return res - fun execute(task: @FibContTask) - task.result = task.s1 + task.s2 + fun execute(task: !FibContTask) + task.result.get = task.s1 + task.s2 fun parFib(n: Long): Long var res: Long - spawnRootAndWait(FibTask(n, res)) + spawnRootAndWait(FibTask(n, (Long Ptr)(res))) return res fun sprMain diff --git a/tests/Par/ThreadTest.spr b/tests/Par/ThreadTest.spr index 2043378f..0dd7fb3c 100644 --- a/tests/Par/ThreadTest.spr +++ b/tests/Par/ThreadTest.spr @@ -12,7 +12,7 @@ import std.compilerInfo fun sprMain if programArgs.size() < 2 return - var n = programArgs(1) asInt + let n = programArgs(1) asInt if n == 1; test1 else if n == 2; test2 @@ -30,15 +30,15 @@ import std.compilerInfo doPrint: Bool lastCounter: @Int - fun ctor(this: @TwiddleThumbs, message: StringRef, count: Int, lastCounter: @Int, doPrint: Bool = false) + fun ctor(this: !TwiddleThumbs, message: StringRef, count: Int, lastCounter: !Int, doPrint: Bool = false) this.message construct message this.count construct count this.lastCounter := lastCounter this.doPrint construct doPrint - fun ()(this: @TwiddleThumbs) + fun ()(this: !TwiddleThumbs) for i = 0..count - var cnt: Int = gCounter++ + let cnt: Int = gCounter++ if i == count-1 lastCounter = cnt if doPrint @@ -54,7 +54,7 @@ import std.compilerInfo fun test3 cout << "Before creating threads" << endl - var count = 10 + let count = 10 var cnt1, cnt2: Int var t1 = Thread(TwiddleThumbs("worker 1", count, cnt1, true)) var t2 = Thread(TwiddleThumbs("worker 2", count, cnt2, true)) @@ -65,7 +65,7 @@ import std.compilerInfo cout << "Done" << endl fun test4 - var count = 10 + let count = 10 var cnt1, cnt2: Int var t1 = Thread(TwiddleThumbs("worker 1", count, cnt1)) var t2 = Thread(TwiddleThumbs("worker 2", count, cnt2)) @@ -81,13 +81,13 @@ import std.compilerInfo cout << "ok" << endl //p1 store cnt1 - var pp: Int Ptr + let pp: Int Ptr p2 store pp else fun sprMain if programArgs.size() < 2 return - var n = programArgs(1) asInt + let n = programArgs(1) asInt if n == 1 cout << '8\n' diff --git a/tests/Par/TlsTest.spr b/tests/Par/TlsTest.spr index 118e0785..835927a5 100644 --- a/tests/Par/TlsTest.spr +++ b/tests/Par/TlsTest.spr @@ -37,23 +37,23 @@ import std.compilerInfo numThreads: Int threads: (Thread Ptr) Vector - fun ctor(this: @WorkManager, numThreads: Int) + fun ctor(this: !WorkManager, numThreads: Int) this.numThreads ctor numThreads - var i1 = 10 - var i2 = 20 + let i1 = 10 + let i2 = 20 var pi1: @Int = i1 var pi2: @Int = i2 for i=0..numThreads - var p: Thread Ptr = new(Thread, IntWorker(i1, i2)) + let p: Thread Ptr = new(Thread, IntWorker(i1, i2)) threads.pushBack(p) for i=0..numThreads - var p: Thread Ptr = new(Thread, PtrWorker(pi1, pi2)) + let p: Thread Ptr = new(Thread, PtrWorker(pi1, pi2)) threads.pushBack(p) - fun dtor(this: @WorkManager) + fun dtor(this: !WorkManager) for t = threads.all t.get join t.release @@ -61,9 +61,9 @@ import std.compilerInfo fun sprMain if programArgs.size() < 4 return - var numThreads = programArgs(1) asInt + let numThreads = programArgs(1) asInt - var work = WorkManager(numThreads) + let work = WorkManager(numThreads) else fun sprMain ; diff --git a/tests/PerfTests/FibRanges/fib_op.spr b/tests/PerfTests/FibRanges/fib_op.spr index 4897633d..6a7966e6 100644 --- a/tests/PerfTests/FibRanges/fib_op.spr +++ b/tests/PerfTests/FibRanges/fib_op.spr @@ -7,16 +7,16 @@ import std.tuple fun fib(n: Int): Int var p: Int*Int = 0 ~ 1 // Last 2 entries for i = 0..n - p = p.v2 ~ (p.v1 + p.v2) - return p.v2 + p = p.v2 ~ (p.v1 + p.v2); + return p.v2; fun isOdd x = x%2 != 0 fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt - var res = 1...n map \fib filter \isOdd map \sqr sum + let res = 1...n map \fib filter \isOdd map \sqr sum cout << res << endl /*-<<>(this: @SimpleLoop, os: @OutStream) +fun >>(this: SimpleLoop, os: !OutStream) os << "loop-" << counter << ", nest: " << nestingLevel << ", depth: " << depthLevel << endl // @@ -117,28 +125,28 @@ datatype LoopStructureGraph _loops: List(SimpleLoop Ptr) _loopCounter: Int -fun ctor(this: @LoopStructureGraph) +fun ctor(this: !LoopStructureGraph) _loopCounter ctor 1 _root ctor new(SimpleLoop) _root.counter = 0 _root.setNestingLevel(0) _loops += _root -fun dtor(this: @LoopStructureGraph) = this.killAll +fun dtor(this: !LoopStructureGraph) = this.killAll -fun killAll(this: @LoopStructureGraph) +fun killAll(this: !LoopStructureGraph) for loop = _loops.all loop.release _loops.clear -fun createNewLoop(this: @LoopStructureGraph): SimpleLoop Ptr +fun createNewLoop(this: !LoopStructureGraph): SimpleLoop Ptr var loop: SimpleLoop Ptr = new(SimpleLoop) loop.counter = (_loopCounter++) return loop -fun addLoop(this: @LoopStructureGraph, loop: SimpleLoop Ptr) = _loops += loop +fun addLoop(this: !LoopStructureGraph, loop: SimpleLoop Ptr) = _loops += loop -fun calculateNestingLevel(this: @LoopStructureGraph) +fun calculateNestingLevel(this: !LoopStructureGraph) // link up all 1st level _loops to artificial root node. for loop = _loops.all if !loop.isRoot && !loop._parent @@ -153,11 +161,11 @@ fun _calculateNestingLevelRec(loop: SimpleLoop Ptr, depth: Int) _calculateNestingLevelRec(c, depth+1) loop.setNestingLevel(max(loop.nestingLevel, 1+c.nestingLevel)) -fun numLoops(this: @LoopStructureGraph) = _loops.size +fun numLoops(this: !LoopStructureGraph) = _loops.size -fun >>(this: @LoopStructureGraph, os: @OutStream) = _dumpRec(os, _root, 0) +fun >>(this: LoopStructureGraph, os: !OutStream) = _dumpRec(os, _root, 0) -fun _dumpRec(os: @OutStream, loop: SimpleLoop Ptr, indent: Int) +fun _dumpRec(os: !OutStream, loop: SimpleLoop Ptr, indent: Int) os << loop.get for c = loop.children.all _dumpRec(os, c, indent+1) @@ -174,7 +182,7 @@ datatype UnionFindNode // Initialize this node. // -fun init(this: @UnionFindNode, bb: BasicBlock Ptr, dfsNumber: Int) +fun init(this: !UnionFindNode, bb: BasicBlock Ptr, dfsNumber: Int) this._parent ctor this this.bb ctor bb this.dfsNumber ctor dfsNumber @@ -185,7 +193,7 @@ fun init(this: @UnionFindNode, bb: BasicBlock Ptr, dfsNumber: Int) // visited and collapsed once, however, deep nests would still // result in significant traversals). // -fun findSet(this: @UnionFindNode): UnionFindNode Ptr +fun findSet(this: UnionFindNode): UnionFindNode Ptr var nodeList: List(UnionFindNode Ptr) var node: UnionFindNode Ptr = this @@ -202,7 +210,7 @@ fun findSet(this: @UnionFindNode): UnionFindNode Ptr // // We rely on path compression. // -fun union(this: @UnionFindNode, b: UnionFindNode Ptr) +fun union(this: !UnionFindNode, b: UnionFindNode Ptr) _parent = b //------------------------------------------------------------------ @@ -248,7 +256,7 @@ datatype HavlakLoopFinder _cfg: @MaoCFG _lsg: @LoopStructureGraph -fun ctor(this: @HavlakLoopFinder, cfg: @MaoCFG, lsg: @LoopStructureGraph) +fun ctor(this: !HavlakLoopFinder, cfg: !MaoCFG, lsg: !LoopStructureGraph) this._cfg := cfg this._lsg := lsg @@ -262,7 +270,7 @@ fun ctor(this: @HavlakLoopFinder, cfg: @MaoCFG, lsg: @LoopStructureGraph) // for depth-first spanning trees. This is why DFS is the first // thing we run below. // -fun isAncestor(w, v: SizeType, last: @IntVector) = (w <= v) && (v <= last(w)) +fun isAncestor(w, v: SizeType, last: !IntVector) = (w <= v) && (v <= last(w)) // // DFS - Depth-First-Search @@ -270,7 +278,7 @@ fun isAncestor(w, v: SizeType, last: @IntVector) = (w <= v) && (v <= last(w)) // DESCRIPTION: // Simple depth first traversal along out edges with node numbering. // -fun doDFS(currentNode: BasicBlock Ptr, nodes: @NodeVector, number: @BasicBlockMap, last: @IntVector, current: Int): Int +fun doDFS(currentNode: BasicBlock Ptr, nodes: !NodeVector, number: !BasicBlockMap, last: !IntVector, current: Int): Int nodes(current).init(currentNode, current) number(currentNode) = current @@ -289,11 +297,11 @@ fun doDFS(currentNode: BasicBlock Ptr, nodes: @NodeVector, number: @BasicBlockMa // been chosen to be identical to the nomenclature in Havlak's // paper (which is similar to the one used by Tarjan). // -fun findLoops(this: @HavlakLoopFinder) +fun findLoops(this: !HavlakLoopFinder) if !_cfg.startNode return - var size = _cfg.getNumNodes + let size = _cfg.getNumNodes var nonBackPreds: IntSetVector = size var backPreds: IntListVector = size @@ -327,14 +335,14 @@ fun findLoops(this: @HavlakLoopFinder) header(w) = 0 type(w) = BB_NONHEADER - var nodeW: BasicBlock Ptr = nodes(w).bb + let nodeW: BasicBlock Ptr = nodes(w).bb if !nodeW type(w) = BB_DEAD continue // dead BB if nodeW.numPred > 0 for nodeV = nodeW.inEdgesRange - var v = number(nodeV) + let v = number(nodeV) if v == kUnvisited continue // dead node @@ -360,7 +368,7 @@ fun findLoops(this: @HavlakLoopFinder) // for w = Int(size-1)...0 ../ (-1) var nodePool: NodeList // this is 'P' in Havlak's paper - var nodeW = nodes(w).bb + let nodeW = nodes(w).bb if !nodeW continue // dead BB @@ -381,7 +389,7 @@ fun findLoops(this: @HavlakLoopFinder) // work the list... // while !workList.isEmpty - var x = workList.front + let x = workList.front workList.popFront // Step e: @@ -395,14 +403,14 @@ fun findLoops(this: @HavlakLoopFinder) // The algorithm has degenerated. Break and // return in this case. // - var nonBackSize = nonBackPreds(x.dfsNumber).size + let nonBackSize = nonBackPreds(x.dfsNumber).size if nonBackSize > kMaxNonBackPreds _lsg.killAll return for t = nonBackPreds(x.dfsNumber).all - var y: @UnionFindNode = nodes(t) - var yDash = y.findSet + let y: @UnionFindNode = nodes(t) + let yDash = y.findSet if !isAncestor(w, yDash.dfsNumber, last) type(w) = BB_IRREDUCIBLE @@ -446,29 +454,29 @@ fun findLoops(this: @HavlakLoopFinder) _lsg.addLoop(loop) // External entry point. -fun findHavlakLoops(cfg: @MaoCFG, lsg: @LoopStructureGraph): SizeType +fun findHavlakLoops(cfg: !MaoCFG, lsg: !LoopStructureGraph): SizeType var finder = HavlakLoopFinder(cfg, lsg) finder.findLoops return lsg.numLoops //--- TESTING CODE ------------------- -fun buildDiamond(cfg: @MaoCFG, start: Int): Int - new(BasicBlockEdge, cfg, start , start+1) - new(BasicBlockEdge, cfg, start , start+2) - new(BasicBlockEdge, cfg, start+1, start+3) - new(BasicBlockEdge, cfg, start+2, start+3) +fun buildDiamond(cfg: !MaoCFG, start: Int): Int + allocBBE(cfg, start , start+1) + allocBBE(cfg, start , start+2) + allocBBE(cfg, start+1, start+3) + allocBBE(cfg, start+2, start+3) return start+3 -fun buildConnect(cfg: @MaoCFG, start, end: Int) - new(BasicBlockEdge, cfg, start, end) +fun buildConnect(cfg: !MaoCFG, start, end: Int) + allocBBE(cfg, start, end) -fun buildStraight(cfg: @MaoCFG, start, n: Int): Int +fun buildStraight(cfg: !MaoCFG, start, n: Int): Int for i = 0..n buildConnect(cfg, start + i, start + i + 1) return start + n -fun buildBaseLoop(cfg: @MaoCFG, from: Int): Int +fun buildBaseLoop(cfg: !MaoCFG, from: Int): Int var header = buildStraight(cfg, from, 1) var diamond1 = buildDiamond(cfg, header) var d11 = buildStraight(cfg, diamond1, 1) @@ -492,7 +500,7 @@ fun sprMain cfg.createNode(0) // top buildBaseLoop(cfg, 0) cfg.createNode(1) // bottom - new(BasicBlockEdge, cfg, 0, 2) + allocBBE(cfg, 0, 2) cout << "15000 dummy loops" << endl for dummyLoop = 0..15000 @@ -507,20 +515,20 @@ fun sprMain ++n for i = 0..100 - var top = n + let top = n n = buildStraight(cfg, n, 1) for j = 0..25 n = buildBaseLoop(cfg, n) - var bottom = buildStraight(cfg, n, 1) + let bottom = buildStraight(cfg, n, 1) buildConnect(cfg, n, top) n = bottom buildConnect(cfg, n, 1) cout << "Performing Loop Recognition\n1 Iteration" << endl - var numLoops = findHavlakLoops(cfg, lsg) + let numLoops = findHavlakLoops(cfg, lsg) cout << "Another 50 iterations..." << endl - var numIterations = programArgs(1) asInt + let numIterations = programArgs(1) asInt var sum: SizeType = 0 for i = 0..numIterations cout << '.' << flush diff --git a/tests/PerfTests/Hash/TestHashPerf.spr b/tests/PerfTests/Hash/TestHashPerf.spr index 8455c906..c5f04f99 100644 --- a/tests/PerfTests/Hash/TestHashPerf.spr +++ b/tests/PerfTests/Hash/TestHashPerf.spr @@ -15,7 +15,7 @@ datatype Obj value: UInt payload: StaticArray(Byte, payloadSize) -fun >> (this: @Obj, os: @OutStream) { os << "Obj(" << value << ")"; } +fun >> (this: !Obj, os: !OutStream) { os << "Obj(" << value << ")"; } // TODO: Move this to Std ??? datatype Equal(type: Type) @@ -30,21 +30,22 @@ var objects: Array(Obj) var insertKeys: Array(UInt) var searchKeys: Array(UInt) -fun testInsert(bag: @AnyType, n: Int) +fun testInsert(bag: !AnyType, n: Int) for i = 0..n // The element to insert - var key = insertKeys(i) + let key = insertKeys(i) var obj: ObjPtr = objects(i) obj.get().value = key // Insert it bag(key) = obj + ; -fun testChange(bag: @AnyType, n: Int) +fun testChange(bag: !AnyType, n: Int) for i = 0..n // Search the element - var key = searchKeys(i) - var r = bag.equalRange(key) + let key = searchKeys(i) + let r = bag.equalRange(key) if ( r.isEmpty() ) cout << "FAIL: Cannot find element " << key << " in map!" << endl os.exit(-1) @@ -58,42 +59,47 @@ fun testChange(bag: @AnyType, n: Int) key = insertKeys(i) + 1 obj.get().value = key bag(key) = obj + ; -[noInline] fun testHit(bag: @AnyType, n: Int) +[noInline] fun testHit(bag: !AnyType, n: Int) for i = 0..n // Search the element - var key = searchKeys(i) + 1 - var r = bag.equalRange(key) + let key = searchKeys(i) + 1 + let r = bag.equalRange(key) if ( r.isEmpty() ) cout << "FAIL: Cannot find element " << key << " in map!" << endl return // Ensure that we have the correct element - var obj = r.front().v2 + let obj = r.front().v2 if ( obj.get().value != key ) cout << "FAIL: Element with key " << key << " has an invalid value: " << obj.get().value << endl return + ; + ; -fun testMiss(bag: @AnyType, n: Int) +fun testMiss(bag: !AnyType, n: Int) for i = 0..n // Search the element // As all elements are shifted by one, we will find nothing - var key = searchKeys(i) - var r = bag.equalRange(key) + let key = searchKeys(i) + let r = bag.equalRange(key) if ( !r.isEmpty() ) cout << "FAIL: Element " << key << " shouldn't be in the map!" << endl return + ; + ; -fun testRemove(bag: @AnyType, n: Int) +fun testRemove(bag: !AnyType, n: Int) for i = 0..n // Search the element - var key = searchKeys(i) + 1 - var r = bag.equalRange(key) + let key = searchKeys(i) + 1 + let r = bag.equalRange(key) if ( r.isEmpty() ) cout << "FAIL: Cannot find element " << key << " in map!" << endl return - var obj = r.front().v2 + let obj = r.front().v2 // Remove it bag.remove(r) @@ -102,6 +108,8 @@ fun testRemove(bag: @AnyType, n: Int) if ( obj.get().value != key ) cout << "FAIL: Element with key " << key << " has an invalid value: " << obj.get().value << endl return + ; + ; [noDefault] datatype TestTimer @@ -109,20 +117,20 @@ datatype TestTimer n: UInt timerImpl: time.Timer -fun ctor(this: @TestTimer, desc: StringRef, n: UInt) +fun ctor(this: !TestTimer, desc: StringRef, n: UInt) this.desc ctor desc this.n ctor n timerImpl ctor -fun dtor(this: @TestTimer) - var t = timerImpl.elapsed() - var t_ns = t * 1000000.0 / Double(n) +fun dtor(this: !TestTimer) + let t = timerImpl.elapsed() + let t_ns = t * 1000000.0 / Double(n) cout << desc << ":\t" << t << ", " << t_ns << " ns" << endl fun sprMain if ( programArgs.size() < 2 ) - return - //var n = programArgs(1) asInt; + return; + //let n = programArgs(1) asInt; using n = 10000000 // Preallocate the objects @@ -136,20 +144,21 @@ fun sprMain searchKeys(i) = 0x80000000 + i*2 // TODO: random shuffling - var hashBag: TestHashMap; - var t = TestTimer("Hash Insert", n) + var hashBag: TestHashMap + ; + let t = TestTimer("Hash Insert", n) testInsert(hashBag, n) ; - var t = TestTimer("Hash Change", n) + let t = TestTimer("Hash Change", n) testChange(hashBag, n) ; - var t = TestTimer("Hash Hit", n) + let t = TestTimer("Hash Hit", n) testHit(hashBag, n) ; - var t = TestTimer("Hash Miss", n) + let t = TestTimer("Hash Miss", n) testMiss(hashBag, n) ; - var t = TestTimer("Hash Remove", n) + let t = TestTimer("Hash Remove", n) testRemove(hashBag, n) ; diff --git a/tests/PerfTests/LazyRanges/lazy_ranges.spr b/tests/PerfTests/LazyRanges/lazy_ranges.spr index a3889607..febbf3ca 100644 --- a/tests/PerfTests/LazyRanges/lazy_ranges.spr +++ b/tests/PerfTests/LazyRanges/lazy_ranges.spr @@ -9,10 +9,10 @@ fun collatzSeq(n: ULong) = generate1(n, \nextCollatz) takeUntil (fun n = n==1) fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt - var res = (1..) map \collatzSeq map \rangeSize takeWhile (fun.{n} s = s < n) rootMeanSquare + let res = (1..) map \collatzSeq map \rangeSize takeWhile (fun.{n} s = s < n) rootMeanSquare cout << res << endl /*<<= n ) - break + break; // Main part of computing the root mean square sum += len*len ++count - var res = sqrt(Double(sum) / Double(count)) + let res = sqrt(Double(sum) / Double(count)) cout << res << endl /*<< y; } fun printRange(nr: ContiguousMemoryRange(Int)) @@ -36,28 +36,30 @@ fun printRange(nr: ContiguousMemoryRange(Int)) cout << nr.front() nr.popFront() if ( nr.isEmpty() ) - cout << endl + cout << endl; else - cout << " " + cout << " "; + ; fun printRange(nr: List(Int).RangeType) - while !nr.isEmpty() - cout << nr.front() - nr.popFront() - if ( nr.isEmpty() ) + var rc = nr + while !rc.isEmpty + cout << rc.front + rc.popFront() + if rc.isEmpty cout << endl else - cout << " " + cout << ' ' fun createRangeAscending(size: SizeType): ContiguousMemoryRange(Int) var ptr = allocRawPtr(Int, size) - var ptrEnd = ptr.advance(DiffType(size)) + let ptrEnd = ptr.advance(DiffType(size)) var i = 0 while i < size ; i = i + 1 - ptr.advance(i).value() = i + ptr.advance(i).value() = i; - return ContiguousMemoryRange(Int)(ptr, ptrEnd) + return ContiguousMemoryRange(Int)(ptr, ptrEnd); fun test1() cout << min(-3, 10) << endl @@ -138,8 +140,8 @@ fun test7() >>>*/ fun test8() - var cmr = createRangeAscending(20) - var cmr0 = createRangeAscending(0) + let cmr = createRangeAscending(20) + let cmr0 = createRangeAscending(0) cout << rangeSize(cmr) << endl cout << rangeSize(cmr0) << endl @@ -149,14 +151,14 @@ fun test8() >>>*/ fun test9() - var x = 10 - var nr = createRangeAscending(5) - var pair = x ~ nr + let x = 10 + let nr = createRangeAscending(5) + let pair = x ~ nr cout << pair.v1 << endl printRange(pair.v2) - var pair2 = 20 ~ (50 ~ "bla") + let pair2 = 20 ~ (50 ~ "bla") cout << pair2.v1 << endl cout << pair2.v2.v1 << endl diff --git a/tests/StdLib/AlgorithmsTest2.spr b/tests/StdLib/AlgorithmsTest2.spr index 6d9be5d1..20623b32 100644 --- a/tests/StdLib/AlgorithmsTest2.spr +++ b/tests/StdLib/AlgorithmsTest2.spr @@ -7,8 +7,8 @@ import std.list(List) fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1 ; test1 else if n == 2 ; test2 @@ -36,33 +36,35 @@ fun sprMain [initCtor] datatype MyObj - x: Int + x: Int; -fun <(this, other: @MyObj): Bool { return x < other.x; } +fun <(this, other: MyObj): Bool { return x < other.x; } datatype Greater - + ; fun ()(this: Greater, x: Int, y: Int): Bool { return x > y; } datatype Even - + ; fun ()(this: Even, x: Int): Bool { return x % 2 == 0; } datatype Minus + ; fun ()(this: Minus, x: Int, y: Int) = x - y -fun printRange(nr: AnyType) - while !nr.isEmpty() - cout << nr.front() - nr.popFront() - if (nr.isEmpty() ) +fun printRange(nr: Range) + var rc = nr + while !rc.isEmpty + cout << rc.front + rc.popFront() + if rc.isEmpty cout << endl else cout << ' ' fun printEmpty(nr: AnyType) - cout << ife(nr.isEmpty(), "empty", "not empty") << endl + cout << ife(nr.isEmpty(), "empty", "not empty") << endl; fun makeList(): List(Int) var li: List(Int) @@ -87,16 +89,16 @@ fun makeList(): List(Int) fun createRangeAscending(size: SizeType): ContiguousMemoryRange(Int) var ptr = allocRawPtr(Int, size) - var ptrEnd = ptr.advance(DiffType(size)) + let ptrEnd = ptr.advance(DiffType(size)) var i = 0 while i < size ; i = i + 1 - ptr.advance(i).value() = i + ptr.advance(i).value() = i; - return ContiguousMemoryRange(Int)(ptr, ptrEnd) + return ContiguousMemoryRange(Int)(ptr, ptrEnd); fun test1() - var nr = 0..10 + let nr = 0..10 printRange(find(nr, 0)) printRange(find(nr, 5)) @@ -108,8 +110,8 @@ empty >>>*/ fun test2() - var nr1 = 11..99../2 - var nr2 = 5..10 + let nr1 = 11..99../2 + let nr2 = 5..10 printRange(findIf(nr2, Even())) printEmpty(findIf(nr1, Even())) @@ -119,9 +121,9 @@ empty >>>*/ fun test3() - var nr1 = 0..10 - var nr2 = -10..40../3 - var nr3 = 20..20../100 + let nr1 = 0..10 + let nr2 = -10..40../3 + let nr3 = 20..20../100 printRange(findFirstOf(nr1, nr2)) printEmpty(findFirstOf(nr3, nr2)) @@ -133,10 +135,10 @@ empty >>>*/ fun test4() - var nr1 = 0..10../2 - var nr2 = 5..40../3 - var nr3 = 20..20../100 - var nr4 = 10..20 + let nr1 = 0..10../2 + let nr2 = 5..40../3 + let nr3 = 20..20../100 + let nr4 = 10..20 printRange(findFirstOfIf(nr1, nr2, Greater())) printEmpty(findFirstOfIf(nr3, nr2, Greater())) @@ -160,7 +162,7 @@ fun test5() >>>*/ fun test6() - var nr = 1..9../2 + let nr = 1..9../2 var li = makeList() cout << countIf(li.all(), Even()) << endl @@ -171,13 +173,13 @@ fun test6() >>>*/ fun test7() - var nr1 = 0..10 - var nr2 = 0..10 - var nr3 = 10..10../2 - var nr4 = -10 .. -10../5 - var nr5 = 40..100../16 - var nr6 = 0..11 - var nr7 = 0..9 + let nr1 = 0..10 + let nr2 = 0..10 + let nr3 = 10..10../2 + let nr4 = -10 .. -10../5 + let nr5 = 40..100../16 + let nr6 = 0..11 + let nr7 = 0..9 cout << equal(nr1, nr2) << endl cout << equal(nr1, nr3) << endl @@ -197,15 +199,15 @@ false >>>*/ fun test8() - var nr1 = 0..10 - var nr2 = 0..10 - var nr3 = 10..10../2 - var nr4 = -10 .. -10 ../ 5 - var nr5 = 40..100../16 - var nr6 = 0..11 - var nr7 = 0..9 - var nr8 = -1..9 - var nr9 = -3..50 + let nr1 = 0..10 + let nr2 = 0..10 + let nr3 = 10..10../2 + let nr4 = -10 .. -10 ../ 5 + let nr5 = 40..100../16 + let nr6 = 0..11 + let nr7 = 0..9 + let nr8 = -1..9 + let nr9 = -3..50 cout << equalIf(nr1, nr2, Greater()) << endl cout << equalIf(nr1, nr3, Greater()) << endl @@ -229,11 +231,11 @@ false >>>*/ fun test9() - var nr1 = 0..10 - var nr2 = 0..10 - var nr3 = 3..7 - var nr4 = 20..20../20 - var nr5 = 0..20 + let nr1 = 0..10 + let nr2 = 0..10 + let nr3 = 3..7 + let nr4 = 20..20../20 + let nr5 = 0..20 printRange(findRange(nr1, nr2)) printRange(findRange(nr1, nr3)) @@ -251,10 +253,10 @@ empty >>>*/ fun test10() - var nr1 = 0..10 - var nr2 = 3..5 - var nr3 = 10..10 - var nr4 = 4..11 + let nr1 = 0..10 + let nr2 = 3..5 + let nr3 = 10..10 + let nr4 = 4..11 printRange(findRangeIf(nr1, nr2, Greater())) printRange(findRangeIf(nr1, nr3, Greater())) @@ -272,7 +274,7 @@ fun test11() printRange(minElement(li.all())) - var nr = 10..10 + let nr = 10..10 printEmpty(minElement(nr)) /*<<>>*/ fun test17() - var nr1 = 0..10 - var nr2 = 2..5 - var nr3 = -1..20 - var nr4 = 1..15 + let nr1 = 0..10 + let nr2 = 2..5 + let nr3 = -1..20 + let nr4 = 1..15 cout << compare(nr1, nr2) << endl cout << compare(nr1, nr3) << endl @@ -375,10 +377,10 @@ true >>>*/ fun test18() - var nr1 = 0..10 - var nr2 = 2..5 - var nr3 = -1..20 - var nr4 = 1..15 + let nr1 = 0..10 + let nr2 = 2..5 + let nr3 = -1..20 + let nr4 = 1..15 cout << compare(nr1, nr2, Greater()) << endl cout << compare(nr1, nr3, Greater()) << endl @@ -392,8 +394,8 @@ false >>>*/ fun test19() - var nr1 = 0..10 - var nr2 = 20..10 ../ -1 + let nr1 = 0..10 + let nr2 = 20..10 ../ -1 cout << isSorted(nr1) << endl cout << isSorted(nr2) << endl @@ -403,8 +405,8 @@ false >>>*/ fun test20() - var nr1 = 0..10 - var nr2 = 10..5 ../ -1 + let nr1 = 0..10 + let nr2 = 10..5 ../ -1 cout << isSorted(nr1, Greater()) << endl cout << isSorted(nr2, Greater()) << endl @@ -425,7 +427,7 @@ fun test21() fun test22() var li = makeList() - var nr = 5..19../2 + let nr = 5..19../2 cout << indexOfIf(li.all(), Even()) << endl cout << indexOfIf(nr, Even()) << endl @@ -436,12 +438,12 @@ fun test22() fun test23() var li = makeList() - var lr = li.all() + let lr = li.all() cout << foldLeft(lr, Minus(), 0) << endl cout << foldRight(lr, Minus(), 0) << endl - var nr = NumericRangeWithStep(Int)() + let nr = NumericRangeWithStep(Int)() cout << foldLeft(nr, Minus(), 100) << endl /*<< y; } datatype Even - + ; fun ()(this: Even, x: Int): Bool { return x % 2 == 0; } -fun printRange(nr: AnyType) - while !nr.isEmpty() - cout << nr.front() - nr.popFront() - if (nr.isEmpty() ) +fun printRange(nr: Range) + var rc = nr + while !rc.isEmpty + cout << rc.front + rc.popFront() + if rc.isEmpty cout << endl else - cout << " " + cout << ' ' fun printEmpty(nr: AnyType) - cout << ife(nr.isEmpty(), "empty", "not empty") << endl + cout << ife(nr.isEmpty(), "empty", "not empty") << endl; fun makeList(): List(Int) var li: List(Int) @@ -66,7 +67,7 @@ fun makeList(): List(Int) return li -fun makeList(li: @List(Int)) +fun makeList(li: !List(Int)) li.pushBack(3) li.pushBack(1) li.pushBack(-4) @@ -98,16 +99,16 @@ fun makeList(li: @List(Int)) fun createRangeAscending(size: SizeType): ContiguousMemoryRange(Int) var ptr = allocRawPtr(Int, size) - var ptrEnd = ptr.advance(DiffType(size)) + let ptrEnd = ptr.advance(DiffType(size)) var i = 0 while i < size ; i = i + 1 - ptr.advance(i).value() = i + ptr.advance(i).value() = i; - return ContiguousMemoryRange(Int)(ptr, ptrEnd) + return ContiguousMemoryRange(Int)(ptr, ptrEnd); fun test1() - var nr = NumericRangeWithStep(Int)(0, 10, 1) + let nr = NumericRangeWithStep(Int)(0, 10, 1) var li: List(Int) makeList(li) var lr = li.all() @@ -175,7 +176,7 @@ fun test5() sort(vec.all()) if ( !isSorted(vec.all()) ) - cout << "Test failed" << endl + cout << "Test failed" << endl; /*<<>>*/ @@ -197,7 +198,7 @@ fun test6() sort(vec.all(), Greater()) if ( !isSorted(vec.all(), Greater()) ) - cout << "Test failed" << endl + cout << "Test failed" << endl; /*<<>>*/ diff --git a/tests/StdLib/AlgorithmsTest4.spr b/tests/StdLib/AlgorithmsTest4.spr index 31c43955..19bab30f 100644 --- a/tests/StdLib/AlgorithmsTest4.spr +++ b/tests/StdLib/AlgorithmsTest4.spr @@ -8,8 +8,8 @@ import std.array(Array) fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1; test1 else if n == 2; test2 @@ -18,27 +18,29 @@ fun sprMain [initCtor] datatype MyObj - x: Int + x: Int; -fun <(this, other: @MyObj): Bool { return x < other.x; } +fun <(this, other: MyObj): Bool { return x < other.x; } datatype Greater - + ; fun ()(this: Greater, x: Int, y: Int): Bool { return x > y; } datatype Even - + ; fun ()(this: Even, x: Int): Bool { return x % 2 == 0; } datatype Minus + ; fun ()(this: Minus, x: Int, y: Int) = x - y -fun printRange(nr: AnyType) - while !nr.isEmpty() - cout << nr.front() - nr.popFront() - if (nr.isEmpty() ) +fun printRange(nr: Range) + var rc = nr + while !rc.isEmpty + cout << rc.front + rc.popFront() + if rc.isEmpty cout << endl else cout << ' ' @@ -66,18 +68,18 @@ fun makeList(): List(Int) fun createRangeAscending(size: SizeType): ContiguousMemoryRange(Int) var ptr = allocRawPtr(Int, size) - var ptrEnd = ptr.advance(DiffType(size)) + let ptrEnd = ptr.advance(DiffType(size)) var i = 0 while i < size ; i = i + 1 - ptr.advance(i).value() = i + ptr.advance(i).value() = i; - return ContiguousMemoryRange(Int)(ptr, ptrEnd) + return ContiguousMemoryRange(Int)(ptr, ptrEnd); fun test1() var arr = Array(Int)(20, 0) - var nr1 = NumericRangeWithStep(Int)(0, 10, 1) - var nr2 = NumericRangeWithStep(Int)(0, 11, 2) + let nr1 = NumericRangeWithStep(Int)(0, 10, 1) + let nr2 = NumericRangeWithStep(Int)(0, 11, 2) printRange(merge(nr1, nr2, arr.all())) printRange(arr.all()) @@ -88,8 +90,8 @@ fun test1() fun test2() var arr = Array(Int)(20, 0) - var nr1 = NumericRangeWithStep(Int)(10, 0, -1) - var nr2 = NumericRangeWithStep(Int)(11, 0, -2) + let nr1 = NumericRangeWithStep(Int)(10, 0, -1) + let nr2 = NumericRangeWithStep(Int)(11, 0, -2) printRange(merge(nr1, nr2, arr.all(), Greater())) printRange(arr.all()) @@ -123,7 +125,7 @@ false >>>*/ fun test4() - var v = Vector(Int)(makeList().all()) + let v = Vector(Int)(makeList().all()) sort(v.all(), Greater()) cout << binarySearch(v.all(), 7, Greater()) << endl diff --git a/tests/StdLib/ArrayTest.spr b/tests/StdLib/ArrayTest.spr index e10163cc..96056205 100644 --- a/tests/StdLib/ArrayTest.spr +++ b/tests/StdLib/ArrayTest.spr @@ -5,8 +5,8 @@ import std.rawPtr fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1 ; test1 else if n == 2 ; test2 @@ -24,11 +24,11 @@ fun sprMain [initCtor] datatype MyObj - x: Int + x: Int; fun createRangeAscending(size: SizeType): ContiguousMemoryRange(MyObj) var ptr: RawPtr(MyObj) = allocRawPtr(MyObj, size) - var ptrEnd = ptr.advance(size) + let ptrEnd = ptr.advance(size) var i = 0 while i < size ; i = i + 1 @@ -38,22 +38,23 @@ fun createRangeAscending(size: SizeType): ContiguousMemoryRange(MyObj) return ContiguousMemoryRange(MyObj)(ptr, ptrEnd) -fun printArray(a: @Array(MyObj)) +fun printArray(a: !Array(MyObj)) var i = 0 while i < a.size() ; i = i + 1 cout << a.at(i).x if ( i < a.size() - 1 ) - cout << ' ' + cout << ' '; else - cout << endl + cout << endl; + ; -fun printSizeInfo(a: @Array(MyObj)) +fun printSizeInfo(a: Array(MyObj)) cout << a.isEmpty() << endl cout << a.size() << endl fun test1() - var a: Array(MyObj) + let a: Array(MyObj) printSizeInfo(a) /*<<>>*/ fun test2() - var a = Array(MyObj)(createRangeAscending(4)) + let a = Array(MyObj)(createRangeAscending(4)) printSizeInfo(a) printArray(a) @@ -73,10 +74,10 @@ false >>>*/ fun test3() - var a1: Array(MyObj) - var a2 = Array(MyObj)(createRangeAscending(4)) - var a3: Array(MyObj) = a1 - var a4 = a2 + let a1: Array(MyObj) + let a2 = Array(MyObj)(createRangeAscending(4)) + let a3: Array(MyObj) = a1 + let a4 = a2 printSizeInfo(a3) printSizeInfo(a4) @@ -90,7 +91,7 @@ false >>>*/ fun test4() - var a = Array(MyObj)(6) + let a = Array(MyObj)(6) printSizeInfo(a) printArray(a) @@ -101,7 +102,7 @@ false >>>*/ fun test5() - var a = Array(MyObj)(6, MyObj(42)) + let a = Array(MyObj)(6, MyObj(42)) printSizeInfo(a) printArray(a) @@ -133,10 +134,10 @@ fun test8() var r = a.all() while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; r = ContiguousMemoryRange(MyObj)(a.all()) while !r.isEmpty() ; r.popFront() - r.front().x = r.front().x + 1 + r.front().x = r.front().x + 1; printSizeInfo(a) printArray(a) /*<<>>*/ fun test11() - var a1 = Array(MyObj)(createRangeAscending(4)) - var a2 = Array(MyObj)(createRangeAscending(4)) - var a3 = Array(MyObj)(createRangeAscending(6)) + let a1 = Array(MyObj)(createRangeAscending(4)) + let a2 = Array(MyObj)(createRangeAscending(4)) + let a3 = Array(MyObj)(createRangeAscending(6)) cout << a1 == a2 << endl cout << a1 == a3 << endl @@ -208,21 +209,21 @@ false >>>*/ fun test12() - var a = Array(MyObj)(createRangeAscending(1000)) + let a = Array(MyObj)(createRangeAscending(1000)) var i = 0 printSizeInfo(a) while i < a.size() ; i = i + 1 if ( a.at(i).x != i ) - cout << "test failed" << endl + cout << "test failed" << endl; - var aa = a + let aa = a i = 0 printSizeInfo(aa) while i < aa.size() ; i = i + 1 if ( aa.at(i).x != i ) - cout << "test failed" << endl + cout << "test failed" << endl; var aaa = Array(MyObj)(1000) @@ -231,7 +232,8 @@ fun test12() printSizeInfo(aaa) while i < aaa.size() ; i = i + 1 if ( aaa.at(i).x != i ) - cout << "test failed" << endl + cout << "test failed" << endl; + ; /*<<>>*/ fun test13() - var v = Array(MyObj)(createRangeAscending(8)) + let v = Array(MyObj)(createRangeAscending(8)) var r = v.subrange(0, 0) while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; r = v.subrange(0, 1) while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; r = v.subrange(2, 3) while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; r = v.subrange(0, v.size()) while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; /*<<= b, "intentional error") - assert(foo.data == 100, "non-printable vars work too") - assert(fact(c) != 120, "calling functions") /*<<= b[=13] has failed: intentional error -AssertTest.spr(40): assertion failure: check foo.data == 100 has failed: non-printable vars work too -AssertTest.spr(41): assertion failure: check fact(c[=5]) != 120 has failed: calling functions +>>>*/ + +fun test2 + let a = 12 + let b = 13 + let c = 5 + let foo: FooType = 10 + assert(a == b) + assert(a+1 < b) + assert(a >= b, "intentional error") + assert(foo.data == 100, "non-printable vars work too") + assert(fact(c) != 120, "calling functions") +/*<<= b[=13] has failed: intentional error +AssertTest.spr(50): assertion failure: check foo.data == 100 has failed: non-printable vars work too +AssertTest.spr(51): assertion failure: check fact(c[=5]) != 120 has failed: calling functions >>>*/ diff --git a/tests/StdLib/CheckTest.spr b/tests/StdLib/CheckTest.spr index 9ba1dbad..87c22952 100644 --- a/tests/StdLib/CheckTest.spr +++ b/tests/StdLib/CheckTest.spr @@ -20,8 +20,8 @@ fun isTrivial(x: Int) = x<5 fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1; testOk else if n == 2; testFailure @@ -39,19 +39,19 @@ fun testOk forAll(elements(10..20)) check (fun x = 10<=x && x<20) ~ "that elements works" - var g1 = elements(10..15) - var g2 = elements(20..25) - var g3 = elements(30..35) - var g4 = oneOf(values(g1, g2, g3)) + let g1 = elements(10..15) + let g2 = elements(20..25) + let g3 = elements(30..35) + let g4 = oneOf(values(g1, g2, g3)) forAll(g4) check (fun x = 10<=x && x<50 && x % 10 < 5) ~ "that oneOf works" - var g5 = frequency(values(1 ~ g1, 6 ~ g2, 2 ~ g3)) + let g5 = frequency(values(1 ~ g1, 6 ~ g2, 2 ~ g3)) forAll(g5) check (fun x = 10<=x && x<50 && x % 10 < 5) ~ "that frequency works" //<<>>*/ fun test2() - var r = ContiguousMemoryRange(MyObj)(createRangeAscending(5)) + let r = ContiguousMemoryRange(MyObj)(createRangeAscending(5)) cout << r.isEmpty() << endl cout << r.size() << endl @@ -77,7 +77,7 @@ fun test3() var r = ContiguousMemoryRange(MyObj)(createRangeAscending(5)) while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; /*<<>>*/ fun test4() - var r = ContiguousMemoryRange(MyObj)(createRangeAscending(5)) + let r = ContiguousMemoryRange(MyObj)(createRangeAscending(5)) cout << r.front().x << endl cout << r.back().x << endl @@ -107,13 +107,14 @@ fun test4() >>>*/ fun test5() - var size = 1000 - var r = ContiguousMemoryRange(MyObj)(createRangeAscending(size)) + let size = 1000 + let r = ContiguousMemoryRange(MyObj)(createRangeAscending(size)) var i = 0 while i < size ; i = i + 1 if ( r(i).x != i ) - cout << "Test failed" << endl + cout << "Test failed" << endl; + ; /*<<>>*/ @@ -124,33 +125,34 @@ fun test6() r.popFront() r.popBack() if ( r.size() != 18 ) - cout << "Test failed" << endl + cout << "Test failed" << endl; i = 0 while i < r.size() ; i = i + 1 if ( r(i).x != i + 1 ) - cout << "Test failed" << endl + cout << "Test failed" << endl; r.popFront() r.popBack() if ( r.size() != 16 ) - cout << "Test failed" << endl + cout << "Test failed" << endl; i = 0 while i < r.size() ; i = i + 1 if ( r(i).x != i + 2 ) - cout << "Test failed" << endl + cout << "Test failed" << endl; r.popFront(2) if ( r.size() != 14 ) - cout << "Test failed" << endl + cout << "Test failed" << endl; i = 0 while i < r.size() ; i = i + 1 if ( r(i).x != i + 4 ) - cout << "Test failed" << endl + cout << "Test failed" << endl; r.popBack(2) if ( r.size() != 12 ) - cout << "Test failed" << endl + cout << "Test failed" << endl; i = 0 while i < r.size() ; i = i + 1 if ( r(i).x != i + 4 ) - cout << "Test failed" << endl + cout << "Test failed" << endl; + ; /*<<>>*/ @@ -159,7 +161,7 @@ fun test7() var r = ContiguousMemoryRange(MyObj)(createRangeAscending(20)) while !r.isEmpty() ; r.popFront(3) - cout << r.front().x << endl + cout << r.front().x << endl; /*<<>>*/ fun test9() - var r1 = ContiguousMemoryRange(MyObj)(createRangeAscending(10)) - var r2 = ContiguousMemoryRange(MyObj)(createRangeAscending(20)) + let r1 = ContiguousMemoryRange(MyObj)(createRangeAscending(10)) + let r2 = ContiguousMemoryRange(MyObj)(createRangeAscending(20)) var r3 = r2 cout << r1 == r2 << endl diff --git a/tests/StdLib/FunTest.spr b/tests/StdLib/FunTest.spr index f0729727..53c9a644 100644 --- a/tests/StdLib/FunTest.spr +++ b/tests/StdLib/FunTest.spr @@ -20,7 +20,7 @@ fun stdFun(s: String): String datatype FunctorInt storedNum: Int -fun ()(this: @FunctorInt, n: Int): Int +fun ()(this: !FunctorInt, n: Int): Int cout << "Functor(" << storedNum << ")(" << n << ") called" << flush return n*storedNum @@ -28,24 +28,24 @@ fun ()(this: @FunctorInt, n: Int): Int datatype Functor storedString: String -fun ()(this: @Functor, s: String): String +fun ()(this: !Functor, s: String): String cout << "Functor(" << storedString << ")(" << s << ") called" << flush return "Functor" datatype BigFunctor -fun () (this: @BigFunctor, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10: Int): Int +fun () (this: BigFunctor, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10: Int): Int return p1+p2+p3+p4+p5+p6+p7+p8+p9+p10 [initCtor] datatype Counter count: Int -fun ()(this: @Counter): Int = ++count +fun ()(this: !Counter): Int = ++count fun sprMain if programArgs.size() < 2 return - var n = programArgs(1) asInt + let n = programArgs(1) asInt if n == 1; test1 else if n == 2; test2 @@ -58,12 +58,12 @@ fun sprMain else cout << "Invalid test number!\n" fun test1 - var f0 = \stdFunInt - var r0 = f0(10) + let f0 = \stdFunInt + let r0 = f0(10) cout << " => " << r0 << endl - var f1 = \stdFun - var r1 = f1("Hello, world!") + let f1 = \stdFun + let r1 = f1("Hello, world!") cout << " => " << r1 << endl /*<<< Basic testing of FunctionPtr(1) stdFunInt(10) called => 100 @@ -71,12 +71,12 @@ stdFun(Hello, world!) called => stdFun >>>*/ fun test2 - var f0: Function(Int, Int) = \stdFunInt - var r0 = f0(10) + let f0: Function(Int, Int) = \stdFunInt + let r0 = f0(10) cout << " => " << r0 << endl - var f1: Function(String, String) = \stdFun - var r1 = f1("Hello, world!") + let f1: Function(String, String) = \stdFun + let r1 = f1("Hello, world!") cout << " => " << r1 << endl /*<<< Function constructed with function pointer(2) stdFunInt(10) called => 100 @@ -84,12 +84,12 @@ stdFun(Hello, world!) called => stdFun >>>*/ fun test3 - var f0: Function(Int, Int) = FunctorInt(3) - var r0 = f0(10) + let f0: Function(Int, Int) = FunctorInt(3) + let r0 = f0(10) cout << " => " << r0 << endl - var f1: Function(String, String) = Functor("bubu") - var r1 = f1("Hello, world!") + let f1: Function(String, String) = Functor("bubu") + let r1 = f1("Hello, world!") cout << " => " << r1 << endl /*<<< Function constructed with functor(3) Functor(3)(10) called => 30 @@ -97,19 +97,19 @@ Functor(bubu)(Hello, world!) called => Functor >>>*/ fun test4 - var f: Function(Int, Int,Int,Int,Int,Int,Int,Int,Int,Int,Int) = BigFunctor() + let f: Function(Int, Int,Int,Int,Int,Int,Int,Int,Int,Int,Int) = BigFunctor() cout << f(1,2,3,4,5,6,7,8,9,10) << endl /*<<< Functor with a large number of parameters(4) 55 >>>*/ fun test5 - var f1: Function(String, String) = Functor("bubu") - var r1 = f1("Hello, world!") + let f1: Function(String, String) = Functor("bubu") + let r1 = f1("Hello, world!") cout << " => " << r1 << endl - var f2 = f1 - var r2 = f2("Hello, to you too!") + let f2 = f1 + let r2 = f2("Hello, to you too!") cout << " => " << r2 << endl /*<<< Copying functors (5) Functor(bubu)(Hello, world!) called => Functor @@ -117,13 +117,13 @@ Functor(bubu)(Hello, to you too!) called => Functor >>>*/ fun test6 - var f1: Function(String, String) = Functor("bubu") - var r1 = f1("Hello, world!") + let f1: Function(String, String) = Functor("bubu") + let r1 = f1("Hello, world!") cout << " => " << r1 << endl var f2: Function(String, String) f2 = f1 - var r2 = f2("Hello, to you too!") + let r2 = f2("Hello, to you too!") cout << " => " << r2 << endl /*<<< Functor assignment (6) Functor(bubu)(Hello, world!) called => Functor @@ -131,8 +131,8 @@ Functor(bubu)(Hello, to you too!) called => Functor >>>*/ fun test7 - var f1: Function(String, String) = Functor("bubu") - var r1 = f1("Hello, world!") + let f1: Function(String, String) = Functor("bubu") + let r1 = f1("Hello, world!") cout << " => " << r1 << endl assert(f1.isSet()) assert(!f1.isNull()) @@ -151,8 +151,8 @@ Functor(bubu)(Hello, to you too!) called => Functor >>>*/ fun test8 - var f1: Function(Int) = Counter(10) - var f2 = f1 + let f1: Function(Int) = Counter(10) + let f2 = f1 cout << f1() << endl cout << f2() << endl diff --git a/tests/StdLib/HashMapTest.spr b/tests/StdLib/HashMapTest.spr index b6c0d326..4317ac1f 100644 --- a/tests/StdLib/HashMapTest.spr +++ b/tests/StdLib/HashMapTest.spr @@ -7,10 +7,10 @@ import std.algorithms [convert] datatype IntWrapper - x: Int + x: Int; [convert] -fun ctor(this: @IntWrapper, x: Int) { this.x ctor x; } +fun ctor(this: !IntWrapper, x: Int) { this.x ctor x; } fun hash(this: IntWrapper): SizeType cout << "IntWrapper.hash called for value " << x << endl @@ -18,12 +18,13 @@ fun hash(this: IntWrapper): SizeType [convert] datatype IntWithNoHash - x: Int + x: Int; [convert] -fun ctor(this: @IntWithNoHash, x: Int) { this.x ctor x; } +fun ctor(this: !IntWithNoHash, x: Int) { this.x ctor x; } datatype MyTypeTraits + ; fun equal(this: MyTypeTraits, l, r: IntWithNoHash) = l == r fun less(this: MyTypeTraits, l, r: IntWithNoHash) = l.x < r.x @@ -33,8 +34,8 @@ fun hash(this: MyTypeTraits, val: IntWithNoHash): SizeType fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1 ; test1 else if n == 2 ; test2 @@ -94,12 +95,13 @@ fun printRange(nr: AnyType) printPair(r.front()) r.popFront() if ( r.isEmpty() ) - cout << endl + cout << endl; else - cout << ' ' + cout << ' '; + ; fun test1() - var hs: Map(Int, Int) + let hs: Map(Int, Int) cout << hs.isEmpty() << endl cout << hs.size() << endl @@ -113,7 +115,7 @@ false >>>*/ fun test2() - var hs = Map(Int, Int)(60) + let hs = Map(Int, Int)(60) cout << hs.isEmpty() << endl cout << hs.size() << endl @@ -127,7 +129,7 @@ false >>>*/ fun test3() - var hs = Map(Int, Int)(makeList().all()) + let hs = Map(Int, Int)(makeList().all()) cout << hs.isEmpty() << endl cout << hs.size() << endl @@ -147,8 +149,8 @@ false >>>*/ fun test4() - var hs = Map(Int, Int)(makeList().all()) - var hs2 = Map(Int, Int)(hs) + let hs = Map(Int, Int)(makeList().all()) + let hs2 = Map(Int, Int)(hs) cout << hs2.isEmpty() << endl cout << hs2.size() << endl @@ -219,7 +221,7 @@ false >>>*/ fun test7() - var hs = Map(Int, Int)(makeList().all()) + let hs = Map(Int, Int)(makeList().all()) printRange(hs.all()) /*<<>>*/ fun test12() - var hs = Map(Int, Int)(makeList().all()) + let hs = Map(Int, Int)(makeList().all()) cout << hs.contains(106) << endl cout << hs.contains(53) << endl @@ -333,7 +335,7 @@ false >>>*/ fun test13() - var hs = Map(Int, Int)(makeList().all()) + let hs = Map(Int, Int)(makeList().all()) hs.insert(5, 10) cout << hs.count(5) << endl @@ -364,7 +366,7 @@ fun test14() >>>*/ fun test15() - var hs = Map(Int, Int)(makeList().all()) + let hs = Map(Int, Int)(makeList().all()) printRange(hs.find(5)) printRange(hs.find(10)) @@ -421,7 +423,7 @@ true >>>*/ fun test19() - var hs = Map(Int, Int)(makeList().all()) + let hs = Map(Int, Int)(makeList().all()) var keys = hs.keys() var values = hs.values() @@ -449,8 +451,9 @@ fun test20() i = i + 1 while i < 1000 if ( !hs.contains(i) ) - cout << "Test failed" << endl - i = i + 1 + cout << "Test failed" << endl; + i = i + 1; + ; /*<<>>*/ @@ -458,7 +461,8 @@ fun test21() var hs: Map(IntWrapper, Int) for i = 1..5 - hs.insert(i, i*10) + hs.insert(i, i*10); + ; /*<<>>*/ fun test2() - var hs: Int Set = 60 + let hs: Int Set = 60 cout << hs.isEmpty() << endl cout << hs.size() << endl @@ -93,7 +94,7 @@ false >>>*/ fun test3() - var hs: Int Set = makeList().all() + let hs: Int Set = makeList().all() cout << hs.isEmpty() << endl cout << hs.size() << endl @@ -113,8 +114,8 @@ false >>>*/ fun test4() - var hs = Set(Int)(makeList().all()) - var hs2 = Set(Int)(hs) + let hs = Set(Int)(makeList().all()) + let hs2 = Set(Int)(hs) cout << hs2.isEmpty() << endl cout << hs2.size() << endl @@ -185,7 +186,7 @@ false >>>*/ fun test7() - var hs = Set(Int)(makeList().all()) + let hs = Set(Int)(makeList().all()) printRange(hs.all()) /*<<>>*/ fun test12() - var hs = Set(Int)(0 .. 10) + let hs = Set(Int)(0 .. 10) cout << hs.contains(7) << endl cout << hs.contains(53) << endl @@ -307,7 +308,7 @@ fun test14() >>>*/ fun test15() - var hs = Set(Int)(0 .. 10) + let hs = Set(Int)(0 .. 10) printRange(hs.find(5)) printRange(hs.find(10)) @@ -317,7 +318,7 @@ fun test15() >>>*/ fun test16() - var hs = Set(Int)(0 .. 10) + let hs = Set(Int)(0 .. 10) hs.clear() cout << hs.isEmpty() << endl @@ -342,9 +343,9 @@ fun test17() >>>*/ fun test18() - var hs1 = Set(Int)(makeList().all()) + let hs1 = Set(Int)(makeList().all()) var hs2 = hs1 - var hs3: Set(Int) + let hs3: Set(Int) var hs4 = Set(Int)(0 .. 10) cout << hs1 == hs2 << endl @@ -377,10 +378,11 @@ true >>>*/ fun test19() - var hs = Set(Int)(0 .. 1000) + let hs = Set(Int)(0 .. 1000) for i = numericRange(0, 1000) if ( !hs.contains(i) ) - cout << "Test failed" << endl + cout << "Test failed" << endl; + ; /*<<>>*/ diff --git a/tests/StdLib/ListTest.spr b/tests/StdLib/ListTest.spr index 2b4dda7c..ac0a5b5b 100644 --- a/tests/StdLib/ListTest.spr +++ b/tests/StdLib/ListTest.spr @@ -5,8 +5,8 @@ import std.rawPtr fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1 ; test1 else if n == 2 ; test2 @@ -37,23 +37,23 @@ fun sprMain [initCtor] datatype MyObj - x: Int + x: Int; -fun <(this, other: @MyObj): Bool { return x < other.x; } +fun <(this, other: MyObj): Bool { return x < other.x; } -fun >>(this: MyObj, os: @OutStream) { os << x; } +fun >>(this: MyObj, os: !OutStream) { os << x; } datatype Greater - + ; fun ()(this: Greater, x: MyObj, y: MyObj): Bool { return x.x > y.x; } datatype Even - + ; fun ()(this: Even, x: MyObj): Bool { return x.x % 2 == 0; } fun createRangeAscending(size: SizeType): ContiguousMemoryRange(MyObj) var ptr = allocRawPtr(MyObj, size) - var ptrEnd = ptr.advance(DiffType(size)) + let ptrEnd = ptr.advance(DiffType(size)) var i = 0 while i < size ; i = i + 1 @@ -63,20 +63,21 @@ fun createRangeAscending(size: SizeType): ContiguousMemoryRange(MyObj) return ContiguousMemoryRange(MyObj)(ptr, ptrEnd) -fun printList(li: @List(MyObj)) +fun printList(li: !List(MyObj)) var i = 0 var r = li.all() while !r.isEmpty() cout << r.front().x if ( i < li.size() - 1 ) - cout << ' ' + cout << ' '; else - cout << endl + cout << endl; i = i + 1 r.popFront() + ; -fun printSizeInfo(li: @List(MyObj)) +fun printSizeInfo(li: !List(MyObj)) cout << li.isEmpty() << endl cout << li.size() << endl @@ -123,10 +124,10 @@ false >>>*/ fun test3() - var li1: List(MyObj) - var li2 = List(MyObj)(createRangeAscending(4)) - var li3 = List(MyObj)(li1) - var li4 = List(MyObj)(li2) + let li1: List(MyObj) + let li2 = List(MyObj)(createRangeAscending(4)) + let li3 = List(MyObj)(li1) + let li4 = List(MyObj)(li2) printSizeInfo(li3) printSizeInfo(li4) @@ -166,8 +167,8 @@ false >>>*/ fun test6() - var li1 = List(MyObj)(createRangeAscending(8)) - var li2 = List(MyObj)(createRangeAscending(1)) + let li1 = List(MyObj)(createRangeAscending(8)) + let li2 = List(MyObj)(createRangeAscending(1)) cout << li1.front().x << endl li1.front().x = 42 @@ -203,11 +204,11 @@ fun test7() var r = li.all() while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; r = li.all() while !r.isEmpty() ; r.popFront() - r.front().x = r.front().x + 1 + r.front().x = r.front().x + 1; printSizeInfo(li) printList(li) /*<<>>*/ fun test25() - var l1: List(MyObj) = createRangeAscending(4) - var l2: List(MyObj) = createRangeAscending(4) - var l3: List(MyObj) = createRangeAscending(6) + let l1: List(MyObj) = createRangeAscending(4) + let l2: List(MyObj) = createRangeAscending(4) + let l3: List(MyObj) = createRangeAscending(6) cout << l1 == l2 << endl cout << l1 == l3 << endl @@ -1014,8 +1015,8 @@ fun test26() printSizeInfo(li) while !r.isEmpty() ; r.popFront() if ( r.front().x != i ) - cout << "test failed" << endl - i = i + 1 + cout << "test failed" << endl; + i = i + 1; var lili: List(MyObj) = li @@ -1024,8 +1025,8 @@ fun test26() printSizeInfo(lili) while !r.isEmpty() ; r.popFront() if ( r.front().x != i ) - cout << "test failed" << endl - i = i + 1 + cout << "test failed" << endl; + i = i + 1; var lilili: List(MyObj) @@ -1035,8 +1036,9 @@ fun test26() printSizeInfo(lilili) while !r.isEmpty() ; r.popFront() if ( r.front().x != i ) - cout << "test failed" << endl - i = i + 1 + cout << "test failed" << endl; + i = i + 1; + ; /*<<>(this: @MyObj, os: @OutStream) - os << "MyObj(" << x << ")" +fun >>(this: !MyObj, os: !OutStream) + os << "MyObj(" << x << ")"; -fun print(this: @MyObj) - cout << "MyObj.print" << endl -fun print(this: @MyObj, arg: StringRef) - cout << "MyObj.print(" << arg << ")" << endl +fun print(this: !MyObj) + cout << "MyObj.print" << endl; +fun print(this: !MyObj, arg: StringRef) + cout << "MyObj.print(" << arg << ")" << endl; datatype Foo - obj: MyObj + obj: MyObj; -fun ctor(this: @Foo, x: Int) - obj ctor x +fun ctor(this: !Foo, x: Int) + obj ctor x; -fun get(this: @Foo) = obj +fun get(this: !Foo) = obj fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1; test1 else if n == 2; test2 @@ -40,42 +40,33 @@ fun sprMain else if n == 7; test7 else if n == 8; test8 -[native("malloc")] fun mallocRt(size: SizeType): @Byte -[native("free")] fun freeRt(p: @Byte) +[native("malloc")] fun mallocRt(size: SizeType): UntypedPtr +[native("free")] fun freeRt(p: UntypedPtr) fun newObj(x: Int): @MyObj - var ptr: @Byte + var ptr = mallocRt(sizeOf(MyObj)) - ptr := mallocRt(sizeOf(MyObj)) - - var oPtr: @MyObj - - oPtr := reinterpretCast(@MyObj, ptr) + var oPtr: @MyObj = ptr asRefOf MyObj oPtr.ctor(x) return oPtr -fun delObj(oPtr: @MyObj) +fun delObj(oPtr: !MyObj) oPtr.dtor() - - var ptr: @Byte - - ptr := reinterpretCast(@Byte, oPtr) - - freeRt(ptr) + freeRt(UntypedPtr(oPtr)) fun test1() var p: Ptr(MyObj) var scp: ScopedPtr(MyObj) - var shp: SharedPtr(MyObj) + let shp: SharedPtr(MyObj) if ( !isNullRef(reinterpretCast(@Byte, p.get())) || !p.isNull() ) - cout << "test failed" << endl + cout << "test failed" << endl; if ( !isNullRef(reinterpretCast(@Byte, scp.get())) || !scp.isNull() ) - cout << "test failed" << endl + cout << "test failed" << endl; if ( !isNullRef(reinterpretCast(@Byte, shp.get())) || !shp.isNull() ) - cout << "test failed" << endl + cout << "test failed" << endl; /*<<>>*/ @@ -88,7 +79,7 @@ fun test2() cout << p.get().x << endl p.reset() if ( !isNullRef(reinterpretCast(@Byte, p.get())) || !p.isNull() ) - cout << "test failed" << endl + cout << "test failed" << endl; p.reset(obj) cout << p.get().x << endl p = pp @@ -100,10 +91,10 @@ fun test2() cout << p.get().x << endl cout << pp.get().x << endl if ( p == pp ) - cout << "test failed" << endl + cout << "test failed" << endl; p = pp if ( p != pp ) - cout << "test failed" << endl + cout << "test failed" << endl; /*<< y; } datatype Even - + ; fun ()(this: Even, x: Int): Bool { return x % 2 == 0; } datatype Minus - + ; fun ()(this: Minus, x: Int, y: Int) = x - y datatype Square - + ; fun ()(this: Square, x: AnyType) = x * x datatype Multiply - + ; fun ()(this: Multiply, x: AnyType, y: AnyType) = x * y datatype Fact _res: Int = 1 _k: Int = 0 -fun ()(this: @Fact): Int +fun ()(this: !Fact): Int ++_k _res *= _k @@ -71,10 +71,11 @@ fun ()(this: @Fact): Int fun isOdd(n: Int) = n%2==1 fun printRange(nr: Range) - while !nr.isEmpty() - cout << nr.front() - nr.popFront() - if (nr.isEmpty() ) + var rc = nr + while !rc.isEmpty + cout << rc.front + rc.popFront() + if rc.isEmpty cout << endl else cout << ' ' @@ -102,28 +103,28 @@ fun makeList(): List(Int) fun createRangeAscending(size: SizeType): ContiguousMemoryRange(Int) var ptr = allocRawPtr(Int, size) - var ptrEnd = ptr.advance(DiffType(size)) + let ptrEnd = ptr.advance(DiffType(size)) var i = 0 while i < size ; i++ - ptr.advance(i).value() = i + ptr.advance(i).value() = i; - return ContiguousMemoryRange(Int)(ptr, ptrEnd) + return ContiguousMemoryRange(Int)(ptr, ptrEnd); fun test1() - var l = makeList() - var lr = l.all() - var v = Vector(Int)(lr) - var vr = v.all() - var ev = Vector(Int)() - var evr = ev.all() + let l = makeList() + let lr = l.all() + let v = Vector(Int)(lr) + let vr = v.all() + let ev = Vector(Int)() + let evr = ev.all() printRange(retro(lr)) printRange(retro(retro(lr))) printRange(retro(vr)) cout << retro(evr).isEmpty() << endl - var rvr = retro(vr) + let rvr = retro(vr) cout << rvr.front() << endl /*<<>>*/ fun test2() - var li = makeList() - var lr = li.all() + let li = makeList() + let lr = li.all() printRange(take(lr, 5)) printRange(take(take(lr, 5), 3)) @@ -150,7 +151,7 @@ true >>>*/ fun test3() - var li = makeList() + let li = makeList() var lr = li.all() cout << takeWhile(lr, Even()).isEmpty() << endl @@ -158,7 +159,7 @@ fun test3() lr.popFront() printRange(takeWhile(lr, Even())) - var nr = NumericRangeWithStep(Int)(0, 10, 2) + let nr = NumericRangeWithStep(Int)(0, 10, 2) printRange(takeWhile(nr, Even())) /*<<>>*/ fun test5() - var li = makeList() - var lr = li.all() + let li = makeList() + let lr = li.all() printRange(filter(lr, Even())) printRange(lr filter Even()) printRange(lr filter ((fun x = x%2 == 0))) - var nr = NumericRangeWithStep(Int)(1, 11, 2) + let nr = NumericRangeWithStep(Int)(1, 11, 2) cout << filter(nr, Even()).isEmpty() << endl /*<<>>*/ fun test6() - var li = makeList() - var lr = li.all() + let li = makeList() + let lr = li.all() printRange(transform(lr, Square())) printRange(lr map Square()) @@ -217,12 +218,12 @@ fun test6() >>>*/ fun test7() - var range = repeat(42) + let range = repeat(42) var i = 0 while i < 1000 if ( range.front() != 42 ) - cout << "Test failed" << endl + cout << "Test failed" << endl; i = i + 1 range.popFront() printRange(repeat(42, 10)) @@ -231,11 +232,11 @@ fun test7() >>>*/ fun test8() - var li = makeList() - var lr = li.all() - var nr = NumericRangeWithStep(Int)(0, 5, 1) - var enr = NumericRangeWithStep(Int)(5, 5, 1) - var elr = List(Int)().all() + let li = makeList() + let lr = li.all() + let nr = NumericRangeWithStep(Int)(0, 5, 1) + let enr = NumericRangeWithStep(Int)(5, 5, 1) + let elr = List(Int)().all() printRange(chain(lr, nr)) printRange(chain(nr, lr)) @@ -251,21 +252,21 @@ true >>>*/ fun test9() - var l = makeList() - var lr = l.all() + let l = makeList() + let lr = l.all() printRange(stride(lr, 5)) - var nr = NumericRangeWithStep(Int)(0, 10, 1) + let nr = NumericRangeWithStep(Int)(0, 10, 1) printRange(stride(nr, 3)) - var v = Vector(Int)(makeList().all()) - var vr = v.all() + let v = Vector(Int)(makeList().all()) + let vr = v.all() printRange(stride(vr, 5)) - var nr2 = NumericRangeWithStep(Int)(0, 5, 1) + let nr2 = NumericRangeWithStep(Int)(0, 5, 1) printRange(stride(nr2, 10)) /*<<>>*/ fun test10() - var v = Vector(Int)(NumericRangeWithStep(Int)(0, 5, 1)) - var vr = v.all() + let v = Vector(Int)(NumericRangeWithStep(Int)(0, 5, 1)) + let vr = v.all() printRange(radial(vr, 0)) printRange(radial(vr, 1)) @@ -285,8 +286,8 @@ fun test10() printRange(radial(vr, 3)) printRange(radial(vr, 4)) - var v2 = Vector(Int)(NumericRangeWithStep(Int)(0, 4, 1)) - var vr2 = v2.all() + let v2 = Vector(Int)(NumericRangeWithStep(Int)(0, 4, 1)) + let vr2 = v2.all() printRange(radial(vr2, 0)) printRange(radial(vr2, 1)) @@ -305,7 +306,7 @@ fun test10() >>>*/ fun test11() - var nr = NumericRangeWithStep(Int)(0, 5, 1) + let nr = NumericRangeWithStep(Int)(0, 5, 1) printRange(cycle(nr, 4)) cout << cycle(nr, 0).isEmpty() << endl @@ -364,10 +365,10 @@ fun test13() fun test14() printRange(zip(numericRange(0, 6), numericRange(3, 12), Multiply())) - var zr = zip(numericRange(0, 4), numericRange(0, -4, -1)) + let zr = zip(numericRange(0, 4), numericRange(0, -4, -1)) for p = zr - cout << p.v1 << ' ' << p.v2 << '\n' + cout << p.v1 << ' ' << p.v2 << '\n'; /*<<>>*/ diff --git a/tests/StdLib/SortedMapTest.spr b/tests/StdLib/SortedMapTest.spr index b43ff3f4..fc810dee 100644 --- a/tests/StdLib/SortedMapTest.spr +++ b/tests/StdLib/SortedMapTest.spr @@ -7,8 +7,8 @@ import std.algorithms fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1 ; test1 else if n == 2 ; test2 @@ -66,16 +66,17 @@ fun printRange(nr: AnyType) printPair(r.front()) r.popFront() if ( r.isEmpty() ) - cout << endl + cout << endl; else - cout << ' ' + cout << ' '; + ; datatype Equal(type: Type) using ValueType = type fun ()(this: Equal, x, y: this.ValueType): Bool = x == y fun test1() - var sm: SortedMap(Int, Int, Less(Int), Equal(Int)) + let sm: SortedMap(Int, Int, Less(Int), Equal(Int)) cout << sm.isEmpty() << endl cout << sm.size() << endl @@ -89,7 +90,7 @@ false >>>*/ fun test2() - var sm = SortedMap(Int, Int, Less(Int), Equal(Int))(60) + let sm = SortedMap(Int, Int, Less(Int), Equal(Int))(60) cout << sm.isEmpty() << endl cout << sm.size() << endl @@ -103,7 +104,7 @@ false >>>*/ fun test3() - var sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) + let sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) cout << sm.isEmpty() << endl cout << sm.size() << endl @@ -123,8 +124,8 @@ false >>>*/ fun test4() - var sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) - var sm2 = SortedMap(Int, Int, Less(Int), Equal(Int))(sm) + let sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) + let sm2 = SortedMap(Int, Int, Less(Int), Equal(Int))(sm) cout << sm2.isEmpty() << endl cout << sm2.size() << endl @@ -195,7 +196,7 @@ false >>>*/ fun test7() - var sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) + let sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) printRange(sm.all()) /*<<>>*/ fun test12() - var sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) + let sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) cout << sm.contains(106) << endl cout << sm.contains(53) << endl @@ -340,7 +341,7 @@ fun test14() >>>*/ fun test15() - var sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) + let sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) printRange(sm.find(5)) printRange(sm.find(10)) @@ -397,7 +398,7 @@ true >>>*/ fun test19() - var sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) + let sm = SortedMap(Int, Int, Less(Int), Equal(Int))(makeList().all()) var keys = sm.keys() var values = sm.values() @@ -425,7 +426,8 @@ fun test20() i = i + 1 while i < 1000 if ( !sm.contains(i) ) - cout << "Test failed" << endl - i = i + 1 + cout << "Test failed" << endl; + i = i + 1; + ; /*<<>>*/ diff --git a/tests/StdLib/SortedSetTest.spr b/tests/StdLib/SortedSetTest.spr index fa18844a..29ee95b7 100644 --- a/tests/StdLib/SortedSetTest.spr +++ b/tests/StdLib/SortedSetTest.spr @@ -6,8 +6,8 @@ import std.vector fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1 ; test1 else if n == 2 ; test2 @@ -51,23 +51,24 @@ fun makeList(): List(Int) return li fun printRange(nr: AnyType) - var v: Vector(Int) = nr + let v: Vector(Int) = nr var r = v.all() while !r.isEmpty() cout << r.front() r.popFront() if (r.isEmpty() ) - cout << endl + cout << endl; else - cout << ' ' + cout << ' '; + ; datatype Equal(type: Type) using ValueType = type fun ()(this: Equal, x, y: this.ValueType): Bool = x == y fun test1() - var ss: SortedSet(Int, Less(Int), Equal(Int)) + let ss: SortedSet(Int, Less(Int), Equal(Int)) cout << ss.isEmpty() << endl cout << ss.size() << endl @@ -81,7 +82,7 @@ false >>>*/ fun test2() - var ss = SortedSet(Int, Less(Int), Equal(Int))(60) + let ss = SortedSet(Int, Less(Int), Equal(Int))(60) cout << ss.isEmpty() << endl cout << ss.size() << endl @@ -95,7 +96,7 @@ false >>>*/ fun test3() - var ss = SortedSet(Int, Less(Int), Equal(Int))(makeList().all()) + let ss = SortedSet(Int, Less(Int), Equal(Int))(makeList().all()) cout << ss.isEmpty() << endl cout << ss.size() << endl @@ -115,8 +116,8 @@ false >>>*/ fun test4() - var ss = SortedSet(Int, Less(Int), Equal(Int))(makeList().all()) - var ss2 = SortedSet(Int, Less(Int), Equal(Int))(ss) + let ss = SortedSet(Int, Less(Int), Equal(Int))(makeList().all()) + let ss2 = SortedSet(Int, Less(Int), Equal(Int))(ss) cout << ss2.isEmpty() << endl cout << ss2.size() << endl @@ -187,7 +188,7 @@ false >>>*/ fun test7() - var ss = SortedSet(Int, Less(Int), Equal(Int))(makeList().all()) + let ss = SortedSet(Int, Less(Int), Equal(Int))(makeList().all()) printRange(ss.all()) /*<<>>*/ fun test12() - var ss = SortedSet(Int, Less(Int), Equal(Int))(0 .. 10) + let ss = SortedSet(Int, Less(Int), Equal(Int))(0 .. 10) cout << ss.contains(7) << endl cout << ss.contains(53) << endl @@ -309,7 +310,7 @@ fun test14() >>>*/ fun test15() - var ss = SortedSet(Int, Less(Int), Equal(Int))(0 .. 10) + let ss = SortedSet(Int, Less(Int), Equal(Int))(0 .. 10) printRange(ss.find(5)) printRange(ss.find(10)) @@ -344,9 +345,9 @@ fun test17() >>>*/ fun test18() - var ss1 = SortedSet(Int, Less(Int), Equal(Int))(makeList().all()) + let ss1 = SortedSet(Int, Less(Int), Equal(Int))(makeList().all()) var ss2 = ss1 - var ss3: SortedSet(Int, Less(Int), Equal(Int)) + let ss3: SortedSet(Int, Less(Int), Equal(Int)) var ss4 = SortedSet(Int, Less(Int), Equal(Int))(0 .. 10) cout << ss1 == ss2 << endl @@ -379,10 +380,11 @@ true >>>*/ fun test19() - var ss = SortedSet(Int, Less(Int), Equal(Int))(0 .. 1000) + let ss = SortedSet(Int, Less(Int), Equal(Int))(0 .. 1000) for i = numericRange(0, 1000) if ( !ss.contains(i) ) - cout << "Test failed" << endl + cout << "Test failed" << endl; + ; /*<<>>*/ diff --git a/tests/StdLib/StaticArrayTest.spr b/tests/StdLib/StaticArrayTest.spr index 14710980..cae58eaa 100644 --- a/tests/StdLib/StaticArrayTest.spr +++ b/tests/StdLib/StaticArrayTest.spr @@ -5,8 +5,8 @@ import std.rawPtr fun sprMain if ( programArgs.size() < 2 ) - return - var n = programArgs(1) asInt + return; + let n = programArgs(1) asInt if n == 1 ; test1 else if n == 2 ; test2 @@ -23,11 +23,11 @@ fun sprMain [initCtor] datatype MyObj - x: Int + x: Int; fun createRangeAscending(size: SizeType): ContiguousMemoryRange(MyObj) var ptr = allocRawPtr(MyObj, size) - var ptrEnd = ptr.advance(DiffType(size)) + let ptrEnd = ptr.advance(DiffType(size)) var i = 0 while i < size ; i = i + 1 @@ -37,22 +37,23 @@ fun createRangeAscending(size: SizeType): ContiguousMemoryRange(MyObj) return ContiguousMemoryRange(MyObj)(ptr, ptrEnd) -fun printStaticArray(a: @AnyType) +fun printStaticArray(a: AnyType) var i = 0 while i < a.size() ; i = i + 1 cout << a.at(i).x if ( i < a.size() - 1 ) - cout << ' ' + cout << ' '; else - cout << endl + cout << endl; + ; -fun printSizeInfo(a: @AnyType) +fun printSizeInfo(a: AnyType) cout << a.isEmpty() << endl cout << a.size() << endl fun test1() - var a: StaticArray(MyObj, 10) + let a: StaticArray(MyObj, 10) printSizeInfo(a) printStaticArray(a) @@ -63,7 +64,7 @@ false >>>*/ fun test2() - var a: StaticArray(MyObj, 10) = MyObj(15) + let a: StaticArray(MyObj, 10) = MyObj(15) printSizeInfo(a) printStaticArray(a) @@ -74,7 +75,7 @@ false >>>*/ fun test3() - var a: StaticArray(MyObj, 10) = createRangeAscending(10) + let a: StaticArray(MyObj, 10) = createRangeAscending(10) printSizeInfo(a) printStaticArray(a) @@ -85,10 +86,10 @@ false >>>*/ fun test4() - var a1: StaticArray(MyObj, 4) - var a2 = StaticArray(MyObj, 4)(createRangeAscending(4)) - var a3: StaticArray(MyObj, 4) = a1 - var a4 = a2 + let a1: StaticArray(MyObj, 4) + let a2 = StaticArray(MyObj, 4)(createRangeAscending(4)) + let a3: StaticArray(MyObj, 4) = a1 + let a4 = a2 printSizeInfo(a3) printSizeInfo(a4) @@ -119,14 +120,14 @@ fun test6() >>>*/ fun test7() - var a = StaticArray(MyObj, 4)(createRangeAscending(4)) + let a = StaticArray(MyObj, 4)(createRangeAscending(4)) var r = a.all() while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; r = ContiguousMemoryRange(MyObj)(a.all()) while !r.isEmpty() ; r.popFront() - r.front().x = r.front().x + 1 + r.front().x = r.front().x + 1; printSizeInfo(a) printStaticArray(a) /*<<>>*/ fun test10() - var a1 = StaticArray(MyObj, 4)(createRangeAscending(4)) - var a2 = StaticArray(MyObj, 4)(createRangeAscending(4)) + let a1 = StaticArray(MyObj, 4)(createRangeAscending(4)) + let a2 = StaticArray(MyObj, 4)(createRangeAscending(4)) var a3 = StaticArray(MyObj, 4)(createRangeAscending(4)) a3.at(2) = MyObj(10) @@ -199,21 +200,21 @@ false >>>*/ fun test11() - var a = StaticArray(MyObj, 1000)(createRangeAscending(1000)) + let a = StaticArray(MyObj, 1000)(createRangeAscending(1000)) var i = 0 printSizeInfo(a) while i < a.size() ; i = i + 1 if ( a.at(i).x != i ) - cout << "test failed" << endl + cout << "test failed" << endl; - var aa = a + let aa = a i = 0 printSizeInfo(aa) while i < aa.size() ; i = i + 1 if ( aa.at(i).x != i ) - cout << "test failed" << endl + cout << "test failed" << endl; var aaa = StaticArray(MyObj, 1000)() @@ -222,7 +223,8 @@ fun test11() printSizeInfo(aaa) while i < aaa.size() ; i = i + 1 if ( aaa.at(i).x != i ) - cout << "test failed" << endl + cout << "test failed" << endl; + ; /*<<>>*/ fun test12() - var v = StaticArray(MyObj, 8)(createRangeAscending(8)) + let v = StaticArray(MyObj, 8)(createRangeAscending(8)) var r = v.subrange(0, 0) while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; r = v.subrange(0, 1) while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; r = v.subrange(2, 3) while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; r = v.subrange(0, v.size()) while !r.isEmpty() ; r.popFront() - cout << r.front().x << endl + cout << r.front().x << endl; /*<<>(o: MyObj1, os: @OutStream) - os << o.x -fun >>(o: MyObj2, os: @OutStream) - os << o.x << '#' << o.y +fun >>(o: MyObj1, os: !OutStream) + os << o.x; +fun >>(o: MyObj2, os: !OutStream) + os << o.x << '#' << o.y; using T2 = Tuple(MyObj1, MyObj2) using T4 = Tuple(MyObj1, MyObj2, Int rt, Bool rt) fun arbitrary(t: Type): T2 Gen if t == T2 - return mkGen(T2, \generateT2) + return mkGen(T2, \generateT2); fun arbitrary(t: Type): T4 Gen if t == T4 - return mkGen(T4, \generateT4) + return mkGen(T4, \generateT4); //! Generate an arbitrary tuple 2 fun generateT2(sizeHint: UInt): T2 var res: T2 - var h: Int = sizeHint + 5 + let h: Int = sizeHint + 5 res.v1.x = randBetween(-h, h+1) res.v2.x = randBetween(-h, h+1) res.v2.y = randBetween(-h, h+1) @@ -34,7 +34,7 @@ fun generateT2(sizeHint: UInt): T2 //! Generate an arbitrary tuple 4 fun generateT4(sizeHint: UInt): T4 var res: T4 - var h: Int = sizeHint + 5 + let h: Int = sizeHint + 5 res.v1.x = randBetween(-h, h+1) res.v2.x = randBetween(-h, h+1) res.v2.y = randBetween(-h, h+1) @@ -78,8 +78,8 @@ fun sprMain forAll(T4 arbitrary) check (fun x = (x tail).v1 == x.v2 && tail(tail(x)).v1 == x.v3 && tail(tail(x)).v2 == x.v4) ~ "tail function" // Constructing types - var a: Int * Bool - var b: MyObj1 * MyObj2 + let a: Int * Bool + let b: MyObj1 * MyObj2 //var b: MyObj1 * MyObj2 * Int; //var b: MyObj1 * MyObj2 * Int * Bool; [ct] if ( MyObj1 * MyObj2 != T2 ) { cout << "FAILURE: cannot construct tuple types (T2)" << endl; } diff --git a/tests/StdLib/UnionTest.spr b/tests/StdLib/UnionTest.spr index e37b0fe7..89f158af 100644 --- a/tests/StdLib/UnionTest.spr +++ b/tests/StdLib/UnionTest.spr @@ -27,7 +27,7 @@ fun test1 fun test2 var union: Union(Int, Char) union.get1 = 7963 - + cout << Byte(union.get2) << endl /*<<>>*/ fun test4 var union: Union(Int, StaticArray(Byte, 20), Float) - + cout << sizeOf(union) << endl /*<<>>*/ fun test7 - var union: Union(Int, StaticArray(Byte, 20), myType) + var union: Union(Int, StaticArray(Byte, 20), myType) cout << sizeOf(union) << endl /*<<>>*/ fun test2() - [ct] var v = createVector(10) - var v2: Vector(MyObj) = v + [ct] let v = createVector(10) + let v2: Vector(MyObj) = v cout << v2.size() << endl for el = v2.all() - cout << el.x << endl + cout << el.x << endl; + ; /*<<>(this: @SubrangeTestData, os: @OutStream) +fun >>(this: SubrangeTestData, os: !OutStream) os << vec << ", start=" << start << ", count=" << count fun arbitrary(t: Type): SubrangeTestData Gen if t == SubrangeTestData @@ -307,7 +308,7 @@ datatype InsertValueTestData idx: SizeType value: Int -fun >>(this: @InsertValueTestData, os: @OutStream) +fun >>(this: InsertValueTestData, os: !OutStream) os << vec << ", idx=" << idx << ", value=" << value fun arbitrary(t: Type): InsertValueTestData Gen if t == InsertValueTestData @@ -324,7 +325,7 @@ datatype InsertRangeTestData idx: SizeType values: Vec -fun >>(this: @InsertRangeTestData, os: @OutStream) +fun >>(this: InsertRangeTestData, os: !OutStream) os << vec << ", idx=" << idx << ", values=" << values fun arbitrary(t: Type): InsertRangeTestData Gen if t == InsertRangeTestData @@ -342,10 +343,10 @@ using DataVec = Data Vector datatype Data x: Int -fun >>(this: @Data, os: @OutStream) +fun >>(this: Data, os: !OutStream) os << 'Data(' << x << ')\n' -fun ctor(this: @Data, other: Data) +fun ctor(this: !Data, other: Data) copyCtorCnt++ var copyCtorCnt = 0 diff --git a/tests/tests.in b/tests/tests.in index 32710eaa..7442b2c1 100644 --- a/tests/tests.in +++ b/tests/tests.in @@ -55,6 +55,7 @@ Bugs/StaticGlobal.spr: Bugs - static vars, global vars, static Bugs/VectorOfCtClass.spr: Bugs - vectors of CT-only classes Bugs/WhileVarCond.spr: Bugs - while condition is a variable or a reference Bugs/GenericWithCtConcept.spr: Bugs - generic with CT concept +Bugs/CastOnAssignment.spr: Bugs - cast on assignment # AlgoProblems/P1_Collatz.spr: Algo problems - P1. Collatz sequences Examples/Power.spr: Examples: Powers @@ -145,6 +146,8 @@ Basic/datatype/bitcopiable.spr: Basic features - datatype - bitcopiable Basic/datatype/queryBitcopiable.spr: Basic features - datatype - query bitcopiable Basic/datatype/autoBitcopiable.spr: Basic features - datatype - auto bitcopiable Basic/exp/dotOper.spr: Basic features - expressions - dot operator +Basic/vars/typeCatVarsErr.spr: Basic features - vars - type cat variables (err) +Basic/vars/typeCatFieldsErr.spr: Basic features - vars - type cat fields (err) Imports/ImportTwice.spr: Import twice the same file Imports/ImportComplex.spr: Import a complex hierarchy of files, some of them twice diff --git a/tools/formatDetails/astNodes.spr b/tools/formatDetails/astNodes.spr index f925dd3c..1169791d 100644 --- a/tools/formatDetails/astNodes.spr +++ b/tools/formatDetails/astNodes.spr @@ -23,12 +23,12 @@ fun ctor(this: @AstNodeImpl, l: Location, kind: NodeKind) this.kind ctor kind this.loc ctor l // cout << "Parsed: " << kind << endl -fun ctor(this: @AstNodeImpl, l: Location, kind: NodeKind, r: Range) +fun ctor(this: @AstNodeImpl, l: Location, kind: NodeKind, r: AnyType) // TODO (mut) this.kind ctor kind this.loc ctor l this.children ctor r // cout << "Parsed: " << kind << endl -fun ctor(this: @AstNodeImpl, l: Location, kind: NodeKind, r: Range, name: StringRef) +fun ctor(this: @AstNodeImpl, l: Location, kind: NodeKind, r: AnyType, name: StringRef) // TODO (mut) this.kind ctor kind this.loc ctor l this.name ctor name @@ -40,7 +40,11 @@ fun ctor(this: @AstNodeImpl, l: Location, kind: NodeKind, name: StringRef) this.name ctor name // cout << "Parsed: " << kind << endl -fun _toImpl(n: Node): @AstNodeImpl = ife(n.data.data !== null, reinterpretCast(@AstNodeImpl, n.data.data), _nullAstNodeImpl) +fun _toImpl(n: Node): @AstNodeImpl + if n.data.data !== null + return reinterpretCast(@AstNodeImpl, n.data.data) + else + return _nullAstNodeImpl fun _toNode(impl: @AstNodeImpl) = Node(UntypedPtr(reinterpretCast(@Byte, impl))) fun isSet(this: Node) = this.data.data !== null @@ -99,6 +103,8 @@ fun mkField(this: @SimpleAstBuilder, loc: @Location, name: StringRef, typeNode, = createNode(loc, nkField, values(typeNode, init), name) fun mkConcept(this: @SimpleAstBuilder, loc: @Location, name, paramName: StringRef, baseConcept, ifClause: Node) \ = createNode(loc, nkConcept, values(baseConcept, ifClause), name) +fun mkLet(this: @SimpleAstBuilder, loc: @Location, name: StringRef, typeNode, init: Node) \ + = createNode(loc, nkLet, values(typeNode, init), name) fun mkVar(this: @SimpleAstBuilder, loc: @Location, name: StringRef, typeNode, init: Node) \ = createNode(loc, nkVar, values(typeNode, init), name) fun mkParameter(this: @SimpleAstBuilder, loc: @Location, name: StringRef, typeNode, init: Node) \ diff --git a/tools/formatDetails/nodeKinds.spr b/tools/formatDetails/nodeKinds.spr index f5397191..f6cdc09b 100644 --- a/tools/formatDetails/nodeKinds.spr +++ b/tools/formatDetails/nodeKinds.spr @@ -17,36 +17,37 @@ using nkPackage = NodeKind(5) using nkDatatype = NodeKind(6) using nkField = NodeKind(7) using nkConcept = NodeKind(8) -using nkVar = NodeKind(9) -using nkParameter = NodeKind(10) -using nkFun = NodeKind(11) -using nkParenthesisExpr = NodeKind(12) -using nkPostfixOp = NodeKind(13) -using nkInfixOp = NodeKind(14) -using nkPrefixOp = NodeKind(15) -using nkIdentifier = NodeKind(16) -using nkCompoundExpr = NodeKind(17) -using nkStarExpr = NodeKind(18) -using nkDotExpr = NodeKind(19) -using nkFunAppExpr = NodeKind(20) -using nkLambdaExpr = NodeKind(21) -using nkNullLiteral = NodeKind(22) -using nkBoolLiteral = NodeKind(23) -using nkIntLiteral = NodeKind(24) -using nkUIntLiteral = NodeKind(25) -using nkLongLiteral = NodeKind(26) -using nkULongLiteral = NodeKind(27) -using nkFloatLiteral = NodeKind(28) -using nkDoubleLiteral = NodeKind(29) -using nkCharLiteral = NodeKind(30) -using nkStringLiteral = NodeKind(31) -using nkBlockStmt = NodeKind(32) -using nkIfStmt = NodeKind(33) -using nkForStmt = NodeKind(34) -using nkWhileStmt = NodeKind(35) -using nkBreakStmt = NodeKind(36) -using nkContinueStmt = NodeKind(37) -using nkReturnStmt = NodeKind(38) +using nkLet = NodeKind(9) +using nkVar = NodeKind(10) +using nkParameter = NodeKind(11) +using nkFun = NodeKind(12) +using nkParenthesisExpr = NodeKind(13) +using nkPostfixOp = NodeKind(14) +using nkInfixOp = NodeKind(15) +using nkPrefixOp = NodeKind(16) +using nkIdentifier = NodeKind(17) +using nkCompoundExpr = NodeKind(18) +using nkStarExpr = NodeKind(19) +using nkDotExpr = NodeKind(20) +using nkFunAppExpr = NodeKind(21) +using nkLambdaExpr = NodeKind(22) +using nkNullLiteral = NodeKind(23) +using nkBoolLiteral = NodeKind(24) +using nkIntLiteral = NodeKind(25) +using nkUIntLiteral = NodeKind(26) +using nkLongLiteral = NodeKind(27) +using nkULongLiteral = NodeKind(28) +using nkFloatLiteral = NodeKind(29) +using nkDoubleLiteral = NodeKind(30) +using nkCharLiteral = NodeKind(31) +using nkStringLiteral = NodeKind(32) +using nkBlockStmt = NodeKind(33) +using nkIfStmt = NodeKind(34) +using nkForStmt = NodeKind(35) +using nkWhileStmt = NodeKind(36) +using nkBreakStmt = NodeKind(37) +using nkContinueStmt = NodeKind(38) +using nkReturnStmt = NodeKind(39) // Not actually a node kind; just to represent a null node using nkNULL = NodeKind(255) diff --git a/tools/formatTool.spr b/tools/formatTool.spr index d356fd59..9f81693c 100644 --- a/tools/formatTool.spr +++ b/tools/formatTool.spr @@ -12,8 +12,9 @@ using TransformFun = FunctionPtr(VoidType, @SourceData) using Transforms = TransformFun Vector fun sprMain - if programArgs.size() < 2 + if programArgs.size < 2 _printArgsError('not enough arguments') + var filename = '' var inPlace = false diff --git a/tools/transforms/refToMut.spr b/tools/transforms/refToMut.spr index db4cdb0a..05bf7338 100644 --- a/tools/transforms/refToMut.spr +++ b/tools/transforms/refToMut.spr @@ -3,12 +3,17 @@ module formatTool.transforms.refToMut import formatDetails.sourceData fun refToMut(src: @SourceData) - for i = 2..src.tokens.size - var prev2 = src.tokens(i-2) - var prev1 = src.tokens(i-1) - var cur: @TokenData = src.tokens(i) + if src.tokens.size < 3 + return + var prev2: @TokenData = src.tokens(0) + var prev1: @TokenData = src.tokens(0) + var cur: @TokenData = src.tokens(0) + for i = 3..src.tokens.size + if cur.type != tkWHITESPACE + prev2 := prev1 + prev1 := cur + cur := src.tokens(i) if !cur.canFormat continue - if prev2.type == tkCOLON && prev1.type == tkWHITESPACE && cur.content == '@' + if cur.type == tkOPERATOR && cur.content == '@' && prev1.type == tkCOLON && (prev2.parentAst kind) == nkParameter cur.content = '!' - diff --git a/unittests/Common/BackendMock.cpp b/unittests/Common/BackendMock.cpp index 758c74e2..51c6f460 100644 --- a/unittests/Common/BackendMock.cpp +++ b/unittests/Common/BackendMock.cpp @@ -23,7 +23,7 @@ BackendMock::BackendMock() ctApiRegisterFun = &BackendMock::CtApiRegisterFun; } -BackendMock::~BackendMock() {} +BackendMock::~BackendMock() = default; void BackendMock::Init(Nest_Backend* /*backend*/, const char* /*mainFilename*/) { // Nothing to do diff --git a/unittests/Common/TypeFactory.cpp b/unittests/Common/TypeFactory.cpp index 6cea3d19..4a842677 100644 --- a/unittests/Common/TypeFactory.cpp +++ b/unittests/Common/TypeFactory.cpp @@ -35,7 +35,8 @@ Gen arbConstType(EvalMode mode, int minRef, int maxRef) { minRef--; if (maxRef > 0) maxRef--; - return gen::apply(&ConstType::get, arbDataType(mode, minRef, maxRef)); + auto locGen = gen::just(Location{}); + return gen::apply(&ConstType::get, arbDataType(mode, minRef, maxRef), locGen); } Gen arbMutableType(EvalMode mode, int minRef, int maxRef) { @@ -43,7 +44,8 @@ Gen arbMutableType(EvalMode mode, int minRef, int maxRef) { minRef--; if (maxRef > 0) maxRef--; - return gen::apply(&MutableType::get, arbDataType(mode, minRef, maxRef)); + auto locGen = gen::just(Location{}); + return gen::apply(&MutableType::get, arbDataType(mode, minRef, maxRef), locGen); } Gen arbTempType(EvalMode mode, int minRef, int maxRef) { @@ -51,7 +53,8 @@ Gen arbTempType(EvalMode mode, int minRef, int maxRef) { minRef--; if (maxRef > 0) maxRef--; - return gen::apply(&TempType::get, arbDataType(mode, minRef, maxRef)); + auto locGen = gen::just(Location{}); + return gen::apply(&TempType::get, arbDataType(mode, minRef, maxRef), locGen); } Gen arbArrayType(EvalMode mode) { @@ -138,7 +141,7 @@ Gen arbBoolType(EvalMode mode) { break; } } - return gen::exec([=] () -> TypeWithStorage { + return gen::exec([=]() -> TypeWithStorage { auto m = mode != modeUnspecified ? mode : *gen::arbitrary(); int numRefs = *gen::weightedElement({ {10, 0}, diff --git a/unittests/Feather/TestFeatherNodes.cpp b/unittests/Feather/TestFeatherNodes.cpp index 80e5377e..6d111a80 100644 --- a/unittests/Feather/TestFeatherNodes.cpp +++ b/unittests/Feather/TestFeatherNodes.cpp @@ -24,13 +24,13 @@ struct FeatherNodesFixture : SparrowGeneralFixture { FeatherNodesFixture::FeatherNodesFixture() { using TypeFactory::g_dataTypeDecls; - g_dataTypeDecls.push_back(createNativeDatatypeNode(StringRef("i1"), globalContext_)); - g_dataTypeDecls.push_back(createNativeDatatypeNode(StringRef("i8"), globalContext_)); - g_dataTypeDecls.push_back(createNativeDatatypeNode(StringRef("i16"), globalContext_)); - g_dataTypeDecls.push_back(createNativeDatatypeNode(StringRef("i32"), globalContext_)); - g_dataTypeDecls.push_back(createDatatypeNode(StringRef("FooType"), globalContext_)); - g_dataTypeDecls.push_back(createDatatypeNode(StringRef("BarType"), globalContext_)); - g_dataTypeDecls.push_back(createDatatypeNode(StringRef("NullType"), globalContext_)); + g_dataTypeDecls.emplace_back(createNativeDatatypeNode(StringRef("i1"), globalContext_)); + g_dataTypeDecls.emplace_back(createNativeDatatypeNode(StringRef("i8"), globalContext_)); + g_dataTypeDecls.emplace_back(createNativeDatatypeNode(StringRef("i16"), globalContext_)); + g_dataTypeDecls.emplace_back(createNativeDatatypeNode(StringRef("i32"), globalContext_)); + g_dataTypeDecls.emplace_back(createDatatypeNode(StringRef("FooType"), globalContext_)); + g_dataTypeDecls.emplace_back(createDatatypeNode(StringRef("BarType"), globalContext_)); + g_dataTypeDecls.emplace_back(createDatatypeNode(StringRef("NullType"), globalContext_)); } FeatherNodesFixture::~FeatherNodesFixture() { FeatherNodeFactory::instance().reset(); diff --git a/unittests/Feather/TestTypes.cpp b/unittests/Feather/TestTypes.cpp index 80f9f57e..4705097a 100644 --- a/unittests/Feather/TestTypes.cpp +++ b/unittests/Feather/TestTypes.cpp @@ -19,14 +19,14 @@ struct FeatherTypesFixture : SparrowGeneralFixture { FeatherTypesFixture::FeatherTypesFixture() { using TypeFactory::g_dataTypeDecls; - g_dataTypeDecls.push_back(createNativeDatatypeNode(StringRef("i8"), globalContext_)); - g_dataTypeDecls.push_back(createNativeDatatypeNode(StringRef("i16"), globalContext_)); - g_dataTypeDecls.push_back(createNativeDatatypeNode(StringRef("i32"), globalContext_)); - g_dataTypeDecls.push_back(createDatatypeNode(StringRef("FooType"), globalContext_)); - g_dataTypeDecls.push_back(createDatatypeNode(StringRef("BarType"), globalContext_)); - g_dataTypeDecls.push_back(createDatatypeNode(StringRef("NullType"), globalContext_)); + g_dataTypeDecls.emplace_back(createNativeDatatypeNode(StringRef("i8"), globalContext_)); + g_dataTypeDecls.emplace_back(createNativeDatatypeNode(StringRef("i16"), globalContext_)); + g_dataTypeDecls.emplace_back(createNativeDatatypeNode(StringRef("i32"), globalContext_)); + g_dataTypeDecls.emplace_back(createDatatypeNode(StringRef("FooType"), globalContext_)); + g_dataTypeDecls.emplace_back(createDatatypeNode(StringRef("BarType"), globalContext_)); + g_dataTypeDecls.emplace_back(createDatatypeNode(StringRef("NullType"), globalContext_)); } -FeatherTypesFixture::~FeatherTypesFixture() {} +FeatherTypesFixture::~FeatherTypesFixture() = default; TEST_CASE_METHOD(FeatherTypesFixture, "User can create Feather types with given properties") { rc::prop("Can create VoidTypes for proper mode", [](EvalMode mode) { diff --git a/unittests/Nest/TestType.cpp b/unittests/Nest/TestType.cpp index e183aae9..58eb912b 100644 --- a/unittests/Nest/TestType.cpp +++ b/unittests/Nest/TestType.cpp @@ -12,8 +12,8 @@ struct TypesFixture : NestGeneralFixture { ~TypesFixture(); }; -TypesFixture::TypesFixture() {} -TypesFixture::~TypesFixture() {} +TypesFixture::TypesFixture() = default; +TypesFixture::~TypesFixture() = default; TEST_CASE_METHOD(TypesFixture, "User can register a new type") { SECTION("first time register") { diff --git a/unittests/SparrowFrontend/SprCommon/GenGenericParams.cpp b/unittests/SparrowFrontend/SprCommon/GenGenericParams.cpp index 1867012f..c05b3001 100644 --- a/unittests/SparrowFrontend/SprCommon/GenGenericParams.cpp +++ b/unittests/SparrowFrontend/SprCommon/GenGenericParams.cpp @@ -88,8 +88,8 @@ rc::Gen> arbBoundValues(const ParamsData& params, const Sampl // If this is a regular param (RT, non-concept), don't create a bound value for it if (t && t.kind() != typeKindConcept && t.mode() == modeRt) { - values.push_back(nullptr); - valTypes.push_back(nullptr); + values.emplace_back(nullptr); + valTypes.emplace_back(nullptr); continue; } @@ -105,6 +105,7 @@ rc::Gen> arbBoundValues(const ParamsData& params, const Sampl auto* t = Feather_getCtValueData(prevValAsCtValue); if (!t || !*t) REP_INTERNAL(prevValAsCtValue.location(), "No type was set for node"); + ASSERT(t); valueType = *t; } value = createTypeNode(nullptr, g_LocationGen(), valueType); diff --git a/unittests/SparrowFrontend/SprCommon/GenValueForType.cpp b/unittests/SparrowFrontend/SprCommon/GenValueForType.cpp index 1143f5f4..9130e22d 100644 --- a/unittests/SparrowFrontend/SprCommon/GenValueForType.cpp +++ b/unittests/SparrowFrontend/SprCommon/GenValueForType.cpp @@ -71,7 +71,7 @@ Gen arbValueConvertibleTo(TypeWithStorage t, const SampleTypes* samp int weightAddRef = 1; int weightFromPlain = tk == typeKindConst ? 1 : 0; int weightFromConst = tk == typeKindData ? 1 : 0; - int weightFromMutable = 1; + int weightFromMutable = tk != typeKindTemp ? 1 : 0; int weightFromTmp = 1; TypeWithStorage newType; diff --git a/unittests/SparrowFrontend/TestCallable.cpp b/unittests/SparrowFrontend/TestCallable.cpp index d4284310..cfdb2e74 100644 --- a/unittests/SparrowFrontend/TestCallable.cpp +++ b/unittests/SparrowFrontend/TestCallable.cpp @@ -31,9 +31,6 @@ using namespace SprFrontend; using namespace rc; struct CallableFixture : SparrowGeneralFixture { - CallableFixture(); - ~CallableFixture(); - //! Ensures that the generated callable matches the original decl void checkCallable(Callable& c, NodeHandle decl, const ParamsData* paramsData = nullptr); @@ -61,9 +58,6 @@ struct CallableFixture : SparrowGeneralFixture { SampleTypes types_; }; -CallableFixture::CallableFixture() {} - -CallableFixture::~CallableFixture() {} void CallableFixture::checkCallable(Callable& c, NodeHandle decl, const ParamsData* paramsData) { RC_ASSERT(c.valid()); @@ -316,7 +310,10 @@ GenericFunctionCallable CallableFixture::genGenericFunctionCallable( void CallableFixture::checkCallableParams(Callable& callable, ParamsData& paramsData) { RC_ASSERT(callable.numParams() == paramsData.numParams_); for (int i = 0; i < paramsData.numParams_; i++) { - RC_ASSERT(callable.paramType(i) == paramsData.types_[i]); + auto paramType = paramsData.types_[i]; + if (paramType && shouldMakeParamConst(paramType)) + paramType = ConstType::get(paramType); + RC_ASSERT(callable.paramType(i) == paramType); } } diff --git a/unittests/SparrowFrontend/TestConvert.cpp b/unittests/SparrowFrontend/TestConvert.cpp index 648ec127..b9eb890a 100644 --- a/unittests/SparrowFrontend/TestConvert.cpp +++ b/unittests/SparrowFrontend/TestConvert.cpp @@ -44,7 +44,7 @@ struct ConvertFixture : SparrowGeneralFixture { ConvertFixture::ConvertFixture() { types_.init(*this); } -ConvertFixture::~ConvertFixture() {} +ConvertFixture::~ConvertFixture() = default; TEST_CASE("User shall be able to combine two ConversionType values") { SECTION("combine function") { @@ -204,6 +204,8 @@ TEST_CASE_METHOD(ConvertFixture, "Conversion rules are properly applied") { CHECK(getConvType(t0mut, t1) == convImplicit); CHECK(getConvType(t1mut, t1) == convDirect); CHECK(getConvType(t1mut, t2) == convImplicit); + CHECK(getConvType(t1, t0mut) == convImplicit); + CHECK(getConvType(t2, t1mut) == convImplicit); CHECK(getConvType(t1, t2) == convNone); CHECK(getConvType(t0, t2) == convNone); } @@ -236,6 +238,7 @@ TEST_CASE_METHOD(ConvertFixture, "Conversion rules are properly applied") { auto dest = *TypeFactory::arbType(); auto srcRef = addRef(DataType(src)); RC_PRE(srcRef != dest); + RC_PRE(dest.kind() != typeKindMutable); RC_LOG() << src << " -> " << dest << endl; auto c1 = getConvType(srcRef, dest); @@ -266,6 +269,35 @@ TEST_CASE_METHOD(ConvertFixture, "Conversion rules are properly applied") { SECTION("Concept base conversion") { CHECK(getConvType(types_.concept1Type_, types_.concept2Type_) == convNone); CHECK(getConvType(types_.concept2Type_, types_.concept1Type_) == convDirect); + + // Exhaustively test category combinations + auto addCat = [](TypeWithStorage t, int idx) -> TypeWithStorage { + switch (idx) { + case 1: + return ConstType::get(t); + case 2: + return MutableType::get(t); + case 3: + return TempType::get(t); + case 0: + default: + return t; + } + }; + for ( int i=0; i<4; i++) { + for ( int j=0; j<4; j++) { + auto t1 = addCat(types_.concept1Type_, i); + auto t2 = addCat(types_.concept2Type_, j); + // INFO(t1 << " -> " << t2); + CHECK(getConvType(t1, t2) == convNone); + INFO(t2 << " -> " << t1); + if (t1.numReferences() == t2.numReferences()) + CHECK(getConvType(t2, t1) == convDirect); + else + CHECK(getConvType(t2, t1) == convNone); + // TODO (types): Revisit this + } + } } SECTION("Concept with categories") { diff --git a/unittests/SparrowFrontend/TestGenerics.cpp b/unittests/SparrowFrontend/TestGenerics.cpp index 119809dd..bc154614 100644 --- a/unittests/SparrowFrontend/TestGenerics.cpp +++ b/unittests/SparrowFrontend/TestGenerics.cpp @@ -21,9 +21,6 @@ using namespace SprFrontend; using namespace rc; struct GenericsFixture : SparrowGeneralFixture { - GenericsFixture(); - ~GenericsFixture(); - //! Checks if the created instantiation is OK, matching the parameters and given bound values static void checkInst(Instantiation inst, const ParamsData& paramsData, NodeRange values); @@ -31,9 +28,6 @@ struct GenericsFixture : SparrowGeneralFixture { SampleTypes types_; }; -GenericsFixture::GenericsFixture() {} - -GenericsFixture::~GenericsFixture() {} //! Checks if the created instantiation is OK, matching the parameters and given bound values void GenericsFixture::checkInst( @@ -146,9 +140,10 @@ TEST_CASE_METHOD(GenericsFixture, "GenericsFixture..checkCreateGenericFun") { RC_ASSERT(instSet.params().size() == ourParams.size()); for (int i = 0; i < ourParams.size(); i++) { auto t = ourParams[i].type(); - bool isRegular = t && t.kind() == typeKindData && t.mode() == modeRt; + bool isRegular = t && (t.kind() == typeKindData || t.kind() == typeKindConst) && + t.mode() == modeRt; bool genericParamIsNull = !instSet.params()[i]; - RC_ASSERT(isRegular == genericParamIsNull); + RC_ASSERT(!genericParamIsNull || isRegular); } } }); diff --git a/unittests/SparrowFrontend/metatests/TestGenCallableDecl.cpp b/unittests/SparrowFrontend/metatests/TestGenCallableDecl.cpp index 66dbb9d9..2a16263f 100644 --- a/unittests/SparrowFrontend/metatests/TestGenCallableDecl.cpp +++ b/unittests/SparrowFrontend/metatests/TestGenCallableDecl.cpp @@ -13,19 +13,12 @@ using namespace SprFrontend; using namespace rc; struct GenCallableDeclFixture : SparrowGeneralFixture { - GenCallableDeclFixture(); - ~GenCallableDeclFixture(); - void checkSemanticallyOk(NodeHandle decl); //! The types that we are using while performing our tests SampleTypes types_; }; -GenCallableDeclFixture::GenCallableDeclFixture() {} - -GenCallableDeclFixture::~GenCallableDeclFixture() {} - void GenCallableDeclFixture::checkSemanticallyOk(NodeHandle decl) { if (!decl) return; diff --git a/unittests/SparrowFrontend/metatests/TestGenGenericParams.cpp b/unittests/SparrowFrontend/metatests/TestGenGenericParams.cpp index f619a6d1..ca715f94 100644 --- a/unittests/SparrowFrontend/metatests/TestGenGenericParams.cpp +++ b/unittests/SparrowFrontend/metatests/TestGenGenericParams.cpp @@ -15,16 +15,10 @@ using namespace SprFrontend; using namespace rc; struct GenGenericParamsFixture : SparrowGeneralFixture { - GenGenericParamsFixture(); - ~GenGenericParamsFixture(); - //! The types that we are using while performing our tests SampleTypes types_; }; -GenGenericParamsFixture::GenGenericParamsFixture() {} - -GenGenericParamsFixture::~GenGenericParamsFixture() {} TEST_CASE_METHOD(GenGenericParamsFixture, "Test GenGenericParams.genParams") { types_.init(*this); diff --git a/unittests/SparrowFrontend/metatests/TestGenValueForType.cpp b/unittests/SparrowFrontend/metatests/TestGenValueForType.cpp index 1634b8c5..731c5d85 100644 --- a/unittests/SparrowFrontend/metatests/TestGenValueForType.cpp +++ b/unittests/SparrowFrontend/metatests/TestGenValueForType.cpp @@ -15,9 +15,6 @@ using namespace SprFrontend; using namespace rc; struct GenValueForTypeFixture : SparrowGeneralFixture { - GenValueForTypeFixture(); - ~GenValueForTypeFixture(); - void computeType(Nest::NodeHandle node) { RC_ASSERT(node); node.setContext(globalContext_); @@ -29,9 +26,6 @@ struct GenValueForTypeFixture : SparrowGeneralFixture { SampleTypes types_; }; -GenValueForTypeFixture::GenValueForTypeFixture() {} - -GenValueForTypeFixture::~GenValueForTypeFixture() {} TEST_CASE_METHOD(GenValueForTypeFixture, "genValueForType functions generate expected results") { types_.init(*this);