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

Issue 12299008: Stop resolving all of js_helper unconditionally. (Closed)

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

Description

Stop resolving all of js_helper unconditionally. Committed: https://code.google.com/p/dart/source/detail?r=18617

Patch Set 1 : #

Total comments: 17

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Messages

Total messages: 5 (0 generated)
ngeoffray
I got tired of seeing these generally irrelevant helpers being resolved just because they are ...
7 years, 10 months ago (2013-02-18 10:19:48 UTC) #1
kasperl
LGTM. https://codereview.chromium.org/12299008/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart File sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (right): https://codereview.chromium.org/12299008/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart#newcode890 sdk/lib/_internal/compiler/implementation/js_backend/backend.dart:890: ||cls == compiler.stringClass) { ||cls -> cls https://codereview.chromium.org/12299008/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart#newcode954 ...
7 years, 10 months ago (2013-02-18 10:31:52 UTC) #2
karlklose
LGTM. It would be nice if we could encapsulate the registration of js_helpers in helper ...
7 years, 10 months ago (2013-02-18 10:35:52 UTC) #3
ngeoffray
Thanks Karl and Kasper https://codereview.chromium.org/12299008/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart File sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (right): https://codereview.chromium.org/12299008/diff/2001/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart#newcode890 sdk/lib/_internal/compiler/implementation/js_backend/backend.dart:890: ||cls == compiler.stringClass) { On ...
7 years, 10 months ago (2013-02-18 11:32:18 UTC) #4
ahe
7 years, 10 months ago (2013-02-18 12:38:04 UTC) #5
Message was sent while issue was closed.
Nice, LGTM!

But you forgot to add a test for the TODO you fixed.

Cheers,
Peter

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/compiler.dart (right):

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/compiler.dart:130: // helper methods.
Categories like this doesn't work, what happens if a method is added after them?

I would prefer if you could add real documentation comments to each of the
methods.

For example:

/// Called during resolution (and SSA graph building?) to record that [cls] was
instantiated from [element].
void registerInstantiatedClass(Element user, ClassElement cls, Enqueuer world)
{}

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/compiler.dart:132: void
registerStringInterpolation() {}
I think all of the following methods should take the element which add the
dependency. This will help us shortly when we start looking at dynamic
recompilation.

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (right):

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/js_backend/backend.dart:1313:
Map<String, SourceString> nativeNames = const <String, SourceString> {
Document this.

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/js_backend/backend.dart:1324:
Map<String, SourceString> castNames = const <String, SourceString> {
Ditto.

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right):

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/resolution/members.dart:2098: if
(operatorString == 'is' || operatorString == 'as') {
This has to be identical.

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/resolution/members.dart:2102: if
(operatorString == 'as') {
Identical.

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/resolution/members.dart:2396:
warnArgumentMismatch(node.send, constructor);
I would prefer if you did this change separately and tested it.

https://codereview.chromium.org/12299008/diff/3010/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/resolution/members.dart:2773: if
(!node.formals.nodes.tail.tail.isEmpty) {
Generally, I really like going from && to nested ifs. It is just more readable
to me.

Powered by Google App Engine
This is Rietveld 408576698