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

Unified Diff: sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart

Issue 1125083002: dart2js: Access to metadata and types goes through builtins. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_helper.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart b/sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart
index 66826b623f84299be8331e9ae77cbd1e91a50ca4..0e455624f741db792198eb0864d112a6370574cf 100644
--- a/sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart
+++ b/sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart
@@ -31,7 +31,6 @@ const MANGLED_NAMES = 'mangledNames';
const LIBRARIES = 'libraries';
const FINISHED_CLASSES = 'finishedClasses';
const ALL_CLASSES = 'allClasses';
-const METADATA = 'metadata';
const INTERCEPTORS_BY_TAG = 'interceptorsByTag';
const LEAF_TAGS = 'leafTags';
const LAZIES = 'lazies';
@@ -46,8 +45,16 @@ const IS_HUNK_INITIALIZED = 'isHunkInitialized';
const DEFERRED_INITIALIZED = 'deferredInitialized';
const PRECOMPILED = 'precompiled';
+/// The name of the embedded global for metadata.
+///
+/// Use [JsBuiltin.getMetadata] instead of directly accessing this embedded
+/// global.
+const METADATA = 'metadata';
+
/// A list of types used in the program e.g. for reflection or encoding of
/// function types.
+///
+/// Use [JsBuiltin.getType] instead of directly accessing this embedded global.
const TYPES = 'types';
/// Returns a function that creates a new Isolate (its static state).
@@ -146,4 +153,16 @@ enum JsBuiltin {
/// JS_BUILTIN('returns:bool;effects:none;depends:none',
/// JsBuiltin.isSubtype, other, type);
isSubtype,
+
+ /// Returns the metadata of the given [index].
+ ///
+ /// JS_BUILTIN('returns:var;effects:none;depends:none',
+ /// JsBuiltin.getMetadata, index);
+ getMetadata,
+
+ /// Returns the type of the given [index].
+ ///
+ /// JS_BUILTIN('returns:var;effects:none;depends:none',
+ /// JsBuiltin.getType, index);
+ getType,
}
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698