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

Issue 8566022: Function type checking (Closed)

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

Description

Function type checking Replaces http://codereview.chromium.org/8479049/ Rebased with master Add RTT.createFunction() to handle all functions. Update code to call RTT.createFunction() directly instead of hooking into the class' lookup. This should save memory as all functions should share the same name, "cls:Function". FunctionDeclarations do not work. Some code exists to support in another cl. Named optional parameters do not work. FunctionAlias types as paramters do not work. R=mmendez,zundel,fabiomfv BUG= TEST=

Patch Set 1 #

Total comments: 32

Patch Set 2 : Round 2: Refactoring #

Total comments: 9

Patch Set 3 : Cleanup / refactor #

Total comments: 18

Patch Set 4 : Fix for bad co19 test #

Patch Set 5 : Review comments #

Total comments: 10

Patch Set 6 : Addressing Miguel's comments #

Patch Set 7 : Trying to get optmiized compile to work with treeshaking changed #

Patch Set 8 : Fixes typos in bindXY(), adding getDynamic to bypass jsc error #

Total comments: 2

Patch Set 9 : Setting fun levels to stun #

Patch Set 10 : Getting to work in optimized #

Unified diffs Side-by-side diffs Delta from patch set Stats (+831 lines, -213 lines) Patch
M compiler/java/com/google/dart/compiler/backend/js/ClosureJsCodingConvention.java View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -39 lines 0 comments Download
M compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java View 1 2 3 4 5 6 15 chunks +103 lines, -30 lines 0 comments Download
M compiler/java/com/google/dart/compiler/backend/js/JsNameProvider.java View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java View 1 2 3 4 5 6 7 11 chunks +336 lines, -5 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java View 2 chunks +5 lines, -0 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/ResolveVisitor.java View 1 2 3 4 4 chunks +57 lines, -16 lines 0 comments Download
M compiler/java/com/google/dart/compiler/resolver/Resolver.java View 1 chunk +3 lines, -0 lines 0 comments Download
D compiler/javatests/com/google/dart/compiler/backend/js/ClosureJsCodingConventionTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -30 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/backend/js/JsBackendTests.java View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M compiler/javatests/com/google/dart/compiler/common/GenerateSourceMapTest.java View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M compiler/lib/implementation/core.js View 1 2 3 4 5 6 7 8 2 chunks +205 lines, -53 lines 0 comments Download
M compiler/lib/implementation/rtt.js View 1 2 3 4 5 6 7 7 chunks +103 lines, -4 lines 0 comments Download
M tests/co19/co19-compiler.status View 1 2 3 1 chunk +7 lines, -28 lines 0 comments Download
M tests/language/language.status View 3 chunks +4 lines, -5 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
codefu
9 years, 1 month ago (2011-11-15 00:01:35 UTC) #1
zundel
Here are some comments so far, I didn't get through the entire patch. http://codereview.chromium.org/8566022/diff/1/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java File ...
9 years, 1 month ago (2011-11-16 22:17:15 UTC) #2
codefu
http://codereview.chromium.org/8566022/diff/1/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java File compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java (right): http://codereview.chromium.org/8566022/diff/1/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java#newcode636 compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java:636: // ret = $bind(<class>.prototype.<member>$lookupRTT, this); return ret; } On ...
9 years, 1 month ago (2011-11-16 22:39:55 UTC) #3
zundel
a few more comments http://codereview.chromium.org/8566022/diff/1/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java File compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java (right): http://codereview.chromium.org/8566022/diff/1/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java#newcode634 compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java:634: private void generateRTTLookupMethod(DartFunctionTypeAlias x) { ...
9 years, 1 month ago (2011-11-16 23:54:55 UTC) #4
codefu
Working on pushing a new patch soon http://codereview.chromium.org/8566022/diff/1/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java File compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java (right): http://codereview.chromium.org/8566022/diff/1/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java#newcode634 compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java:634: private void ...
9 years, 1 month ago (2011-11-17 21:17:10 UTC) #5
codefu
PTAL
9 years, 1 month ago (2011-11-17 22:39:03 UTC) #6
zundel
http://codereview.chromium.org/8566022/diff/7001/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java File compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java (right): http://codereview.chromium.org/8566022/diff/7001/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java#newcode639 compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java:639: // return ret; } this comment is wrong for ...
9 years, 1 month ago (2011-11-18 18:45:00 UTC) #7
codefu
http://codereview.chromium.org/8566022/diff/7001/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java File compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java (right): http://codereview.chromium.org/8566022/diff/7001/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java#newcode639 compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java:639: // return ret; } On 2011/11/18 18:45:00, zundel wrote: ...
9 years, 1 month ago (2011-11-18 20:06:16 UTC) #8
mmendez
As we discussed at my desk, I think that the following maybe an issue. typedef ...
9 years, 1 month ago (2011-11-18 21:19:27 UTC) #9
codefu
Patch set 3 has a major clean up with logic changes: $getter methods no longer ...
9 years, 1 month ago (2011-11-23 17:59:18 UTC) #10
zundel
I didn't find anything significant http://codereview.chromium.org/8566022/diff/14001/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java File compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java (right): http://codereview.chromium.org/8566022/diff/14001/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java#newcode160 compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java:160: // 1) create static ...
9 years ago (2011-11-29 21:53:46 UTC) #11
mmendez
I'm going to look at it some more this evening, but it looks like there ...
9 years ago (2011-11-29 22:18:23 UTC) #12
codefu
On 2011/11/29 22:18:23, mmendez wrote: > I'm going to look at it some more this ...
9 years ago (2011-11-29 22:33:52 UTC) #13
codefu
Addressing Eric's review comments. http://codereview.chromium.org/8566022/diff/14001/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java File compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java (right): http://codereview.chromium.org/8566022/diff/14001/compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java#newcode160 compiler/java/com/google/dart/compiler/backend/js/RuntimeTypeInjector.java:160: // 1) create static type ...
9 years ago (2011-11-29 22:42:13 UTC) #14
mmendez
This is getting closer John. I only have one concern at this point and that ...
9 years ago (2011-11-30 18:49:39 UTC) #15
codefu
Lets get together tomorrow morning and hammer out the RTT bind vs getter methods. http://codereview.chromium.org/8566022/diff/25001/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java ...
9 years ago (2011-11-30 22:42:51 UTC) #16
mmendez
This is the root cause behind the optimzed mode failures. Take a look and we ...
9 years ago (2011-12-06 17:36:46 UTC) #17
codefu
9 years ago (2011-12-07 16:31:30 UTC) #18
Closing and merging to head. New CL located at:
http://codereview.chromium.org/8845002

http://codereview.chromium.org/8566022/diff/32012/compiler/lib/implementation...
File compiler/lib/implementation/core.js (right):

http://codereview.chromium.org/8566022/diff/32012/compiler/lib/implementation...
compiler/lib/implementation/core.js:22: return fn;
On 2011/12/06 17:36:46, mmendez wrote:
> I think that part of the problem is that these bind overloads should be
> returning fun instead of fn.   Otherwise, the body of these is dead code.

Good catch.  I was fairly certain I had fixed these, but apparently I lost that
change.

Powered by Google App Engine
This is Rietveld 408576698