dart-sdk/pkg
Jenny Messerly 472c898c87 [dartdevc] fix for-in loop variable shadowing a var used in initialzer
Dart for-in loops allow `var x = [1]; for (var x in x) {}`, which is not
allowed in JS. If this pattern is detected, a temporary variable is
introduced so the for-in initializer expression is evaluated outside of
the JS for-of loop.

(This issue seems to be unique to for-in loops. For loops and other
kinds of variable declarations of the form `var x = ...` are not
allowed to use `x` in the initializer, even if `x` is declared in an
outer scope.)

Also fixes an out-of-date comment in the DDC+Analyzer backend.

Change-Id: I35b272a5a311f7b6f104cc82a99cc83a6ed5c247
Reviewed-on: https://dart-review.googlesource.com/c/79142
Commit-Queue: Alan Knight <alanknight@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
2018-10-11 17:07:39 +00:00
..
analysis_server Add LSP spec code-gen output 2018-10-11 15:54:14 +00:00
analysis_server_client
analyzer Move package bundle functionality into SummaryBaseTestStrategy. 2018-10-11 16:09:04 +00:00
analyzer_cli Hook up FixProcessor to fix errors in dartfix 2018-10-10 16:52:16 +00:00
analyzer_fe_comparison Remove TargetFlags.strongMode 2018-10-10 12:11:41 +00:00
analyzer_plugin Fix cast exception in OpTypeAstVisitor 2018-10-09 18:40:19 +00:00
async_helper
build_integration
compiler fix some typos 2018-10-10 19:15:30 +00:00
dart2js_tools
dart_internal
dev_compiler [dartdevc] fix for-in loop variable shadowing a var used in initialzer 2018-10-11 17:07:39 +00:00
diagnostic Create a package for shared diagnostics 2018-09-27 16:23:20 +00:00
expect fix some typos 2018-10-10 19:15:30 +00:00
front_end Reland "[fasta] Report errors for bounds violations" 2018-10-11 10:20:01 +00:00
js
js_ast fix some typos 2018-10-10 19:15:30 +00:00
kernel Reland "[fasta] Report errors for bounds violations" 2018-10-11 10:20:01 +00:00
meta Revert "[dart2js] Simplify noInline / tryInline annotations" 2018-09-25 22:11:42 +00:00
microlytics
smith
sourcemap_testing
status_file fix some typos 2018-10-10 19:15:30 +00:00
telemetry
testing Fix broken 'fasta testing sdk'. 2018-09-27 13:08:47 +00:00
vm Remove the word "strongMode" from some package:kernel libraries. 2018-10-11 08:50:43 +00:00
.gitignore
BUILD.gn
pkg.status Update status entries for renamed test (pkg/front_end hot_reload_e2e_test) 2018-10-05 14:24:41 +00:00