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

Issue 8479037: Provide enclosing element (method) for local function object, issue 145 (Closed)

Created:
9 years, 1 month ago by scheglov
Modified:
9 years, 1 month ago
Reviewers:
zundel
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Provide enclosing element (method) for local function object http://code.google.com/p/dart/issues/detail?id=145 1. I've made MethodElement an EnclosingElement to be able to return it from Element.getenclosingElement(). 2. I've changed GenerateJavascriptAST.GenerateJavascriptVisitor to use directly method only if it is enclosed with Class, not just any element. R=zundel@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=1268

Patch Set 1 #

Total comments: 4

Messages

Total messages: 2 (0 generated)
scheglov
9 years, 1 month ago (2011-11-07 19:18:04 UTC) #1
zundel
9 years, 1 month ago (2011-11-07 19:26:53 UTC) #2
lgtm

http://codereview.chromium.org/8479037/diff/1/compiler/java/com/google/dart/c...
File
compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
(right):

http://codereview.chromium.org/8479037/diff/1/compiler/java/com/google/dart/c...
compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java:2481:
if (kind == ElementKind.FUNCTION_OBJECT
nit. I would  just move this into a separate FUNCTION_OBJECT case statement.

http://codereview.chromium.org/8479037/diff/1/compiler/java/com/google/dart/c...
File compiler/java/com/google/dart/compiler/resolver/Element.java (right):

http://codereview.chromium.org/8479037/diff/1/compiler/java/com/google/dart/c...
compiler/java/com/google/dart/compiler/resolver/Element.java:27: * element.
Because method is now not an {@link EnclosingElement}, its enclosing class is
returned
but in this  patch, you modify MethodElement so it can be an EnclosingElement,
so I don't understand this comment.

http://codereview.chromium.org/8479037/diff/1/compiler/javatests/com/google/d...
File compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerSlowTest.java
(right):

http://codereview.chromium.org/8479037/diff/1/compiler/javatests/com/google/d...
compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerSlowTest.java:24:
public class TypeAnalyzerSlowTest extends CompilerTestCase {
maybe call this TypeAnalyzerCompiledTest?

http://codereview.chromium.org/8479037/diff/1/frog/frogsh
File frog/frogsh (right):

http://codereview.chromium.org/8479037/diff/1/frog/frogsh#newcode2
frog/frogsh:2: //  ********** Library dart:core **************
I take it you don't mean to check in this file.

Powered by Google App Engine
This is Rietveld 408576698