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

Issue 2798443002: Add "load from .dill" file capability and run a white-box test. (Closed)

Created:
3 years, 8 months ago by Emily Fortuna
Modified:
3 years, 8 months ago
Reviewers:
Johnni Winther, sra1
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add "load from .dill" file capability and run a white-box test. The dill_loader_test is rather intrusive and I look forward to rewriting it once we have the Entity model spread throughout the compiler rather than Elements. BUG= R=johnniwinther@google.com Committed: https://github.com/dart-lang/sdk/commit/310532ab508ee9d54e44abe7b1b8e6d4e2cbc7b8

Patch Set 1 : . #

Total comments: 14

Patch Set 2 : johnni comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -31 lines) Patch
M pkg/compiler/lib/src/commandline_options.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/compiler.dart View 5 chunks +11 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/dart2js.dart View 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/dump_info.dart View 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/js_backend/mirrors_analysis.dart View 2 chunks +4 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/kernel/world_builder.dart View 1 chunk +0 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/library_loader.dart View 1 12 chunks +152 lines, -19 lines 0 comments Download
M pkg/compiler/lib/src/options.dart View 7 chunks +10 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/serialization/task.dart View 4 chunks +4 lines, -3 lines 0 comments Download
M tests/compiler/dart2js/analyze_unused_dart2js_test.dart View 2 chunks +3 lines, -1 line 0 comments Download
A tests/compiler/dart2js/dill_loader_test.dart View 1 1 chunk +85 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/memory_compiler.dart View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 9 (4 generated)
Emily Fortuna
3 years, 8 months ago (2017-04-03 23:13:08 UTC) #4
Johnni Winther
lgtm https://codereview.chromium.org/2798443002/diff/20001/pkg/compiler/lib/src/library_loader.dart File pkg/compiler/lib/src/library_loader.dart (right): https://codereview.chromium.org/2798443002/diff/20001/pkg/compiler/lib/src/library_loader.dart#newcode878 pkg/compiler/lib/src/library_loader.dart:878: //return reporter.withCurrentElement(program, () { Just remove this. It's ...
3 years, 8 months ago (2017-04-04 07:25:20 UTC) #5
Emily Fortuna
https://codereview.chromium.org/2798443002/diff/20001/pkg/compiler/lib/src/library_loader.dart File pkg/compiler/lib/src/library_loader.dart (right): https://codereview.chromium.org/2798443002/diff/20001/pkg/compiler/lib/src/library_loader.dart#newcode878 pkg/compiler/lib/src/library_loader.dart:878: //return reporter.withCurrentElement(program, () { On 2017/04/04 07:25:20, Johnni Winther ...
3 years, 8 months ago (2017-04-04 20:03:53 UTC) #6
Emily Fortuna
Committed patchset #2 (id:40001) manually as 310532ab508ee9d54e44abe7b1b8e6d4e2cbc7b8 (presubmit successful).
3 years, 8 months ago (2017-04-04 23:22:19 UTC) #8
Johnni Winther
3 years, 8 months ago (2017-04-05 06:53:42 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/2798443002/diff/20001/tests/compiler/dart2js/...
File tests/compiler/dart2js/dill_loader_test.dart (right):

https://codereview.chromium.org/2798443002/diff/20001/tests/compiler/dart2js/...
tests/compiler/dart2js/dill_loader_test.dart:27:
path.normalize(path.join(basePath, 'tools/dartk_wrappers/dartk'));
On 2017/04/04 20:03:53, Emily Fortuna wrote:
> On 2017/04/04 07:25:20, Johnni Winther wrote:
> > This won't work on Windows. I'll fix it when you land it.
> > 'tools/dartk_wrappers/' doesn't contain a 'dartk.bat' and we don't run
> unittests
> > on Windows, anyway.
> 
> I know, but I thought as per our discussion, that was an okay shortcoming?

Yes. I'll fix it.

https://codereview.chromium.org/2798443002/diff/20001/tests/compiler/dart2js/...
tests/compiler/dart2js/dill_loader_test.dart:63: LibraryLoaderTask loader = new
LibraryLoaderTask(
On 2017/04/04 20:03:53, Emily Fortuna wrote:
> On 2017/04/04 07:25:20, Johnni Winther wrote:
> > `LibraryLoaderTask loader` -> `dynamic loader`
> > 
> > Then you don't need to put 'worldBuilder' in the LibraryLoaderTask
interface.
> 
> Is that really an improvement, that way we would now have no checks at all,
> whereas with LibraryLoaderTask we at least know it's a LibraryLoaderTask type
or
> subtype.

We are relying on implementation details (that the actual type has a meaningfull
[worldBuilder] property) but that is okay in tests. `dynamic` is just a way to
circumvent the type system and avoid a warning.

Powered by Google App Engine
This is Rietveld 408576698