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

Issue 1182653002: Refactor runtime into libraries, better type reps (Closed)

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

Most of this CL just re-organizes the runtime code into multiple sub-libraries. js_utils and loader remain as top level symbols (the former so that it has no dependencies, the latter since it defines the module system that the rest use). The dart runtime files are roughly split around functional boundaries. Comments at the top of each file describe the function of the library. I'm not sure that these are 100% right yet, but they're closer. We may want to iterate on the organization. The main dart runtime file just re-exports various symbols from the sub-libraries. It has hard dependencies on the other runtime files, some of which have soft (lazy) dependencies on SDK files. The generated code now depends on dart and dartx as a imported libraries, rather than as top level symbols. This CL also includes some new code to make type representations a bit better. This is mostly in the new types.js file, which makes all of the non-instance types (dynamic, bottom, void, function types) subtypes of a common representation type. Among other things, they now have the correct runtime type (core.Type). Some of the type code has been rationalized around this a bit, but there is more left to do here. The setSignature code in classes.js now also places the correct runtime type on nominal (instance) types. There are new tests in the runtime_tests.js file to test for this. The static object method code that implements the Object methods has not yet been updated to dispatch on type representations. I will do that in a separate CL. BUG= R=jmesserly@google.com, vsm@google.com Committed: https://github.com/dart-lang/dev_compiler/commit/5ac465cdaa1eb9508abf8fae24fa66a22bd2932b

Patch Set 1 #

Patch Set 2 : Use exportFrom for exports #

Patch Set 3 : Eliminate top level libraries from loader #

Total comments: 12

Patch Set 4 : Add missing file #

Total comments: 24

Patch Set 5 : Address comments #

Patch Set 6 : Delete unused dartx file #

Patch Set 7 : Address comments 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2020 lines, -1554 lines) Patch
A lib/runtime/_classes.js View 1 2 3 4 5 6 1 chunk +412 lines, -0 lines 0 comments Download
A lib/runtime/_errors.js View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
A lib/runtime/_operations.js View 1 2 3 4 5 6 1 chunk +396 lines, -0 lines 0 comments Download
A lib/runtime/_rtti.js View 1 2 3 4 5 6 1 chunk +149 lines, -0 lines 0 comments Download
A lib/runtime/_types.js View 1 2 3 4 5 6 1 chunk +439 lines, -0 lines 0 comments Download
M lib/runtime/dart/_foreign_helper.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/_interceptors.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/_internal.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/_isolate_helper.js View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/_js_embedded_names.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/_js_helper.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/_js_primitives.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/_native_typed_data.js View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/async.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/collection.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/convert.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/core.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/isolate.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/math.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M lib/runtime/dart/typed_data.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
A lib/runtime/dart_library.js View 1 2 3 4 1 chunk +134 lines, -0 lines 0 comments Download
M lib/runtime/dart_runtime.js View 1 2 3 4 1 chunk +98 lines, -1453 lines 0 comments Download
A lib/runtime/dart_utils.js View 1 2 3 4 5 6 1 chunk +115 lines, -0 lines 0 comments Download
M lib/src/codegen/html_codegen.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M lib/src/codegen/js_codegen.dart View 1 2 3 4 3 chunks +13 lines, -5 lines 0 comments Download
M lib/src/dependency_graph.dart View 1 2 3 4 1 chunk +11 lines, -1 line 0 comments Download
M test/browser/index.html View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M test/browser/runtime_tests.js View 1 2 3 4 5 chunks +32 lines, -6 lines 0 comments Download
M test/codegen/expect/8invalid-chars.in+file_name.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/BenchmarkBase.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/DeltaBlue.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/cascade.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/constructors.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/covariance.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/dir/html_input_a.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/dir/html_input_b.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/dir/html_input_c.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/dir/html_input_d.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/dir/html_input_e.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/domtest.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/fieldtest.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/functions.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/html_input.html View 1 2 3 4 2 chunks +8 lines, -1 line 0 comments Download
M test/codegen/expect/map_keys.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/methods.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/misc.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/names.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/opassign.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/sunflower/circle.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/sunflower/dom.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/sunflower/painter.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/sunflower/sunflower.html View 1 2 3 4 2 chunks +8 lines, -1 line 0 comments Download
M test/codegen/expect/sunflower/sunflower.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/temps.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M test/codegen/expect/try_catch.js View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M tool/sdk_expected_errors.txt View 3 4 2 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
Leaf
Hi Guys - Sorry for the massive re-org CL. The CL description gives a bit ...
5 years, 6 months ago (2015-06-12 00:33:11 UTC) #2
vsm
lgtm with some comments A couple general high-level comments / questions: - "loader" and "js_util" ...
5 years, 6 months ago (2015-06-12 15:50:33 UTC) #3
Jennifer Messerly
a few comments in addition to Vijay's BTW, the overall organization here looks great, the ...
5 years, 6 months ago (2015-06-12 17:32:25 UTC) #4
Leaf
Ok, I changed a few things based on comments. dartx is a field on dart, ...
5 years, 6 months ago (2015-06-12 19:52:14 UTC) #5
Jennifer Messerly
lgtm https://codereview.chromium.org/1182653002/diff/30057/lib/runtime/js_utils.js File lib/runtime/js_utils.js (right): https://codereview.chromium.org/1182653002/diff/30057/lib/runtime/js_utils.js#newcode5 lib/runtime/js_utils.js:5: /* This library defines a set of general ...
5 years, 6 months ago (2015-06-12 20:12:49 UTC) #6
Leaf
https://codereview.chromium.org/1182653002/diff/30057/lib/runtime/js_utils.js File lib/runtime/js_utils.js (right): https://codereview.chromium.org/1182653002/diff/30057/lib/runtime/js_utils.js#newcode14 lib/runtime/js_utils.js:14: js_utils.defineProperty = defineProperty; On 2015/06/12 20:12:49, John Messerly wrote: ...
5 years, 6 months ago (2015-06-12 20:34:25 UTC) #7
Leaf
5 years, 6 months ago (2015-06-12 20:34:45 UTC) #8
Message was sent while issue was closed.
Committed patchset #7 (id:110001) manually as
5ac465cdaa1eb9508abf8fae24fa66a22bd2932b (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698