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

Issue 10941031: Reapply 'Add runtimeType() to Object which returns canonicalized instances of Type'. (Closed)

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

Description

Reapply 'Add runtimeType() to Object which returns canonicalized instances of Type'. This CL fixes a bug in https://chromiumcodereview.appspot.com/10908142/ which generated unneeded type information leading to runtime regression. Original committed in 12491 and reverted in R=ngeoffray@google.com Committed: https://code.google.com/p/dart/source/detail?r=12540

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -27 lines) Patch
M compiler/java/com/google/dart/compiler/DartCompiler.java View 1 chunk +0 lines, -7 lines 0 comments Download
M lib/compiler/implementation/compiler.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M lib/compiler/implementation/enqueue.dart View 1 chunk +5 lines, -0 lines 0 comments Download
M lib/compiler/implementation/js_backend/emitter.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M lib/compiler/implementation/lib/core_patch.dart View 1 chunk +5 lines, -0 lines 0 comments Download
M lib/compiler/implementation/lib/interceptors.dart View 1 chunk +14 lines, -0 lines 0 comments Download
M lib/compiler/implementation/lib/js_helper.dart View 1 chunk +22 lines, -0 lines 0 comments Download
M lib/compiler/implementation/ssa/builder.dart View 1 3 chunks +48 lines, -19 lines 0 comments Download
M lib/compiler/implementation/ssa/ssa.dart View 1 chunk +55 lines, -0 lines 0 comments Download
M lib/compiler/implementation/world.dart View 1 chunk +3 lines, -1 line 0 comments Download
M lib/core/object.dart View 1 chunk +4 lines, -0 lines 1 comment Download
A tests/language/first_class_types.dart View 1 chunk +34 lines, -0 lines 1 comment Download
M tests/language/language.status View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
karlklose
8 years, 3 months ago (2012-09-19 08:08:42 UTC) #1
ngeoffray
LGTM! https://chromiumcodereview.appspot.com/10941031/diff/1/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://chromiumcodereview.appspot.com/10941031/diff/1/lib/compiler/implementation/ssa/builder.dart#newcode2664 lib/compiler/implementation/ssa/builder.dart:2664: bool needsRti = compiler.world.needsRti(element) && rtiInputs.length > 0; ...
8 years, 3 months ago (2012-09-19 08:43:09 UTC) #2
karlklose
https://chromiumcodereview.appspot.com/10941031/diff/1/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://chromiumcodereview.appspot.com/10941031/diff/1/lib/compiler/implementation/ssa/builder.dart#newcode2664 lib/compiler/implementation/ssa/builder.dart:2664: bool needsRti = compiler.world.needsRti(element) && rtiInputs.length > 0; On ...
8 years, 3 months ago (2012-09-19 08:44:27 UTC) #3
Ivan Posva
8 years, 3 months ago (2012-09-19 15:21:36 UTC) #4
The class Type was hard to find for me as it does not follow the usual pattern
and other drive by comments.

-Ivan

https://codereview.chromium.org/10941031/diff/15/lib/core/object.dart
File lib/core/object.dart (right):

https://codereview.chromium.org/10941031/diff/15/lib/core/object.dart#newcode20
lib/core/object.dart:20: abstract class Type {}
This is lacking documentation.

Also, we tend to split classes into separate files. This would not be the first
tiny class in its own file.

https://codereview.chromium.org/10941031/diff/15/tests/language/first_class_t...
File tests/language/first_class_types.dart (right):

https://codereview.chromium.org/10941031/diff/15/tests/language/first_class_t...
tests/language/first_class_types.dart:8: Expect.isTrue(a.runtimeType() ===
b.runtimeType());
Expect.identical(a.runtimeType(), b.runtimeType());

You will get much better error messages this way.

Powered by Google App Engine
This is Rietveld 408576698