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

Issue 1318043005: Support user generated custom native JS classes. (Closed)

Created:
5 years, 3 months ago by Jacob
Modified:
5 years, 2 months ago
CC:
reviews_dartlang.org, Siggi Cherem (dart-lang), vsm
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : ready for review #

Patch Set 4 : ready for review #

Total comments: 22

Patch Set 5 : #

Total comments: 12

Patch Set 6 : ptal #

Patch Set 7 : ptal #

Total comments: 48

Patch Set 8 : ptal #

Total comments: 73

Patch Set 9 : PTAL #

Total comments: 5

Patch Set 10 : ptal #

Total comments: 79

Patch Set 11 : ptal #

Total comments: 20

Patch Set 12 : ptal #

Total comments: 3

Patch Set 13 : #

Patch Set 14 : fix tests #

Patch Set 15 : about to land #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1585 lines, -327 lines) Patch
M pkg/compiler/lib/src/common/backend_api.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +11 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/diagnostics/messages.dart View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +41 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/elements/elements.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +8 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/elements/modelx.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +61 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/type_graph_nodes.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/js_backend/backend.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 13 chunks +26 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/js_backend.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -0 lines 0 comments Download
A pkg/compiler/lib/src/js_backend/js_interop_analysis.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +142 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/namer.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +26 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/patch_resolver.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/js_emitter/native_emitter.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +17 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +126 lines, -15 lines 0 comments Download
M pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/native/enqueue.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/patch_parser.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +42 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/serialization/modelz.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +137 lines, -13 lines 0 comments Download
M pkg/compiler/lib/src/types/types.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +9 lines, -0 lines 0 comments Download
M pkg/compiler/pubspec.yaml View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
A + pkg/js/AUTHORS View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
A + pkg/js/LICENSE View 1 2 3 4 5 6 7 2 chunks +1 line, -3 lines 0 comments Download
A + pkg/js/PATENTS View 1 2 3 4 5 6 7 0 chunks +-1 lines, --1 lines 0 comments Download
A pkg/js/README.md View 1 2 3 4 5 6 7 1 chunk +60 lines, -0 lines 0 comments Download
A pkg/js/lib/js.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +68 lines, -0 lines 0 comments Download
A pkg/js/pubspec.yaml View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -0 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/interceptors.dart View 1 2 3 4 5 6 7 8 9 6 chunks +28 lines, -2 lines 0 comments Download
M sdk/lib/js/dart2js/js_dart2js.dart View 1 2 3 4 5 6 7 8 9 10 17 chunks +137 lines, -46 lines 0 comments Download
M tests/compiler/dart2js/mock_libraries.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M tests/html/html.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +13 lines, -7 lines 0 comments Download
M tests/html/js_array_test.dart View 1 2 3 4 5 6 7 8 9 10 12 chunks +262 lines, -168 lines 0 comments Download
A tests/html/js_dart_to_string_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +46 lines, -0 lines 0 comments Download
M tests/html/js_typed_interop_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +228 lines, -47 lines 0 comments Download
A + tests/html/json_helper.dart View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
A tests/html/mirrors_js_typed_interop_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (5 generated)
Jacob
Essentially this is an implementation of JS interfaces using "some such method" stubs added to ...
5 years, 3 months ago (2015-09-02 22:03:27 UTC) #2
Jacob
Known issue with the CL: in a number of places I check for both isJsInterop ...
5 years, 3 months ago (2015-09-02 22:07:28 UTC) #3
Jennifer Messerly
I looked at js_dart2js.dart, some questions/comments https://codereview.chromium.org/1318043005/diff/60001/sdk/lib/js/dart2js/js_dart2js.dart File sdk/lib/js/dart2js/js_dart2js.dart (right): https://codereview.chromium.org/1318043005/diff/60001/sdk/lib/js/dart2js/js_dart2js.dart#newcode101 sdk/lib/js/dart2js/js_dart2js.dart:101: export 'dart:_interceptors' show ...
5 years, 3 months ago (2015-09-02 22:29:12 UTC) #4
Jacob
https://codereview.chromium.org/1318043005/diff/60001/sdk/lib/js/dart2js/js_dart2js.dart File sdk/lib/js/dart2js/js_dart2js.dart (right): https://codereview.chromium.org/1318043005/diff/60001/sdk/lib/js/dart2js/js_dart2js.dart#newcode101 sdk/lib/js/dart2js/js_dart2js.dart:101: export 'dart:_interceptors' show Interceptor, JavaScriptObject, JSArray; On 2015/09/02 22:29:12, ...
5 years, 3 months ago (2015-09-02 22:49:56 UTC) #5
Jennifer Messerly
https://codereview.chromium.org/1318043005/diff/60001/sdk/lib/js/dart2js/js_dart2js.dart File sdk/lib/js/dart2js/js_dart2js.dart (right): https://codereview.chromium.org/1318043005/diff/60001/sdk/lib/js/dart2js/js_dart2js.dart#newcode109 sdk/lib/js/dart2js/js_dart2js.dart:109: 'return function() {' On 2015/09/02 22:49:55, Jacob wrote: > ...
5 years, 3 months ago (2015-09-02 22:54:56 UTC) #6
Jennifer Messerly
fwiw, js_dart2js LGTM
5 years, 3 months ago (2015-09-03 19:54:17 UTC) #7
alexandre.ardhuin
Do you plan to handle abstract members of objects inheriting from JavaScriptObject (as in https://codereview.chromium.org/1194643002/) ...
5 years, 3 months ago (2015-09-03 20:14:12 UTC) #9
Jacob
On 2015/09/03 20:14:12, alexandre.ardhuin wrote: > Do you plan to handle abstract members of objects ...
5 years, 3 months ago (2015-09-03 23:48:44 UTC) #10
sra1
What to others think about the design of the 'annotation language'? https://chromiumcodereview.appspot.com/1318043005/diff/120001/tests/html/js_typed_interop_test.dart File tests/html/js_typed_interop_test.dart (right): ...
5 years, 3 months ago (2015-09-17 19:52:57 UTC) #12
Siggi Cherem (dart-lang)
This is very exciting Jacob Some preliminary comments below. I still didn't get to do ...
5 years, 3 months ago (2015-09-18 20:34:10 UTC) #14
Jacob
ptal https://chromiumcodereview.appspot.com/1318043005/diff/60001/sdk/lib/js/dart2js/js_dart2js.dart File sdk/lib/js/dart2js/js_dart2js.dart (right): https://chromiumcodereview.appspot.com/1318043005/diff/60001/sdk/lib/js/dart2js/js_dart2js.dart#newcode797 sdk/lib/js/dart2js/js_dart2js.dart:797: class JsNative { On 2015/09/18 20:34:10, Siggi Cherem ...
5 years, 2 months ago (2015-10-01 00:47:34 UTC) #15
alexandre.ardhuin
https://chromiumcodereview.appspot.com/1318043005/diff/120001/tests/html/js_typed_interop_test.dart File tests/html/js_typed_interop_test.dart (right): https://chromiumcodereview.appspot.com/1318043005/diff/120001/tests/html/js_typed_interop_test.dart#newcode5 tests/html/js_typed_interop_test.dart:5: @JsName() > Modifying the behavior of a JS class ...
5 years, 2 months ago (2015-10-01 08:51:05 UTC) #16
sra1
https://codereview.chromium.org/1318043005/diff/120001/pkg/compiler/lib/src/ssa/builder.dart File pkg/compiler/lib/src/ssa/builder.dart (right): https://codereview.chromium.org/1318043005/diff/120001/pkg/compiler/lib/src/ssa/builder.dart#newcode5763 pkg/compiler/lib/src/ssa/builder.dart:5763: var templateString; The rest of this file uses local ...
5 years, 2 months ago (2015-10-01 17:34:30 UTC) #17
Siggi Cherem (dart-lang)
https://chromiumcodereview.appspot.com/1318043005/diff/120001/sdk/lib/js/dart2js/js_dart2js.dart File sdk/lib/js/dart2js/js_dart2js.dart (right): https://chromiumcodereview.appspot.com/1318043005/diff/120001/sdk/lib/js/dart2js/js_dart2js.dart#newcode108 sdk/lib/js/dart2js/js_dart2js.dart:108: 'function(_call, f, captureThis) {' On 2015/10/01 17:34:30, sra1 wrote: ...
5 years, 2 months ago (2015-10-01 18:21:28 UTC) #18
sra1
https://codereview.chromium.org/1318043005/diff/140001/pkg/compiler/lib/src/elements/modelx.dart File pkg/compiler/lib/src/elements/modelx.dart (right): https://codereview.chromium.org/1318043005/diff/140001/pkg/compiler/lib/src/elements/modelx.dart#newcode237 pkg/compiler/lib/src/elements/modelx.dart:237: String _jsNameHelper(e) { Element e or some more specific ...
5 years, 2 months ago (2015-10-01 20:55:29 UTC) #19
Jacob
https://codereview.chromium.org/1318043005/diff/120001/pkg/compiler/lib/src/ssa/builder.dart File pkg/compiler/lib/src/ssa/builder.dart (right): https://codereview.chromium.org/1318043005/diff/120001/pkg/compiler/lib/src/ssa/builder.dart#newcode5763 pkg/compiler/lib/src/ssa/builder.dart:5763: var templateString; On 2015/10/01 17:34:30, sra1 wrote: > The ...
5 years, 2 months ago (2015-10-02 20:08:16 UTC) #20
kevmoo
https://codereview.chromium.org/1318043005/diff/160001/pkg/js/lib/js.dart File pkg/js/lib/js.dart (right): https://codereview.chromium.org/1318043005/diff/160001/pkg/js/lib/js.dart#newcode11 pkg/js/lib/js.dart:11: /// A metadata annotation that indicates that a Library, ...
5 years, 2 months ago (2015-10-02 20:20:13 UTC) #22
alexandre.ardhuin
https://codereview.chromium.org/1318043005/diff/120001/tests/html/js_typed_interop_test.dart File tests/html/js_typed_interop_test.dart (right): https://codereview.chromium.org/1318043005/diff/120001/tests/html/js_typed_interop_test.dart#newcode5 tests/html/js_typed_interop_test.dart:5: @JsName() On 2015/10/02 20:08:15, Jacob wrote: > On 2015/10/01 ...
5 years, 2 months ago (2015-10-02 20:29:56 UTC) #23
Jacob
Also rebased to tip of dart repo trunk, implemented siggi's suggestion of using the techniques ...
5 years, 2 months ago (2015-10-03 01:01:09 UTC) #24
sra1
https://codereview.chromium.org/1318043005/diff/160001/pkg/js/lib/js.dart File pkg/js/lib/js.dart (right): https://codereview.chromium.org/1318043005/diff/160001/pkg/js/lib/js.dart#newcode22 pkg/js/lib/js.dart:22: /// library maps semicolon https://codereview.chromium.org/1318043005/diff/180001/pkg/compiler/lib/src/common/backend_api.dart File pkg/compiler/lib/src/common/backend_api.dart (right): https://codereview.chromium.org/1318043005/diff/180001/pkg/compiler/lib/src/common/backend_api.dart#newcode302 ...
5 years, 2 months ago (2015-10-06 21:42:18 UTC) #25
sra1
5 years, 2 months ago (2015-10-06 21:42:22 UTC) #26
sra1
5 years, 2 months ago (2015-10-06 21:42:23 UTC) #27
sra1
5 years, 2 months ago (2015-10-06 21:42:25 UTC) #28
sra1
5 years, 2 months ago (2015-10-06 21:42:29 UTC) #29
Siggi Cherem (dart-lang)
https://codereview.chromium.org/1318043005/diff/180001/pkg/compiler/lib/src/diagnostics/messages.dart File pkg/compiler/lib/src/diagnostics/messages.dart (right): https://codereview.chromium.org/1318043005/diff/180001/pkg/compiler/lib/src/diagnostics/messages.dart#newcode2138 pkg/compiler/lib/src/diagnostics/messages.dart:2138: "#{cls} cannot extend a normal Dart class as it ...
5 years, 2 months ago (2015-10-06 22:38:02 UTC) #30
Siggi Cherem (dart-lang)
oh, I forgot to ask: I couldn't find the js_interop_analysis.dart file, maybe missing a `git ...
5 years, 2 months ago (2015-10-06 22:39:37 UTC) #31
Jacob
PTAL Added a few more files to fix failing tests. https://codereview.chromium.org/1318043005/diff/160001/pkg/js/lib/js.dart File pkg/js/lib/js.dart (right): https://codereview.chromium.org/1318043005/diff/160001/pkg/js/lib/js.dart#newcode22 ...
5 years, 2 months ago (2015-10-13 01:19:24 UTC) #32
Siggi Cherem (dart-lang)
It's looking really nice! I just added a few small comments below, besides that looks ...
5 years, 2 months ago (2015-10-13 02:08:53 UTC) #33
Jacob
ptal https://codereview.chromium.org/1318043005/diff/180001/sdk/lib/js/dart2js/js_dart2js.dart File sdk/lib/js/dart2js/js_dart2js.dart (right): https://codereview.chromium.org/1318043005/diff/180001/sdk/lib/js/dart2js/js_dart2js.dart#newcode709 sdk/lib/js/dart2js/js_dart2js.dart:709: void registerJsInterfaces([List<Type> types]) { On 2015/10/13 02:08:52, Siggi ...
5 years, 2 months ago (2015-10-13 03:10:43 UTC) #34
sra1
lgtm https://codereview.chromium.org/1318043005/diff/220001/pkg/compiler/lib/src/js_backend/backend.dart File pkg/compiler/lib/src/js_backend/backend.dart (right): https://codereview.chromium.org/1318043005/diff/220001/pkg/compiler/lib/src/js_backend/backend.dart#newcode917 pkg/compiler/lib/src/js_backend/backend.dart:917: // TODO(jacobr): this is the wrong place to ...
5 years, 2 months ago (2015-10-13 03:31:36 UTC) #35
Jacob
5 years, 2 months ago (2015-10-13 20:15:32 UTC) #36
Message was sent while issue was closed.
Committed patchset #15 (id:280001) manually as
cd2752431e41c33c7ae85e0d0d26e5261f168930 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698