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

Issue 2662493004: Redo "dart2js: Redo known-type analysis after load-elimination" (Closed)

Created:
3 years, 10 months ago by sra1
Modified:
3 years, 10 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Redo "dart2js: Redo known-type analysis after load-elimination" BUG= Committed: https://github.com/dart-lang/sdk/commit/4867cf9adca793779397e4de068bcddaedba14ff

Patch Set 1 #

Patch Set 2 : remove incorrect assert #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -5 lines) Patch
M pkg/compiler/lib/src/ssa/codegen.dart View 1 1 chunk +0 lines, -5 lines 3 comments Download
M pkg/compiler/lib/src/ssa/optimize.dart View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
sra1
https://codereview.chromium.org/2662493004/diff/20001/pkg/compiler/lib/src/ssa/codegen.dart File pkg/compiler/lib/src/ssa/codegen.dart (left): https://codereview.chromium.org/2662493004/diff/20001/pkg/compiler/lib/src/ssa/codegen.dart#oldcode2853 pkg/compiler/lib/src/ssa/codegen.dart:2853: // sufficient for doing an argument or receiver check. ...
3 years, 10 months ago (2017-02-01 00:59:15 UTC) #3
sra1
Committed patchset #2 (id:20001) manually as 4867cf9adca793779397e4de068bcddaedba14ff (presubmit successful).
3 years, 10 months ago (2017-02-01 00:59:36 UTC) #5
Siggi Cherem (dart-lang)
https://codereview.chromium.org/2662493004/diff/20001/pkg/compiler/lib/src/ssa/codegen.dart File pkg/compiler/lib/src/ssa/codegen.dart (left): https://codereview.chromium.org/2662493004/diff/20001/pkg/compiler/lib/src/ssa/codegen.dart#oldcode2853 pkg/compiler/lib/src/ssa/codegen.dart:2853: // sufficient for doing an argument or receiver check. ...
3 years, 10 months ago (2017-02-01 01:31:48 UTC) #6
sra1
3 years, 10 months ago (2017-02-01 02:15:47 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/2662493004/diff/20001/pkg/compiler/lib/src/ss...
File pkg/compiler/lib/src/ssa/codegen.dart (left):

https://codereview.chromium.org/2662493004/diff/20001/pkg/compiler/lib/src/ss...
pkg/compiler/lib/src/ssa/codegen.dart:2853: // sufficient for doing an argument
or receiver check.
On 2017/02/01 01:31:48, Siggi Cherem (dart-lang) wrote:
> On 2017/02/01 00:59:15, sra1 wrote:
> > I think this is incorrect. The check is Math.floor(x) !== x, which will not
> > accidentally accept numeric strings.
> 
> Could we end up hitting the Math.floor case when the input is `null`? which
will
> say true instead of false? for example if input.isPrimitiveOrNull? 
> 
> I'm not as familiar with this as you are, so feel free to ignore and I'll ask
> you in person later in the week.

It works as intended:

  Math.floor(null) --> 0,           0 !== null
  Math.floor(undefined) --> NaN,  NaN !== undefined

These cases might be a slow path, but only when the program is going to throw an
exception.
`x is int` sometimes generates an additional `typeof x === "number"` to avoid
this potential slowness.

Powered by Google App Engine
This is Rietveld 408576698