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

Issue 10888003: Change how runtime type information is being set in the backend. (Closed)

Created:
8 years, 3 months ago by ngeoffray
Modified:
8 years, 3 months ago
Reviewers:
karlklose, kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Change how runtime type information is being set in the backend. Committed: https://code.google.com/p/dart/source/detail?r=11436

Patch Set 1 : #

Patch Set 2 : #

Total comments: 10

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -70 lines) Patch
M lib/compiler/implementation/lib/js_helper.dart View 1 2 1 chunk +6 lines, -1 line 0 comments Download
M lib/compiler/implementation/ssa/builder.dart View 1 2 4 chunks +70 lines, -19 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen.dart View 1 2 4 chunks +23 lines, -3 lines 0 comments Download
M lib/compiler/implementation/ssa/nodes.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M lib/compiler/implementation/ssa/ssa.dart View 1 chunk +1 line, -20 lines 0 comments Download
M tests/co19/co19-dart2js.status View 2 chunks +6 lines, -3 lines 0 comments Download
A tests/language/factory_type_parameter_test.dart View 1 chunk +42 lines, -0 lines 0 comments Download
M tests/language/language.status View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/language_dart2js.status View 1 chunk +0 lines, -1 line 0 comments Download
D tests/language/new_expression_type_args_frog_test.dart View 1 chunk +0 lines, -22 lines 0 comments Download
A + tests/language/new_expression_type_args_test.dart View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
ngeoffray
The motivation for this change was initially to get rid of these setRuntimeTypeInfo calls after ...
8 years, 3 months ago (2012-08-28 08:44:17 UTC) #1
kasperl
LGTM. https://chromiumcodereview.appspot.com/10888003/diff/7001/lib/compiler/implementation/lib/js_helper.dart File lib/compiler/implementation/lib/js_helper.dart (right): https://chromiumcodereview.appspot.com/10888003/diff/7001/lib/compiler/implementation/lib/js_helper.dart#newcode966 lib/compiler/implementation/lib/js_helper.dart:966: return res == null ? JS('var', '{}') : ...
8 years, 3 months ago (2012-08-28 09:14:15 UTC) #2
ngeoffray
8 years, 3 months ago (2012-08-28 10:39:45 UTC) #3
Thanks Kasper

https://chromiumcodereview.appspot.com/10888003/diff/7001/lib/compiler/implem...
File lib/compiler/implementation/lib/js_helper.dart (right):

https://chromiumcodereview.appspot.com/10888003/diff/7001/lib/compiler/implem...
lib/compiler/implementation/lib/js_helper.dart:966: return res == null ?
JS('var', '{}') : res;
On 2012/08/28 09:14:15, kasperl wrote:
> I'd prefer () around the comparison. Would it be possible to re-use the object
> returned in the case res is null? Seems wasteful to allocate a new object
every
> single time.

I added a TODO to do that once we have lazy static initializations.

https://chromiumcodereview.appspot.com/10888003/diff/7001/lib/compiler/implem...
File lib/compiler/implementation/ssa/builder.dart (right):

https://chromiumcodereview.appspot.com/10888003/diff/7001/lib/compiler/implem...
lib/compiler/implementation/ssa/builder.dart:2503: if
(argument.element.isTypeVariable()) {
On 2012/08/28 09:14:15, kasperl wrote:
> Maybe factor this code out into a helper function. It seems a bit complicated
to
> have this big closure right here.

Done.

https://chromiumcodereview.appspot.com/10888003/diff/7001/lib/compiler/implem...
lib/compiler/implementation/ssa/builder.dart:2509: ||
work.element.isGenerativeConstructor()) {
On 2012/08/28 09:14:15, kasperl wrote:
> Aren't they also available as locals in generative constructors?

Good point. Done.

https://chromiumcodereview.appspot.com/10888003/diff/7001/lib/compiler/implem...
lib/compiler/implementation/ssa/builder.dart:2514: HInstruction foreign =  new
HForeign(
On 2012/08/28 09:14:15, kasperl wrote:
> Remove extra space after =.

Done.

https://chromiumcodereview.appspot.com/10888003/diff/7001/lib/compiler/implem...
File lib/compiler/implementation/ssa/codegen.dart (right):

https://chromiumcodereview.appspot.com/10888003/diff/7001/lib/compiler/implem...
lib/compiler/implementation/ssa/codegen.dart:82: void addTypeVariables(Element
element,
On 2012/08/28 09:14:15, kasperl wrote:
> Shouldn't this be something like addTypeParameters?

Done.

Powered by Google App Engine
This is Rietveld 408576698