Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Issue 2974633003: Option to truncate integers to 64 bits, part 1 (core VM changes) (Closed)

Created:
3 years, 5 months ago by alexmarkov
Modified:
3 years, 5 months ago
Reviewers:
zra, regis, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Option to truncate integers to 64 bits, part 1 (core VM changes) This changeset revises --limit-ints-to-64-bits option to change range of integers from unlimited to int64. On overflow, integer arithmetic operations silently wrap around and discard extra bits. No Bigints are allocated in case of overflow. This changeset is the 1st part in the series of changes, it revises the implementation of integer arithmetic operations. More changes will follow. R=regis@google.com, zra@google.com Issue: https://github.com/dart-lang/sdk/issues/30103 Committed: https://github.com/dart-lang/sdk/commit/7a20b6b8d89ec22b9e036d17abba54ad52ef451c

Patch Set 1 #

Total comments: 30

Patch Set 2 : Review fixes #

Patch Set 3 : Corrections in comments #

Total comments: 12

Patch Set 4 : Merged 2 flags into 1 (--limit-ints-to-64-bits) #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+376 lines, -64 lines) Patch
M runtime/lib/double.cc View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M runtime/lib/integers.cc View 1 2 3 3 chunks +25 lines, -24 lines 0 comments Download
M runtime/platform/globals.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/platform/utils.h View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
A runtime/tests/vm/dart/truncating_ints_test.dart View 1 2 3 1 chunk +184 lines, -0 lines 0 comments Download
M runtime/vm/flag_list.h View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 chunks +26 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 15 chunks +80 lines, -32 lines 2 comments Download

Messages

Total messages: 16 (3 generated)
alexmarkov
3 years, 5 months ago (2017-07-07 18:32:09 UTC) #2
regis
https://codereview.chromium.org/2974633003/diff/1/runtime/lib/double.cc File runtime/lib/double.cc (right): https://codereview.chromium.org/2974633003/diff/1/runtime/lib/double.cc#newcode84 runtime/lib/double.cc:84: // in truncating mode. Something to discuss with the ...
3 years, 5 months ago (2017-07-07 20:10:30 UTC) #3
alexmarkov
https://codereview.chromium.org/2974633003/diff/1/runtime/lib/double.cc File runtime/lib/double.cc (right): https://codereview.chromium.org/2974633003/diff/1/runtime/lib/double.cc#newcode84 runtime/lib/double.cc:84: // in truncating mode. On 2017/07/07 20:10:29, regis wrote: ...
3 years, 5 months ago (2017-07-07 20:46:39 UTC) #4
regis
lgtm But maybe Siva and/or Zach should have a look too. https://codereview.chromium.org/2974633003/diff/1/runtime/platform/utils.h File runtime/platform/utils.h (right): ...
3 years, 5 months ago (2017-07-07 21:46:53 UTC) #5
alexmarkov
https://codereview.chromium.org/2974633003/diff/1/runtime/platform/utils.h File runtime/platform/utils.h (right): https://codereview.chromium.org/2974633003/diff/1/runtime/platform/utils.h#newcode190 runtime/platform/utils.h:190: // Avoid UB by doing arithmetic in the unsigned ...
3 years, 5 months ago (2017-07-07 22:28:44 UTC) #6
regis
https://codereview.chromium.org/2974633003/diff/1/runtime/platform/utils.h File runtime/platform/utils.h (right): https://codereview.chromium.org/2974633003/diff/1/runtime/platform/utils.h#newcode190 runtime/platform/utils.h:190: // Avoid UB by doing arithmetic in the unsigned ...
3 years, 5 months ago (2017-07-07 22:38:25 UTC) #7
siva
https://codereview.chromium.org/2974633003/diff/40001/runtime/lib/double.cc File runtime/lib/double.cc (right): https://codereview.chromium.org/2974633003/diff/40001/runtime/lib/double.cc#newcode120 runtime/lib/double.cc:120: } Why not add your new code here if ...
3 years, 5 months ago (2017-07-07 23:11:21 UTC) #8
alexmarkov
https://codereview.chromium.org/2974633003/diff/1/runtime/platform/utils.h File runtime/platform/utils.h (right): https://codereview.chromium.org/2974633003/diff/1/runtime/platform/utils.h#newcode190 runtime/platform/utils.h:190: // Avoid UB by doing arithmetic in the unsigned ...
3 years, 5 months ago (2017-07-07 23:17:58 UTC) #9
regis
On 2017/07/07 23:17:58, alexmarkov wrote: > https://codereview.chromium.org/2974633003/diff/1/runtime/platform/utils.h > File runtime/platform/utils.h (right): > > https://codereview.chromium.org/2974633003/diff/1/runtime/platform/utils.h#newcode190 > ...
3 years, 5 months ago (2017-07-07 23:24:56 UTC) #10
alexmarkov
https://codereview.chromium.org/2974633003/diff/40001/runtime/lib/double.cc File runtime/lib/double.cc (right): https://codereview.chromium.org/2974633003/diff/40001/runtime/lib/double.cc#newcode120 runtime/lib/double.cc:120: } On 2017/07/07 23:11:20, siva wrote: > Why not ...
3 years, 5 months ago (2017-07-10 16:58:13 UTC) #12
zra
lgtm https://codereview.chromium.org/2974633003/diff/60001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/2974633003/diff/60001/runtime/vm/object.cc#newcode19755 runtime/vm/object.cc:19755: // TODO(alexmarkov): Throw error or assert in --limit-ints-to-64-bits ...
3 years, 5 months ago (2017-07-10 21:54:03 UTC) #13
alexmarkov
Committed patchset #4 (id:60001) manually as 7a20b6b8d89ec22b9e036d17abba54ad52ef451c (presubmit successful).
3 years, 5 months ago (2017-07-10 22:16:47 UTC) #15
alexmarkov
3 years, 5 months ago (2017-07-10 22:21:54 UTC) #16
Message was sent while issue was closed.
https://codereview.chromium.org/2974633003/diff/60001/runtime/vm/object.cc
File runtime/vm/object.cc (right):

https://codereview.chromium.org/2974633003/diff/60001/runtime/vm/object.cc#ne...
runtime/vm/object.cc:19755: // TODO(alexmarkov): Throw error or assert in
--limit-ints-to-64-bits mode.
On 2017/07/10 21:54:03, zra wrote:
> ... until there's something in the language spec or libraries that defines a
> legal way to allocate them.

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698