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

Issue 9447049: Put two $ in front of top-level builtins, to not clash with member names. Otherwise, the global obj… (Closed)

Created:
8 years, 10 months ago by ngeoffray
Modified:
8 years, 10 months ago
Reviewers:
vsm, floitsch, sra1, kasperl
CC:
reviews_dartlang.org, sra1
Visibility:
Public.

Description

Put two $ in front of top-level builtins, to not clash with member names. Otherwise, the global object calls the top-level builtin instead of its member. Committed: https://code.google.com/p/dart/source/detail?r=4564

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -15 lines) Patch
A client/tests/client/dom/WindowEqTest.dart View 1 chunk +12 lines, -0 lines 0 comments Download
M frog/corejs.dart View 8 chunks +12 lines, -12 lines 0 comments Download
M frog/member.dart View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
ngeoffray
8 years, 10 months ago (2012-02-24 11:14:28 UTC) #1
floitsch
LGTM.
8 years, 10 months ago (2012-02-24 11:42:23 UTC) #2
sra1
This is a broken fix. The Frog name mangling rule is that $ in a ...
8 years, 10 months ago (2012-02-24 19:36:07 UTC) #3
floitsch
8 years, 10 months ago (2012-02-24 20:50:33 UTC) #4
Should have caught that.
thanks for spotting.

On 2012/02/24 19:36:07, sra1 wrote:
> This is a broken fix.
> 
> The Frog name mangling rule is that $ in a user identifier is always
doubled-up
> to $$.
> I think you could write this in Dart and get a clash:
>    void $eq(){}
> 
> The $-->$$ mangling means
>   (1) a single $ is always safe for a non-user identifier (like builtings and
> argument defaulting trampoline),
>   (2) builtins must always have a non-paired $ to avoid a clash.

Powered by Google App Engine
This is Rietveld 408576698