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

Issue 10964058: Support redirecting factory constructors in the VM (issue 3969). (Closed)

Created:
8 years, 3 months ago by regis
Modified:
8 years, 3 months ago
Reviewers:
siva, hausner
CC:
reviews_dartlang.org, Ivan Posva
Visibility:
Public.

Description

Support redirecting factory constructors in the VM (issue 3969). Add test (negative tests still missing). Some more work is needed regarding when to throw a dynamic error and when to report a compile-time error. Some questions are not answered by the spec. Committed: https://code.google.com/p/dart/source/detail?r=12791

Patch Set 1 #

Patch Set 2 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+485 lines, -32 lines) Patch
runtime/vm/class_finalizer.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
runtime/vm/class_finalizer.cc View 1 2 chunks +126 lines, -0 lines 0 comments Download
runtime/vm/object.h View 1 4 chunks +39 lines, -0 lines 0 comments Download
runtime/vm/object.cc View 1 7 chunks +108 lines, -2 lines 0 comments Download
runtime/vm/parser.cc View 1 16 chunks +78 lines, -30 lines 0 comments Download
runtime/vm/raw_object.h View 1 2 chunks +17 lines, -0 lines 0 comments Download
runtime/vm/raw_object.cc View 1 1 chunk +7 lines, -0 lines 0 comments Download
runtime/vm/raw_object_snapshot.cc View 1 1 chunk +48 lines, -0 lines 0 comments Download
runtime/vm/snapshot.h View 1 3 chunks +3 lines, -0 lines 0 comments Download
runtime/vm/snapshot.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
runtime/vm/symbols.h View 1 1 chunk +1 line, -0 lines 0 comments Download
tests/language/factory_redirection_test.dart View 1 chunk +47 lines, -0 lines 4 comments Download
tests/language/language.status View 1 1 chunk +1 line, -0 lines 0 comments Download
tests/language/language_dart2js.status View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
regis
8 years, 3 months ago (2012-09-22 01:58:43 UTC) #1
hausner
LGTM.
8 years, 3 months ago (2012-09-24 17:03:14 UTC) #2
siva
lgtm https://codereview.chromium.org/10964058/diff/11001/tests/language/factory_redirection_test.dart File tests/language/factory_redirection_test.dart (right): https://codereview.chromium.org/10964058/diff/11001/tests/language/factory_redirection_test.dart#newcode8 tests/language/factory_redirection_test.dart:8: const A.constant(T x) : this.x = x; const ...
8 years, 3 months ago (2012-09-24 20:51:35 UTC) #3
regis
8 years, 3 months ago (2012-09-24 21:41:28 UTC) #4
Thank you both.

https://codereview.chromium.org/10964058/diff/11001/tests/language/factory_re...
File tests/language/factory_redirection_test.dart (right):

https://codereview.chromium.org/10964058/diff/11001/tests/language/factory_re...
tests/language/factory_redirection_test.dart:8: const A.constant(T x) : this.x =
x;
On 2012/09/24 20:51:35, siva wrote:
> const A.constant(this.x); ?

Done.

https://codereview.chromium.org/10964058/diff/11001/tests/language/factory_re...
tests/language/factory_redirection_test.dart:32: factory C.A_factory() =
A<V>.factory;
On 2012/09/24 20:51:35, siva wrote:
> Would it be legal here to redirect to A<K>.factory; ?

Yes, it would. But you would need to call new C<bool, ...> for the test to work.
Actually, I tried and ran into another issue, which I will fix: type arguments
of canonical types should be allocated in the old space, but they are not
always.

Powered by Google App Engine
This is Rietveld 408576698