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

Issue 1142293002: Use dart.tearoff helper at tearoff sites (Closed)

Created:
5 years, 7 months ago by Leaf
Modified:
5 years, 7 months ago
Reviewers:
vsm, Jennifer Messerly
CC:
dev-compiler+reviews_dartlang.org
Base URL:
git@github.com:dart-lang/dev_compiler.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Use dart.tearoff helper at tearoff sites. When we tear off a method, replace the obj.foo.bind(obj) pattern with dart.tearoff(obj, 'foo'), and the dart.bind(exp, 'foo') pattern with dart.tearoff(exp, 'foo'). This helper does both the bind and attaches rtti. This CL also stops binding of static methods when they are town off, since I think this is unnecessary. BUG= R=vsm@google.com Committed: https://github.com/dart-lang/dev_compiler/commit/3f47a80af77a37420e5e5907685a2497cb23c996

Patch Set 1 #

Patch Set 2 : Clean up conditional #

Total comments: 7

Patch Set 3 : Use dart.bind instead of dart.tearoff #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -76 lines) Patch
M lib/runtime/dart/_internal.js View 1 chunk +1 line, -1 line 0 comments Download
M lib/runtime/dart/_isolate_helper.js View 1 2 5 chunks +6 lines, -6 lines 0 comments Download
M lib/runtime/dart/_js_helper.js View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M lib/runtime/dart/async.js View 1 2 30 chunks +33 lines, -33 lines 0 comments Download
M lib/runtime/dart/collection.js View 3 chunks +3 lines, -3 lines 0 comments Download
M lib/runtime/dart/convert.js View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M lib/runtime/dart/core.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lib/runtime/dart_runtime.js View 1 2 3 chunks +3 lines, -14 lines 0 comments Download
M lib/src/codegen/js_codegen.dart View 1 2 2 chunks +4 lines, -8 lines 0 comments Download
M test/codegen/expect/functions.js View 1 2 2 chunks +12 lines, -0 lines 0 comments Download
M test/codegen/expect/methods.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/names.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (1 generated)
Leaf
5 years, 7 months ago (2015-05-19 23:59:02 UTC) #2
vsm
lgtm
5 years, 7 months ago (2015-05-20 15:01:49 UTC) #3
Jennifer Messerly
https://codereview.chromium.org/1142293002/diff/20001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (left): https://codereview.chromium.org/1142293002/diff/20001/lib/src/codegen/js_codegen.dart#oldcode1998 lib/src/codegen/js_codegen.dart:1998: return js.call('#.#.bind(#)', [_visit(target), name, _visit(target)]); this makes me a ...
5 years, 7 months ago (2015-05-20 16:05:17 UTC) #4
Leaf
https://codereview.chromium.org/1142293002/diff/20001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (left): https://codereview.chromium.org/1142293002/diff/20001/lib/src/codegen/js_codegen.dart#oldcode1998 lib/src/codegen/js_codegen.dart:1998: return js.call('#.#.bind(#)', [_visit(target), name, _visit(target)]); On 2015/05/20 16:05:17, John ...
5 years, 7 months ago (2015-05-20 16:35:17 UTC) #5
Jennifer Messerly
https://codereview.chromium.org/1142293002/diff/20001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (left): https://codereview.chromium.org/1142293002/diff/20001/lib/src/codegen/js_codegen.dart#oldcode1998 lib/src/codegen/js_codegen.dart:1998: return js.call('#.#.bind(#)', [_visit(target), name, _visit(target)]); On 2015/05/20 16:35:17, leafp ...
5 years, 7 months ago (2015-05-20 16:50:30 UTC) #6
Leaf
https://codereview.chromium.org/1142293002/diff/20001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (right): https://codereview.chromium.org/1142293002/diff/20001/lib/src/codegen/js_codegen.dart#newcode1118 lib/src/codegen/js_codegen.dart:1118: var code = (tearOff) ? 'dart.tearoff(this, #)' : 'this.#'; ...
5 years, 7 months ago (2015-05-20 17:05:56 UTC) #7
Leaf
5 years, 7 months ago (2015-05-20 18:13:42 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
3f47a80af77a37420e5e5907685a2497cb23c996 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698