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

Issue 11304021: Add NativeEnqueuer to work with the Enqueuer. (Closed)

Created:
8 years, 1 month ago by sra1
Modified:
8 years ago
Reviewers:
ahe, ngeoffray
CC:
ngeoffray, kasperl, karlklose, ahe
Visibility:
Public.

Description

Add NativeEnqueuer to work with the Enqueuer. Committed: https://code.google.com/p/dart/source/detail?r=14977

Patch Set 1 #

Total comments: 3

Patch Set 2 : All html tests working except websql #

Patch Set 3 : #

Total comments: 9

Patch Set 4 : Parse annotations #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : Get apidoc and dart2dart working #

Patch Set 8 : Add --enable-native-live-type-analysis #

Total comments: 137

Patch Set 9 : code review fixes #

Total comments: 6

Patch Set 10 : CR fixes #

Patch Set 11 : #

Patch Set 12 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+696 lines, -91 lines) Patch
M sdk/lib/_internal/compiler/implementation/apiimpl.dart View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/compiler.dart View 1 2 3 4 5 6 7 8 9 6 chunks +15 lines, -5 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart2js.dart View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/enqueue.dart View 1 2 3 4 5 6 7 8 9 7 chunks +48 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/interceptors.dart View 1 2 3 4 5 6 7 8 9 7 chunks +8 lines, -7 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_helper.dart View 1 2 3 4 5 6 7 8 9 11 chunks +31 lines, -11 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/regexp_helper.dart View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/string_helper.dart View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/native_handler.dart View 1 2 3 4 5 6 7 8 9 10 2 chunks +552 lines, -51 lines 2 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/universe/universe.dart View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
sra1
For the native live class analysis I need to see all the JS code and ...
8 years, 1 month ago (2012-10-27 01:00:48 UTC) #1
ngeoffray
About types in JS, I think we can start using type literals instead of strings. ...
8 years, 1 month ago (2012-10-29 14:10:47 UTC) #2
sra1
On 2012/10/29 14:10:47, ngeoffray wrote: > About types in JS, I think we can start ...
8 years, 1 month ago (2012-10-29 16:12:46 UTC) #3
ngeoffray
https://codereview.chromium.org/11304021/diff/10001/sdk/lib/_internal/compiler/implementation/native_handler.dart File sdk/lib/_internal/compiler/implementation/native_handler.dart (right): https://codereview.chromium.org/11304021/diff/10001/sdk/lib/_internal/compiler/implementation/native_handler.dart#newcode43 sdk/lib/_internal/compiler/implementation/native_handler.dart:43: class NativeEnqueuerBase implements NativeEnqueuer { A couple of high-level ...
8 years, 1 month ago (2012-11-08 08:18:01 UTC) #4
sra1
Still a work in progress. I have factored the properties of a native feature (NativeBehavior) ...
8 years, 1 month ago (2012-11-12 20:28:03 UTC) #5
ahe
Just skimmed the patch on my phone. I really like like the direction you're taking. ...
8 years, 1 month ago (2012-11-13 20:55:22 UTC) #6
sra1
Ok, so I'm putting this out to review to make the most of the time-zone ...
8 years, 1 month ago (2012-11-14 05:04:26 UTC) #7
ahe
So far so good. A lot of nitpicking below, nothing really important. Unfortunately, I have ...
8 years, 1 month ago (2012-11-14 13:51:30 UTC) #8
ngeoffray
Like Peter a lot of nitpicking, but I like where this is heading. http://codereview.chromium.org/11304021/diff/14004/sdk/lib/_internal/compiler/implementation/compiler.dart File ...
8 years, 1 month ago (2012-11-14 21:17:39 UTC) #9
sra1
I have worked through the code review comments. https://codereview.chromium.org/11304021/diff/10001/sdk/lib/_internal/compiler/implementation/native_handler.dart File sdk/lib/_internal/compiler/implementation/native_handler.dart (right): https://codereview.chromium.org/11304021/diff/10001/sdk/lib/_internal/compiler/implementation/native_handler.dart#newcode43 sdk/lib/_internal/compiler/implementation/native_handler.dart:43: class ...
8 years, 1 month ago (2012-11-15 00:09:10 UTC) #10
ngeoffray
LGTM! http://codereview.chromium.org/11304021/diff/20017/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): http://codereview.chromium.org/11304021/diff/20017/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode529 sdk/lib/_internal/compiler/implementation/compiler.dart:529: backend.nativeResolutionEnqueuer(enqueuer.resolution); The reason why I asked about why ...
8 years, 1 month ago (2012-11-15 12:49:57 UTC) #11
ahe
8 years ago (2012-12-04 09:15:19 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/11304021/diff/24002/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/native_handler.dart (right):

https://codereview.chromium.org/11304021/diff/24002/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/native_handler.dart:227: for (var type
in behavior.typesInstantiated) {
When I see code like this, I assume this is equivalent:

Collection<DartType> types = behavior.typesInstantiated;
for (DartType type in types) {
  ...

However, SpecialType does not implement DartType.  So my version would fail.

I think that is problematic because a compiler will always have a natural
concept of "type", and the concept "type" should be reserved for expressing only
that concept.  Otherwise it will cause confusion.  There are a few ways to
accomplish this:

* Use different words to describe concepts that are type-like.  For example,
HType.  However, this is problematic as you then have to convert between
DartTypes and HTypes.  It is also problematic because people will accept
fallacious arguments like:

The JavaScript backend is a separate component from the front-end, and in the
backend, the concept of "type" is clearly HType.  So in the backend, we can call
fields "type", not "htype".

This argument is fallacious because nobody works exclusively on the backend or
the frontend, so everyone will get confused when there isn't agreement about a
core concept such as "type" throughout the compiler.

* Make sure that all types implement DartType.  This is actually easy.

In case you're counting, we now have at least four different kinds of types in
dart2js:

1. HType
2. DartType
3. SpecialType
4. ConcreteType

It would be great if we all could agree to stop this, and also not compound the
situation further.  As far as I can tell, a good first step would be to have
SpecialType and ConcreteType implement DartType.

https://codereview.chromium.org/11304021/diff/24002/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/native_handler.dart:234: assert(type
is DartType);
There is a more natural way to express this in Dart:

DartType dartType = type;

That also gives you a considerably better error message than this:

Internal error:
'file:///mnt/data/b/build/slave/dart2js-linux-release-host-checked/build/dart/sdk/lib/_internal/compiler/implementation/native_handler.dart':
Failed assertion: line 312 pos 14: 'type is DartType' is not true.

I assume the problem is that "type" is null.

Powered by Google App Engine
This is Rietveld 408576698