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

Issue 11366224: Move some string methods in the interceptor, and support for optional parameters in intercepted met… (Closed)

Created:
8 years, 1 month ago by ngeoffray
Modified:
8 years, 1 month ago
Reviewers:
ahe, floitsch, Erik Corry
CC:
reviews_dartlang.org, erikcorry
Visibility:
Public.

Description

Move some string methods in the interceptor, and support for optional parameters in intercepted methods. Committed: https://code.google.com/p/dart/source/detail?r=14881

Patch Set 1 : #

Total comments: 12

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -104 lines) Patch
M sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 1 2 3 1 chunk +24 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/interceptors.dart View 1 2 3 chunks +66 lines, -98 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_helper.dart View 1 2 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
ngeoffray
8 years, 1 month ago (2012-11-13 17:59:31 UTC) #1
floitsch
LGTM. https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode415 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:415: // Use $ to avoid clashes with other ...
8 years, 1 month ago (2012-11-13 18:20:01 UTC) #2
ahe
LGTM, when you address Florian's comment. https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode397 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:397: JavaScriptBackend backend = ...
8 years, 1 month ago (2012-11-13 18:41:26 UTC) #3
ngeoffray
https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode415 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:415: // Use $ to avoid clashes with other parameter ...
8 years, 1 month ago (2012-11-14 09:18:43 UTC) #4
ngeoffray
https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode397 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:397: JavaScriptBackend backend = compiler.backend; On 2012/11/13 18:41:26, ahe wrote: ...
8 years, 1 month ago (2012-11-14 09:24:44 UTC) #5
floitsch
https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode415 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:415: // Use $ to avoid clashes with other parameter ...
8 years, 1 month ago (2012-11-14 10:06:33 UTC) #6
ngeoffray
https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode415 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:415: // Use $ to avoid clashes with other parameter ...
8 years, 1 month ago (2012-11-14 10:10:58 UTC) #7
floitsch
https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode415 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:415: // Use $ to avoid clashes with other parameter ...
8 years, 1 month ago (2012-11-14 10:18:45 UTC) #8
Erik Corry
I think this will work for now. When we start minifying this code we will ...
8 years, 1 month ago (2012-11-14 11:27:05 UTC) #9
floitsch
8 years, 1 month ago (2012-11-14 12:01:26 UTC) #10
https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right):

https://codereview.chromium.org/11366224/diff/2001/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:415: // Use $
to avoid clashes with other parameter names.
On 2012/11/14 10:18:45, floitsch wrote:
> On 2012/11/14 10:10:58, ngeoffray wrote:
> > On 2012/11/14 10:06:33, floitsch wrote:
> > > On 2012/11/14 09:18:43, ngeoffray wrote:
> > > > On 2012/11/13 18:20:01, floitsch wrote:
> > > > > Too brittle. Discuss with Erik how this should be done.
> > > > 
> > > > Note that this is not touched by the minifier. I could use
> Namer.isolateName
> > > > instead.
> > > 
> > > 1. It should go through the minifier (eventually).
> > > 2. If we change the isolate-name from "$" to something else you cannot be
> sure
> > > anymore that the element-name will not clash with the isolate-name.
> Currently
> > > "$" is always escaped by "getValid", but that's more of an accident.
> > 
> > It doesn't have to be an accident, just an internal convention. If I'm not
> using
> > that convention, I think the only option is to go through the list of
> parameter
> > names, and make up one that isn't used (eg temp).
> > 
> > Note that I could also do the minifiying myself in this code (using a, b, c,
d
> > as parameter names).
> 
> Yes. there are several possibilities. That's why I propose to talk with Erik.

As Erik suggests: this should work for now.
Please add a comment, that this works because "JsNames.getValid" below is
guaranteed never to return "$".
So this choice has nothing to do with the fact that the isolate is "$".

Powered by Google App Engine
This is Rietveld 408576698