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

Issue 10834243: Reduce usage of .enclosingElement to get enclosing class. (Closed)

Created:
8 years, 4 months ago by Lasse Reichstein Nielsen
Modified:
8 years, 4 months ago
Reviewers:
ahe, Anders Johnsen
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Reduce usage of .enclosingElement to get enclosing class. Currently code assumes that a member's immediate enclosingElement is its class element. If we introduce compilation unit override elements into the enclosing chain, this will no longer be true. This CL changes the places that assumes this to use isMember() or getEnclosingClass(). The assumption is still in place in isMember(), which will need to be modified when things change. Committed: https://code.google.com/p/dart/source/detail?r=10438

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -67 lines) Patch
M lib/compiler/implementation/compile_time_constants.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M lib/compiler/implementation/compiler.dart View 8 chunks +23 lines, -21 lines 0 comments Download
M lib/compiler/implementation/dart_backend/backend.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M lib/compiler/implementation/elements/elements.dart View 4 chunks +11 lines, -3 lines 2 comments Download
M lib/compiler/implementation/enqueue.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/compiler/implementation/namer.dart View 1 chunk +4 lines, -4 lines 0 comments Download
M lib/compiler/implementation/native_handler.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/compiler/implementation/resolver.dart View 9 chunks +11 lines, -9 lines 0 comments Download
M lib/compiler/implementation/ssa/builder.dart View 8 chunks +10 lines, -11 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen.dart View 4 chunks +6 lines, -6 lines 0 comments Download
M lib/compiler/implementation/ssa/optimize.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/compiler/implementation/typechecker.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/compiler/implementation/universe.dart View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein Nielsen
8 years, 4 months ago (2012-08-09 07:57:17 UTC) #1
Anders Johnsen
LGTM, Thank you for doing this. https://chromiumcodereview.appspot.com/10834243/diff/1/lib/compiler/implementation/elements/elements.dart File lib/compiler/implementation/elements/elements.dart (right): https://chromiumcodereview.appspot.com/10834243/diff/1/lib/compiler/implementation/elements/elements.dart#newcode126 lib/compiler/implementation/elements/elements.dart:126: // TODO(lrn): Skip ...
8 years, 4 months ago (2012-08-09 08:08:37 UTC) #2
Lasse Reichstein Nielsen
8 years, 4 months ago (2012-08-09 11:22:09 UTC) #3
https://chromiumcodereview.appspot.com/10834243/diff/1/lib/compiler/implement...
File lib/compiler/implementation/elements/elements.dart (right):

https://chromiumcodereview.appspot.com/10834243/diff/1/lib/compiler/implement...
lib/compiler/implementation/elements/elements.dart:126: // TODO(lrn): Skip any
synthetic elements inserted, e.g.,
Alas no. That would make the parameter of a method itself a member of the class,
which it isn't.

Powered by Google App Engine
This is Rietveld 408576698