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

Side by Side Diff: pkg/kernel/lib/clone.dart

Issue 2697193008: [Kernel] replace function debuggable field with originalAsyncMarker field (Closed)
Patch Set: Changes based on feedback (+ small forgotten things) Created 3 years, 10 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) 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.clone; 4 library kernel.clone;
5 5
6 import 'ast.dart'; 6 import 'ast.dart';
7 import 'type_algebra.dart'; 7 import 'type_algebra.dart';
8 8
9 /// Visitor that return a clone of a tree, maintaining references to cloned 9 /// Visitor that return a clone of a tree, maintaining references to cloned
10 /// objects. 10 /// objects.
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 visitFunctionNode(FunctionNode node) { 382 visitFunctionNode(FunctionNode node) {
383 var typeParameters = node.typeParameters.map(clone).toList(); 383 var typeParameters = node.typeParameters.map(clone).toList();
384 var positional = node.positionalParameters.map(clone).toList(); 384 var positional = node.positionalParameters.map(clone).toList();
385 var named = node.namedParameters.map(clone).toList(); 385 var named = node.namedParameters.map(clone).toList();
386 return new FunctionNode(cloneFunctionNodeBody(node), 386 return new FunctionNode(cloneFunctionNodeBody(node),
387 typeParameters: typeParameters, 387 typeParameters: typeParameters,
388 positionalParameters: positional, 388 positionalParameters: positional,
389 namedParameters: named, 389 namedParameters: named,
390 requiredParameterCount: node.requiredParameterCount, 390 requiredParameterCount: node.requiredParameterCount,
391 returnType: visitType(node.returnType), 391 returnType: visitType(node.returnType),
392 asyncMarker: node.asyncMarker)..fileEndOffset = node.fileEndOffset; 392 asyncMarker: node.asyncMarker,
393 originalAsyncMarker: node.originalAsyncMarker)
394 ..fileEndOffset = node.fileEndOffset;
393 } 395 }
394 396
395 visitArguments(Arguments node) { 397 visitArguments(Arguments node) {
396 return new Arguments(node.positional.map(clone).toList(), 398 return new Arguments(node.positional.map(clone).toList(),
397 types: node.types.map(visitType).toList(), 399 types: node.types.map(visitType).toList(),
398 named: node.named.map(clone).toList()); 400 named: node.named.map(clone).toList());
399 } 401 }
400 402
401 visitNamedExpression(NamedExpression node) { 403 visitNamedExpression(NamedExpression node) {
402 return new NamedExpression(node.name, clone(node.value)); 404 return new NamedExpression(node.name, clone(node.value));
403 } 405 }
404 } 406 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698