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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2647613004: Use entities in code_emitter_task (Closed)
Patch Set: Updated cf. comments Created 3 years, 11 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 import 'dart:collection'; 5 import 'dart:collection';
6 6
7 import 'package:js_runtime/shared/embedded_names.dart'; 7 import 'package:js_runtime/shared/embedded_names.dart';
8 8
9 import '../closure.dart'; 9 import '../closure.dart';
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after
2952 if (node.arguments.isEmpty || !node.arguments.tail.isEmpty) { 2952 if (node.arguments.isEmpty || !node.arguments.tail.isEmpty) {
2953 reporter.internalError( 2953 reporter.internalError(
2954 node.argumentsNode, '"$name" requires exactly one argument.'); 2954 node.argumentsNode, '"$name" requires exactly one argument.');
2955 } 2955 }
2956 ast.Node closure = node.arguments.head; 2956 ast.Node closure = node.arguments.head;
2957 Element element = elements[closure]; 2957 Element element = elements[closure];
2958 if (!Elements.isStaticOrTopLevelFunction(element)) { 2958 if (!Elements.isStaticOrTopLevelFunction(element)) {
2959 reporter.internalError( 2959 reporter.internalError(
2960 closure, '"$name" requires a static or top-level method.'); 2960 closure, '"$name" requires a static or top-level method.');
2961 } 2961 }
2962 FunctionElement function = element; 2962 MethodElement function = element;
2963 // TODO(johnniwinther): Try to eliminate the need to distinguish declaration 2963 // TODO(johnniwinther): Try to eliminate the need to distinguish declaration
2964 // and implementation signatures. Currently it is need because the 2964 // and implementation signatures. Currently it is need because the
2965 // signatures have different elements for parameters. 2965 // signatures have different elements for parameters.
2966 FunctionElement implementation = function.implementation; 2966 FunctionElement implementation = function.implementation;
2967 FunctionSignature params = implementation.functionSignature; 2967 FunctionSignature params = implementation.functionSignature;
2968 if (params.optionalParameterCount != 0) { 2968 if (params.optionalParameterCount != 0) {
2969 reporter.internalError( 2969 reporter.internalError(
2970 closure, '"$name" does not handle closure with optional parameters.'); 2970 closure, '"$name" does not handle closure with optional parameters.');
2971 } 2971 }
2972 2972
(...skipping 3799 matching lines...) Expand 10 before | Expand all | Expand 10 after
6772 this.oldReturnLocal, 6772 this.oldReturnLocal,
6773 this.oldReturnType, 6773 this.oldReturnType,
6774 this.oldResolvedAst, 6774 this.oldResolvedAst,
6775 this.oldStack, 6775 this.oldStack,
6776 this.oldLocalsHandler, 6776 this.oldLocalsHandler,
6777 this.inTryStatement, 6777 this.inTryStatement,
6778 this.allFunctionsCalledOnce, 6778 this.allFunctionsCalledOnce,
6779 this.oldElementInferenceResults) 6779 this.oldElementInferenceResults)
6780 : super(function); 6780 : super(function);
6781 } 6781 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698