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

Issue 208323015: Support deferred library prefix syntax (Closed)

Created:
6 years, 9 months ago by hausner
Modified:
6 years, 5 months ago
Reviewers:
siva, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Support deferred library prefix syntax First step towards deferred library support: - Parse the “deferred as” import clause. - Implement p.loadLibrary() which returns a future that completes when the library is loaded. - Treat type annotations of deferred types as malformed. - Throw NoSuchMethodError when calling functions from unloaded libraries. - Libraries are still read synchronously, but items in the library won’t be visible through the deferred prefix until the future returned by loadLibrary() completes. Committed: https://code.google.com/p/dart/source/detail?r=34481

Patch Set 1 #

Patch Set 2 : #

Total comments: 17

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+360 lines, -109 lines) Patch
M runtime/lib/corelib_sources.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A runtime/lib/lib_prefix.dart View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
M runtime/lib/object.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/compiler.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/object.h View 1 2 4 chunks +52 lines, -37 lines 0 comments Download
M runtime/vm/object.cc View 1 2 11 chunks +101 lines, -9 lines 0 comments Download
M runtime/vm/object_store.h View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M runtime/vm/object_store.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/parser.h View 1 2 4 chunks +8 lines, -1 line 0 comments Download
M runtime/vm/parser.cc View 1 2 10 chunks +106 lines, -34 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 4 chunks +18 lines, -14 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M runtime/vm/snapshot.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/symbols.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M tests/language/deferred_constraints_type_annotation_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/language/language.status View 1 2 2 chunks +15 lines, -10 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
hausner
Please take an early look. Still need to run tests and adjust status files. Siva, ...
6 years, 9 months ago (2014-03-24 22:21:47 UTC) #1
hausner
After running tests, I realize that this change is not finished yet. I have to ...
6 years, 9 months ago (2014-03-24 23:57:59 UTC) #2
Ivan Posva
I have a couple of questions about why libraries are treated as loaded/deferred. Let's discuss ...
6 years, 9 months ago (2014-03-25 02:38:40 UTC) #3
hausner
Now with tests and test expectations updated. Also adds distinction between deferred types used to ...
6 years, 9 months ago (2014-03-25 23:21:59 UTC) #4
Ivan Posva
-Ivan https://codereview.chromium.org/208323015/diff/20001/runtime/lib/lib_prefix.dart File runtime/lib/lib_prefix.dart (right): https://codereview.chromium.org/208323015/diff/20001/runtime/lib/lib_prefix.dart#newcode14 runtime/lib/lib_prefix.dart:14: var completer = new Completer<bool>(); indentation https://codereview.chromium.org/208323015/diff/20001/runtime/vm/object.cc File ...
6 years, 9 months ago (2014-03-27 07:38:48 UTC) #5
hausner
Thank you. https://codereview.chromium.org/208323015/diff/20001/runtime/lib/lib_prefix.dart File runtime/lib/lib_prefix.dart (right): https://codereview.chromium.org/208323015/diff/20001/runtime/lib/lib_prefix.dart#newcode14 runtime/lib/lib_prefix.dart:14: var completer = new Completer<bool>(); On 2014/03/27 ...
6 years, 9 months ago (2014-03-27 20:45:39 UTC) #6
hausner
Committed patchset #3 manually as r34481 (presubmit successful).
6 years, 9 months ago (2014-03-27 21:21:01 UTC) #7
Ivan Posva
6 years, 9 months ago (2014-03-27 21:41:18 UTC) #8
Message was sent while issue was closed.
LGTM -ip

https://codereview.chromium.org/208323015/diff/20001/runtime/vm/object.cc
File runtime/vm/object.cc (right):

https://codereview.chromium.org/208323015/diff/20001/runtime/vm/object.cc#new...
runtime/vm/object.cc:2453: if (code.is_optimized()) {
On 2014/03/27 20:45:39, hausner wrote:
> On 2014/03/27 07:38:48, Ivan Posva wrote:
> > What if we have optimized code that needs to be entirely cleared such as on
> load
> > of libraries?
> I think we spoke about this before i implemented it. You pointed out that if
the
> optimized code is in the list, then the unoptimized code is in the list as
well
> and we'll get rid of it in a separate iteration. The optimized code is thrown
> away when we switch to unoptimized code. So I think both versions of the code
> are nuked.

I worry about the ordering of code removal a bit. What is the behaviour of
SwitchToUnoptimizedCode if we have already removed the unoptimized code?

Powered by Google App Engine
This is Rietveld 408576698