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

Side by Side Diff: dart/lib/compiler/implementation/code_buffer.dart

Issue 10876008: Remove most superfluous getter arguments from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class CodeBuffer implements StringBuffer { 5 class CodeBuffer implements StringBuffer {
6 StringBuffer buffer; 6 StringBuffer buffer;
7 List<SourceLocation> sourceLocations; 7 List<SourceLocation> sourceLocations;
8 int lastBufferOffset = 0; 8 int lastBufferOffset = 0;
9 9
10 CodeBuffer() 10 CodeBuffer()
11 : buffer = new StringBuffer(), 11 : buffer = new StringBuffer(),
12 sourceLocations = new List<SourceLocation>(); 12 sourceLocations = new List<SourceLocation>();
13 13
14 int get length() => buffer.length; 14 int get length => buffer.length;
15 15
16 bool isEmpty() { 16 bool isEmpty() {
17 return buffer.isEmpty(); 17 return buffer.isEmpty();
18 } 18 }
19 19
20 /** 20 /**
21 * Converts [object] to a string and adds it to the buffer. If [object] is a 21 * Converts [object] to a string and adds it to the buffer. If [object] is a
22 * [CodeBuffer], adds its source locations to [sourceLocations]. 22 * [CodeBuffer], adds its source locations to [sourceLocations].
23 */ 23 */
24 CodeBuffer add(var object) { 24 CodeBuffer add(var object) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 }); 81 });
82 } 82 }
83 } 83 }
84 84
85 class SourceLocation { 85 class SourceLocation {
86 final Element element; 86 final Element element;
87 final Token token; 87 final Token token;
88 final int offsetDelta; 88 final int offsetDelta;
89 SourceLocation(this.element, this.token, this.offsetDelta); 89 SourceLocation(this.element, this.token, this.offsetDelta);
90 } 90 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/closure.dart ('k') | dart/lib/compiler/implementation/compile_time_constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698