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

Side by Side Diff: frog/leg/lib/js_helper.dart

Issue 9632018: Switch-implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 9 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 #library('js_helper'); 5 #library('js_helper');
6 6
7 #import('coreimpl.dart'); 7 #import('coreimpl.dart');
8 8
9 #source('constant_map.dart'); 9 #source('constant_map.dart');
10 #source('date_helper.dart'); 10 #source('date_helper.dart');
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 String toString() => "Closure"; 1378 String toString() => "Closure";
1379 } 1379 }
1380 1380
1381 bool jsHasOwnProperty(var jsObject, String property) { 1381 bool jsHasOwnProperty(var jsObject, String property) {
1382 return JS('bool', @'$0.hasOwnProperty($1)', jsObject, property); 1382 return JS('bool', @'$0.hasOwnProperty($1)', jsObject, property);
1383 } 1383 }
1384 1384
1385 jsPropertyAccess(var jsObject, String property) { 1385 jsPropertyAccess(var jsObject, String property) {
1386 return JS('var', @'$0[$1]', jsObject, property); 1386 return JS('var', @'$0[$1]', jsObject, property);
1387 } 1387 }
1388
1389
1390 // Called at the end of unaborted switch cases to get the (unique)
1391 // FallThroughError exception that will be thrown.
1392 FallThroughError fallThroughErrorInstance = null;
1393 getFallThroughError() {
1394 // TODO(lrn): Redo when we support "const FallThroughError()".
1395 if (fallThroughErrorInstance === null) {
1396 fallThroughErrorInstance = new FallThroughError();
1397 }
1398 return fallThroughErrorInstance;
1399 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698