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

Unified Diff: pkg/compiler/lib/src/native/ssa.dart

Issue 2808683003: Remove most direct uses of 'backend' and 'compiler' in GraphBuilder. (Closed)
Patch Set: Created 3 years, 8 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/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/ssa.dart
diff --git a/pkg/compiler/lib/src/native/ssa.dart b/pkg/compiler/lib/src/native/ssa.dart
index 70b022171a6aa8975c98dc25ed047e1ad8262338..ca40035cb708a260a983792f57dd5a70d43ddcce 100644
--- a/pkg/compiler/lib/src/native/ssa.dart
+++ b/pkg/compiler/lib/src/native/ssa.dart
@@ -7,7 +7,6 @@ import '../constants/values.dart';
import '../elements/resolution_types.dart';
import '../elements/elements.dart';
import '../js/js.dart' as js;
-import '../js_backend/js_backend.dart';
import '../js_emitter/js_emitter.dart' show NativeEmitter;
import '../ssa/builder.dart' show SsaBuilder;
import '../ssa/nodes.dart' show HInstruction, HForeignCode, HReturn;
@@ -19,7 +18,6 @@ final RegExp nativeRedirectionRegExp = new RegExp(r'^[a-zA-Z][a-zA-Z_$0-9]*$');
void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
MethodElement element = builder.target;
NativeEmitter nativeEmitter = builder.nativeEmitter;
- JavaScriptBackend backend = builder.backend;
HInstruction convertDartClosure(
ParameterElement parameter, ResolutionFunctionType type) {
@@ -30,7 +28,7 @@ void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
builder.graph.addConstant(arityConstant, builder.closedWorld);
// TODO(ngeoffray): For static methods, we could pass a method with a
// defined arity.
- MethodElement helper = backend.helpers.closureConverter;
+ MethodElement helper = builder.helpers.closureConverter;
builder.pushInvokeStatic(nativeBody, helper, [local, arity]);
HInstruction closure = builder.pop();
return closure;
@@ -44,8 +42,8 @@ void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
// 3) foo() native "return 42";
// hasBody = true
bool hasBody = false;
- assert(backend.nativeData.isNativeMember(element));
- String nativeMethodName = backend.nativeData.getFixedBackendName(element);
+ assert(builder.nativeData.isNativeMember(element));
+ String nativeMethodName = builder.nativeData.getFixedBackendName(element);
if (nativeBody != null) {
LiteralString jsCode = nativeBody.asLiteralString();
String str = jsCode.dartString.slowToString();
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698