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

Issue 861713002: Handle super-method invocations in CPS->JS backend. (Closed)

Created:
5 years, 11 months ago by asgerf
Modified:
5 years, 11 months ago
Reviewers:
karlklose, sigurdm
CC:
reviews_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Handle super-method invocations in CPS->JS backend. InvokeSuperMethod has been replaced by InvokeMethodDirectly. This instruction works like InvokeMethod, except it has an explicit target element that it always invokes, regardless of overriding. The new instruction is easier to handle in the JS backend, it is more amenable to inlining, and it should also be useful for calling backend-specific methods, such as constructor bodies. When targeting Dart, we translate it back to a 'super' at the end, because the instruction is never used for any other purpose with that backend. R=karlklose@google.com, sigurdm@google.com Committed: https://code.google.com/p/dart/source/detail?r=43011

Patch Set 1 #

Total comments: 8

Patch Set 2 : Register declaration elements in codegen #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+292 lines, -92 lines) Patch
M pkg/compiler/lib/src/compiler.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart View 4 chunks +43 lines, -20 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_builder_visitor.dart View 3 chunks +5 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 6 chunks +36 lines, -14 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart View 1 chunk +3 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart View 1 chunk +3 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart View 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart View 1 chunk +6 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/codegen.dart View 1 2 chunks +8 lines, -3 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/unsugar.dart View 3 chunks +28 lines, -16 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart View 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart View 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart View 1 chunk +4 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart View 4 chunks +12 lines, -7 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart View 1 chunk +4 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/use_unused_api.dart View 1 chunk +1 line, -2 lines 0 comments Download
M tests/compiler/dart2js/backend_dart/sexpr_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart View 4 chunks +11 lines, -7 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir.dart View 3 chunks +32 lines, -4 lines 0 comments Download
A tests/compiler/dart2js/js_backend_cps_ir_supercall_test.dart View 1 chunk +78 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
asgerf
5 years, 11 months ago (2015-01-20 09:43:03 UTC) #2
sigurdm
lgtm https://codereview.chromium.org/861713002/diff/1/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart File pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart (right): https://codereview.chromium.org/861713002/diff/1/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart#newcode785 pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart:785: // super receiver. Perhaps put asserts here that ...
5 years, 11 months ago (2015-01-20 10:54:25 UTC) #3
asgerf
https://codereview.chromium.org/861713002/diff/1/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart File pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart (right): https://codereview.chromium.org/861713002/diff/1/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart#newcode785 pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart:785: // super receiver. On 2015/01/20 10:54:25, sigurdm wrote: > ...
5 years, 11 months ago (2015-01-20 13:07:50 UTC) #4
karlklose
LGTM.
5 years, 11 months ago (2015-01-20 14:25:42 UTC) #5
asgerf
5 years, 11 months ago (2015-01-20 14:33:37 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as 43011 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698