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

Issue 1530563003: Generate all runtime files from dart. (Closed)

Created:
5 years ago by ochafik
Modified:
4 years, 11 months ago
CC:
dev-compiler+reviews_dartlang.org, Jacob
Base URL:
git@github.com:dart-lang/dev_compiler.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Generate _runtime.js from dart (https://github.com/dart-lang/dev_compiler/issues/310) The following part files were ported from the original .js (lib/runtime/dart/_foo.js -> input_sdk/private/foo.dart): - input_sdk/private/rtti.dart - input_sdk/private/types.dart - input_sdk/private/classes.dart - input_sdk/private/errors.dart - input_sdk/private/generators.dart - input_sdk/private/operations.dart - input_sdk/private/runtime.dart Notes: - Introduced genericTypeConstructor intrinsic: `JS('', '#(type)', genericTypeConstructor(List))` generates `core.List$(type)` - Used new JS quasiquotes everywhere - Depends on new internal `@JSExportName` annotation to alias symbols like dart.{as, is, const, assert, export, implements, throw, async, dynamic, void} (see https://codereview.chromium.org/1580413002/) BUG= R=jmesserly@google.com Committed: https://github.com/dart-lang/dev_compiler/commit/6c1c9403788a85a98ee5d5a1f86ff2a3f6a61593

Patch Set 1 #

Patch Set 2 : rebased + regen with new one-line ifs #

Patch Set 3 : replace 'dart/_runtime' by "dart/_runtime" (less files in diff) #

Patch Set 4 : dropped optional params + added comments to codegen #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : Overwrote .dart files with original .js to ease up comparison #

Patch Set 10 : Reverted to new .dart files in input_sdk: please compare them against previous patchset #

Patch Set 11 : Overwrote .dart files with original .js to ease up comparison #

Patch Set 12 : Reverted to new .dart files in input_sdk: please compare them against previous patchset #

Total comments: 28

Patch Set 13 : Make runtime files parts of dart:_runtime #

Patch Set 14 : Make runtime files parts of dart:_runtime #

Patch Set 15 : rebased #

Patch Set 16 : updated JSExportName annotation #

Patch Set 17 : update jsname #

Patch Set 18 : Simplified modules codegen #

Patch Set 19 : Added comments to generic intrinsic function #

Patch Set 20 : synced changes from JSExportName cl #

Patch Set 21 : Rebased with JSExportName change #

Patch Set 22 : simplify diff in js_codegen.dart #

Total comments: 2

Patch Set 23 : Use runtime getGenericClass instead of intrinsic genericTypeConstructor #

Patch Set 24 : merged master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4662 lines, -2494 lines) Patch
M karma.conf.js View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
D lib/runtime/dart/_classes.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -419 lines 0 comments Download
M lib/runtime/dart/_errors.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -41 lines 0 comments Download
M lib/runtime/dart/_foreign_helper.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +15 lines, -1 line 0 comments Download
M lib/runtime/dart/_generators.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -234 lines 0 comments Download
M lib/runtime/dart/_interceptors.js 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 lib/runtime/dart/_internal.js 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 lib/runtime/dart/_isolate_helper.js 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 lib/runtime/dart/_js_embedded_names.js View 1 2 3 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M lib/runtime/dart/_js_helper.js 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 lib/runtime/dart/_js_mirrors.js 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 lib/runtime/dart/_js_primitives.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M lib/runtime/dart/_metadata.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M lib/runtime/dart/_native_typed_data.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
D lib/runtime/dart/_operations.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -466 lines 0 comments Download
M lib/runtime/dart/_rtti.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -178 lines 0 comments Download
M lib/runtime/dart/_runtime.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1294 lines, -113 lines 0 comments Download
D lib/runtime/dart/_types.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -547 lines 0 comments Download
D lib/runtime/dart/_utils.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -107 lines 0 comments Download
M lib/runtime/dart/async.js 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 lib/runtime/dart/collection.js 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 lib/runtime/dart/convert.js 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 lib/runtime/dart/core.js 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 lib/runtime/dart/html.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 9 chunks +95 lines, -4 lines 0 comments Download
M lib/runtime/dart/html_common.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -2 lines 0 comments Download
M lib/runtime/dart/isolate.js 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 lib/runtime/dart/js.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +4 lines, -6 lines 0 comments Download
M lib/runtime/dart/math.js 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 lib/runtime/dart/mirrors.js 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 lib/runtime/dart/typed_data.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M lib/src/codegen/js_codegen.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 11 chunks +30 lines, -44 lines 0 comments Download
M lib/src/compiler.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -7 lines 0 comments Download
M lib/src/js/template.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M lib/src/runner/runtime_utils.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -4 lines 0 comments Download
M test/browser/runtime_tests.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 7 chunks +25 lines, -18 lines 0 comments Download
M test/codegen/expect/8invalid-chars.in+file_name.js View 1 2 3 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/BenchmarkBase.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/DeltaBlue.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/async_helper.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/async_helper/async_helper.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/cascade.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/closure.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/collection/algorithms.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/collection/iterable_zip.js 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 test/codegen/expect/collection/priority_queue.js 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 test/codegen/expect/collection/src/canonicalized_map.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -3 lines 0 comments Download
M test/codegen/expect/collection/src/canonicalized_map.txt 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 test/codegen/expect/collection/src/comparators.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
A test/codegen/expect/collection/src/queue_list.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +235 lines, -0 lines 0 comments Download
M test/codegen/expect/collection/src/queue_list.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -2 lines 0 comments Download
A test/codegen/expect/collection/src/unmodifiable_wrappers.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +229 lines, -0 lines 0 comments Download
M test/codegen/expect/collection/src/unmodifiable_wrappers.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -2 lines 0 comments Download
M test/codegen/expect/collection/src/utils.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
A test/codegen/expect/collection/wrappers.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +809 lines, -0 lines 0 comments Download
M test/codegen/expect/collection/wrappers.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -16 lines 0 comments Download
M test/codegen/expect/constructors.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/covariance.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/dir/html_input_a.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/dir/html_input_b.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M test/codegen/expect/dir/html_input_c.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/dir/html_input_d.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/dir/html_input_e.js View 1 2 3 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/dom/dom.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/domtest.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/expect.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/expect/expect.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/extensions.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/fieldtest.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/functions.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/html_input.html View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -7 lines 0 comments Download
M test/codegen/expect/js/js.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M test/codegen/expect/js/src/varargs.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/language-all.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Binary file 0 comments Download
M test/codegen/expect/map_keys.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/methods.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/misc.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/names.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/opassign.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/script.js 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 test/codegen/expect/sunflower/circle.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/sunflower/dom.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/sunflower/painter.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/sunflower/sunflower.html View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -7 lines 0 comments Download
M test/codegen/expect/sunflower/sunflower.js 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 test/codegen/expect/syncstar_syntax.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/temps.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/try_catch.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/unittest.js View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M test/codegen/expect/unittest/unittest.js View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M test/codegen/expect/varargs.js View 1 2 3 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M tool/build_sdk.sh View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M tool/input_sdk/lib/_internal/libraries.dart View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M tool/input_sdk/lib/html/ddc/html_ddc.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 8 chunks +113 lines, -0 lines 0 comments Download
M tool/input_sdk/lib/js/dart2js/js_dart2js.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -3 lines 0 comments Download
A tool/input_sdk/private/classes.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +358 lines, -0 lines 0 comments Download
A tool/input_sdk/private/errors.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +20 lines, -0 lines 0 comments Download
M tool/input_sdk/private/foreign_helper.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +17 lines, -0 lines 0 comments Download
A + tool/input_sdk/private/generators.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 7 chunks +85 lines, -96 lines 0 comments Download
M tool/input_sdk/private/js_helper.dart View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M tool/input_sdk/private/js_primitives.dart View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M tool/input_sdk/private/js_rti.dart View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A tool/input_sdk/private/operations.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +426 lines, -0 lines 0 comments Download
A tool/input_sdk/private/rtti.dart View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +157 lines, -0 lines 0 comments Download
A tool/input_sdk/private/runtime.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +42 lines, -0 lines 0 comments Download
A tool/input_sdk/private/types.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +546 lines, -0 lines 0 comments Download
M tool/input_sdk/private/utils.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +13 lines, -24 lines 0 comments Download
M tool/sdk_expected_errors.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 chunks +66 lines, -66 lines 0 comments Download

Messages

Total messages: 21 (12 generated)
ochafik
Hey guys, I've finally managed to get a green Karma with runtime fully generated from ...
5 years ago (2015-12-15 05:38:50 UTC) #4
ochafik
Regenerated with 1-line ifs, the diff should be easier to review now (best = side-by-side ...
5 years ago (2015-12-16 20:00:37 UTC) #9
ochafik
Note: added a phony intermediate patchset to see a diff between the original .js and ...
5 years ago (2015-12-18 16:02:17 UTC) #12
Jennifer Messerly
I looked at the js_codegen changes. Below are some comments. The meta-comment: it's usually better ...
4 years, 11 months ago (2016-01-07 20:18:05 UTC) #14
ochafik
Thanks John! https://codereview.chromium.org/1530563003/diff/190001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (right): https://codereview.chromium.org/1530563003/diff/190001/lib/src/codegen/js_codegen.dart#newcode133 lib/src/codegen/js_codegen.dart:133: static final _runtimeLibUris = new Set<String>.from([ On ...
4 years, 11 months ago (2016-01-13 13:13:21 UTC) #16
ochafik
PTAL rebased after @JSExportName CL
4 years, 11 months ago (2016-01-20 01:11:46 UTC) #17
Jennifer Messerly
sorry this took me so long to get to. LGTM! https://codereview.chromium.org/1530563003/diff/390001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (right): https://codereview.chromium.org/1530563003/diff/390001/lib/src/codegen/js_codegen.dart#newcode1906 ...
4 years, 11 months ago (2016-01-20 23:44:58 UTC) #18
ochafik
Thanks a lot John! https://codereview.chromium.org/1530563003/diff/390001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (right): https://codereview.chromium.org/1530563003/diff/390001/lib/src/codegen/js_codegen.dart#newcode1906 lib/src/codegen/js_codegen.dart:1906: JS.Expression _emitGenericTypeConstructor(Expression typeExpression) { On ...
4 years, 11 months ago (2016-01-21 00:11:36 UTC) #19
ochafik
4 years, 11 months ago (2016-01-21 00:45:39 UTC) #21
Message was sent while issue was closed.
Committed patchset #24 (id:430001) manually as
6c1c9403788a85a98ee5d5a1f86ff2a3f6a61593 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698