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

Side by Side Diff: runtime/lib/core_patch.dart

Issue 735723003: Implement enum types in VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.h » ('j') | runtime/vm/method_recognizer.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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:math"; 5 import "dart:math";
6 import "dart:typed_data"; 6 import "dart:typed_data";
7 7
8 // We need to pass the exception object as second parameter to the continuation. 8 // We need to pass the exception object as second parameter to the continuation.
9 // See vm/ast_transformer.cc for usage. 9 // See vm/ast_transformer.cc for usage.
10 void _asyncCatchHelper(catchFunction, continuation) { 10 void _asyncCatchHelper(catchFunction, continuation) {
11 catchFunction((e) => continuation(null, e)); 11 catchFunction((e) => continuation(null, e));
12 } 12 }
13
14 // The members of this class are cloned and added to each class that
15 // represents an enum type.
16 class _EnumHelper {
17 // Declare the list of enum value names private. When this field is
18 // cloned into a user-defined enum class, the field will be inaccessible
19 // because of the library-specific name suffix. The toString() function
20 // below can access it because it uses the same name suffix.
21 static const List<String> _enum_names = null;
22 String toString() => _enum_names[index];
23 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.h » ('j') | runtime/vm/method_recognizer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698