Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/codegen.dart |
| diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart |
| index f4223405bb4df74c5eb43bc6a0f00150a6d29bea..27fc2e879e9cda61e0f55d0e6d80615f142c566d 100644 |
| --- a/pkg/compiler/lib/src/ssa/codegen.dart |
| +++ b/pkg/compiler/lib/src/ssa/codegen.dart |
| @@ -2849,11 +2849,6 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| void visitTypeConversion(HTypeConversion node) { |
| if (node.isArgumentTypeCheck || node.isReceiverTypeCheck) { |
| - // An int check if the input is not int or null, is not |
| - // sufficient for doing an argument or receiver check. |
|
sra1
2017/02/01 00:59:15
I think this is incorrect. The check is Math.floor
Siggi Cherem (dart-lang)
2017/02/01 01:31:48
Could we end up hitting the Math.floor case when t
sra1
2017/02/01 02:15:46
It works as intended:
Math.floor(null) --> 0,
|
| - assert(compiler.options.trustTypeAnnotations || |
| - !node.checkedType.containsOnlyInt(closedWorld) || |
| - node.checkedInput.isIntegerOrNull(closedWorld)); |
| js.Expression test = generateReceiverOrArgumentTypeTest( |
| node.checkedInput, node.checkedType); |
| js.Block oldContainer = currentContainer; |