Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#186] Inlining for Word8 arithmetic operations is broken

Date:
2017-09-21 18:49
Priority:
3
State:
Open
Submitted by:
Bug Submitter (webuser)
Assigned to:
John Reppy (jhr)
Machine Architecture:
None
Operating System:
Generic Unix
Component:
Compiler
Resolution:
Accepted As Bug
Severity:
Minor
OS Version:
SML/NJ Version:
110.81
Keywords:
URL:
Transcript (of reproduction):
[After convert ...] v12(v25[C],v17[PR2]) = v28(v29[PV]) = v28("bogus") v24(v30[PV]) = v28("bogus") v17.0 -> v18[F] v1(v26[C],v5[I]) = v18(v26,v5,(I)1) {v1} -> v16 v25(v16)
Source (for reproduction):
(* to demonstrate *) Control.CG.printit := true; fun f (x : Word8.word) = x + 0w1;
Summary:
Inlining for Word8 arithmetic operations is broken

Detailed description
Word8.+, Word8.-, Word8.*, and Word8.~ are not inline expanded.

Additional comments:
The problem is the w8adapt function in
base/system/smlnj/init/pervasive.sml.

To fix, the w8adapt function needs to be merged into the
actual primitive implementations.

Submitted via web form by John Reppy <jhr@cs.uchicago.edu>

Comments:

No Comments Have Been Posted

Attached Files:

Changes

Field Old Value Date By
assigned_tonone2017-09-21 18:50jhr
detailsWord8.+, Word8.-, Word8.*, and Word8.~ are not inline expanded. Additional comments: The problem is the w8adapt function in base/system/smlnj/init/pervasive.sml. To fix, the w8adapt function needs to be merged into the actual primitive implementations. Submitted via web form by John Reppy <jhr@cs.uchicago.edu> 2017-09-21 18:50jhr
ResolutionNone2017-09-21 18:50jhr
Transcript (of reproduction)[After convert ...] v12(v25[C],v17[PR2]) = v28(v29[PV]) = v28("bogus") v24(v30[PV]) = v28("bogus") v17.0 -> v18[F] v1(v26[C],v5[I]) = v18(v26,v5,(I)1) {v1} -> v16 v25(v16) 2017-09-21 18:50jhr
Source (for reproduction)(* to demonstrate *) Control.CG.printit := true; fun f (x : Word8.word) = x + 0w1; 2017-09-21 18:50jhr