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

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

Issue 3000023002: [kernel] Add fileOffset on FunctionExpression (Closed)
Patch Set: Almost forgot the C++ side of things 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
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | runtime/vm/kernel_binary_flowgraph.h » ('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_to_binary; 4 library kernel.ast_to_binary;
5 5
6 import '../ast.dart'; 6 import '../ast.dart';
7 import '../import_table.dart'; 7 import '../import_table.dart';
8 import 'tag.dart'; 8 import 'tag.dart';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:typed_data'; 10 import 'dart:typed_data';
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 writeNode(node.value); 822 writeNode(node.value);
823 } 823 }
824 824
825 visitAwaitExpression(AwaitExpression node) { 825 visitAwaitExpression(AwaitExpression node) {
826 writeByte(Tag.AwaitExpression); 826 writeByte(Tag.AwaitExpression);
827 writeNode(node.operand); 827 writeNode(node.operand);
828 } 828 }
829 829
830 visitFunctionExpression(FunctionExpression node) { 830 visitFunctionExpression(FunctionExpression node) {
831 writeByte(Tag.FunctionExpression); 831 writeByte(Tag.FunctionExpression);
832 writeOffset(node.fileOffset);
832 writeNode(node.function); 833 writeNode(node.function);
833 } 834 }
834 835
835 visitLet(Let node) { 836 visitLet(Let node) {
836 writeByte(Tag.Let); 837 writeByte(Tag.Let);
837 writeVariableDeclaration(node.variable); 838 writeVariableDeclaration(node.variable);
838 writeNode(node.body); 839 writeNode(node.body);
839 --_variableIndexer.stackHeight; 840 --_variableIndexer.stackHeight;
840 } 841 }
841 842
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 _sink.add(_buffer.sublist(0, length)); 1551 _sink.add(_buffer.sublist(0, length));
1551 _buffer = new Uint8List(SIZE); 1552 _buffer = new Uint8List(SIZE);
1552 flushedLength += length; 1553 flushedLength += length;
1553 length = 0; 1554 length = 0;
1554 } 1555 }
1555 1556
1556 void flushAndDestroy() { 1557 void flushAndDestroy() {
1557 _sink.add(_buffer.sublist(0, length)); 1558 _sink.add(_buffer.sublist(0, length));
1558 } 1559 }
1559 } 1560 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | runtime/vm/kernel_binary_flowgraph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698