Skip to content

Commit 55078c0

Browse files
nshahancommit-bot@chromium.org
authored andcommitted
[dartdevc] Fix emitting double constants from the SDK
Change-Id: I38c2f1fe6deca63c3a689503862c3a620017e091 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108880 Reviewed-by: Vijay Menon <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]>
1 parent 1e4b799 commit 55078c0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/dev_compiler/lib/src/kernel/compiler.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5295,6 +5295,15 @@ class ProgramCompiler extends Object
52955295
return js.number(intValue);
52965296
}
52975297
}
5298+
if (value.isInfinite) {
5299+
if (value.isNegative) {
5300+
return js.call('-1 / 0');
5301+
}
5302+
return js.call('1 / 0');
5303+
}
5304+
if (value.isNaN) {
5305+
return js.call('0 / 0');
5306+
}
52985307
return js.number(value);
52995308
}
53005309

0 commit comments

Comments
 (0)