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

Issue 806103003: cps-ir: Add support for intercepted calls. (Closed)

Created:
6 years ago by karlklose
Modified:
6 years ago
Reviewers:
sigurdm
CC:
reviews_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

cps-ir: Add support for intercepted calls. Add an Interceptor IR node that encapsulates the receiver of a method call that (possibly) must be intercepted and replace the receiver of the call by the new node. Currently we do no optimizations of the interceptor's intercepted class field based on type inference. R=sigurdm@google.com Committed: https://code.google.com/p/dart/source/detail?r=42385 Committed: https://code.google.com/p/dart/source/detail?r=42391

Patch Set 1 #

Patch Set 2 : Disable debug print. #

Total comments: 8

Patch Set 3 : Add extra argument in unsugar step. #

Patch Set 4 : Add the test. #

Patch Set 5 : Use more glue. #

Patch Set 6 : Insert newline. #

Patch Set 7 : Correct base diff. #

Patch Set 8 : Bailout on special selectors. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+185 lines, -43 lines) Patch
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 1 2 6 chunks +31 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 2 3 4 5 6 7 7 chunks +12 lines, -12 lines 2 comments Download
M pkg/compiler/lib/src/dart_backend/backend.dart View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/dart_backend/dart_backend.dart View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/codegen.dart View 3 4 5 6 2 chunks +3 lines, -10 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/glue.dart View 1 2 3 4 5 2 chunks +14 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/task.dart View 1 2 3 4 4 chunks +20 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/unsugar.dart View 1 2 3 4 5 6 7 3 chunks +37 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart View 1 2 3 4 7 chunks +23 lines, -7 lines 0 comments Download
A tests/compiler/dart2js/js_backend_cps_ir_interceptors.dart View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_test.dart View 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 10 (1 generated)
karlklose
6 years ago (2014-12-16 10:03:25 UTC) #1
sigurdm
I just saw you moved the creation of the extra argument. I left the comment ...
6 years ago (2014-12-16 11:44:56 UTC) #3
karlklose
Thanks, Sigurd. https://codereview.chromium.org/806103003/diff/40001/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart File pkg/compiler/lib/src/js_backend/codegen/unsugar.dart (right): https://codereview.chromium.org/806103003/diff/40001/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart#newcode53 pkg/compiler/lib/src/js_backend/codegen/unsugar.dart:53: (Reference<Primitive> r) => r.definition).toList())); On 2014/12/16 11:44:55, ...
6 years ago (2014-12-16 12:04:03 UTC) #4
sigurdm
lgtm
6 years ago (2014-12-16 12:16:14 UTC) #5
karlklose
Committed patchset #7 (id:140001) manually as 42385 (presubmit successful).
6 years ago (2014-12-16 12:29:18 UTC) #6
karlklose
The unsugaring to JS semantics has problems with intercepted getters/setters/..., since there are too many ...
6 years ago (2014-12-16 13:23:55 UTC) #7
sigurdm
lgtm https://codereview.chromium.org/806103003/diff/160001/pkg/compiler/lib/src/cps_ir/type_propagation.dart File pkg/compiler/lib/src/cps_ir/type_propagation.dart (right): https://codereview.chromium.org/806103003/diff/160001/pkg/compiler/lib/src/cps_ir/type_propagation.dart#newcode654 pkg/compiler/lib/src/cps_ir/type_propagation.dart:654: types.DartType constantType = constant.getType(compiler.coreTypes); Actually getType should probably ...
6 years ago (2014-12-16 13:34:19 UTC) #8
karlklose
https://codereview.chromium.org/806103003/diff/160001/pkg/compiler/lib/src/cps_ir/type_propagation.dart File pkg/compiler/lib/src/cps_ir/type_propagation.dart (right): https://codereview.chromium.org/806103003/diff/160001/pkg/compiler/lib/src/cps_ir/type_propagation.dart#newcode654 pkg/compiler/lib/src/cps_ir/type_propagation.dart:654: types.DartType constantType = constant.getType(compiler.coreTypes); On 2014/12/16 13:34:19, sigurdm wrote: ...
6 years ago (2014-12-16 13:48:25 UTC) #9
karlklose
6 years ago (2014-12-16 13:48:36 UTC) #10
Message was sent while issue was closed.
Committed patchset #8 (id:160001) manually as 42391 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698