| OLD | NEW |
| 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 '../ast.dart'; | 6 import '../ast.dart'; |
| 7 import 'tag.dart'; | 7 import 'tag.dart'; |
| 8 import 'loader.dart'; | 8 import 'loader.dart'; |
| 9 import 'dart:convert'; | 9 import 'dart:convert'; |
| 10 import 'package:kernel/transformations/flags.dart'; | 10 import 'package:kernel/transformations/flags.dart'; |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 addTransformerFlag(TransformerFlag.superCalls); | 544 addTransformerFlag(TransformerFlag.superCalls); |
| 545 return new SuperPropertySet( | 545 return new SuperPropertySet( |
| 546 readName(), readExpression(), readMemberReference(allowNull: true)); | 546 readName(), readExpression(), readMemberReference(allowNull: true)); |
| 547 case Tag.DirectPropertyGet: | 547 case Tag.DirectPropertyGet: |
| 548 return new DirectPropertyGet(readExpression(), readMemberReference()); | 548 return new DirectPropertyGet(readExpression(), readMemberReference()); |
| 549 case Tag.DirectPropertySet: | 549 case Tag.DirectPropertySet: |
| 550 return new DirectPropertySet( | 550 return new DirectPropertySet( |
| 551 readExpression(), readMemberReference(), readExpression()); | 551 readExpression(), readMemberReference(), readExpression()); |
| 552 case Tag.StaticGet: | 552 case Tag.StaticGet: |
| 553 int offset = readOffset(); | 553 int offset = readOffset(); |
| 554 return new StaticGet(readMemberReference()) | 554 return new StaticGet(readMemberReference())..fileOffset = offset; |
| 555 ..fileOffset = offset; | |
| 556 case Tag.StaticSet: | 555 case Tag.StaticSet: |
| 557 return new StaticSet(readMemberReference(), readExpression()); | 556 return new StaticSet(readMemberReference(), readExpression()); |
| 558 case Tag.MethodInvocation: | 557 case Tag.MethodInvocation: |
| 559 int offset = readOffset(); | 558 int offset = readOffset(); |
| 560 return new MethodInvocation( | 559 return new MethodInvocation( |
| 561 readExpression(), | 560 readExpression(), |
| 562 readName(), | 561 readName(), |
| 563 readArguments(), | 562 readArguments(), |
| 564 readMemberReference(allowNull: true))..fileOffset = offset; | 563 readMemberReference(allowNull: true))..fileOffset = offset; |
| 565 case Tag.SuperMethodInvocation: | 564 case Tag.SuperMethodInvocation: |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 isFinal: flags & 0x1 != 0, | 931 isFinal: flags & 0x1 != 0, |
| 933 isConst: flags & 0x2 != 0); | 932 isConst: flags & 0x2 != 0); |
| 934 } | 933 } |
| 935 | 934 |
| 936 int readOffset() { | 935 int readOffset() { |
| 937 // Offset is saved as unsigned, | 936 // Offset is saved as unsigned, |
| 938 // but actually ranges from -1 and up (thus the -1) | 937 // but actually ranges from -1 and up (thus the -1) |
| 939 return readUInt() - 1; | 938 return readUInt() - 1; |
| 940 } | 939 } |
| 941 } | 940 } |
| OLD | NEW |