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

Issue 9835088: Handle implicit closure of toString. (Closed)

Created:
8 years, 9 months ago by ahe
Modified:
8 years, 9 months ago
CC:
reviews_dartlang.org, compiler-dev_dartlang.org
Visibility:
Public.

Description

Handle implicit closure of toString. Committed: https://code.google.com/p/dart/source/detail?r=5820

Patch Set 1 #

Total comments: 6

Patch Set 2 : Add missing "new" #

Total comments: 2

Patch Set 3 : Remove controversial TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -4 lines) Patch
M dart/frog/leg/lib/js_helper.dart View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M dart/tests/co19/co19-leg.status View 2 chunks +1 line, -1 line 0 comments Download
M dart/tests/language/language-leg.status View 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
ahe
8 years, 9 months ago (2012-03-25 01:13:23 UTC) #1
Lasse Reichstein Nielsen
LGTM https://chromiumcodereview.appspot.com/9835088/diff/1/dart/frog/leg/lib/js_helper.dart File dart/frog/leg/lib/js_helper.dart (right): https://chromiumcodereview.appspot.com/9835088/diff/1/dart/frog/leg/lib/js_helper.dart#newcode1367 dart/frog/leg/lib/js_helper.dart:1367: // TODO(ahe): We should be able to automatically ...
8 years, 9 months ago (2012-03-25 18:27:33 UTC) #2
ngeoffray
LGTM https://chromiumcodereview.appspot.com/9835088/diff/1/dart/frog/leg/lib/js_helper.dart File dart/frog/leg/lib/js_helper.dart (right): https://chromiumcodereview.appspot.com/9835088/diff/1/dart/frog/leg/lib/js_helper.dart#newcode1363 dart/frog/leg/lib/js_helper.dart:1363: throw UnsupportedOperationException('new Null()'); Unrelated, but there is a ...
8 years, 9 months ago (2012-03-25 18:35:31 UTC) #3
ahe
Hi Nicolas and Lasse, Thank you for your comments. Cheers, Peter https://chromiumcodereview.appspot.com/9835088/diff/1/dart/frog/leg/lib/js_helper.dart File dart/frog/leg/lib/js_helper.dart (right): ...
8 years, 9 months ago (2012-03-25 19:49:53 UTC) #4
ngeoffray
@floitsch: since you wrote the code for handling closures, maybe you have another opinion. But ...
8 years, 9 months ago (2012-03-26 08:47:32 UTC) #5
ahe
8 years, 9 months ago (2012-03-26 09:24:57 UTC) #6
https://chromiumcodereview.appspot.com/9835088/diff/6001/dart/frog/leg/lib/js...
File dart/frog/leg/lib/js_helper.dart (right):

https://chromiumcodereview.appspot.com/9835088/diff/6001/dart/frog/leg/lib/js...
dart/frog/leg/lib/js_helper.dart:1367: // TODO(ahe): We should automatically
generate these.
On 2012/03/26 08:47:32, ngeoffray wrote:
> Just talked with Lasse about this. It's not so trivial to automatically
generate
> those. Right now, we have a very simple scheme to recognize if something must
be
> intercepted. Doing something more elegant requires either:
> 
> a) Build a table before starting compiling that contains all methods that must
> be intercepted (eg methods on List,String,num interfaces), or
> 
> b) Have a tool that generates the dart file containing the getters.
> 
> Since we already write the interceptors, as well as the ones that have default
> values, it doesn't seem that bad to manually write a getter just after the
> interceptor. It will make things very easy, including optional arguments:
> 
> builtin$get$indexOf(receiver) {
>  return (value, [int startIndex]) => builtin$indexOf(receiver, value,
> startIndex);
> }

I have removed the TODO for now and continued the discussion in a new thread.

Powered by Google App Engine
This is Rietveld 408576698