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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/model.dart

Issue 741833003: dart2js: Add "onlyForRti" to Classes in model of the new emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.new_js_emitter.model; 5 library dart2js.new_js_emitter.model;
6 6
7 import '../js/js.dart' as js show Expression; 7 import '../js/js.dart' as js show Expression;
8 import '../constants/values.dart' show ConstantValue; 8 import '../constants/values.dart' show ConstantValue;
9 9
10 class Program { 10 class Program {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 StaticField(this.name, this.holder, this.code, 128 StaticField(this.name, this.holder, this.code,
129 this.isFinal, this.isLazy); 129 this.isFinal, this.isLazy);
130 } 130 }
131 131
132 class Class { 132 class Class {
133 final String name; 133 final String name;
134 final Holder holder; 134 final Holder holder;
135 Class superclass; 135 Class superclass;
136 final List<Method> methods; 136 final List<Method> methods;
137 final List<InstanceField> fields; 137 final List<InstanceField> fields;
138 final bool onlyForRti;
138 139
139 /// Whether the class must be evaluated eagerly. 140 /// Whether the class must be evaluated eagerly.
140 bool isEager = false; 141 bool isEager = false;
141 142
142 Class(this.name, this.holder, this.methods, this.fields, 143 Class(this.name, this.holder, this.methods, this.fields,
143 { this.isEager: false }); 144 { this.onlyForRti }) {
145 assert(onlyForRti != null);
146 }
144 147
145 void setSuperclass(Class superclass) { 148 void setSuperclass(Class superclass) {
146 this.superclass = superclass; 149 this.superclass = superclass;
147 } 150 }
148 151
149 String get superclassName 152 String get superclassName
150 => (superclass == null) ? "" : superclass.name; 153 => (superclass == null) ? "" : superclass.name;
151 int get superclassHolderIndex 154 int get superclassHolderIndex
152 => (superclass == null) ? 0 : superclass.holder.index; 155 => (superclass == null) ? 0 : superclass.holder.index;
153 } 156 }
(...skipping 24 matching lines...) Expand all
178 final String name; 181 final String name;
179 final js.Expression code; 182 final js.Expression code;
180 Method(this.name, this.code); 183 Method(this.name, this.code);
181 } 184 }
182 185
183 class StaticMethod extends Method { 186 class StaticMethod extends Method {
184 final Holder holder; 187 final Holder holder;
185 StaticMethod(String name, this.holder, js.Expression code) 188 StaticMethod(String name, this.holder, js.Expression code)
186 : super(name, code); 189 : super(name, code);
187 } 190 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698