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

Issue 339563002: Remove scanBuiltinLibraries. (Closed)

Created:
6 years, 6 months ago by Johnni Winther
Modified:
6 years, 5 months ago
Reviewers:
karlklose, ahe
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : #

Total comments: 7

Patch Set 3 : Updated cf. comments. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+434 lines, -424 lines) Patch
M sdk/lib/_internal/compiler/implementation/apiimpl.dart View 1 chunk +0 lines, -6 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/compiler.dart View 1 2 13 chunks +118 lines, -80 lines 2 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart View 1 chunk +7 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/enqueue.dart View 1 chunk +5 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 4 chunks +140 lines, -119 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/library_loader.dart View 1 9 chunks +27 lines, -51 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/mirror_renamer/renamer.dart View 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/use_unused_api.dart View 1 chunk +0 lines, -1 line 0 comments Download
M tests/compiler/dart2js/analyze_only_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/dart_backend_test.dart View 1 3 chunks +12 lines, -1 line 0 comments Download
M tests/compiler/dart2js/exit_code_test.dart View 2 chunks +8 lines, -8 lines 0 comments Download
M tests/compiler/dart2js/import_test.dart View 1 chunk +3 lines, -1 line 0 comments Download
M tests/compiler/dart2js/memory_compiler.dart View 3 chunks +10 lines, -3 lines 0 comments Download
M tests/compiler/dart2js/mirrors/mirrors_test_helper.dart View 1 chunk +2 lines, -1 line 0 comments Download
M tests/compiler/dart2js/mirrors_metadata_test.dart View 2 chunks +53 lines, -35 lines 0 comments Download
M tests/compiler/dart2js/mock_compiler.dart View 2 chunks +8 lines, -11 lines 0 comments Download
M tests/compiler/dart2js/part_of_test.dart View 1 chunk +2 lines, -4 lines 0 comments Download
M tests/compiler/dart2js/reexport_handled_test.dart View 2 chunks +3 lines, -5 lines 0 comments Download
M tests/utils/dummy_compiler_test.dart View 3 chunks +31 lines, -20 lines 0 comments Download
M tests/utils/recursive_import_test.dart View 2 chunks +2 lines, -70 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Johnni Winther
6 years, 6 months ago (2014-06-16 10:01:01 UTC) #1
karlklose
LGTM. https://codereview.chromium.org/339563002/diff/20001/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): https://codereview.chromium.org/339563002/diff/20001/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode1005 sdk/lib/_internal/compiler/implementation/compiler.dart:1005: /// This method is called immediately after the ...
6 years, 6 months ago (2014-06-17 12:30:26 UTC) #2
Johnni Winther
https://codereview.chromium.org/339563002/diff/20001/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): https://codereview.chromium.org/339563002/diff/20001/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode1005 sdk/lib/_internal/compiler/implementation/compiler.dart:1005: /// This method is called immediately after the [LibraryElement] ...
6 years, 6 months ago (2014-06-17 12:52:28 UTC) #3
Johnni Winther
Committed patchset #3 manually as r37391 (presubmit successful).
6 years, 6 months ago (2014-06-17 13:00:22 UTC) #4
ahe
https://codereview.chromium.org/339563002/diff/40001/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): https://codereview.chromium.org/339563002/diff/40001/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode1235 sdk/lib/_internal/compiler/implementation/compiler.dart:1235: // when these are handled as erroneous libraries/compilation units. ...
6 years, 5 months ago (2014-07-17 08:33:13 UTC) #5
Johnni Winther
6 years, 5 months ago (2014-07-17 11:13:03 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/339563002/diff/40001/sdk/lib/_internal/compil...
File sdk/lib/_internal/compiler/implementation/compiler.dart (right):

https://codereview.chromium.org/339563002/diff/40001/sdk/lib/_internal/compil...
sdk/lib/_internal/compiler/implementation/compiler.dart:1235: // when these are
handled as erroneous libraries/compilation units.
On 2014/07/17 08:33:13, ahe wrote:
> I guess it isn't clear how detrimental fatal errors are to incremental
> compilation, and why that is.
> 
> When a fatal error occurs, the compiler is left in an inconsistent state. So
if
> the compiler instance was reused, it produces undefined results. In practice,
I
> have observed that fatal errors can lead to error that cannot go away, or take
a
> few attempts to go away. Or plain compiler crashes. I also have examples of
the
> compiler producing bad output.
> 
> So when a fatal error occurs, it is better to flush all state (discard the
> compiler instance) and start over. This is why fatal errors are detrimental,
> because the response to the user misspelling an import, or making a syntax
error
> results in the next compilation taking a really long time.
> 
> However, silently leaving the compiler in an inconsistent state is even worse.
> If a fatal error had been reported, an exception would have been thrown, and
the
> compilation would have been aborted, and [compilerWasCancelled] would have
been
> true. The incremental compiler recognizes this situation and flushes state.
> 
> To support incremental compilation, the compiler needs to recover from all
> errors without leaving itself in an inconsistent state, or let the incremental
> compiler know that it cannot be reused. I think that can be stated in a simple
> rule with one exception:
> 
>   Don't use reportFatalError, unless that would leave the compiler in an
> inconsistent state.
> 
> I don't believe I have articulated the "unless" part clearly before.
> 
> IIUC, the bad state only occurs if a "builtin" library isn't available. If
that
> is really the case, then perhaps we can replace this check to see if
> initializeCoreClasses and initializeHelperClasses hasn't been called.

Can you file a bug on this and put me in it?

Powered by Google App Engine
This is Rietveld 408576698