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

Issue 2994203002: Optimize DDC private library files. (Closed)

Created:
3 years, 4 months ago by Leaf
Modified:
3 years, 4 months ago
Reviewers:
vsm, Jennifer Messerly
CC:
dev-compiler+reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Optimize DDC private runtime library files. Eliminate numerous type checks not needed in strong mode. Use private nullability annotations instead of inline JS to mark known non-null variables, and to make the compiler generate null checks for null checked variables. Use nullability annotations and code refactoring to remove redundant null checks and to move checks out of loops. BUG= R=jmesserly@google.com Committed: https://github.com/dart-lang/sdk/commit/1b8f4ac1e740c8acb21560f5ac64d055b1654d33

Patch Set 1 #

Patch Set 2 : Revisions #

Patch Set 3 : Regen #

Patch Set 4 : Rebase #

Patch Set 5 : Small tweaks #

Total comments: 16

Patch Set 6 : Address comments #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+613 lines, -362 lines) Patch
M pkg/dev_compiler/lib/sdk/ddc_sdk.sum View 1 2 3 4 5 Binary file 0 comments Download
M pkg/dev_compiler/lib/src/analyzer/context.dart View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M pkg/dev_compiler/lib/src/compiler/code_generator.dart View 1 2 3 4 5 10 chunks +51 lines, -6 lines 0 comments Download
M pkg/dev_compiler/lib/src/compiler/js_interop.dart View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart View 1 2 3 4 5 9 chunks +119 lines, -30 lines 7 comments Download
M pkg/dev_compiler/test/browser/language_tests.js View 1 2 3 4 5 2 chunks +1 line, -1 line 0 comments Download
M pkg/dev_compiler/test/codegen_expected/sunflower/sunflower.js View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M pkg/dev_compiler/test/codegen_expected/sunflower/sunflower.js.map View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart View 1 2 3 4 5 3 chunks +21 lines, -9 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart View 1 2 3 4 5 9 chunks +44 lines, -23 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/private/annotations.dart View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/private/js_array.dart View 1 2 3 4 5 19 chunks +53 lines, -44 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/private/js_helper.dart View 1 2 3 4 5 15 chunks +23 lines, -56 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/private/js_number.dart View 1 2 3 4 5 25 chunks +104 lines, -70 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/private/js_string.dart View 1 2 3 4 5 17 chunks +107 lines, -80 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart View 1 2 3 4 5 8 chunks +12 lines, -2 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart View 1 2 3 4 5 7 chunks +14 lines, -17 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/private/string_helper.dart View 1 2 3 4 5 12 chunks +28 lines, -17 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Leaf
Take a look, see what you think of this approach. I pushed a branch here ...
3 years, 4 months ago (2017-08-22 20:47:24 UTC) #3
Jennifer Messerly
LGTM! https://codereview.chromium.org/2994203002/diff/40001/pkg/dev_compiler/lib/src/compiler/code_generator.dart File pkg/dev_compiler/lib/src/compiler/code_generator.dart (right): https://codereview.chromium.org/2994203002/diff/40001/pkg/dev_compiler/lib/src/compiler/code_generator.dart#newcode3281 pkg/dev_compiler/lib/src/compiler/code_generator.dart:3281: // interferes with nullability analysis. FYI ... I ...
3 years, 4 months ago (2017-08-22 21:54:41 UTC) #4
Leaf
https://codereview.chromium.org/2994203002/diff/40001/pkg/dev_compiler/lib/src/compiler/code_generator.dart File pkg/dev_compiler/lib/src/compiler/code_generator.dart (right): https://codereview.chromium.org/2994203002/diff/40001/pkg/dev_compiler/lib/src/compiler/code_generator.dart#newcode3281 pkg/dev_compiler/lib/src/compiler/code_generator.dart:3281: // interferes with nullability analysis. On 2017/08/22 21:54:41, Jennifer ...
3 years, 4 months ago (2017-08-23 17:26:14 UTC) #5
Leaf
Committed patchset #6 (id:50001) manually as 1b8f4ac1e740c8acb21560f5ac64d055b1654d33 (presubmit successful).
3 years, 4 months ago (2017-08-23 17:29:13 UTC) #7
Jennifer Messerly
Oops I missed "nullable_type_inference.dart" file the first time :) this still LGTM ... just a ...
3 years, 4 months ago (2017-08-23 19:49:38 UTC) #8
Jennifer Messerly
3 years, 4 months ago (2017-08-23 19:51:12 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/2994203002/diff/50001/pkg/dev_compiler/lib/sr...
File pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart (right):

https://codereview.chromium.org/2994203002/diff/50001/pkg/dev_compiler/lib/sr...
pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart:127: return
_assertedNotNull(element);
this one also seems potentially unsafe -- I'm guessing we only put these
annotations on non-extensible members, and never on members of interface types?

Powered by Google App Engine
This is Rietveld 408576698