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

Issue 1122133003: fixes #157, renaming local library identifiers if needed. (Closed)

Created:
5 years, 7 months ago by Jennifer Messerly
Modified:
5 years, 7 months ago
Reviewers:
vsm
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 #157, renaming local library identifiers if needed. readability regression, but fairly simple fix. looks okay in libraries with few imports, bad if they have a lot. ultimately I think this gets cleaned up as part of emitting modules + handling module lowering in JS codegen, see issue #34. R=vsm@google.com Committed: https://github.com/dart-lang/dev_compiler/commit/d9fadc32b2fa2efc382d56a610abd2570e5497ff

Patch Set 1 #

Patch Set 2 : fix core.Symbol reference #

Total comments: 2

Patch Set 3 : new approach #

Total comments: 3

Patch Set 4 : fix lazyImport vs import #

Patch Set 5 : rebase and format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+247 lines, -121 lines) Patch
M lib/runtime/dart/_foreign_helper.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M lib/runtime/dart/_interceptors.js View 1 2 3 2 chunks +8 lines, -3 lines 0 comments Download
M lib/runtime/dart/_internal.js View 1 2 3 2 chunks +8 lines, -3 lines 0 comments Download
M lib/runtime/dart/_isolate_helper.js View 1 2 3 2 chunks +12 lines, -3 lines 0 comments Download
M lib/runtime/dart/_js_embedded_names.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M lib/runtime/dart/_js_helper.js View 1 2 3 2 chunks +12 lines, -3 lines 0 comments Download
M lib/runtime/dart/_js_names.js View 1 2 3 2 chunks +8 lines, -3 lines 0 comments Download
M lib/runtime/dart/_js_primitives.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M lib/runtime/dart/_native_typed_data.js View 1 2 3 2 chunks +10 lines, -3 lines 0 comments Download
M lib/runtime/dart/async.js View 1 2 3 4 2 chunks +8 lines, -3 lines 0 comments Download
M lib/runtime/dart/collection.js View 1 2 3 4 2 chunks +7 lines, -3 lines 0 comments Download
M lib/runtime/dart/convert.js View 1 2 3 4 2 chunks +8 lines, -3 lines 0 comments Download
M lib/runtime/dart/core.js View 1 2 3 4 2 chunks +8 lines, -3 lines 0 comments Download
M lib/runtime/dart/isolate.js View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download
M lib/runtime/dart/math.js View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M lib/runtime/dart/typed_data.js View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M lib/runtime/dart_runtime.js View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
M lib/src/codegen/js_codegen.dart View 1 2 3 4 7 chunks +34 lines, -15 lines 0 comments Download
M test/codegen/expect/8invalid-chars.in+file_name.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M test/codegen/expect/BenchmarkBase.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/DeltaBlue.js View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M test/codegen/expect/cascade.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/constructors.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/covariance.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/dir/html_input_a.js View 1 2 3 2 chunks +7 lines, -3 lines 0 comments Download
M test/codegen/expect/dir/html_input_b.js View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M test/codegen/expect/dir/html_input_c.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/dir/html_input_d.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M test/codegen/expect/dir/html_input_e.js View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M test/codegen/expect/fieldtest.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/map_keys.js View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M test/codegen/expect/map_keys.js.map View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/methods.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/misc.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/names.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/opassign.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/sunflower/dom.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/sunflower/sunflower.js View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download
M test/codegen/expect/temps.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M test/codegen/expect/try_catch.js View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (1 generated)
Jennifer Messerly
5 years, 7 months ago (2015-05-05 19:33:42 UTC) #2
vsm
lgtm https://codereview.chromium.org/1122133003/diff/20001/lib/runtime/dart/_interceptors.js File lib/runtime/dart/_interceptors.js (right): https://codereview.chromium.org/1122133003/diff/20001/lib/runtime/dart/_interceptors.js#newcode1 lib/runtime/dart/_interceptors.js:1: var _interceptors, core, _js_helper, _internal, _foreign_helper, _js_embedded_names; It ...
5 years, 7 months ago (2015-05-05 22:01:19 UTC) #3
Jennifer Messerly
thanks! going to make that change and send it back https://codereview.chromium.org/1122133003/diff/20001/lib/runtime/dart/_interceptors.js File lib/runtime/dart/_interceptors.js (right): https://codereview.chromium.org/1122133003/diff/20001/lib/runtime/dart/_interceptors.js#newcode1 ...
5 years, 7 months ago (2015-05-05 22:04:45 UTC) #4
Jennifer Messerly
PTAL
5 years, 7 months ago (2015-05-05 22:23:46 UTC) #5
vsm
https://codereview.chromium.org/1122133003/diff/40001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (right): https://codereview.chromium.org/1122133003/diff/40001/lib/src/codegen/js_codegen.dart#newcode163 lib/src/codegen/js_codegen.dart:163: var helper = _libraryMightNotBeLoaded(library) ? 'import' : 'lazyImport'; Shouldn't ...
5 years, 7 months ago (2015-05-06 00:35:56 UTC) #6
Jennifer Messerly
https://codereview.chromium.org/1122133003/diff/40001/lib/src/codegen/js_codegen.dart File lib/src/codegen/js_codegen.dart (right): https://codereview.chromium.org/1122133003/diff/40001/lib/src/codegen/js_codegen.dart#newcode163 lib/src/codegen/js_codegen.dart:163: var helper = _libraryMightNotBeLoaded(library) ? 'import' : 'lazyImport'; On ...
5 years, 7 months ago (2015-05-06 16:04:54 UTC) #7
vsm
On 2015/05/06 16:04:54, John Messerly wrote: > https://codereview.chromium.org/1122133003/diff/40001/lib/src/codegen/js_codegen.dart > File lib/src/codegen/js_codegen.dart (right): > > https://codereview.chromium.org/1122133003/diff/40001/lib/src/codegen/js_codegen.dart#newcode163 ...
5 years, 7 months ago (2015-05-06 18:16:14 UTC) #8
Jennifer Messerly
nice, fixed. landing!
5 years, 7 months ago (2015-05-06 20:46:06 UTC) #9
Jennifer Messerly
Committed patchset #5 (id:80001) manually as d9fadc32b2fa2efc382d56a610abd2570e5497ff (presubmit successful).
5 years, 7 months ago (2015-05-06 20:47:43 UTC) #10
Jennifer Messerly
5 years, 7 months ago (2015-05-06 20:52:30 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/1122133003/diff/40001/lib/src/codegen/js_code...
File lib/src/codegen/js_codegen.dart (right):

https://codereview.chromium.org/1122133003/diff/40001/lib/src/codegen/js_code...
lib/src/codegen/js_codegen.dart:163: var helper =
_libraryMightNotBeLoaded(library) ? 'import' : 'lazyImport';
On 2015/05/06 16:04:54, John Messerly wrote:
> On 2015/05/06 00:35:55, vsm wrote:
> > Shouldn't this be switched?  I.e., lazyImport if the library might not be
> > loaded?
> 
> haha, yes. I'll fix, does CL look good otherwise?

Oh funny, I figured out how this happened. Merging it into my branch fixing
use-before-define issues, I had inverted this function, it's now
`_libraryIsLoaded` instead of `_libraryMightNotBeLoaded` ... hah. Now resolving
that conflict ... :)

Powered by Google App Engine
This is Rietveld 408576698