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

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

Issue 2071593003: Allow constant static fields to overwrite defaults (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: Merge master Created 4 years, 6 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 | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'dart:collection'; 5 import 'dart:collection';
6 6
7 import '../js_ast/js_ast.dart'; 7 import '../js_ast/js_ast.dart';
8 8
9 /// Unique instance for temporary variables. Will be renamed consistently 9 /// Unique instance for temporary variables. Will be renamed consistently
10 /// across the entire file. Different instances will be named differently 10 /// across the entire file. Different instances will be named differently
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 case "protected": 276 case "protected":
277 case "public": 277 case "public":
278 case "static": 278 case "static":
279 case "yield": 279 case "yield":
280 return strictMode; 280 return strictMode;
281 } 281 }
282 return false; 282 return false;
283 } 283 }
284 284
285 /// Returns true for invalid static field names in strict mode. 285 /// Returns true for invalid static field names in strict mode.
286 /// In particular, "caller" "callee" and "arguments" cannot be used. 286 /// In particular, "caller" "callee" "arguments" and "name" cannot be used.
287 bool invalidStaticFieldName(String name) { 287 bool invalidStaticFieldName(String name) {
288 switch (name) { 288 switch (name) {
289 case "arguments": 289 case "arguments":
290 case "caller": 290 case "caller":
291 case "callee": 291 case "callee":
292 case "name":
292 return true; 293 return true;
293 } 294 }
294 return false; 295 return false;
295 } 296 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698