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

Unified Diff: pkg/compiler/lib/src/js_emitter/model.dart

Issue 859843002: dart2js: use model in native emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert debug code. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/native_emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/model.dart
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index b1e20c10bdb660dc213a6adf7b1c3c8896c974f6..f4e7ef541d6c76041eb0f26e6ec92459a00cde5a 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -13,11 +13,15 @@ import '../common.dart';
class Program {
final List<Fragment> fragments;
+ final List<Class> nativeClasses;
final bool outputContainsConstantList;
/// A map from load id to the list of fragments that need to be loaded.
final Map<String, List<Fragment>> loadMap;
- Program(this.fragments, this.outputContainsConstantList, this.loadMap);
+ Program(this.fragments,
+ this.nativeClasses,
+ this.outputContainsConstantList,
+ this.loadMap);
bool get isSplit => fragments.length > 1;
Iterable<Fragment> get deferredFragments => fragments.skip(1);
@@ -168,6 +172,7 @@ class Class {
final List<InstanceField> fields;
final bool onlyForRti;
final bool isDirectlyInstantiated;
+ final bool isNative;
/// Whether the class must be evaluated eagerly.
bool isEager = false;
@@ -175,9 +180,11 @@ class Class {
Class(this.element,
this.name, this.holder, this.methods, this.fields,
{this.onlyForRti,
- this.isDirectlyInstantiated}) {
+ this.isDirectlyInstantiated,
+ this.isNative}) {
assert(onlyForRti != null);
assert(isDirectlyInstantiated != null);
+ assert(isNative != null);
}
bool get isMixinApplication => false;
@@ -205,7 +212,8 @@ class MixinApplication extends Class {
: super(element,
name, holder, methods, fields,
onlyForRti: onlyForRti,
- isDirectlyInstantiated: isDirectlyInstantiated);
+ isDirectlyInstantiated: isDirectlyInstantiated,
+ isNative: false);
sra1 2015/01/21 06:27:06 I believe that you can create a custom element tha
bool get isMixinApplication => true;
Class get mixinClass => _mixinClass;
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/native_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698