| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.ir_builder; | 5 library dart2js.ir_builder; |
| 6 | 6 |
| 7 import '../compile_time_constants.dart' show BackendConstantEnvironment; | 7 import '../compile_time_constants.dart' show BackendConstantEnvironment; |
| 8 import '../constants/constant_system.dart'; | 8 import '../constants/constant_system.dart'; |
| 9 import '../constants/values.dart' show ConstantValue, PrimitiveConstantValue; | 9 import '../constants/values.dart' show ConstantValue, PrimitiveConstantValue; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 } | 625 } |
| 626 | 626 |
| 627 ir.Primitive _buildInvokeDynamic(ir.Primitive receiver, | 627 ir.Primitive _buildInvokeDynamic(ir.Primitive receiver, |
| 628 Selector selector, | 628 Selector selector, |
| 629 TypeMask mask, | 629 TypeMask mask, |
| 630 List<ir.Primitive> arguments, | 630 List<ir.Primitive> arguments, |
| 631 {SourceInformation sourceInformation}) { | 631 {SourceInformation sourceInformation}) { |
| 632 assert(isOpen); | 632 assert(isOpen); |
| 633 return _continueWithExpression( | 633 return _continueWithExpression( |
| 634 (k) => new ir.InvokeMethod(receiver, selector, mask, arguments, k, | 634 (k) => new ir.InvokeMethod(receiver, selector, mask, arguments, k, |
| 635 sourceInformation: sourceInformation)); | 635 sourceInformation)); |
| 636 } | 636 } |
| 637 | 637 |
| 638 ir.Primitive _buildInvokeCall(ir.Primitive target, | 638 ir.Primitive _buildInvokeCall(ir.Primitive target, |
| 639 CallStructure callStructure, | 639 CallStructure callStructure, |
| 640 TypeMask mask, | 640 TypeMask mask, |
| 641 List<ir.Definition> arguments, | 641 List<ir.Definition> arguments, |
| 642 {SourceInformation sourceInformation}) { | 642 {SourceInformation sourceInformation}) { |
| 643 Selector selector = callStructure.callSelector; | 643 Selector selector = callStructure.callSelector; |
| 644 return _buildInvokeDynamic(target, selector, mask, arguments, | 644 return _buildInvokeDynamic(target, selector, mask, arguments, |
| 645 sourceInformation: sourceInformation); | 645 sourceInformation: sourceInformation); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 // let cont join(x, ..., result) = [] in | 739 // let cont join(x, ..., result) = [] in |
| 740 // let cont then() = [[thenPart]]; join(v, ...) | 740 // let cont then() = [[thenPart]]; join(v, ...) |
| 741 // and else() = [[elsePart]]; join(v, ...) | 741 // and else() = [[elsePart]]; join(v, ...) |
| 742 // in | 742 // in |
| 743 // if condition (then, else) | 743 // if condition (then, else) |
| 744 ir.Continuation thenContinuation = new ir.Continuation([]); | 744 ir.Continuation thenContinuation = new ir.Continuation([]); |
| 745 ir.Continuation elseContinuation = new ir.Continuation([]); | 745 ir.Continuation elseContinuation = new ir.Continuation([]); |
| 746 thenContinuation.body = thenBuilder._root; | 746 thenContinuation.body = thenBuilder._root; |
| 747 elseContinuation.body = elseBuilder._root; | 747 elseContinuation.body = elseBuilder._root; |
| 748 add(new ir.LetCont(join.continuation, | 748 add(new ir.LetCont(join.continuation, |
| 749 new ir.LetCont.many(<ir.Continuation>[thenContinuation, | 749 new ir.LetCont.two(thenContinuation, elseContinuation, |
| 750 elseContinuation], | |
| 751 new ir.Branch(new ir.IsTrue(condition), | 750 new ir.Branch(new ir.IsTrue(condition), |
| 752 thenContinuation, | 751 thenContinuation, |
| 753 elseContinuation)))); | 752 elseContinuation)))); |
| 754 environment = join.environment; | 753 environment = join.environment; |
| 755 return environment.discard(1); | 754 return environment.discard(1); |
| 756 } | 755 } |
| 757 | 756 |
| 758 /** | 757 /** |
| 759 * Add an explicit `return null` for functions that don't have a return | 758 * Add an explicit `return null` for functions that don't have a return |
| 760 * statement on each branch. This includes functions with an empty body, | 759 * statement on each branch. This includes functions with an empty body, |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 outerBodyBuilder.add(innerBodyBuilder._root); | 1215 outerBodyBuilder.add(innerBodyBuilder._root); |
| 1217 } | 1216 } |
| 1218 | 1217 |
| 1219 // Create loop exit and body entry continuations and a branch to them. | 1218 // Create loop exit and body entry continuations and a branch to them. |
| 1220 ir.Continuation exitContinuation = new ir.Continuation([]); | 1219 ir.Continuation exitContinuation = new ir.Continuation([]); |
| 1221 ir.Continuation bodyContinuation = new ir.Continuation([]); | 1220 ir.Continuation bodyContinuation = new ir.Continuation([]); |
| 1222 bodyContinuation.body = outerBodyBuilder._root; | 1221 bodyContinuation.body = outerBodyBuilder._root; |
| 1223 // Note the order of continuations: the first one is the one that will | 1222 // Note the order of continuations: the first one is the one that will |
| 1224 // be filled by LetCont.plug. | 1223 // be filled by LetCont.plug. |
| 1225 ir.LetCont branch = | 1224 ir.LetCont branch = |
| 1226 new ir.LetCont.many(<ir.Continuation>[exitContinuation, | 1225 new ir.LetCont.two(exitContinuation, bodyContinuation, |
| 1227 bodyContinuation], | |
| 1228 new ir.Branch(new ir.IsTrue(condition), | 1226 new ir.Branch(new ir.IsTrue(condition), |
| 1229 bodyContinuation, | 1227 bodyContinuation, |
| 1230 exitContinuation)); | 1228 exitContinuation)); |
| 1231 // If there are breaks in the body, then there must be a join-point | 1229 // If there are breaks in the body, then there must be a join-point |
| 1232 // continuation for the normal exit and the breaks. Otherwise, the | 1230 // continuation for the normal exit and the breaks. Otherwise, the |
| 1233 // successor is translated in the hole in the exit continuation. | 1231 // successor is translated in the hole in the exit continuation. |
| 1234 bool hasBreaks = !breakCollector.isEmpty; | 1232 bool hasBreaks = !breakCollector.isEmpty; |
| 1235 ir.LetCont letBreak; | 1233 ir.LetCont letBreak; |
| 1236 if (hasBreaks) { | 1234 if (hasBreaks) { |
| 1237 IrBuilder exitBuilder = makeDelimitedBuilder(); | 1235 IrBuilder exitBuilder = makeDelimitedBuilder(); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 // | 1375 // |
| 1378 // let cont exit() = [ ] | 1376 // let cont exit() = [ ] |
| 1379 // and body() = <<BODY>> | 1377 // and body() = <<BODY>> |
| 1380 // in branch condition (body, exit) | 1378 // in branch condition (body, exit) |
| 1381 ir.Continuation exitContinuation = new ir.Continuation([]); | 1379 ir.Continuation exitContinuation = new ir.Continuation([]); |
| 1382 ir.Continuation bodyContinuation = new ir.Continuation([]); | 1380 ir.Continuation bodyContinuation = new ir.Continuation([]); |
| 1383 bodyContinuation.body = bodyBuilder._root; | 1381 bodyContinuation.body = bodyBuilder._root; |
| 1384 // Note the order of continuations: the first one is the one that will | 1382 // Note the order of continuations: the first one is the one that will |
| 1385 // be filled by LetCont.plug. | 1383 // be filled by LetCont.plug. |
| 1386 ir.LetCont branch = | 1384 ir.LetCont branch = |
| 1387 new ir.LetCont.many(<ir.Continuation>[exitContinuation, | 1385 new ir.LetCont.two(exitContinuation, bodyContinuation, |
| 1388 bodyContinuation], | |
| 1389 new ir.Branch(new ir.IsTrue(condition), | 1386 new ir.Branch(new ir.IsTrue(condition), |
| 1390 bodyContinuation, | 1387 bodyContinuation, |
| 1391 exitContinuation)); | 1388 exitContinuation)); |
| 1392 // If there are breaks in the body, then there must be a join-point | 1389 // If there are breaks in the body, then there must be a join-point |
| 1393 // continuation for the normal exit and the breaks. Otherwise, the | 1390 // continuation for the normal exit and the breaks. Otherwise, the |
| 1394 // successor is translated in the hole in the exit continuation. | 1391 // successor is translated in the hole in the exit continuation. |
| 1395 bool hasBreaks = !breakCollector.isEmpty; | 1392 bool hasBreaks = !breakCollector.isEmpty; |
| 1396 ir.LetCont letBreak; | 1393 ir.LetCont letBreak; |
| 1397 if (hasBreaks) { | 1394 if (hasBreaks) { |
| 1398 IrBuilder exitBuilder = makeDelimitedBuilder(); | 1395 IrBuilder exitBuilder = makeDelimitedBuilder(); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 state.continueCollectors.removeLast(); | 1450 state.continueCollectors.removeLast(); |
| 1454 if (bodyBuilder.isOpen) bodyBuilder.jumpTo(loop); | 1451 if (bodyBuilder.isOpen) bodyBuilder.jumpTo(loop); |
| 1455 | 1452 |
| 1456 // Create body entry and loop exit continuations and a branch to them. | 1453 // Create body entry and loop exit continuations and a branch to them. |
| 1457 ir.Continuation exitContinuation = new ir.Continuation([]); | 1454 ir.Continuation exitContinuation = new ir.Continuation([]); |
| 1458 ir.Continuation bodyContinuation = new ir.Continuation([]); | 1455 ir.Continuation bodyContinuation = new ir.Continuation([]); |
| 1459 bodyContinuation.body = bodyBuilder._root; | 1456 bodyContinuation.body = bodyBuilder._root; |
| 1460 // Note the order of continuations: the first one is the one that will | 1457 // Note the order of continuations: the first one is the one that will |
| 1461 // be filled by LetCont.plug. | 1458 // be filled by LetCont.plug. |
| 1462 ir.LetCont branch = | 1459 ir.LetCont branch = |
| 1463 new ir.LetCont.many(<ir.Continuation>[exitContinuation, | 1460 new ir.LetCont.two(exitContinuation, bodyContinuation, |
| 1464 bodyContinuation], | |
| 1465 new ir.Branch(new ir.IsTrue(condition), | 1461 new ir.Branch(new ir.IsTrue(condition), |
| 1466 bodyContinuation, | 1462 bodyContinuation, |
| 1467 exitContinuation)); | 1463 exitContinuation)); |
| 1468 // If there are breaks in the body, then there must be a join-point | 1464 // If there are breaks in the body, then there must be a join-point |
| 1469 // continuation for the normal exit and the breaks. Otherwise, the | 1465 // continuation for the normal exit and the breaks. Otherwise, the |
| 1470 // successor is translated in the hole in the exit continuation. | 1466 // successor is translated in the hole in the exit continuation. |
| 1471 bool hasBreaks = !breakCollector.isEmpty; | 1467 bool hasBreaks = !breakCollector.isEmpty; |
| 1472 ir.LetCont letBreak; | 1468 ir.LetCont letBreak; |
| 1473 if (hasBreaks) { | 1469 if (hasBreaks) { |
| 1474 IrBuilder exitBuilder = makeDelimitedBuilder(); | 1470 IrBuilder exitBuilder = makeDelimitedBuilder(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 ir.Continuation exitContinuation = new ir.Continuation([]); | 1536 ir.Continuation exitContinuation = new ir.Continuation([]); |
| 1541 IrBuilder exitBuilder = continueBuilder.makeDelimitedBuilder(); | 1537 IrBuilder exitBuilder = continueBuilder.makeDelimitedBuilder(); |
| 1542 exitBuilder.jumpTo(breakCollector); | 1538 exitBuilder.jumpTo(breakCollector); |
| 1543 exitContinuation.body = exitBuilder._root; | 1539 exitContinuation.body = exitBuilder._root; |
| 1544 ir.Continuation repeatContinuation = new ir.Continuation([]); | 1540 ir.Continuation repeatContinuation = new ir.Continuation([]); |
| 1545 IrBuilder repeatBuilder = continueBuilder.makeDelimitedBuilder(); | 1541 IrBuilder repeatBuilder = continueBuilder.makeDelimitedBuilder(); |
| 1546 repeatBuilder.jumpTo(loop); | 1542 repeatBuilder.jumpTo(loop); |
| 1547 repeatContinuation.body = repeatBuilder._root; | 1543 repeatContinuation.body = repeatBuilder._root; |
| 1548 | 1544 |
| 1549 continueBuilder.add( | 1545 continueBuilder.add( |
| 1550 new ir.LetCont.many(<ir.Continuation>[exitContinuation, | 1546 new ir.LetCont.two(exitContinuation, repeatContinuation, |
| 1551 repeatContinuation], | |
| 1552 new ir.Branch(new ir.IsTrue(condition), | 1547 new ir.Branch(new ir.IsTrue(condition), |
| 1553 repeatContinuation, | 1548 repeatContinuation, |
| 1554 exitContinuation))); | 1549 exitContinuation))); |
| 1555 continueCollector.continuation.body = continueBuilder._root; | 1550 continueCollector.continuation.body = continueBuilder._root; |
| 1556 | 1551 |
| 1557 // Construct the loop continuation (i.e., the body and condition). | 1552 // Construct the loop continuation (i.e., the body and condition). |
| 1558 // <Loop> = | 1553 // <Loop> = |
| 1559 // let cont continue(x, ...) = | 1554 // let cont continue(x, ...) = |
| 1560 // <Continue> | 1555 // <Continue> |
| 1561 // in [[body]]; continue(v, ...) | 1556 // in [[body]]; continue(v, ...) |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1607 } | 1602 } |
| 1608 } | 1603 } |
| 1609 | 1604 |
| 1610 ir.Continuation thenContinuation = new ir.Continuation([]); | 1605 ir.Continuation thenContinuation = new ir.Continuation([]); |
| 1611 thenContinuation.body = thenBuilder._root; | 1606 thenContinuation.body = thenBuilder._root; |
| 1612 ir.Continuation elseContinuation = new ir.Continuation([]); | 1607 ir.Continuation elseContinuation = new ir.Continuation([]); |
| 1613 // A LetCont.many term has a hole as the body of the first listed | 1608 // A LetCont.many term has a hole as the body of the first listed |
| 1614 // continuation, to be plugged by the translation. Therefore put the | 1609 // continuation, to be plugged by the translation. Therefore put the |
| 1615 // else continuation first. | 1610 // else continuation first. |
| 1616 casesBuilder.add( | 1611 casesBuilder.add( |
| 1617 new ir.LetCont.many(<ir.Continuation>[elseContinuation, | 1612 new ir.LetCont.two(elseContinuation, thenContinuation, |
| 1618 thenContinuation], | |
| 1619 new ir.Branch(new ir.IsTrue(condition), | 1613 new ir.Branch(new ir.IsTrue(condition), |
| 1620 thenContinuation, | 1614 thenContinuation, |
| 1621 elseContinuation))); | 1615 elseContinuation))); |
| 1622 } | 1616 } |
| 1623 | 1617 |
| 1624 if (defaultCase != null) { | 1618 if (defaultCase != null) { |
| 1625 defaultCase.buildBody(casesBuilder); | 1619 defaultCase.buildBody(casesBuilder); |
| 1626 } | 1620 } |
| 1627 if (casesBuilder.isOpen) casesBuilder.jumpTo(join); | 1621 if (casesBuilder.isOpen) casesBuilder.jumpTo(join); |
| 1628 | 1622 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1813 elseContinuation.body = catchBody; | 1807 elseContinuation.body = catchBody; |
| 1814 | 1808 |
| 1815 // Build the type test guarding this clause. We can share the | 1809 // Build the type test guarding this clause. We can share the |
| 1816 // environment with the nested builder because this part cannot mutate | 1810 // environment with the nested builder because this part cannot mutate |
| 1817 // it. | 1811 // it. |
| 1818 IrBuilder checkBuilder = builder.makeDelimitedBuilder(environment); | 1812 IrBuilder checkBuilder = builder.makeDelimitedBuilder(environment); |
| 1819 ir.Primitive typeMatches = | 1813 ir.Primitive typeMatches = |
| 1820 checkBuilder.buildTypeOperator(exceptionParameter, | 1814 checkBuilder.buildTypeOperator(exceptionParameter, |
| 1821 clause.type, | 1815 clause.type, |
| 1822 isTypeTest: true); | 1816 isTypeTest: true); |
| 1823 checkBuilder.add(new ir.LetCont.many([thenContinuation, | 1817 checkBuilder.add(new ir.LetCont.two(thenContinuation, elseContinuation, |
| 1824 elseContinuation], | |
| 1825 new ir.Branch(new ir.IsTrue(typeMatches), | 1818 new ir.Branch(new ir.IsTrue(typeMatches), |
| 1826 thenContinuation, | 1819 thenContinuation, |
| 1827 elseContinuation))); | 1820 elseContinuation))); |
| 1828 catchBody = checkBuilder._root; | 1821 catchBody = checkBuilder._root; |
| 1829 } | 1822 } |
| 1830 builder.add(catchBody); | 1823 builder.add(catchBody); |
| 1831 | 1824 |
| 1832 return <ir.Parameter>[exceptionParameter, traceParameter]; | 1825 return <ir.Parameter>[exceptionParameter, traceParameter]; |
| 1833 } | 1826 } |
| 1834 | 1827 |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2085 | 2078 |
| 2086 ir.Constant trueConstant = makeBoolConstant(true); | 2079 ir.Constant trueConstant = makeBoolConstant(true); |
| 2087 ir.Constant falseConstant = makeBoolConstant(false); | 2080 ir.Constant falseConstant = makeBoolConstant(false); |
| 2088 | 2081 |
| 2089 thenContinuation.body = new ir.LetPrim(falseConstant) | 2082 thenContinuation.body = new ir.LetPrim(falseConstant) |
| 2090 ..plug(new ir.InvokeContinuation(joinContinuation, [falseConstant])); | 2083 ..plug(new ir.InvokeContinuation(joinContinuation, [falseConstant])); |
| 2091 elseContinuation.body = new ir.LetPrim(trueConstant) | 2084 elseContinuation.body = new ir.LetPrim(trueConstant) |
| 2092 ..plug(new ir.InvokeContinuation(joinContinuation, [trueConstant])); | 2085 ..plug(new ir.InvokeContinuation(joinContinuation, [trueConstant])); |
| 2093 | 2086 |
| 2094 add(new ir.LetCont(joinContinuation, | 2087 add(new ir.LetCont(joinContinuation, |
| 2095 new ir.LetCont.many(<ir.Continuation>[thenContinuation, | 2088 new ir.LetCont.two(thenContinuation, elseContinuation, |
| 2096 elseContinuation], | |
| 2097 new ir.Branch(new ir.IsTrue(condition), | 2089 new ir.Branch(new ir.IsTrue(condition), |
| 2098 thenContinuation, | 2090 thenContinuation, |
| 2099 elseContinuation)))); | 2091 elseContinuation)))); |
| 2100 return resultParameter; | 2092 return resultParameter; |
| 2101 } | 2093 } |
| 2102 | 2094 |
| 2103 /// Create a lazy and/or expression. [leftValue] is the value of the left | 2095 /// Create a lazy and/or expression. [leftValue] is the value of the left |
| 2104 /// operand and [buildRightValue] is called to process the value of the right | 2096 /// operand and [buildRightValue] is called to process the value of the right |
| 2105 /// operand in the context of its own [IrBuilder]. | 2097 /// operand in the context of its own [IrBuilder]. |
| 2106 ir.Primitive buildLogicalOperator( | 2098 ir.Primitive buildLogicalOperator( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2146 rightTrueBuilder.jumpTo(join, rightTrue); | 2138 rightTrueBuilder.jumpTo(join, rightTrue); |
| 2147 rightFalseBuilder.jumpTo(join, rightFalse); | 2139 rightFalseBuilder.jumpTo(join, rightFalse); |
| 2148 ir.Continuation leftTrueContinuation = new ir.Continuation([]); | 2140 ir.Continuation leftTrueContinuation = new ir.Continuation([]); |
| 2149 ir.Continuation leftFalseContinuation = new ir.Continuation([]); | 2141 ir.Continuation leftFalseContinuation = new ir.Continuation([]); |
| 2150 ir.Continuation rightTrueContinuation = new ir.Continuation([]); | 2142 ir.Continuation rightTrueContinuation = new ir.Continuation([]); |
| 2151 ir.Continuation rightFalseContinuation = new ir.Continuation([]); | 2143 ir.Continuation rightFalseContinuation = new ir.Continuation([]); |
| 2152 rightTrueContinuation.body = rightTrueBuilder._root; | 2144 rightTrueContinuation.body = rightTrueBuilder._root; |
| 2153 rightFalseContinuation.body = rightFalseBuilder._root; | 2145 rightFalseContinuation.body = rightFalseBuilder._root; |
| 2154 // The right subexpression has two continuations. | 2146 // The right subexpression has two continuations. |
| 2155 rightBuilder.add( | 2147 rightBuilder.add( |
| 2156 new ir.LetCont.many(<ir.Continuation>[rightTrueContinuation, | 2148 new ir.LetCont.two(rightTrueContinuation, rightFalseContinuation, |
| 2157 rightFalseContinuation], | |
| 2158 new ir.Branch(new ir.IsTrue(rightValue), | 2149 new ir.Branch(new ir.IsTrue(rightValue), |
| 2159 rightTrueContinuation, | 2150 rightTrueContinuation, |
| 2160 rightFalseContinuation))); | 2151 rightFalseContinuation))); |
| 2161 // Depending on the operator, the left subexpression's continuations are | 2152 // Depending on the operator, the left subexpression's continuations are |
| 2162 // either the right subexpression or an invocation of the join-point | 2153 // either the right subexpression or an invocation of the join-point |
| 2163 // continuation. | 2154 // continuation. |
| 2164 if (isLazyOr) { | 2155 if (isLazyOr) { |
| 2165 leftTrueContinuation.body = emptyBuilder._root; | 2156 leftTrueContinuation.body = emptyBuilder._root; |
| 2166 leftFalseContinuation.body = rightBuilder._root; | 2157 leftFalseContinuation.body = rightBuilder._root; |
| 2167 } else { | 2158 } else { |
| 2168 leftTrueContinuation.body = rightBuilder._root; | 2159 leftTrueContinuation.body = rightBuilder._root; |
| 2169 leftFalseContinuation.body = emptyBuilder._root; | 2160 leftFalseContinuation.body = emptyBuilder._root; |
| 2170 } | 2161 } |
| 2171 | 2162 |
| 2172 add(new ir.LetCont(join.continuation, | 2163 add(new ir.LetCont(join.continuation, |
| 2173 new ir.LetCont.many(<ir.Continuation>[leftTrueContinuation, | 2164 new ir.LetCont.two(leftTrueContinuation, leftFalseContinuation, |
| 2174 leftFalseContinuation], | |
| 2175 new ir.Branch(new ir.IsTrue(leftValue), | 2165 new ir.Branch(new ir.IsTrue(leftValue), |
| 2176 leftTrueContinuation, | 2166 leftTrueContinuation, |
| 2177 leftFalseContinuation)))); | 2167 leftFalseContinuation)))); |
| 2178 environment = join.environment; | 2168 environment = join.environment; |
| 2179 return environment.discard(1); | 2169 return environment.discard(1); |
| 2180 } | 2170 } |
| 2181 | 2171 |
| 2182 ir.Primitive buildIdentical(ir.Primitive x, ir.Primitive y) { | 2172 ir.Primitive buildIdentical(ir.Primitive x, ir.Primitive y) { |
| 2183 return addPrimitive(new ir.ApplyBuiltinOperator( | 2173 return addPrimitive(new ir.ApplyBuiltinOperator( |
| 2184 ir.BuiltinOperator.Identical, <ir.Primitive>[x, y])); | 2174 ir.BuiltinOperator.Identical, <ir.Primitive>[x, y])); |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2696 } | 2686 } |
| 2697 | 2687 |
| 2698 class SwitchCaseInfo { | 2688 class SwitchCaseInfo { |
| 2699 final List<ir.Primitive> constants = <ir.Primitive>[]; | 2689 final List<ir.Primitive> constants = <ir.Primitive>[]; |
| 2700 final SubbuildFunction buildBody; | 2690 final SubbuildFunction buildBody; |
| 2701 | 2691 |
| 2702 SwitchCaseInfo(this.buildBody); | 2692 SwitchCaseInfo(this.buildBody); |
| 2703 | 2693 |
| 2704 void addConstant(ir.Primitive constant) => constants.add(constant); | 2694 void addConstant(ir.Primitive constant) => constants.add(constant); |
| 2705 } | 2695 } |
| OLD | NEW |