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

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

Issue 2460373002: Remove BlockExpression from the Kernel language. (Closed)
Patch Set: Incorporate review comments, format continuation.dart. Created 4 years, 1 month 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 | « lib/binary/ast_from_binary.dart ('k') | lib/binary/tag.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_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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 writeByte(Tag.FunctionExpression); 673 writeByte(Tag.FunctionExpression);
674 writeNode(node.function); 674 writeNode(node.function);
675 } 675 }
676 676
677 visitLet(Let node) { 677 visitLet(Let node) {
678 writeByte(Tag.Let); 678 writeByte(Tag.Let);
679 writeVariableDeclaration(node.variable); 679 writeVariableDeclaration(node.variable);
680 writeNode(node.body); 680 writeNode(node.body);
681 } 681 }
682 682
683 visitBlockExpression(BlockExpression node) {
684 writeByte(Tag.BlockExpression);
685 writeNodeList(node.body.statements);
686 writeNode(node.value);
687 }
688
689 writeStatementOrEmpty(Statement node) { 683 writeStatementOrEmpty(Statement node) {
690 if (node == null) { 684 if (node == null) {
691 writeByte(Tag.EmptyStatement); 685 writeByte(Tag.EmptyStatement);
692 } else { 686 } else {
693 writeNode(node); 687 writeNode(node);
694 } 688 }
695 } 689 }
696 690
697 visitInvalidStatement(InvalidStatement node) { 691 visitInvalidStatement(InvalidStatement node) {
698 writeByte(Tag.InvalidStatement); 692 writeByte(Tag.InvalidStatement);
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 void flush() { 1244 void flush() {
1251 _sink.add(_buffer.sublist(0, length)); 1245 _sink.add(_buffer.sublist(0, length));
1252 _buffer = new Uint8List(SIZE); 1246 _buffer = new Uint8List(SIZE);
1253 length = 0; 1247 length = 0;
1254 } 1248 }
1255 1249
1256 void flushAndDestroy() { 1250 void flushAndDestroy() {
1257 _sink.add(_buffer.sublist(0, length)); 1251 _sink.add(_buffer.sublist(0, length));
1258 } 1252 }
1259 } 1253 }
OLDNEW
« no previous file with comments | « lib/binary/ast_from_binary.dart ('k') | lib/binary/tag.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698