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

Side by Side Diff: pkg/compiler/lib/src/common/codegen.dart

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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
OLDNEW
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 library dart2js.common.codegen; 5 library dart2js.common.codegen;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../compiler.dart' show 8 import '../compiler.dart' show
9 Compiler; 9 Compiler;
10 import '../constants/values.dart' show 10 import '../constants/values.dart' show
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 String toString() => 'CodegenRegistry for $currentElement'; 52 String toString() => 'CodegenRegistry for $currentElement';
53 53
54 CodegenEnqueuer get world => compiler.enqueuer.codegen; 54 CodegenEnqueuer get world => compiler.enqueuer.codegen;
55 JavaScriptBackend get backend => compiler.backend; 55 JavaScriptBackend get backend => compiler.backend;
56 56
57 void registerAssert(bool hasMessage) { 57 void registerAssert(bool hasMessage) {
58 // Codegen does not register asserts. They have been lowered to calls. 58 // Codegen does not register asserts. They have been lowered to calls.
59 assert(false); 59 assert(false);
60 } 60 }
61 61
62 void registerInlining(Element inlinedElement, Element context) {
63 if (compiler.dumpInfo) {
64 compiler.dumpInfoTask.registerInlined(inlinedElement, context);
65 }
66 }
67
68 void registerInstantiatedClass(ClassElement element) { 62 void registerInstantiatedClass(ClassElement element) {
69 backend.registerInstantiatedType(element.rawType, world, this); 63 backend.registerInstantiatedType(element.rawType, world, this);
70 } 64 }
71 65
72 void registerInstantiatedType(InterfaceType type) { 66 void registerInstantiatedType(InterfaceType type) {
73 backend.registerInstantiatedType(type, world, this); 67 backend.registerInstantiatedType(type, world, this);
74 } 68 }
75 69
76 void registerStaticUse(Element element) { 70 void registerStaticUse(Element element) {
77 world.registerStaticUse(element); 71 world.registerStaticUse(element);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 190
197 TreeElements get resolutionTree => element.resolvedAst.elements; 191 TreeElements get resolutionTree => element.resolvedAst.elements;
198 192
199 WorldImpact run(Compiler compiler, CodegenEnqueuer world) { 193 WorldImpact run(Compiler compiler, CodegenEnqueuer world) {
200 if (world.isProcessed(element)) return const WorldImpact(); 194 if (world.isProcessed(element)) return const WorldImpact();
201 195
202 registry = new CodegenRegistry(compiler, resolutionTree); 196 registry = new CodegenRegistry(compiler, resolutionTree);
203 return compiler.codegen(this, world); 197 return compiler.codegen(this, world);
204 } 198 }
205 } 199 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/backend_api.dart ('k') | pkg/compiler/lib/src/common/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698