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

Side by Side Diff: pkg/kernel/lib/binary/ast_from_binary.dart

Issue 2751083002: Revert "[kernel] offsets on direct property get/set" (Closed)
Patch Set: Created 3 years, 9 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 | « pkg/kernel/binary.md ('k') | pkg/kernel/lib/binary/ast_to_binary.dart » ('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.ast_from_binary; 4 library kernel.ast_from_binary;
5 5
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 8
9 import '../ast.dart'; 9 import '../ast.dart';
10 import '../transformations/flags.dart'; 10 import '../transformations/flags.dart';
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 readMemberReference(allowNull: true))..fileOffset = offset; 680 readMemberReference(allowNull: true))..fileOffset = offset;
681 case Tag.SuperPropertyGet: 681 case Tag.SuperPropertyGet:
682 addTransformerFlag(TransformerFlag.superCalls); 682 addTransformerFlag(TransformerFlag.superCalls);
683 return new SuperPropertyGet.byReference( 683 return new SuperPropertyGet.byReference(
684 readName(), readMemberReference(allowNull: true)); 684 readName(), readMemberReference(allowNull: true));
685 case Tag.SuperPropertySet: 685 case Tag.SuperPropertySet:
686 addTransformerFlag(TransformerFlag.superCalls); 686 addTransformerFlag(TransformerFlag.superCalls);
687 return new SuperPropertySet.byReference( 687 return new SuperPropertySet.byReference(
688 readName(), readExpression(), readMemberReference(allowNull: true)); 688 readName(), readExpression(), readMemberReference(allowNull: true));
689 case Tag.DirectPropertyGet: 689 case Tag.DirectPropertyGet:
690 int offset = readOffset();
691 return new DirectPropertyGet.byReference( 690 return new DirectPropertyGet.byReference(
692 readExpression(), readMemberReference())..fileOffset = offset; 691 readExpression(), readMemberReference());
693 case Tag.DirectPropertySet: 692 case Tag.DirectPropertySet:
694 int offset = readOffset();
695 return new DirectPropertySet.byReference( 693 return new DirectPropertySet.byReference(
696 readExpression(), readMemberReference(), readExpression()) 694 readExpression(), readMemberReference(), readExpression());
697 ..fileOffset = offset;
698 case Tag.StaticGet: 695 case Tag.StaticGet:
699 int offset = readOffset(); 696 int offset = readOffset();
700 return new StaticGet.byReference(readMemberReference()) 697 return new StaticGet.byReference(readMemberReference())
701 ..fileOffset = offset; 698 ..fileOffset = offset;
702 case Tag.StaticSet: 699 case Tag.StaticSet:
703 int offset = readOffset(); 700 int offset = readOffset();
704 return new StaticSet.byReference( 701 return new StaticSet.byReference(
705 readMemberReference(), readExpression())..fileOffset = offset; 702 readMemberReference(), readExpression())..fileOffset = offset;
706 case Tag.MethodInvocation: 703 case Tag.MethodInvocation:
707 int offset = readOffset(); 704 int offset = readOffset();
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 ..fileOffset = offset 1110 ..fileOffset = offset
1114 ..fileEqualsOffset = fileEqualsOffset; 1111 ..fileEqualsOffset = fileEqualsOffset;
1115 } 1112 }
1116 1113
1117 int readOffset() { 1114 int readOffset() {
1118 // Offset is saved as unsigned, 1115 // Offset is saved as unsigned,
1119 // but actually ranges from -1 and up (thus the -1) 1116 // but actually ranges from -1 and up (thus the -1)
1120 return readUInt() - 1; 1117 return readUInt() - 1;
1121 } 1118 }
1122 } 1119 }
OLDNEW
« no previous file with comments | « pkg/kernel/binary.md ('k') | pkg/kernel/lib/binary/ast_to_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698