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

Issue 1031633003: Almost-constant interceptors (Closed)

Created:
5 years, 9 months ago by sra1
Modified:
5 years, 8 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org, herhut
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Avoid getInterceptor calls in cases were the interceptor would be constant if it were not `null`. Example: gap = J.getInterceptor$x(style).get$columnGap(style); --> gap = (style && C.CssStyleDeclaration_methods).get$columnGap(style); R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=44853

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -38 lines) Patch
M pkg/compiler/lib/src/ssa/codegen.dart View 1 1 chunk +19 lines, -8 lines 0 comments Download
M pkg/compiler/lib/src/ssa/interceptor_simplifier.dart View 1 2 3 chunks +65 lines, -30 lines 0 comments Download
M pkg/compiler/lib/src/ssa/nodes.dart View 1 1 chunk +19 lines, -0 lines 0 comments Download
A tests/compiler/dart2js/interceptor_almost_constant_test.dart View 1 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
sra1
This is work in progress as I investigate getInterceptor calls.
5 years, 9 months ago (2015-03-25 05:27:56 UTC) #2
floitsch
LG so far. https://chromiumcodereview.appspot.com/1031633003/diff/1/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart File pkg/compiler/lib/src/ssa/interceptor_simplifier.dart (right): https://chromiumcodereview.appspot.com/1031633003/diff/1/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart#newcode295 pkg/compiler/lib/src/ssa/interceptor_simplifier.dart:295: if (!(receiver.canBePrimitiveNumber(compiler) || Why this `if`? ...
5 years, 9 months ago (2015-03-26 20:26:45 UTC) #3
sra1
PTAL https://chromiumcodereview.appspot.com/1031633003/diff/1/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart File pkg/compiler/lib/src/ssa/interceptor_simplifier.dart (right): https://chromiumcodereview.appspot.com/1031633003/diff/1/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart#newcode295 pkg/compiler/lib/src/ssa/interceptor_simplifier.dart:295: if (!(receiver.canBePrimitiveNumber(compiler) || On 2015/03/26 20:26:45, floitsch wrote: ...
5 years, 8 months ago (2015-04-01 23:06:59 UTC) #5
floitsch
LGTM. https://chromiumcodereview.appspot.com/1031633003/diff/40001/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart File pkg/compiler/lib/src/ssa/interceptor_simplifier.dart (right): https://chromiumcodereview.appspot.com/1031633003/diff/40001/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart#newcode295 pkg/compiler/lib/src/ssa/interceptor_simplifier.dart:295: // Can only use `(receiver && C)` if ...
5 years, 8 months ago (2015-04-01 23:14:54 UTC) #6
sra1
Committed patchset #3 (id:60001) manually as 44853 (presubmit successful).
5 years, 8 months ago (2015-04-02 00:59:34 UTC) #7
sra1
5 years, 8 months ago (2015-04-02 01:00:07 UTC) #8
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/1031633003/diff/40001/pkg/compiler/lib...
File pkg/compiler/lib/src/ssa/interceptor_simplifier.dart (right):

https://chromiumcodereview.appspot.com/1031633003/diff/40001/pkg/compiler/lib...
pkg/compiler/lib/src/ssa/interceptor_simplifier.dart:295: // Can only use
`(receiver && C)` if receiver is null or truthy.
On 2015/04/01 23:14:54, floitsch wrote:
> is either null or truthy.

Done.

https://chromiumcodereview.appspot.com/1031633003/diff/40001/pkg/compiler/lib...
pkg/compiler/lib/src/ssa/interceptor_simplifier.dart:302: if (node.inputs.length
== 1) {
On 2015/04/01 23:14:54, floitsch wrote:
> when can it have more than one? is it `node.isConditionalConstantInterceptor`
?
> Maybe check it earlier? (it seems like a cheap check).

Done.

Powered by Google App Engine
This is Rietveld 408576698