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

Issue 9689063: Visit Node in CompileTimeConstantAnalyzer only if Node based (Closed)

Created:
8 years, 9 months ago by scheglov
Modified:
8 years, 9 months ago
Reviewers:
zundel
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Visit Node in CompileTimeConstantAnalyzer only if Node based ...in other case expect that FieldElement will return type from getConstantType(). R=zundel@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=5425

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -147 lines) Patch
D compiler/java/com/google/dart/compiler/resolver/AbstractElement.java View 1 chunk +0 lines, -81 lines 0 comments Download
A + compiler/java/com/google/dart/compiler/resolver/AbstractNodeElement.java View 1 chunk +2 lines, -2 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java View 10 chunks +27 lines, -41 lines 1 comment Download
M compiler/java/com/google/dart/compiler/resolver/DynamicElementImplementation.java View 2 chunks +6 lines, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/Elements.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/FieldElement.java View 1 chunk +5 lines, -0 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/FieldElementImplementation.java View 2 chunks +12 lines, -1 line 0 comments Download
A compiler/java/com/google/dart/compiler/resolver/HasConstantTypeSetter.java View 1 chunk +20 lines, -0 lines 1 comment Download
M compiler/java/com/google/dart/compiler/resolver/LabelElementImplementation.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/LibraryElementImplementation.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/MethodElementImplementation.java View 1 chunk +1 line, -1 line 0 comments Download
A + compiler/java/com/google/dart/compiler/resolver/NodeElement.java View 1 chunk +6 lines, -10 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/SuperElementImplementation.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/SyntheticDefaultConstructorElement.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/TypeVariableElementImplementation.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/VariableElementImplementation.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/VoidElement.java View 1 chunk +1 line, -1 line 0 comments Download
M compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java View 2 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
scheglov
8 years, 9 months ago (2012-03-13 15:35:38 UTC) #1
zundel
8 years, 9 months ago (2012-03-13 17:10:34 UTC) #2
lgtm

offline discussion is that when serializing, we will either provide a new
implementation of the Elements, or will do a custom serializer so as to not save
the node references.

https://chromiumcodereview.appspot.com/9689063/diff/1/compiler/java/com/googl...
File
compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
(right):

https://chromiumcodereview.appspot.com/9689063/diff/1/compiler/java/com/googl...
compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java:509:
((HasConstantTypeSetter) node.getElement()).setConstantType(type);
It seems awkward that you need a cast here.

https://chromiumcodereview.appspot.com/9689063/diff/1/compiler/java/com/googl...
File compiler/java/com/google/dart/compiler/resolver/HasConstantTypeSetter.java
(right):

https://chromiumcodereview.appspot.com/9689063/diff/1/compiler/java/com/googl...
compiler/java/com/google/dart/compiler/resolver/HasConstantTypeSetter.java:1: //
Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
2012

Powered by Google App Engine
This is Rietveld 408576698