[squeak-dev] The Inbox: System-dtl.1118.mcz

Chris Muller asqueaker at gmail.com
Tue Nov 12 03:06:53 UTC 2019


Just a couple of picky readability comments:     :)

  - IMO, the last line wrapped in an ifFalse: would allow removing three
returns for one single return at the top of the method, allowing an easier
hierarchical representation of the logic.
  - Comparing to 1000.0 instead of 1000 would provide a little better
contextual readability.

Best,
  Chris



On Sat, Nov 9, 2019 at 1:13 PM <commits at source.squeak.org> wrote:

> David T. Lewis uploaded a new version of System to project The Inbox:
> http://source.squeak.org/inbox/System-dtl.1118.mcz
>
> ==================== Summary ====================
>
> Name: System-dtl.1118
> Author: dtl
> Time: 9 November 2019, 2:13:04.993358 pm
> UUID: 49b4ee31-b57f-4132-8cda-e13c2414f861
> Ancestors: System-mt.1117
>
> When reporting VM parameters, enable formatting in the case of a parameter
> value that is represented as a Float rather than an Integer. This may
> happen if a VM parameter is defined in units of milliseconds but internally
> measured to microsecond precision by the VM, in which case the value may be
> returned as a Float in order to retain full precision.
> SmalltalkImage>>formatVMParameter: handles the formatting for integer and
> non-integer values.
>
> =============== Diff against System-mt.1117 ===============
>
> Item was added:
> + ----- Method: SmalltalkImage>>formatVMParameter: (in category 'vm
> statistics') -----
> + formatVMParameter: aNumber
> +
> +       aNumber isFloat ifTrue: [
> +               aNumber < 1000
> +                       ifTrue: [^ aNumber printShowingMaxDecimalPlaces: 5
> ]
> +                       ifFalse: [^ aNumber rounded asStringWithCommas]].
> +       ^ aNumber asInteger asStringWithCommas.!
>
> Item was changed:
>   ----- Method: SmalltalkImage>>vmStatisticsReportOn: (in category 'vm
> statistics') -----
> (excessive size, no diff calculated)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191111/2b2d1d2d/attachment.html>


More information about the Squeak-dev mailing list