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

Issue 12095011: Properly register types on the JS foreign instruction. (Closed)

Created:
7 years, 10 months ago by ngeoffray
Modified:
7 years, 10 months ago
Reviewers:
ahe, sra1, kasperl
CC:
reviews_dartlang.org, sra1, karlklose
Visibility:
Public.

Description

Properly register types on the JS foreign instruction. Committed: https://code.google.com/p/dart/source/detail?r=18045

Patch Set 1 : #

Total comments: 6

Patch Set 2 : #

Total comments: 12

Patch Set 3 : #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -107 lines) Patch
M sdk/lib/_internal/compiler/implementation/native_handler.dart View 1 2 3 chunks +9 lines, -5 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 2 15 chunks +58 lines, -59 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 2 3 chunks +11 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/nodes.dart View 1 2 1 chunk +7 lines, -20 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/types.dart View 1 2 7 chunks +35 lines, -9 lines 0 comments Download
M tests/compiler/dart2js/call_site_type_inferer_test.dart View 1 2 3 4 chunks +16 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/type_combination_test.dart View 1 2 3 6 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
ngeoffray
Going back and forth different type systems is quite painful. Before starting on a rapid ...
7 years, 10 months ago (2013-01-28 12:16:37 UTC) #1
polux
On 2013/01/28 12:16:37, ngeoffray wrote: > Going back and forth different type systems is quite ...
7 years, 10 months ago (2013-01-28 12:32:35 UTC) #2
ahe
I don't understand what direction you're heading with this CL. You mention a refactoring. Is ...
7 years, 10 months ago (2013-01-28 15:14:31 UTC) #3
ngeoffray
With this CL, the types of JS are propagated to the SSA backend. The native ...
7 years, 10 months ago (2013-01-28 15:34:19 UTC) #4
ahe
Why are you making this change? Does it fix a bug, or improve generated code? ...
7 years, 10 months ago (2013-01-28 15:38:44 UTC) #5
ngeoffray
On 2013/01/28 15:38:44, ahe wrote: > Why are you making this change? Does it fix ...
7 years, 10 months ago (2013-01-28 15:42:14 UTC) #6
ngeoffray
On 2013/01/28 12:32:35, polux wrote: > On 2013/01/28 12:16:37, ngeoffray wrote: > > Going back ...
7 years, 10 months ago (2013-01-28 19:33:22 UTC) #7
sra1
https://codereview.chromium.org/12095011/diff/4001/sdk/lib/_internal/compiler/implementation/native_handler.dart File sdk/lib/_internal/compiler/implementation/native_handler.dart (right): https://codereview.chromium.org/12095011/diff/4001/sdk/lib/_internal/compiler/implementation/native_handler.dart#newcode557 sdk/lib/_internal/compiler/implementation/native_handler.dart:557: compiler.typesTask.typedNodes[jsCall] = types.toLink(); Move the assignment out to the ...
7 years, 10 months ago (2013-01-28 20:12:20 UTC) #8
ngeoffray
PTAL, I am now caching the NativeBehavior of JS calls, and use it in the ...
7 years, 10 months ago (2013-01-30 15:16:44 UTC) #9
kasperl
LGTM. https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler/implementation/ssa/builder.dart#newcode1330 sdk/lib/_internal/compiler/implementation/ssa/builder.dart:1330: HType ssaType = new HBoundedType.exact(type); This is fairly ...
7 years, 10 months ago (2013-02-04 09:27:50 UTC) #10
ngeoffray
7 years, 10 months ago (2013-02-04 10:45:06 UTC) #11
Thanks Kasper.

https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right):

https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/builder.dart:1330: HType ssaType =
new HBoundedType.exact(type);
On 2013/02/04 09:27:50, kasperl wrote:
> This is fairly common. Maybe have an HBoundedType constructor that takes an
> element and a compiler?

Good point. There are too many constructors in HBoundedType currently, I plan on
cleaning this up with named parameters, and with it add this new constructor
that takes an element.

https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/builder.dart:2843: print('$node
for $ssaType');
On 2013/02/04 09:27:50, kasperl wrote:
> Remove printing.

Done.

https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/builder.dart:4544: ClassBaseType
classBaseType = baseType;
On 2013/02/04 09:27:50, kasperl wrote:
> Unused local variable.

Done.

https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (right):

https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/nodes.dart:1546: final HType
foreignType;
On 2013/02/04 09:27:50, kasperl wrote:
> Could this be type instead of foreignType? The foreign part is sort of implied
> by the fact that the field is on a foreign instruction.

Done.

https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/nodes.dart:1553: : super(inputs) {
On 2013/02/04 09:27:50, kasperl wrote:
> Too much indentation.

Done.

https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/ssa/types.dart (right):

https://codereview.chromium.org/12095011/diff/4002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/types.dart:187: //
TODO(ngeoffray): Deal with Null more generally.
On 2013/02/04 09:27:50, kasperl wrote:
> Null -> null. If you were going for the subtle difference between null and
Null
> I would write it out (something like "the type of null").

Done.

Powered by Google App Engine
This is Rietveld 408576698