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

Issue 2150313003: Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop ob… (Closed)

Created:
4 years, 5 months ago by Jacob
Modified:
4 years, 5 months ago
Reviewers:
Alan Knight, sra1, kevmoo
CC:
reviews_dartlang.org, Alan Knight
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop objects in cases where the member name is not known statically. These methods would be extension methods on JSObject if Dart supported extension methods. Update package js to export these methods. Implement in Dart2JS. Implement JS$ in dart2js. BUG= R=alanknight@google.com, sra@google.com Committed: https://github.com/dart-lang/sdk/commit/96ca5db7e5ad4a7c259376b7ce1bf2d694ccf479

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop ob… #

Total comments: 6

Patch Set 3 : Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop ob… #

Patch Set 4 : ptal #

Total comments: 9

Patch Set 5 : Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop ob… #

Total comments: 2

Patch Set 6 : Fix analyzer warnings in js_util_test, skip js_util_test in csp mode and baseline expectations for … #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1037 lines, -236 lines) Patch
M pkg/compiler/lib/src/js_backend/native_data.dart View 3 chunks +13 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart View 4 chunks +6 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/native/native.dart View 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 chunk +5 lines, -4 lines 0 comments Download
M pkg/js/CHANGELOG.md View 1 chunk +5 lines, -0 lines 0 comments Download
A + pkg/js/lib/js_util.dart View 1 chunk +3 lines, -2 lines 0 comments Download
M pkg/js/pubspec.yaml View 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/bin.gypi View 4 chunks +35 lines, -0 lines 0 comments Download
M runtime/bin/builtin.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/builtin.cc View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart View 1 chunk +6 lines, -0 lines 0 comments Download
M sdk/lib/dart2dart.platform View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/dart_client.platform View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/dart_shared.platform View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/js/dart2js/js_dart2js.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/js/dartium/js_dartium.dart View 26 chunks +282 lines, -199 lines 0 comments Download
A sdk/lib/js_util/dart2js/js_util_dart2js.dart View 1 chunk +126 lines, -0 lines 0 comments Download
A sdk/lib/js_util/dartium/js_util_dartium.dart View 1 chunk +38 lines, -0 lines 0 comments Download
D tests/compiler/dart2js_native/call_on_native_class_test.dart View 1 chunk +0 lines, -17 lines 0 comments Download
M tests/compiler/dart2js_native/dart2js_native.status View 1 chunk +0 lines, -2 lines 1 comment Download
M tests/html/html.status View 1 chunk +1 line, -0 lines 0 comments Download
M tests/html/js_typed_interop_test.dart View 12 chunks +157 lines, -1 line 0 comments Download
A tests/html/js_util_test.dart View 1 chunk +347 lines, -0 lines 0 comments Download
M tests/lib/analyzer/analyze_library.status View 2 chunks +3 lines, -1 line 0 comments Download
M tools/create_sdk.py View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 14 (4 generated)
Jacob
Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop objects in ...
4 years, 5 months ago (2016-07-16 00:25:07 UTC) #2
Alan Knight
lgtm https://codereview.chromium.org/2150313003/diff/1/sdk/lib/js/dart2js/js_dart2js.dart File sdk/lib/js/dart2js/js_dart2js.dart (right): https://codereview.chromium.org/2150313003/diff/1/sdk/lib/js/dart2js/js_dart2js.dart#newcode788 sdk/lib/js/dart2js/js_dart2js.dart:788: static callMethod(o, String method, List args) => JS('Object', ...
4 years, 5 months ago (2016-07-19 16:56:04 UTC) #4
Jacob
https://codereview.chromium.org/2150313003/diff/1/sdk/lib/js/dart2js/js_dart2js.dart File sdk/lib/js/dart2js/js_dart2js.dart (right): https://codereview.chromium.org/2150313003/diff/1/sdk/lib/js/dart2js/js_dart2js.dart#newcode788 sdk/lib/js/dart2js/js_dart2js.dart:788: static callMethod(o, String method, List args) => JS('Object', '#[#].apply(#, ...
4 years, 5 months ago (2016-07-19 17:42:19 UTC) #5
sra1
LGTM if we make it a library. https://codereview.chromium.org/2150313003/diff/20001/pkg/compiler/lib/src/js_backend/native_data.dart File pkg/compiler/lib/src/js_backend/native_data.dart (right): https://codereview.chromium.org/2150313003/diff/20001/pkg/compiler/lib/src/js_backend/native_data.dart#newcode226 pkg/compiler/lib/src/js_backend/native_data.dart:226: String getUnescapedJSInteropName(String ...
4 years, 5 months ago (2016-07-20 18:19:20 UTC) #6
Jacob
Added all requested tests, made dart_util a library, fixed an extra escaping bug present in ...
4 years, 5 months ago (2016-07-22 19:28:24 UTC) #7
sra1
LGTM with some cleanup of the string literal formatting code. https://codereview.chromium.org/2150313003/diff/60001/sdk/lib/js/dartium/js_dartium.dart File sdk/lib/js/dartium/js_dartium.dart (right): https://codereview.chromium.org/2150313003/diff/60001/sdk/lib/js/dartium/js_dartium.dart#newcode180 ...
4 years, 5 months ago (2016-07-22 20:16:33 UTC) #8
Jacob
https://codereview.chromium.org/2150313003/diff/60001/sdk/lib/js/dartium/js_dartium.dart File sdk/lib/js/dartium/js_dartium.dart (right): https://codereview.chromium.org/2150313003/diff/60001/sdk/lib/js/dartium/js_dartium.dart#newcode180 sdk/lib/js/dartium/js_dartium.dart:180: // Identical to JSON string lieral escaping except that ...
4 years, 5 months ago (2016-07-25 16:31:59 UTC) #9
Jacob
Committed patchset #5 (id:80001) manually as 96ca5db7e5ad4a7c259376b7ce1bf2d694ccf479 (presubmit successful).
4 years, 5 months ago (2016-07-25 16:59:08 UTC) #11
kevmoo
Late DBC https://codereview.chromium.org/2150313003/diff/80001/pkg/js/CHANGELOG.md File pkg/js/CHANGELOG.md (right): https://codereview.chromium.org/2150313003/diff/80001/pkg/js/CHANGELOG.md#newcode4 pkg/js/CHANGELOG.md:4: statically. These methods would be extension methods ...
4 years, 5 months ago (2016-07-25 17:34:41 UTC) #13
sra1
4 years, 5 months ago (2016-07-26 00:49:41 UTC) #14
Message was sent while issue was closed.
https://codereview.chromium.org/2150313003/diff/100001/tests/compiler/dart2js...
File tests/compiler/dart2js_native/dart2js_native.status (left):

https://codereview.chromium.org/2150313003/diff/100001/tests/compiler/dart2js...
tests/compiler/dart2js_native/dart2js_native.status:8: [ $compiler == dart2js ]
Restore

Powered by Google App Engine
This is Rietveld 408576698