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

Unified Diff: pkg/compiler/lib/src/js_backend/checked_mode_helpers.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
Index: pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
diff --git a/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart b/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
index a40caad790d64a0eaf8abea71e5a8e16bcbfaca8..409c44dff81307d778ff3e46c1ccdc69fe75bd80 100644
--- a/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
+++ b/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
@@ -17,8 +17,8 @@ class CheckedModeHelper {
CallStructure get callStructure => CallStructure.ONE_ARG;
- jsAst.Expression generateCall(SsaCodeGenerator codegen,
- HTypeConversion node) {
+ jsAst.Expression generateCall(
+ SsaCodeGenerator codegen, HTypeConversion node) {
StaticUse staticUse = getStaticUse(codegen.compiler);
codegen.registry.registerStaticUse(staticUse);
List<jsAst.Expression> arguments = <jsAst.Expression>[];
@@ -31,46 +31,46 @@ class CheckedModeHelper {
}
void generateAdditionalArguments(SsaCodeGenerator codegen,
- HTypeConversion node,
- List<jsAst.Expression> arguments) {
+ HTypeConversion node, List<jsAst.Expression> arguments) {
// No additional arguments needed.
}
- static const List<CheckedModeHelper> helpers = const <CheckedModeHelper> [
- const MalformedCheckedModeHelper('checkMalformedType'),
- const CheckedModeHelper('voidTypeCheck'),
- const CheckedModeHelper('stringTypeCast'),
- const CheckedModeHelper('stringTypeCheck'),
- const CheckedModeHelper('doubleTypeCast'),
- const CheckedModeHelper('doubleTypeCheck'),
- const CheckedModeHelper('numTypeCast'),
- const CheckedModeHelper('numTypeCheck'),
- const CheckedModeHelper('boolTypeCast'),
- const CheckedModeHelper('boolTypeCheck'),
- const CheckedModeHelper('intTypeCast'),
- const CheckedModeHelper('intTypeCheck'),
- const PropertyCheckedModeHelper('numberOrStringSuperNativeTypeCast'),
- const PropertyCheckedModeHelper('numberOrStringSuperNativeTypeCheck'),
- const PropertyCheckedModeHelper('numberOrStringSuperTypeCast'),
- const PropertyCheckedModeHelper('numberOrStringSuperTypeCheck'),
- const PropertyCheckedModeHelper('stringSuperNativeTypeCast'),
- const PropertyCheckedModeHelper('stringSuperNativeTypeCheck'),
- const PropertyCheckedModeHelper('stringSuperTypeCast'),
- const PropertyCheckedModeHelper('stringSuperTypeCheck'),
- const CheckedModeHelper('listTypeCast'),
- const CheckedModeHelper('listTypeCheck'),
- const PropertyCheckedModeHelper('listSuperNativeTypeCast'),
- const PropertyCheckedModeHelper('listSuperNativeTypeCheck'),
- const PropertyCheckedModeHelper('listSuperTypeCast'),
- const PropertyCheckedModeHelper('listSuperTypeCheck'),
- const PropertyCheckedModeHelper('interceptedTypeCast'),
- const PropertyCheckedModeHelper('interceptedTypeCheck'),
- const SubtypeCheckedModeHelper('subtypeCast'),
- const SubtypeCheckedModeHelper('assertSubtype'),
- const TypeVariableCheckedModeHelper('subtypeOfRuntimeTypeCast'),
- const TypeVariableCheckedModeHelper('assertSubtypeOfRuntimeType'),
- const PropertyCheckedModeHelper('propertyTypeCast'),
- const PropertyCheckedModeHelper('propertyTypeCheck')];
+ static const List<CheckedModeHelper> helpers = const <CheckedModeHelper>[
+ const MalformedCheckedModeHelper('checkMalformedType'),
+ const CheckedModeHelper('voidTypeCheck'),
+ const CheckedModeHelper('stringTypeCast'),
+ const CheckedModeHelper('stringTypeCheck'),
+ const CheckedModeHelper('doubleTypeCast'),
+ const CheckedModeHelper('doubleTypeCheck'),
+ const CheckedModeHelper('numTypeCast'),
+ const CheckedModeHelper('numTypeCheck'),
+ const CheckedModeHelper('boolTypeCast'),
+ const CheckedModeHelper('boolTypeCheck'),
+ const CheckedModeHelper('intTypeCast'),
+ const CheckedModeHelper('intTypeCheck'),
+ const PropertyCheckedModeHelper('numberOrStringSuperNativeTypeCast'),
+ const PropertyCheckedModeHelper('numberOrStringSuperNativeTypeCheck'),
+ const PropertyCheckedModeHelper('numberOrStringSuperTypeCast'),
+ const PropertyCheckedModeHelper('numberOrStringSuperTypeCheck'),
+ const PropertyCheckedModeHelper('stringSuperNativeTypeCast'),
+ const PropertyCheckedModeHelper('stringSuperNativeTypeCheck'),
+ const PropertyCheckedModeHelper('stringSuperTypeCast'),
+ const PropertyCheckedModeHelper('stringSuperTypeCheck'),
+ const CheckedModeHelper('listTypeCast'),
+ const CheckedModeHelper('listTypeCheck'),
+ const PropertyCheckedModeHelper('listSuperNativeTypeCast'),
+ const PropertyCheckedModeHelper('listSuperNativeTypeCheck'),
+ const PropertyCheckedModeHelper('listSuperTypeCast'),
+ const PropertyCheckedModeHelper('listSuperTypeCheck'),
+ const PropertyCheckedModeHelper('interceptedTypeCast'),
+ const PropertyCheckedModeHelper('interceptedTypeCheck'),
+ const SubtypeCheckedModeHelper('subtypeCast'),
+ const SubtypeCheckedModeHelper('assertSubtype'),
+ const TypeVariableCheckedModeHelper('subtypeOfRuntimeTypeCast'),
+ const TypeVariableCheckedModeHelper('assertSubtypeOfRuntimeType'),
+ const PropertyCheckedModeHelper('propertyTypeCast'),
+ const PropertyCheckedModeHelper('propertyTypeCheck')
+ ];
}
class MalformedCheckedModeHelper extends CheckedModeHelper {
@@ -79,8 +79,7 @@ class MalformedCheckedModeHelper extends CheckedModeHelper {
CallStructure get callStructure => CallStructure.TWO_ARGS;
void generateAdditionalArguments(SsaCodeGenerator codegen,
- HTypeConversion node,
- List<jsAst.Expression> arguments) {
+ HTypeConversion node, List<jsAst.Expression> arguments) {
ErroneousElement element = node.typeExpression.element;
arguments.add(js.escapedString(element.message));
}
@@ -92,8 +91,7 @@ class PropertyCheckedModeHelper extends CheckedModeHelper {
CallStructure get callStructure => CallStructure.TWO_ARGS;
void generateAdditionalArguments(SsaCodeGenerator codegen,
- HTypeConversion node,
- List<jsAst.Expression> arguments) {
+ HTypeConversion node, List<jsAst.Expression> arguments) {
DartType type = node.typeExpression;
jsAst.Name additionalArgument = codegen.backend.namer.operatorIsType(type);
arguments.add(js.quoteName(additionalArgument));
@@ -106,8 +104,7 @@ class TypeVariableCheckedModeHelper extends CheckedModeHelper {
CallStructure get callStructure => CallStructure.TWO_ARGS;
void generateAdditionalArguments(SsaCodeGenerator codegen,
- HTypeConversion node,
- List<jsAst.Expression> arguments) {
+ HTypeConversion node, List<jsAst.Expression> arguments) {
assert(node.typeExpression.isTypeVariable);
codegen.use(node.typeRepresentation);
arguments.add(codegen.pop());
@@ -120,8 +117,7 @@ class SubtypeCheckedModeHelper extends CheckedModeHelper {
CallStructure get callStructure => const CallStructure.unnamed(4);
void generateAdditionalArguments(SsaCodeGenerator codegen,
- HTypeConversion node,
- List<jsAst.Expression> arguments) {
+ HTypeConversion node, List<jsAst.Expression> arguments) {
DartType type = node.typeExpression;
Element element = type.element;
jsAst.Name isField = codegen.backend.namer.operatorIs(element);
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend_serialization.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698