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

Side by Side Diff: pkg/compiler/lib/src/js_backend/element_strategy.dart

Issue 2939033002: Towards compiling Hello World! (Closed)
Patch Set: Fix parameter ordering Created 3 years, 6 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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.js_backend.element_strategy; 5 library dart2js.js_backend.element_strategy;
6 6
7 import '../backend_strategy.dart'; 7 import '../backend_strategy.dart';
8 import '../closure.dart' show ClosureConversionTask, ClosureTask; 8 import '../closure.dart' show ClosureConversionTask, ClosureTask;
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/codegen.dart'; 10 import '../common/codegen.dart';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 @override 46 @override
47 ClosureConversionTask createClosureConversionTask(Compiler compiler) => 47 ClosureConversionTask createClosureConversionTask(Compiler compiler) =>
48 new ClosureTask(compiler); 48 new ClosureTask(compiler);
49 49
50 @override 50 @override
51 CodegenWorldBuilder createCodegenWorldBuilder( 51 CodegenWorldBuilder createCodegenWorldBuilder(
52 NativeBasicData nativeBasicData, 52 NativeBasicData nativeBasicData,
53 ClosedWorld closedWorld, 53 ClosedWorld closedWorld,
54 SelectorConstraintsStrategy selectorConstraintsStrategy) { 54 SelectorConstraintsStrategy selectorConstraintsStrategy) {
55 return new ElementCodegenWorldBuilderImpl(closedWorld.elementEnvironment, 55 return new ElementCodegenWorldBuilderImpl(
56 nativeBasicData, closedWorld, selectorConstraintsStrategy); 56 _compiler.backend.constants,
57 closedWorld.elementEnvironment,
58 nativeBasicData,
59 closedWorld,
60 selectorConstraintsStrategy);
57 } 61 }
58 62
59 @override 63 @override
60 WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld) { 64 WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld) {
61 return new ElementCodegenWorkItemBuilder( 65 return new ElementCodegenWorkItemBuilder(
62 _compiler.backend, closedWorld, _compiler.options); 66 _compiler.backend, closedWorld, _compiler.options);
63 } 67 }
64 68
65 @override 69 @override
66 SsaBuilder createSsaBuilder(CompilerTask task, JavaScriptBackend backend, 70 SsaBuilder createSsaBuilder(CompilerTask task, JavaScriptBackend backend,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return new ElementCodegenWorkItem.internal( 153 return new ElementCodegenWorkItem.internal(
150 resolvedAst, backend, closedWorld); 154 resolvedAst, backend, closedWorld);
151 } 155 }
152 156
153 ElementCodegenWorkItem.internal( 157 ElementCodegenWorkItem.internal(
154 this.resolvedAst, this._backend, this._closedWorld); 158 this.resolvedAst, this._backend, this._closedWorld);
155 159
156 MemberElement get element => resolvedAst.element; 160 MemberElement get element => resolvedAst.element;
157 161
158 WorldImpact run() { 162 WorldImpact run() {
159 registry = new CodegenRegistry(element); 163 registry = new CodegenRegistry(_closedWorld.elementEnvironment, element);
160 return _backend.codegen(this, _closedWorld); 164 return _backend.codegen(this, _closedWorld);
161 } 165 }
162 166
163 String toString() => 'CodegenWorkItem(${resolvedAst.element})'; 167 String toString() => 'CodegenWorkItem(${resolvedAst.element})';
164 } 168 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698