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

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

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « pkg/compiler/lib/src/native/scanner.dart ('k') | pkg/compiler/lib/src/old_to_new_api.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 a14f7ad92bb2af307623b952138f459bfbd23df3..7ab20c576bb9f2699fdd63aef6c1153e9f935072 100644
--- a/pkg/compiler/lib/src/native/ssa.dart
+++ b/pkg/compiler/lib/src/native/ssa.dart
@@ -3,24 +3,17 @@
// BSD-style license that can be found in the LICENSE file.
import '../common.dart';
-import '../compiler.dart' show
- Compiler;
+import '../compiler.dart' show Compiler;
import '../constants/values.dart';
import '../dart_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
- CodeEmitterTask,
- NativeEmitter;
+import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter;
import '../ssa/builder.dart' show SsaBuilder;
-import '../ssa/nodes.dart' show
- HInstruction,
- HForeignCode,
- HReturn;
+import '../ssa/nodes.dart' show HInstruction, HForeignCode, HReturn;
import '../tree/tree.dart';
-import '../universe/side_effects.dart' show
- SideEffects;
+import '../universe/side_effects.dart' show SideEffects;
final RegExp nativeRedirectionRegExp = new RegExp(r'^[a-zA-Z][a-zA-Z_$0-9]*$');
@@ -31,8 +24,8 @@ void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
JavaScriptBackend backend = builder.backend;
DiagnosticReporter reporter = compiler.reporter;
- HInstruction convertDartClosure(ParameterElement parameter,
- FunctionType type) {
+ HInstruction convertDartClosure(
+ ParameterElement parameter, FunctionType type) {
HInstruction local = builder.localsHandler.readLocal(parameter);
ConstantValue arityConstant =
builder.constantSystem.createInt(type.computeArity());
@@ -99,25 +92,26 @@ void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
} else if (element.kind == ElementKind.SETTER) {
nativeMethodCall = '$receiver$nativeMethodName = $foreignParameters';
} else {
- builder.reporter.internalError(element,
- 'Unexpected kind: "${element.kind}".');
+ builder.reporter
+ .internalError(element, 'Unexpected kind: "${element.kind}".');
}
- builder.push(
- new HForeignCode(
- // TODO(sra): This could be cached. The number of templates should
- // be proportional to the number of native methods, which is bounded
- // by the dart: libraries.
- js.js.uncachedExpressionTemplate(nativeMethodCall),
- backend.dynamicType,
- inputs, effects: new SideEffects()));
+ builder.push(new HForeignCode(
+ // TODO(sra): This could be cached. The number of templates should
+ // be proportional to the number of native methods, which is bounded
+ // by the dart: libraries.
+ js.js.uncachedExpressionTemplate(nativeMethodCall),
+ backend.dynamicType,
+ inputs,
+ effects: new SideEffects()));
// TODO(johnniwinther): Provide source information.
builder
.close(new HReturn(builder.pop(), null))
.addSuccessor(builder.graph.exit);
} else {
if (parameters.parameterCount != 0) {
- reporter.internalError(nativeBody,
+ reporter.internalError(
+ nativeBody,
'native "..." syntax is restricted to '
'functions with zero parameters.');
}
« no previous file with comments | « pkg/compiler/lib/src/native/scanner.dart ('k') | pkg/compiler/lib/src/old_to_new_api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698