Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc8c8050

Browse files
committed
MarkRuntimeLong.toDouble as fully inline.
Its implementation is shorter than many of the methods we alreadyinline, like additions and multiplications. We do pay a littlecode size cost for this change.This will be particularly useful for the following commit, whichwill rely on folding to happen within `toDouble`, once inlined atcall site.
1 parent5fe402b commitc8c8050

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

‎linker-private-library/src/main/scala/org/scalajs/linker/runtime/RuntimeLong.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,9 @@ object RuntimeLong {
695695
a.lo
696696

697697
@inline
698-
deftoDouble(a:RuntimeLong):Double=
699-
toDouble(a.lo, a.hi)
700-
701-
privatedeftoDouble(lo:Int,hi:Int):Double= {
698+
deftoDouble(a:RuntimeLong):Double= {
699+
vallo= a.lo
700+
valhi= a.hi
702701
if (hi<0) {
703702
// We do asUint() on the hi part specifically for MinValue
704703
valneg= inline_negate(lo, hi)

‎project/Build.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,17 +2060,17 @@ object Build {
20602060
))
20612061
}else {
20622062
Some(ExpectedSizes(
2063-
fastLink=425000 to426000,
2064-
fullLink=282000 to283000,
2065-
fastLinkGz=60000 to61000,
2063+
fastLink=426000 to427000,
2064+
fullLink=283000 to284000,
2065+
fastLinkGz=61000 to62000,
20662066
fullLinkGz=43000 to44000,
20672067
))
20682068
}
20692069

20702070
case `default213Version`=>
20712071
if (!useMinifySizes) {
20722072
Some(ExpectedSizes(
2073-
fastLink=442000 to443000,
2073+
fastLink=443000 to444000,
20742074
fullLink=90000 to91000,
20752075
fastLinkGz=57000 to58000,
20762076
fullLinkGz=24000 to25000,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp