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

Issue 10624003: Relax the type requirements for using the builtin bitops. (Closed)

Created:
8 years, 6 months ago by Mads Ager (google)
Modified:
8 years, 6 months ago
Reviewers:
kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Relax the type requirements for using the builtin bitops. Numbers is enough it does not have to be integers. R=kasperl@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=8967

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comment. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -2 lines) Patch
M lib/compiler/implementation/ssa/nodes.dart View 1 1 chunk +0 lines, -2 lines 3 comments Download

Messages

Total messages: 5 (0 generated)
Mads Ager (google)
8 years, 6 months ago (2012-06-21 08:12:33 UTC) #1
kasperl
LGTM. https://chromiumcodereview.appspot.com/10624003/diff/1/lib/compiler/implementation/ssa/nodes.dart File lib/compiler/implementation/ssa/nodes.dart (right): https://chromiumcodereview.appspot.com/10624003/diff/1/lib/compiler/implementation/ssa/nodes.dart#newcode1527 lib/compiler/implementation/ssa/nodes.dart:1527: bool get builtin() => left.isNumber() && right.isNumber(); Can ...
8 years, 6 months ago (2012-06-21 08:58:29 UTC) #2
Mads Ager (google)
https://chromiumcodereview.appspot.com/10624003/diff/1/lib/compiler/implementation/ssa/nodes.dart File lib/compiler/implementation/ssa/nodes.dart (right): https://chromiumcodereview.appspot.com/10624003/diff/1/lib/compiler/implementation/ssa/nodes.dart#newcode1527 lib/compiler/implementation/ssa/nodes.dart:1527: bool get builtin() => left.isNumber() && right.isNumber(); On 2012/06/21 ...
8 years, 6 months ago (2012-06-21 10:25:31 UTC) #3
kasperl
Follow-up questions: https://chromiumcodereview.appspot.com/10624003/diff/4001/lib/compiler/implementation/ssa/nodes.dart File lib/compiler/implementation/ssa/nodes.dart (right): https://chromiumcodereview.appspot.com/10624003/diff/4001/lib/compiler/implementation/ssa/nodes.dart#newcode1384 lib/compiler/implementation/ssa/nodes.dart:1384: if (left.isInteger() && right.isInteger()) return left.propagatedType; Maybe ...
8 years, 6 months ago (2012-06-22 04:54:36 UTC) #4
Mads Ager (google)
8 years, 6 months ago (2012-06-22 09:02:32 UTC) #5
On 2012/06/22 04:54:36, kasperl wrote:
> Follow-up questions:
> 
>
https://chromiumcodereview.appspot.com/10624003/diff/4001/lib/compiler/implem...
> File lib/compiler/implementation/ssa/nodes.dart (right):
> 
>
https://chromiumcodereview.appspot.com/10624003/diff/4001/lib/compiler/implem...
> lib/compiler/implementation/ssa/nodes.dart:1384: if (left.isInteger() &&
> right.isInteger()) return left.propagatedType;
> Maybe replace left.propagatedType with HType.INTEGER here?
> 
>
https://chromiumcodereview.appspot.com/10624003/diff/4001/lib/compiler/implem...
> lib/compiler/implementation/ssa/nodes.dart:1561: if (!left.isInteger() ||
> !right.isConstantInteger()) return false;
> Could this be !left.isNumber() now?
> 
>
https://chromiumcodereview.appspot.com/10624003/diff/4001/lib/compiler/implem...
> lib/compiler/implementation/ssa/nodes.dart:1675: bool get builtin() =>
> operand.isInteger();
> Could we remove this and rely on the implementation in HInvokeUnary that
checks
> for number?

As far as I can tell the answer is yes to all three. Running tests now, will
upload as separate change. Thanks Kasper.

Powered by Google App Engine
This is Rietveld 408576698