c47ad2789e
Safari has a bug that makes it a syntax error for a function name to overlap with names of parameters in functions with default parameter values. This CL changes DDC to generates code to circumvent this issue when emitting top-level methods. Fortunately, the Safari bug doesn't trigger with ES6 methods, so we don't need to do anything for Dart instance methods. The only other occurrence of named functions in DDC are `function*` generators that we emit. Those take no arguments, so we don't need any additional renaming there. Fixes #43520 Change-Id: I2e4588701a294a8f3c5b47956826ada4ed973e6c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198200 Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com>