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

Unified Diff: pkg/compiler/lib/src/core_types.dart

Issue 804333002: Add CoreTypes interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/core_types.dart
diff --git a/pkg/compiler/lib/src/core_types.dart b/pkg/compiler/lib/src/core_types.dart
new file mode 100644
index 0000000000000000000000000000000000000000..738cf4118bfaeb8eb1e5b938f90c453b4231d0cf
--- /dev/null
+++ b/pkg/compiler/lib/src/core_types.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.type_system;
+
+import 'dart_types.dart';
+
+/// The core types in Dart.
+abstract class CoreTypes {
+ /// The `bool` type defined in 'dart:core'.
+ InterfaceType get boolType;
+
+ /// The `bool` type defined in 'dart:core'.
+ InterfaceType get numType;
+
+ /// The `int` type defined in 'dart:core'.
+ InterfaceType get intType;
+
+ /// The `double` type defined in 'dart:core'.
+ InterfaceType get doubleType;
+
+ /// The `String` type defined in 'dart:core'.
+ InterfaceType get stringType;
+
+ /// The `Function` type defined in 'dart:core'.
+ InterfaceType get functionType;
+
+ /// The `Null` type defined in 'dart:core'.
+ InterfaceType get nullType;
+
+ /// Returns an instance of the `List` type defined in 'dart:core' with
+ /// [elementType] as its type argument.
+ InterfaceType listType([DartType elementType = const DynamicType()]);
+
+ /// Returns an instance of the `Map` type defined in 'dart:core' with
+ /// [keyType] and [valueType] as its type arguments.
+ InterfaceType mapType([DartType keyType = const DynamicType(),
+ DartType valueType = const DynamicType()]);
+}

Powered by Google App Engine
This is Rietveld 408576698