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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 19571002: Fix a few issues related to mirrors: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « no previous file | dart/sdk/lib/_internal/lib/js_mirrors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index fd440748cc9d4a881e9f14ab40b0ac3870f354a6..88864114d66845cfa24259ff6e301cb7ba73d16a 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -1591,6 +1591,8 @@ class CodeEmitterTask extends CompilerTask {
}
bool canGenerateCheckedSetter(Element member) {
+ // We never generate accessors for top-level/static fields.
+ if (!member.isInstanceMember()) return false;
DartType type = member.computeType(compiler).unalias(compiler);
if (type.element.isTypeVariable() ||
(type is FunctionType && type.containsTypeVariables) ||
@@ -1732,7 +1734,7 @@ class CodeEmitterTask extends CompilerTask {
// TODO(sra): 'isInterceptorClass' might not be the correct test for
// methods forced to use the interceptor convention because the
// method's class was elsewhere mixed-in to an interceptor.
- assert(getterCode != 0);
+ assert(!member.isInstanceMember() || getterCode != 0);
sra1 2013/07/18 20:33:49 I'm trying to understand a bug in this area. (issu
}
int setterCode = 0;
if (needsSetter) {
@@ -1741,7 +1743,7 @@ class CodeEmitterTask extends CompilerTask {
// 11: function(receiver, value) { this.field = value; }
setterCode += backend.fieldHasInterceptedSetter(member) ? 2 : 0;
setterCode += backend.isInterceptorClass(classElement) ? 0 : 1;
- assert(setterCode != 0);
+ assert(!member.isInstanceMember() || setterCode != 0);
}
int code = getterCode + (setterCode << 2);
if (code == 0) {
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/lib/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698