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

Unified Diff: lib/compiler/implementation/compiler.dart

Issue 10829102: Create 'unified' version of Date, with a dart2js implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Gramma fix and moved JS logic from DateImplementation to js_helpers. Created 8 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 | « corelib/unified/core/implementation/date.dart ('k') | lib/compiler/implementation/lib/core.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index abc40e3844ecb79c6f81597dd1aa5ef21c544333..ca6ca2ba8cb60374a28e6029a5089e9d50e33292 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -556,8 +556,12 @@ class Compiler implements DiagnosticListener {
while (!patches.isEmpty()) {
Element patchElement = patches.head;
Element originalElement = lookup(patchElement.name);
- // Getters and setters are kept inside a synthetic field.
- if (patchElement.kind === ElementKind.ABSTRACT_FIELD) {
+ if (patchElement.isAccessor()) {
+ // Skip accessors. An accessor always has an abstract field,
+ // representing the accessor in the lookup scope. We can thus skip the
+ // accessors and just handle the abstract field.
+ } else if (patchElement.kind === ElementKind.ABSTRACT_FIELD) {
+ // Getters and setters are kept inside a synthetic field.
if (originalElement !== null &&
originalElement.kind !== ElementKind.ABSTRACT_FIELD) {
internalError("Cannot patch non-getter/setter with getter/setter",
« no previous file with comments | « corelib/unified/core/implementation/date.dart ('k') | lib/compiler/implementation/lib/core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698