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

Issue 1761903002: dart2js cps: Keep interceptors in a separate field. (Closed)

Created:
4 years, 9 months ago by asgerf
Modified:
4 years, 9 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js cps: Keep interceptors in a separate field. Previously, the "receiver" of an InvokeMethod would be either be the "Dart receiver" or an interceptor, depending on the calling convention. Likewise, the argument list was possibly prefixed by the Dart receiver. Now, the receiver is always the Dart receiver, and the arguments are the Dart arguments and the interceptor is in a field specific for the interceptor. The old way was very inconvenient in the CPS, it has led to several bugs already, and it's just unintuitive that "receiver" can mean two very different things. FunctionDefinition no longer has a thisParameter, but instead a receiverParameter and an interceptorParameter. These are named to correspond exactly with the names used in InvokeMethod. The concept of 'this' has been removed from the CPS IR to hopefully avoid confusion between 'Dart this' and 'JS this'. There is now only receiver and interceptor, and which one corresponds to the JS 'this' is irrelevant. The Tree IR has not changed. The Tree IR builder is thus responsible for translating the calling convention into the JS receiver and argument list. The Tree needs to know the order in which the operands are evaluated, so it makes sense to keep this form in the Tree. R=sra@google.com Committed: https://github.com/dart-lang/sdk/commit/7772152fa121ac289054ea42370e2ff7887d85a6

Patch Set 1 #

Total comments: 2

Patch Set 2 : Clean up, but output is no longer exactly the same #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+376 lines, -313 lines) Patch
M pkg/compiler/lib/src/cps_ir/backward_null_check_remover.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/cps_ir/bounds_checker.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_fragment.dart View 2 chunks +12 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_integrity.dart View 2 chunks +20 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 13 chunks +72 lines, -54 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart View 3 chunks +16 lines, -15 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart View 1 chunk +6 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/inline.dart View 1 2 12 chunks +35 lines, -44 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/insert_refinements.dart View 4 chunks +5 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/optimize_interceptors.dart View 5 chunks +5 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/path_based_optimizer.dart View 1 chunk +5 lines, -9 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 2 34 chunks +66 lines, -76 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/glue.dart View 1 chunk +6 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/task.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/unsugar.dart View 5 chunks +37 lines, -40 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart View 6 chunks +87 lines, -48 lines 0 comments Download

Messages

Total messages: 7 (4 generated)
asgerf
https://codereview.chromium.org/1761903002/diff/1/pkg/compiler/lib/src/cps_ir/inline.dart File pkg/compiler/lib/src/cps_ir/inline.dart (right): https://codereview.chromium.org/1761903002/diff/1/pkg/compiler/lib/src/cps_ir/inline.dart#newcode234 pkg/compiler/lib/src/cps_ir/inline.dart:234: // for itself here. Mimic the same cost to ...
4 years, 9 months ago (2016-03-03 15:23:48 UTC) #3
sra1
lgtm
4 years, 9 months ago (2016-03-03 19:11:07 UTC) #5
asgerf
4 years, 9 months ago (2016-03-08 12:43:27 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
7772152fa121ac289054ea42370e2ff7887d85a6 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698