| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of js_backend; |
| 6 |
| 5 class ConstantEmitter implements ConstantVisitor { | 7 class ConstantEmitter implements ConstantVisitor { |
| 6 final Compiler compiler; | 8 final Compiler compiler; |
| 7 final Namer namer; | 9 final Namer namer; |
| 8 | 10 |
| 9 CodeBuffer buffer; | 11 CodeBuffer buffer; |
| 10 bool shouldEmitCanonicalVersion; | 12 bool shouldEmitCanonicalVersion; |
| 11 | 13 |
| 12 ConstantEmitter(this.compiler, this.namer); | 14 ConstantEmitter(this.compiler, this.namer); |
| 13 | 15 |
| 14 /** | 16 /** |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 buffer.add(getJsConstructor(constant.type.element)); | 245 buffer.add(getJsConstructor(constant.type.element)); |
| 244 buffer.add("("); | 246 buffer.add("("); |
| 245 for (int i = 0; i < constant.fields.length; i++) { | 247 for (int i = 0; i < constant.fields.length; i++) { |
| 246 if (i != 0) buffer.add(", "); | 248 if (i != 0) buffer.add(", "); |
| 247 _visit(constant.fields[i]); | 249 _visit(constant.fields[i]); |
| 248 } | 250 } |
| 249 buffer.add(")"); | 251 buffer.add(")"); |
| 250 } | 252 } |
| 251 } | 253 } |
| 252 } | 254 } |
| OLD | NEW |