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

Side by Side Diff: pkg/compiler/lib/src/js_model/closure.dart

Issue 2994333002: Various redemptions (Closed)
Patch Set: Fix + status updates Created 3 years, 4 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/tasks.dart'; 9 import '../common/tasks.dart';
10 import '../constants/expressions.dart'; 10 import '../constants/expressions.dart';
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 @override 502 @override
503 FunctionType getFunctionType(KernelToElementMap elementMap) { 503 FunctionType getFunctionType(KernelToElementMap elementMap) {
504 return functionType; 504 return functionType;
505 } 505 }
506 } 506 }
507 507
508 class ClosureFieldData extends ClosureMemberData implements FieldData { 508 class ClosureFieldData extends ClosureMemberData implements FieldData {
509 ClosureFieldData(MemberDefinition definition) : super(definition); 509 ClosureFieldData(MemberDefinition definition) : super(definition);
510 510
511 @override 511 @override
512 DartType getFieldType(KernelToElementMap elementMap) {
513 // A closure field doesn't have a Dart type.
514 return null;
515 }
516
517 @override
512 ConstantExpression getFieldConstant( 518 ConstantExpression getFieldConstant(
513 KernelToElementMap elementMap, FieldEntity field) { 519 KernelToElementMap elementMap, FieldEntity field) {
514 failedAt( 520 failedAt(
515 field, 521 field,
516 "Unexpected field $field in " 522 "Unexpected field $field in "
517 "ClosureFieldData.getFieldConstant"); 523 "ClosureFieldData.getFieldConstant");
518 return null; 524 return null;
519 } 525 }
520 } 526 }
521 527
(...skipping 15 matching lines...) Expand all
537 KernelScopeInfo scopeInfo; 543 KernelScopeInfo scopeInfo;
538 544
539 /// Collected [CapturedScope] data for nodes. 545 /// Collected [CapturedScope] data for nodes.
540 Map<ir.Node, KernelCapturedScope> capturedScopesMap = 546 Map<ir.Node, KernelCapturedScope> capturedScopesMap =
541 <ir.Node, KernelCapturedScope>{}; 547 <ir.Node, KernelCapturedScope>{};
542 548
543 /// Collected [ScopeInfo] data for nodes. 549 /// Collected [ScopeInfo] data for nodes.
544 Map<ir.FunctionNode, KernelScopeInfo> closuresToGenerate = 550 Map<ir.FunctionNode, KernelScopeInfo> closuresToGenerate =
545 <ir.FunctionNode, KernelScopeInfo>{}; 551 <ir.FunctionNode, KernelScopeInfo>{};
546 } 552 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/type_test_registry.dart ('k') | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698