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

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_mirrors.dart

Issue 944423002: Revert "Use an enum in embedded_names as input to JS_GET_NAME." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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') | sdk/lib/_internal/compiler/js_lib/js_names.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart b/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
index e34319e58c2b6d8aee4ed75c3b8490822bad867e..9d55eed28348cf7dd64e65e45d9317e3d6dd0ed6 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_mirrors.dart
@@ -5,7 +5,6 @@
library dart._js_mirrors;
import 'dart:_js_embedded_names' show
- JsGetName,
ALL_CLASSES,
LAZIES,
LIBRARIES,
@@ -72,7 +71,7 @@ import 'dart:_js_names';
const String METHODS_WITH_OPTIONAL_ARGUMENTS = r'$methodsWithOptionalArguments';
bool hasReflectableProperty(var jsFunction) {
- return JS('bool', '# in #', JS_GET_NAME(JsGetName.REFLECTABLE), jsFunction);
+ return JS('bool', '# in #', JS_GET_NAME("REFLECTABLE"), jsFunction);
}
/// No-op method that is called to inform the compiler that tree-shaking needs
@@ -651,7 +650,7 @@ TypeMirror reflectClassByName(Symbol symbol, String mangledName) {
mirror = new JsTypedefMirror(symbol, mangledName, getMetadata(index));
} else {
fields = JS('', '#[#]', descriptor,
- JS_GET_NAME(JsGetName.CLASS_DESCRIPTOR_PROPERTY));
+ JS_GET_NAME('CLASS_DESCRIPTOR_PROPERTY'));
if (fields is List) {
fieldsMetadata = fields.getRange(1, fields.length).toList();
fields = fields[0];
@@ -1747,8 +1746,7 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror
parseCompactFieldSpecification(
fieldOwner,
JS('', '#[#]',
- staticDescriptor,
- JS_GET_NAME(JsGetName.CLASS_DESCRIPTOR_PROPERTY)),
+ staticDescriptor, JS_GET_NAME('CLASS_DESCRIPTOR_PROPERTY')),
true, result);
}
return result;
@@ -2154,7 +2152,7 @@ class JsVariableMirror extends JsDeclarationMirror implements VariableMirror {
if (isStatic) {
unmangledName = mangledGlobalNames[accessorName];
} else {
- String getterPrefix = JS_GET_NAME(JsGetName.GETTER_PREFIX);
+ String getterPrefix = JS_GET_NAME('GETTER_PREFIX');
unmangledName = mangledNames['$getterPrefix$accessorName'];
}
if (unmangledName == null) unmangledName = accessorName;
@@ -2233,7 +2231,7 @@ class JsClosureMirror extends JsInstanceMirror implements ClosureMirror {
if (cachedFunction != null) return cachedFunction;
disableTreeShaking();
// TODO(ahe): What about optional parameters (named or not).
- String callPrefix = "${JS_GET_NAME(JsGetName.CALL_PREFIX)}\$";
+ String callPrefix = "${JS_GET_NAME("CALL_PREFIX")}\$";
var extractCallName = JS('', r'''
function(reflectee) {
for (var property in reflectee) {
@@ -2945,7 +2943,7 @@ bool isOperatorName(String name) {
/// Returns true if the key represent ancillary reflection data, that is, not a
/// method.
bool isReflectiveDataInPrototype(String key) {
- if (key == JS_GET_NAME(JsGetName.CLASS_DESCRIPTOR_PROPERTY) ||
+ if (key == JS_GET_NAME('CLASS_DESCRIPTOR_PROPERTY') ||
key == METHODS_WITH_OPTIONAL_ARGUMENTS) {
return true;
}
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_helper.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_names.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698