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

Issue 9965081: Detect recursion during compilation of const constructors. (Closed)

Created:
8 years, 8 months ago by turnidge
Modified:
8 years, 8 months ago
Reviewers:
hausner
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Detect recursion during compilation of const constructors. We now give a message like this: Illegal recursion in const constructor 'A.'. Committed: https://code.google.com/p/dart/source/detail?r=6128

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -4 lines) Patch
M runtime/vm/compiler.cc View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M tests/co19/co19-runtime.status View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
A tests/language/src/MutuallyRecursiveConstConstructorNegativeTest.dart View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
turnidge
8 years, 8 months ago (2012-04-02 21:26:54 UTC) #1
hausner
I was hoping we could catch this in the parser without having to burn a ...
8 years, 8 months ago (2012-04-02 22:52:10 UTC) #2
srdjan
Also make sure you clear the field in Function::New() (object.cc) On 2012/04/02 22:52:10, hausner wrote: ...
8 years, 8 months ago (2012-04-02 23:14:00 UTC) #3
turnidge
Done. On 2012/04/02 23:14:00, srdjan wrote: > Also make sure you clear the field in ...
8 years, 8 months ago (2012-04-03 16:35:59 UTC) #4
turnidge
8 years, 8 months ago (2012-04-03 16:38:06 UTC) #5
Yes.  I was using a mutually recursive example to test the solution.

If we decide that we want to conserve space, we could collapse some of the bools
in RawFunction into bits.

On 2012/04/02 22:52:10, hausner wrote:
> I was hoping we could catch this in the parser without having to burn a field
on
> every function object. But in its general case, the circular dependency could
be
> more complicated (e.g. mutual recursion through more than one class.)
> 
> So, LGTM.

Powered by Google App Engine
This is Rietveld 408576698