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

Issue 2974953002: Revise assertions and fix bug in the implementation of shifts (Closed)

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

Description

Revise assertions and fix bug in the implementation of shifts Previously failing assertions in the implementations of ShiftMintOpInstr::EmitNativeCode for various architectures are revised: * Incorrect assertion !has_shift_count_check() is removed * Assertion for shift >= 0 is restored * Assertion for shift < 64 on X64 is moved to kSHL branch Also, misleading ShiftMintopInstr::has_shift_count_check() method is replaced with method IsShiftCountInRange() with opposite meaning. On X64, bug in the implementation of right shifts with constant shift amount >= 64 is fixed. Corresponding test case is added. R=regis@google.com, zra@google.com Committed: https://github.com/dart-lang/sdk/commit/97f19892d4264f9102673d08d5f1cc9847a77550

Patch Set 1 #

Total comments: 4

Patch Set 2 : Outdated comment corrected #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -21 lines) Patch
M runtime/vm/intermediate_language.h View 2 chunks +5 lines, -2 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/intermediate_language_arm.cc View 2 chunks +2 lines, -4 lines 2 comments Download
M runtime/vm/intermediate_language_ia32.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 chunks +7 lines, -8 lines 0 comments Download
M tests/language/bit_operations_test.dart View 3 chunks +19 lines, -1 line 0 comments Download

Messages

Total messages: 10 (3 generated)
alexmarkov
3 years, 5 months ago (2017-07-11 18:22:33 UTC) #2
regis
lgtm https://codereview.chromium.org/2974953002/diff/1/runtime/vm/intermediate_language_x64.cc File runtime/vm/intermediate_language_x64.cc (right): https://codereview.chromium.org/2974953002/diff/1/runtime/vm/intermediate_language_x64.cc#newcode6067 runtime/vm/intermediate_language_x64.cc:6067: if (CanDeoptimize()) { When specifying --limit-ints-to-64-bits, we probably ...
3 years, 5 months ago (2017-07-11 18:45:55 UTC) #3
alexmarkov
https://codereview.chromium.org/2974953002/diff/1/runtime/vm/intermediate_language_x64.cc File runtime/vm/intermediate_language_x64.cc (right): https://codereview.chromium.org/2974953002/diff/1/runtime/vm/intermediate_language_x64.cc#newcode6067 runtime/vm/intermediate_language_x64.cc:6067: if (CanDeoptimize()) { On 2017/07/11 18:45:55, regis wrote: > ...
3 years, 5 months ago (2017-07-11 19:39:24 UTC) #4
zra
lgtm
3 years, 5 months ago (2017-07-11 19:44:27 UTC) #5
alexmarkov
Committed patchset #2 (id:20001) manually as 97f19892d4264f9102673d08d5f1cc9847a77550 (presubmit successful).
3 years, 5 months ago (2017-07-11 20:15:06 UTC) #7
Vyacheslav Egorov (Google)
drive-by https://codereview.chromium.org/2974953002/diff/20001/runtime/vm/intermediate_language_arm.cc File runtime/vm/intermediate_language_arm.cc (right): https://codereview.chromium.org/2974953002/diff/20001/runtime/vm/intermediate_language_arm.cc#newcode6548 runtime/vm/intermediate_language_arm.cc:6548: reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1; this should better be Smi::Cast().Value() ...
3 years, 5 months ago (2017-07-12 09:44:48 UTC) #9
alexmarkov
3 years, 5 months ago (2017-07-12 16:47:36 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/2974953002/diff/20001/runtime/vm/intermediate...
File runtime/vm/intermediate_language_arm.cc (right):

https://codereview.chromium.org/2974953002/diff/20001/runtime/vm/intermediate...
runtime/vm/intermediate_language_arm.cc:6548:
reinterpret_cast<int32_t>(locs()->in(1).constant().raw()) >> 1;
On 2017/07/12 09:44:48, Vyacheslav Egorov (Google) wrote:
> this should better be
> 
> Smi::Cast().Value()
> 
> instead of such manual untagging. 

Done, in the follow-up CL https://codereview.chromium.org/2975073002/

Powered by Google App Engine
This is Rietveld 408576698