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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart

Issue 236313012: Don't hide interceptors in mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor cleanups. Created 6 years, 8 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
Index: sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
index 6f19edbabfb30fca42b91aafa3009a93424c6f80..f2ceb499b801da6819cba05d9c908135f566bacd 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
@@ -27,8 +27,6 @@ class ClassEmitter extends CodeEmitterHelper {
if (superclass != null) {
superName = namer.getNameOfClass(superclass);
}
- String runtimeName =
- namer.getPrimitiveInterceptorRuntimeName(classElement);
if (classElement.isMixinApplication) {
String mixinName = namer.getNameOfClass(computeMixinClass(classElement));
@@ -37,8 +35,7 @@ class ClassEmitter extends CodeEmitterHelper {
}
ClassBuilder builder = new ClassBuilder(namer);
- emitClassConstructor(classElement, builder, runtimeName,
- onlyForRti: onlyForRti);
+ emitClassConstructor(classElement, builder, onlyForRti: onlyForRti);
emitFields(classElement, builder, superName, onlyForRti: onlyForRti);
emitClassGettersSetters(classElement, builder, onlyForRti: onlyForRti);
emitInstanceMembers(classElement, builder, onlyForRti: onlyForRti);
@@ -55,7 +52,6 @@ class ClassEmitter extends CodeEmitterHelper {
void emitClassConstructor(ClassElement classElement,
ClassBuilder builder,
- String runtimeName,
{bool onlyForRti: false}) {
List<String> fields = <String>[];
if (!onlyForRti && !classElement.isNative()) {
@@ -82,9 +78,8 @@ class ClassEmitter extends CodeEmitterHelper {
js('function(#) { #; }',
[fields,
fields.map((name) => js('this.# = #', [name, name]))])));
- if (runtimeName == null) {
- runtimeName = constructorName;
- }
+ // TODO(floitsch): do we actually need the name field?
+ // TODO(floitsch): these should all go through the namer.
task.precompiledFunction.add(
js.statement(r'''{
@@ -95,7 +90,7 @@ class ClassEmitter extends CodeEmitterHelper {
if ($desc instanceof Array) $desc = $desc[1];
#.prototype = $desc;
}''',
- [ constructorName, js.string(runtimeName),
+ [ constructorName, js.string(constructorName),
constructorName,
constructorName, js.string(constructorName),
constructorName,
@@ -123,11 +118,6 @@ class ClassEmitter extends CodeEmitterHelper {
assert(invariant(element, superName == null, message: superName));
} else {
assert(invariant(element, superName != null));
- String nativeName =
- namer.getPrimitiveInterceptorRuntimeName(element);
- if (nativeName != null) {
- builder.nativeName = nativeName;
- }
builder.superName = superName;
}
var fieldMetadata = [];

Powered by Google App Engine
This is Rietveld 408576698