|
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
Total comments: 12
Total comments: 24
|
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
|
Total messages: 8 (1 generated)
|