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

Issue 2748713002: Invoke native methods directly (Closed)

Created:
3 years, 9 months ago by vsm
Modified:
3 years, 9 months ago
CC:
dev-compiler+reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Invoke native methods directly In DDC, if the receiver is typed and the target method simply forwards to a JS call, invoke that call directly instead of via a symbol. This is a step toward #28307. Paul: can you look the the analyzer / summary code change? dart:html uses "native". other libraries (e.g., typed_data) use "external" for more or less the same thing. The analyzer element model doesn't provide a way to test for "native" methods, but it does for "external". I map native to external here. Not sure if it's better to treat them as separate (I believe native predated external). Longer term, it may make sense to try to remove "native" in favor of "external". R=brianwilkerson@google.com, jacobr@google.com, jmesserly@google.com, paulberry@google.com Committed: https://github.com/dart-lang/sdk/commit/f331ecea201156bd9f1e8e2584ba9d818d927971

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address comments / cleanup #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+855 lines, -799 lines) Patch
M pkg/analyzer/lib/src/dart/element/builder.dart View 8 chunks +8 lines, -8 lines 0 comments Download
M pkg/analyzer/lib/src/summary/summarize_ast.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M pkg/dev_compiler/lib/js/amd/dart_sdk.js View 100 chunks +193 lines, -193 lines 0 comments Download
M pkg/dev_compiler/lib/js/common/dart_sdk.js View 100 chunks +193 lines, -193 lines 0 comments Download
M pkg/dev_compiler/lib/js/es6/dart_sdk.js View 100 chunks +193 lines, -193 lines 0 comments Download
M pkg/dev_compiler/lib/js/legacy/dart_sdk.js View 100 chunks +193 lines, -193 lines 0 comments Download
M pkg/dev_compiler/lib/sdk/ddc_sdk.sum View 1 Binary file 0 comments Download
M pkg/dev_compiler/lib/src/compiler/code_generator.dart View 1 2 chunks +59 lines, -3 lines 1 comment Download
M pkg/dev_compiler/lib/src/compiler/extension_types.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/dev_compiler/test/codegen_expected/sunflower/sunflower.js View 4 chunks +10 lines, -10 lines 0 comments Download
M pkg/dev_compiler/test/codegen_expected/sunflower/sunflower.js.map View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (4 generated)
vsm
3 years, 9 months ago (2017-03-13 13:21:33 UTC) #3
Jacob
lgtm
3 years, 9 months ago (2017-03-13 15:51:00 UTC) #4
Paul Berry
Analyzer changes lgtm, but I would like to hear Brian's opinion. Brian, essentially the change ...
3 years, 9 months ago (2017-03-13 16:32:21 UTC) #6
Brian Wilkerson
lgtm Native support is only for SDK use, so this shouldn't have any impact on ...
3 years, 9 months ago (2017-03-13 16:36:57 UTC) #7
Jennifer Messerly
lgtm w/ some code factoring suggestions. In particular there's a big perf trap due to ...
3 years, 9 months ago (2017-03-13 17:20:11 UTC) #8
vsm
thanks, ptal. https://codereview.chromium.org/2748713002/diff/1/pkg/dev_compiler/lib/src/compiler/code_generator.dart File pkg/dev_compiler/lib/src/compiler/code_generator.dart (right): https://codereview.chromium.org/2748713002/diff/1/pkg/dev_compiler/lib/src/compiler/code_generator.dart#newcode5666 pkg/dev_compiler/lib/src/compiler/code_generator.dart:5666: _extensionTypes.hasNativeSubtype(baseType) && On 2017/03/13 17:20:10, Jennifer Messerly ...
3 years, 9 months ago (2017-03-13 20:55:26 UTC) #9
Jennifer Messerly
LGTM, really like the new code flow! https://codereview.chromium.org/2748713002/diff/20001/pkg/dev_compiler/lib/src/compiler/code_generator.dart File pkg/dev_compiler/lib/src/compiler/code_generator.dart (right): https://codereview.chromium.org/2748713002/diff/20001/pkg/dev_compiler/lib/src/compiler/code_generator.dart#newcode5674 pkg/dev_compiler/lib/src/compiler/code_generator.dart:5674: var _forwardingCache ...
3 years, 9 months ago (2017-03-13 21:21:33 UTC) #10
vsm
3 years, 9 months ago (2017-03-13 22:11:49 UTC) #12
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
f331ecea201156bd9f1e8e2584ba9d818d927971 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698