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

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

Issue 2641353002: Make full_emitter parts into libraries (Closed)
Patch Set: Created 3 years, 11 months 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart2js.js_emitter.full_emitter; 5 library dart2js.js_emitter.full_emitter.class_builder;
6
7 import '../../elements/elements.dart'
8 show
9 ClassElement,
10 Element;
11 import '../../js/js.dart' as jsAst;
12 import '../../js/js.dart' show js;
13 import '../../js_backend/js_backend.dart'
14 show
15 Namer;
6 16
7 /** 17 /**
8 * A data structure for collecting fragments of a class definition. 18 * A data structure for collecting fragments of a class definition.
9 */ 19 */
10 class ClassBuilder { 20 class ClassBuilder {
11 final List<jsAst.Property> properties = <jsAst.Property>[]; 21 final List<jsAst.Property> properties = <jsAst.Property>[];
12 final List<jsAst.Literal> fields = <jsAst.Literal>[]; 22 final List<jsAst.Literal> fields = <jsAst.Literal>[];
13 23
14 jsAst.Name superName; 24 jsAst.Name superName;
15 jsAst.Node functionType; 25 jsAst.Node functionType;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 fieldsAndProperties = <jsAst.Property>[]; 91 fieldsAndProperties = <jsAst.Property>[];
82 fieldsAndProperties.add(new jsAst.Property( 92 fieldsAndProperties.add(new jsAst.Property(
83 js.string(namer.classDescriptorProperty), classData)); 93 js.string(namer.classDescriptorProperty), classData));
84 fieldsAndProperties.addAll(properties); 94 fieldsAndProperties.addAll(properties);
85 } else { 95 } else {
86 fieldsAndProperties = properties; 96 fieldsAndProperties = properties;
87 } 97 }
88 return new jsAst.ObjectInitializer(fieldsAndProperties, isOneLiner: false); 98 return new jsAst.ObjectInitializer(fieldsAndProperties, isOneLiner: false);
89 } 99 }
90 } 100 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698