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

Issue 12210142: Implement is-checks against type variables. (Closed)

Created:
7 years, 10 months ago by karlklose
Modified:
7 years, 9 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement is-checks against type variables. Committed: https://code.google.com/p/dart/source/detail?r=19216

Patch Set 1 #

Patch Set 2 : Implement native checks. #

Patch Set 3 : Restore comment. #

Total comments: 54

Patch Set 4 : Merge. #

Patch Set 5 : Address comments. #

Total comments: 1

Patch Set 6 : Do not emit Object.isObject. #

Total comments: 3

Patch Set 7 : Address Nicolas' comments. #

Patch Set 8 : Fix computation of classes that need rti. #

Total comments: 31

Patch Set 9 : Address Nicolas' comments. #

Total comments: 8

Patch Set 10 : Address comments. #

Total comments: 3

Patch Set 11 : Address comments. #

Patch Set 12 : Remove some obsolete code. #

Total comments: 34

Patch Set 13 : Address comments. #

Total comments: 14

Patch Set 14 : Register JsArray -> List dependency. #

Patch Set 15 : Remove tabs. #

Patch Set 16 : Add a comment. #

Total comments: 4

Patch Set 17 : Fix a bug and rebase #

Total comments: 6

Patch Set 18 : Fix a long line. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+292 lines, -40 lines) Patch
M sdk/lib/_internal/compiler/implementation/compiler.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/enqueue.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +21 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +31 lines, -6 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +20 lines, -0 lines 3 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_helper.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +51 lines, -8 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +20 lines, -15 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/universe/universe.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +35 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/world.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +20 lines, -2 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
A tests/compiler/dart2js_extra/generics_factories_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +22 lines, -0 lines 0 comments Download
A tests/language/generic2_test.dart View 1 2 3 4 5 6 7 8 9 1 chunk +28 lines, -0 lines 0 comments Download
A tests/language/generic_native_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +26 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +2 lines, -4 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
karlklose
7 years, 10 months ago (2013-02-14 15:47:57 UTC) #1
ahe
DBC. Awesome, I only looked at some of the files, but spotted a few nits. ...
7 years, 10 months ago (2013-02-14 16:58:33 UTC) #2
karlklose
Adding Johnni.
7 years, 10 months ago (2013-02-18 08:57:40 UTC) #3
Johnni Winther
lgtm https://chromiumcodereview.appspot.com/12210142/diff/4006/tests/language/generic2_test.dart File tests/language/generic2_test.dart (right): https://chromiumcodereview.appspot.com/12210142/diff/4006/tests/language/generic2_test.dart#newcode17 tests/language/generic2_test.dart:17: } I would like to see tests of ...
7 years, 10 months ago (2013-02-18 09:16:27 UTC) #4
ngeoffray
https://codereview.chromium.org/12210142/diff/4006/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/12210142/diff/4006/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode139 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:139: // Find all instantiated types that are a supertype ...
7 years, 10 months ago (2013-02-18 09:27:57 UTC) #5
karlklose
Thanks for the comments! https://codereview.chromium.org/12210142/diff/4006/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/12210142/diff/4006/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode139 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:139: // Find all instantiated types ...
7 years, 10 months ago (2013-02-18 16:02:01 UTC) #6
karlklose
https://codereview.chromium.org/12210142/diff/16001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/12210142/diff/16001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1125 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1125: if (other == compiler.objectClass && classElement != other) return; ...
7 years, 10 months ago (2013-02-19 08:57:38 UTC) #7
ngeoffray
https://codereview.chromium.org/12210142/diff/4006/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/12210142/diff/4006/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode145 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:145: for (classes = compiler.world.classesUsingTypeVariableTests; On 2013/02/18 16:02:01, karlklose wrote: ...
7 years, 10 months ago (2013-02-19 09:00:41 UTC) #8
karlklose
https://codereview.chromium.org/12210142/diff/4006/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/12210142/diff/4006/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode145 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:145: for (classes = compiler.world.classesUsingTypeVariableTests; Moved to the backend. https://codereview.chromium.org/12210142/diff/4006/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart ...
7 years, 10 months ago (2013-02-19 12:39:28 UTC) #9
ngeoffray
Last round of comments, (small) things are still a bit unclear to me. https://codereview.chromium.org/12210142/diff/22001/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart File ...
7 years, 10 months ago (2013-02-21 10:26:18 UTC) #10
karlklose
Thanks, Nicolas. https://codereview.chromium.org/12210142/diff/22001/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart File sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (right): https://codereview.chromium.org/12210142/diff/22001/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart#newcode665 sdk/lib/_internal/compiler/implementation/js_backend/backend.dart:665: Iterable<ClassElement> cachedClassesUsingTypeVariableTests; On 2013/02/21 10:26:18, ngeoffray wrote: ...
7 years, 10 months ago (2013-02-21 14:48:44 UTC) #11
ngeoffray
LGTM! https://codereview.chromium.org/12210142/diff/22001/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart File sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart (right): https://codereview.chromium.org/12210142/diff/22001/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart#newcode43 sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart:43: return element == compiler.objectClass || isJsNative(element); On 2013/02/21 ...
7 years, 10 months ago (2013-02-21 16:31:55 UTC) #12
karlklose
https://codereview.chromium.org/12210142/diff/29001/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart File sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart (right): https://codereview.chromium.org/12210142/diff/29001/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart#newcode28 sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart:28: * need a native check. That was actually a ...
7 years, 10 months ago (2013-02-22 10:51:49 UTC) #13
ngeoffray
https://codereview.chromium.org/12210142/diff/23012/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart File sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart (right): https://codereview.chromium.org/12210142/diff/23012/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart#newcode45 sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart:45: return element == compiler.objectClass || isJsNative(element); I don't think ...
7 years, 10 months ago (2013-02-22 11:04:30 UTC) #14
karlklose
Please take another look, Nicolas. I changed the code to use the interceptors for JS-native ...
7 years, 10 months ago (2013-02-26 11:18:50 UTC) #15
ngeoffray
https://codereview.chromium.org/12210142/diff/34002/sdk/lib/_internal/compiler/implementation/enqueue.dart File sdk/lib/_internal/compiler/implementation/enqueue.dart (right): https://codereview.chromium.org/12210142/diff/34002/sdk/lib/_internal/compiler/implementation/enqueue.dart#newcode103 sdk/lib/_internal/compiler/implementation/enqueue.dart:103: compiler.world.registerInstantiatedAbstractClass(cls); Instead of doing this here, it looks a ...
7 years, 10 months ago (2013-02-26 14:11:37 UTC) #16
karlklose
Thanks, Nicolas! https://codereview.chromium.org/12210142/diff/34002/sdk/lib/_internal/compiler/implementation/enqueue.dart File sdk/lib/_internal/compiler/implementation/enqueue.dart (right): https://codereview.chromium.org/12210142/diff/34002/sdk/lib/_internal/compiler/implementation/enqueue.dart#newcode103 sdk/lib/_internal/compiler/implementation/enqueue.dart:103: compiler.world.registerInstantiatedAbstractClass(cls); I moved the code to addToWorklist. ...
7 years, 9 months ago (2013-02-27 10:12:58 UTC) #17
ngeoffray
A few last comments, I'm not sure about why you're registering things to the backend ...
7 years, 9 months ago (2013-02-27 12:36:28 UTC) #18
karlklose
Thanks Nicolas. As discussed I added a special dependency for the JS backend instead of ...
7 years, 9 months ago (2013-02-27 16:11:32 UTC) #19
ngeoffray
LGTM! https://codereview.chromium.org/12210142/diff/23016/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): https://codereview.chromium.org/12210142/diff/23016/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode107 sdk/lib/_internal/compiler/implementation/compiler.dart:107: // TODO(karlklose): get rid of this and specify ...
7 years, 9 months ago (2013-02-27 16:18:37 UTC) #20
karlklose
https://codereview.chromium.org/12210142/diff/23016/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): https://codereview.chromium.org/12210142/diff/23016/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode107 sdk/lib/_internal/compiler/implementation/compiler.dart:107: // TODO(karlklose): get rid of this and specify the ...
7 years, 9 months ago (2013-02-28 11:37:46 UTC) #21
ngeoffray
LGTM https://codereview.chromium.org/12210142/diff/42001/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right): https://codereview.chromium.org/12210142/diff/42001/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart#newcode1538 sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:1538: getArguments(var type) => isJsArray(type) ? JS('var', r'#.slice(1)', type) ...
7 years, 9 months ago (2013-02-28 12:14:51 UTC) #22
karlklose
Thanks again. https://codereview.chromium.org/12210142/diff/42001/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right): https://codereview.chromium.org/12210142/diff/42001/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart#newcode1538 sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:1538: getArguments(var type) => isJsArray(type) ? JS('var', r'#.slice(1)', ...
7 years, 9 months ago (2013-02-28 12:19:58 UTC) #23
karlklose
https://codereview.chromium.org/12210142/diff/49001/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart File sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart (right): https://codereview.chromium.org/12210142/diff/49001/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart#newcode67 sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart:67: // used in substitutions to addArguments. We will generate ...
7 years, 9 months ago (2013-02-28 12:20:46 UTC) #24
karlklose
Committed patchset #18 manually as r19216 (presubmit successful).
7 years, 9 months ago (2013-02-28 12:23:32 UTC) #25
ngeoffray
7 years, 9 months ago (2013-02-28 12:39:03 UTC) #26
Message was sent while issue was closed.
https://codereview.chromium.org/12210142/diff/49001/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
(right):

https://codereview.chromium.org/12210142/diff/49001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart:67: //
used in substitutions to addArguments.
On 2013/02/28 12:20:46, karlklose wrote:
> We will generate holders for these in every program.

OK, please make sure fixing this is #1 in your TODO list, to keep hello world
tidy.

Powered by Google App Engine
This is Rietveld 408576698