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

Side by Side Diff: pkg/kernel/lib/analyzer/ast_from_analyzer.dart

Issue 2632253002: VM: [Kernel] Partial support for metadata annotations (Closed)
Patch Set: Address 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
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library kernel.analyzer.ast_from_analyzer; 4 library kernel.analyzer.ast_from_analyzer;
5 5
6 import '../ast.dart' as ast; 6 import '../ast.dart' as ast;
7 import '../frontend/accessors.dart'; 7 import '../frontend/accessors.dart';
8 import '../frontend/super_initializers.dart'; 8 import '../frontend/super_initializers.dart';
9 import '../log.dart'; 9 import '../log.dart';
10 import '../type_algebra.dart'; 10 import '../type_algebra.dart';
(...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after
2833 field.initializer = scope.buildTopLevelExpression(node.initializer) 2833 field.initializer = scope.buildTopLevelExpression(node.initializer)
2834 ..parent = field; 2834 ..parent = field;
2835 } else if (field.isStatic) { 2835 } else if (field.isStatic) {
2836 // Add null initializer to static fields without an initializer. 2836 // Add null initializer to static fields without an initializer.
2837 // For instance fields, this is handled when building the class. 2837 // For instance fields, this is handled when building the class.
2838 field.initializer = new ast.NullLiteral()..parent = field; 2838 field.initializer = new ast.NullLiteral()..parent = field;
2839 } 2839 }
2840 } 2840 }
2841 2841
2842 visitFunctionDeclaration(FunctionDeclaration node) { 2842 visitFunctionDeclaration(FunctionDeclaration node) {
2843 addAnnotations(node.metadata);
2843 var function = node.functionExpression; 2844 var function = node.functionExpression;
2844 ast.Procedure procedure = currentMember; 2845 ast.Procedure procedure = currentMember;
2845 procedure.function = scope.buildFunctionNode( 2846 procedure.function = scope.buildFunctionNode(
2846 function.parameters, function.body, 2847 function.parameters, function.body,
2847 returnType: node.returnType, 2848 returnType: node.returnType,
2848 typeParameters: scope.buildOptionalTypeParameterList( 2849 typeParameters: scope.buildOptionalTypeParameterList(
2849 function.typeParameters, 2850 function.typeParameters,
2850 strongModeOnly: true))..parent = procedure; 2851 strongModeOnly: true))..parent = procedure;
2851 handleNativeBody(function.body); 2852 handleNativeBody(function.body);
2852 } 2853 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2964 if (list[i - 1].compareTo(item) == 0) { 2965 if (list[i - 1].compareTo(item) == 0) {
2965 ++deleted; 2966 ++deleted;
2966 } else if (deleted > 0) { 2967 } else if (deleted > 0) {
2967 list[i - deleted] = item; 2968 list[i - deleted] = item;
2968 } 2969 }
2969 } 2970 }
2970 if (deleted > 0) { 2971 if (deleted > 0) {
2971 list.length -= deleted; 2972 list.length -= deleted;
2972 } 2973 }
2973 } 2974 }
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698