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

Issue 2045223002: Compute and cache element NativeBehavior during resolution. (Closed)

Created:
4 years, 6 months ago by Johnni Winther
Modified:
4 years, 6 months ago
Reviewers:
Harry Terkelsen
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Compute and cache element NativeBehavior during resolution. NativeBehavior for method calls and field load/store are now computed during resolution and apply as part of the world impact. This prepares for (full) serialization/deserialization of native elements. R=het@google.com Committed: https://github.com/dart-lang/sdk/commit/286b21133b8f64467fbce6b92e67ff4b3f28d782

Patch Set 1 #

Patch Set 2 : Cleanup. #

Total comments: 4

Patch Set 3 : Updated cf. comments. #

Patch Set 4 : Temporarily skip compilation subtest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -98 lines) Patch
M pkg/compiler/lib/src/common/backend_api.dart View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/common/resolution.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/enqueue.dart View 3 chunks +0 lines, -33 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart View 1 chunk +1 line, -4 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/type_graph_nodes.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/backend.dart View 1 1 chunk +50 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/js_backend.dart View 2 chunks +1 line, -3 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/native_data.dart View 3 chunks +55 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/native/behavior.dart View 1 chunk +6 lines, -7 lines 0 comments Download
M pkg/compiler/lib/src/native/enqueue.dart View 1 2 3 chunks +9 lines, -43 lines 0 comments Download
M pkg/compiler/lib/src/resolution/registry.dart View 1 2 chunks +5 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/resolution/resolution.dart View 2 chunks +4 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/ssa/optimize.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/serialization/compilation_test.dart View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Johnni Winther
4 years, 6 months ago (2016-06-08 13:49:10 UTC) #2
Harry Terkelsen
lgtm https://codereview.chromium.org/2045223002/diff/20001/pkg/compiler/lib/src/common/backend_api.dart File pkg/compiler/lib/src/common/backend_api.dart (right): https://codereview.chromium.org/2045223002/diff/20001/pkg/compiler/lib/src/common/backend_api.dart#newcode410 pkg/compiler/lib/src/common/backend_api.dart:410: void registerNativeData(var nativeData); I think this should be ...
4 years, 6 months ago (2016-06-08 16:34:42 UTC) #3
Johnni Winther
Committed patchset #4 (id:60001) manually as 286b21133b8f64467fbce6b92e67ff4b3f28d782 (presubmit successful).
4 years, 6 months ago (2016-06-09 07:50:58 UTC) #5
Johnni Winther
4 years, 6 months ago (2016-06-10 07:58:52 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/2045223002/diff/20001/pkg/compiler/lib/src/co...
File pkg/compiler/lib/src/common/backend_api.dart (right):

https://codereview.chromium.org/2045223002/diff/20001/pkg/compiler/lib/src/co...
pkg/compiler/lib/src/common/backend_api.dart:410: void registerNativeData(var
nativeData);
On 2016/06/08 16:34:42, Harry Terkelsen wrote:
> I think this should be 'NativeBehavior nativeData'

It should have been 'dynamic' (it is in ResolutionWorldImpact). It is
deliberately _not_ NativeBehavior because the actual type is Target specific.

https://codereview.chromium.org/2045223002/diff/20001/pkg/compiler/lib/src/na...
File pkg/compiler/lib/src/native/enqueue.dart (right):

https://codereview.chromium.org/2045223002/diff/20001/pkg/compiler/lib/src/na...
pkg/compiler/lib/src/native/enqueue.dart:38: // [handleMethodAnnotations] to
[JavaScriptBackend] or [NativeData].
On 2016/06/08 16:34:42, Harry Terkelsen wrote:
> do these do anything if the element is not native? I see that it is called
> before checking if it is actually native. If it does nothing for non-native
> elements then it can just be executed when you register the native element.

Adding a TODO to make them return a bool; they actually compute whether the
element is native.

Powered by Google App Engine
This is Rietveld 408576698