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

Issue 1153003003: fixes #40, extension methods for primitive types (Closed)

Created:
5 years, 6 months ago by Jennifer Messerly
Modified:
5 years, 6 months ago
Reviewers:
vsm, Leaf
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

fixes #40, extension methods for primitive types fixes #138, extension methods for Iterable/List injected as needed, regardless of how the methods started fixes #142, extension methods and dynamic dispatch small change that fixes #139, recognize that '.length' doesn't need an extension method Also restores JSArray, moved the methods out of List, which is back to just being an interface. NOTE: this removes the capability of types that mix native JS members and some Dart extension members, instead it now *hides* all JS members for these native types. We'll want to bring that feature back to support dart:html, so it's just a simplification for now. Should be easy to add that capability when we pull in dart:html for reals. R=leafp@google.com, vsm@google.com Committed: https://github.com/dart-lang/dev_compiler/commit/74bfe5b8cf67e5685a741cab949548d88060869b

Patch Set 1 : #

Total comments: 15

Patch Set 2 : feedback #

Patch Set 3 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+3016 lines, -4457 lines) Patch
M lib/runtime/dart/_interceptors.js View 1 35 chunks +456 lines, -240 lines 0 comments Download
M lib/runtime/dart/_internal.js View 1 62 chunks +451 lines, -375 lines 0 comments Download
M lib/runtime/dart/_isolate_helper.js View 1 16 chunks +40 lines, -40 lines 0 comments Download
M lib/runtime/dart/_js_helper.js View 1 2 49 chunks +123 lines, -349 lines 0 comments Download
M lib/runtime/dart/_js_names.js View 1 chunk +2 lines, -2 lines 0 comments Download
M lib/runtime/dart/_native_typed_data.js View 1 49 chunks +253 lines, -240 lines 0 comments Download
M lib/runtime/dart/async.js View 1 4 chunks +5 lines, -5 lines 0 comments Download
M lib/runtime/dart/collection.js View 1 120 chunks +802 lines, -600 lines 0 comments Download
M lib/runtime/dart/convert.js View 1 53 chunks +146 lines, -146 lines 0 comments Download
M lib/runtime/dart/core.js View 1 98 chunks +219 lines, -739 lines 0 comments Download
M lib/runtime/dart/isolate.js View 1 4 chunks +22 lines, -22 lines 0 comments Download
M lib/runtime/dart/math.js View 6 chunks +9 lines, -9 lines 0 comments Download
M lib/runtime/dart/typed_data.js View 1 1 chunk +1 line, -1 line 0 comments Download
M lib/runtime/dart_runtime.js View 1 16 chunks +105 lines, -87 lines 2 comments Download
M lib/src/checker/resolver.dart View 1 1 chunk +11 lines, -3 lines 0 comments Download
M lib/src/codegen/js_codegen.dart View 1 2 19 chunks +128 lines, -79 lines 0 comments Download
M lib/src/dependency_graph.dart View 1 1 chunk +3 lines, -6 lines 0 comments Download
M lib/src/js/nodes.dart View 1 3 chunks +13 lines, -11 lines 0 comments Download
M lib/src/js/printer.dart View 1 3 chunks +16 lines, -5 lines 0 comments Download
M test/codegen/expect/BenchmarkBase.js View 1 1 chunk +4 lines, -4 lines 0 comments Download
M test/codegen/expect/DeltaBlue.js View 12 chunks +39 lines, -39 lines 0 comments Download
M test/codegen/expect/cascade.js View 4 chunks +11 lines, -11 lines 0 comments Download
M test/codegen/expect/functions.js View 2 chunks +2 lines, -2 lines 0 comments Download
M test/codegen/expect/html_input.html View 1 chunk +2 lines, -0 lines 0 comments Download
M test/codegen/expect/misc.js View 1 chunk +3 lines, -3 lines 0 comments Download
M test/codegen/expect/sunflower/sunflower.html View 1 1 chunk +2 lines, -0 lines 0 comments Download
M tool/input_sdk/lib/core/annotations.dart View 1 chunk +0 lines, -25 lines 0 comments Download
M tool/input_sdk/lib/core/iterable.dart View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M tool/input_sdk/lib/core/list.dart View 24 chunks +34 lines, -286 lines 0 comments Download
M tool/input_sdk/patch/core_patch.dart View 3 chunks +2 lines, -24 lines 0 comments Download
M tool/input_sdk/private/annotations.dart View 1 2 1 chunk +25 lines, -0 lines 0 comments Download
M tool/input_sdk/private/interceptors.dart View 2 chunks +7 lines, -309 lines 0 comments Download
M tool/input_sdk/private/js_array.dart View 8 chunks +13 lines, -69 lines 0 comments Download
M tool/input_sdk/private/js_helper.dart View 1 chunk +0 lines, -8 lines 0 comments Download
M tool/input_sdk/private/js_number.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M tool/input_sdk/private/js_string.dart View 1 chunk +1 line, -0 lines 0 comments Download
M tool/input_sdk/private/native_helper.dart View 2 chunks +0 lines, -600 lines 0 comments Download
M tool/sdk_expected_errors.txt View 1 2 5 chunks +63 lines, -117 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
Jennifer Messerly
Not 100% sure this is ready, but I wanted to send it out. I'm going ...
5 years, 6 months ago (2015-05-30 00:04:04 UTC) #3
vsm
This looks nice! A couple quick comments - still working through it. https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js ...
5 years, 6 months ago (2015-06-02 17:59:10 UTC) #4
Jennifer Messerly
https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js#newcode812 lib/runtime/dart_runtime.js:812: function implementExtension(type) { On 2015/06/02 17:59:10, vsm wrote: > ...
5 years, 6 months ago (2015-06-02 18:16:04 UTC) #5
Leaf
Nice! LGTM. -leaf https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js#newcode115 lib/runtime/dart_runtime.js:115: function callMethod(obj, name, displayName, args) { ...
5 years, 6 months ago (2015-06-02 21:35:04 UTC) #6
Jennifer Messerly
FYI, found a bug ... https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js#newcode818 lib/runtime/dart_runtime.js:818: defineProperty(proto, symbol, getOwnPropertyDescriptor(proto, name)); ...
5 years, 6 months ago (2015-06-02 23:43:42 UTC) #7
vsm
https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js#newcode812 lib/runtime/dart_runtime.js:812: function implementExtension(type) { On 2015/06/02 18:16:04, John Messerly wrote: ...
5 years, 6 months ago (2015-06-03 15:48:40 UTC) #8
Jennifer Messerly
PTAL https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1153003003/diff/20001/lib/runtime/dart_runtime.js#newcode109 lib/runtime/dart_runtime.js:109: throwNoSuchMethod(obj, displayName, args); On 2015/06/02 17:59:10, vsm wrote: ...
5 years, 6 months ago (2015-06-04 21:31:19 UTC) #9
vsm
lgtm https://codereview.chromium.org/1153003003/diff/60001/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1153003003/diff/60001/lib/runtime/dart_runtime.js#newcode819 lib/runtime/dart_runtime.js:819: // one of these methods. I see. So, ...
5 years, 6 months ago (2015-06-04 21:50:03 UTC) #10
Jennifer Messerly
https://codereview.chromium.org/1153003003/diff/60001/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1153003003/diff/60001/lib/runtime/dart_runtime.js#newcode819 lib/runtime/dart_runtime.js:819: // one of these methods. On 2015/06/04 21:50:02, vsm ...
5 years, 6 months ago (2015-06-04 21:57:46 UTC) #11
Jennifer Messerly
Committed patchset #3 (id:60001) manually as 74bfe5b8cf67e5685a741cab949548d88060869b (presubmit successful).
5 years, 6 months ago (2015-06-04 21:58:23 UTC) #12
Leaf
On 2015/06/04 21:58:23, John Messerly wrote: > Committed patchset #3 (id:60001) manually as > 74bfe5b8cf67e5685a741cab949548d88060869b ...
5 years, 6 months ago (2015-06-05 00:07:22 UTC) #13
Jennifer Messerly
5 years, 6 months ago (2015-06-05 17:00:38 UTC) #14
Message was sent while issue was closed.
ah, runtime_test.js ... yeah, forgot about that one. Taking a look. Will send
follow up.

Powered by Google App Engine
This is Rietveld 408576698