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

Side by Side Diff: pkg/compiler/lib/src/compiler.dart

Issue 1719193002: Remove triple-shift from dart2js. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | pkg/compiler/lib/src/parser/parser.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) 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 library dart2js.compiler_base; 5 library dart2js.compiler_base;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 EventSink, 8 EventSink,
9 Future; 9 Future;
10 10
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 // end that is null. Otherwise, we probably know the current 1790 // end that is null. Otherwise, we probably know the current
1791 // URI. 1791 // URI.
1792 throw 'Cannot find tokens to produce error message.'; 1792 throw 'Cannot find tokens to produce error message.';
1793 } 1793 }
1794 if (uri == null && currentElement != null) { 1794 if (uri == null && currentElement != null) {
1795 uri = currentElement.compilationUnit.script.resourceUri; 1795 uri = currentElement.compilationUnit.script.resourceUri;
1796 assert(invariant(currentElement, () { 1796 assert(invariant(currentElement, () {
1797 1797
1798 bool sameToken(Token token, Token sought) { 1798 bool sameToken(Token token, Token sought) {
1799 if (token == sought) return true; 1799 if (token == sought) return true;
1800 if (token.stringValue == '>>' || 1800 if (token.stringValue == '>>') {
1801 token.stringValue == '>>>') { 1801 // `>>` is converted to `>` in the parser when needed.
1802 // `>>` and `>>>` are converted to `>` in the parser when needed.
1803 return sought.stringValue == '>' && 1802 return sought.stringValue == '>' &&
1804 token.charOffset <= sought.charOffset && 1803 token.charOffset <= sought.charOffset &&
1805 sought.charOffset < token.charEnd; 1804 sought.charOffset < token.charEnd;
1806 } 1805 }
1807 return false; 1806 return false;
1808 } 1807 }
1809 1808
1810 /// Check that [begin] and [end] can be found between [from] and [to]. 1809 /// Check that [begin] and [end] can be found between [from] and [to].
1811 validateToken(Token from, Token to) { 1810 validateToken(Token from, Token to) {
1812 if (from == null || to == null) return true; 1811 if (from == null || to == null) return true;
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 if (_otherDependencies == null) { 2201 if (_otherDependencies == null) {
2203 _otherDependencies = new Setlet<Element>(); 2202 _otherDependencies = new Setlet<Element>();
2204 } 2203 }
2205 _otherDependencies.add(element.implementation); 2204 _otherDependencies.add(element.implementation);
2206 } 2205 }
2207 2206
2208 Iterable<Element> get otherDependencies { 2207 Iterable<Element> get otherDependencies {
2209 return _otherDependencies != null ? _otherDependencies : const <Element>[]; 2208 return _otherDependencies != null ? _otherDependencies : const <Element>[];
2210 } 2209 }
2211 } 2210 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/parser/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698