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

Issue 8894031: Use VM specific types if DartC types are not available (Closed)

Created:
9 years ago by danrubel
Modified:
9 years ago
Reviewers:
scheglov, srdjan
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Use VM specific types if DartC types are not available Committed: https://code.google.com/p/dart/source/detail?r=2344

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -2 lines) Patch
M compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java View 1 2 chunks +19 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
danrubel
When I override the SystemLibraryProvider to use the VM libraries rather than the DartC libraries ...
9 years ago (2011-12-10 15:04:36 UTC) #1
srdjan
DBC http://codereview.chromium.org/8894031/diff/1/compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java File compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java (right): http://codereview.chromium.org/8894031/diff/1/compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java#newcode52 compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java:52: this.objectArrayType = getType(new String[] {"ListImplementation", "GrowableObjectArray"}, scope, listener); ...
9 years ago (2011-12-11 01:04:18 UTC) #2
scheglov
lgtm I don't know background, but this change looks safe.
9 years ago (2011-12-12 16:02:11 UTC) #3
danrubel
9 years ago (2011-12-12 16:30:48 UTC) #4
http://codereview.chromium.org/8894031/diff/1/compiler/java/com/google/dart/c...
File
compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java
(right):

http://codereview.chromium.org/8894031/diff/1/compiler/java/com/google/dart/c...
compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java:52:
this.objectArrayType = getType(new String[] {"ListImplementation",
"GrowableObjectArray"}, scope, listener);
I agree that this is a fragile approach. This is a short term fix to get DartC
analyzing VM code so that we can move forward. I'm hoping someone with more
knowledge in this area can improve or remove this code.

On 2011/12/11 01:04:19, srdjan wrote:
> Why do you need to know about which classes implement lists? In VM, the
> interface List is implemented either by ObjectArray or by GrowableObjectArray.
> Those class names will likely be changed.

http://codereview.chromium.org/8894031/diff/1/compiler/java/com/google/dart/c...
compiler/java/com/google/dart/compiler/resolver/CoreTypeProviderImplementation.java:55:
this.stringImplementation = getType(new String[] {"StringImplementation",
"GrowableObjectArray"}, scope, listener);
Good catch. Fixed.

On 2011/12/11 01:04:19, srdjan wrote:
> I do not know about StringImplementation, but in VM the interface String is
> implemented by One/Two/FourByteString classes. Again, the user should not care
> about them.

Powered by Google App Engine
This is Rietveld 408576698