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

Issue 1939703002: Don't crash on deserialized type inference. (Closed)

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

Description

Patch Set 1 #

Patch Set 2 : Fix getResolvedAst for local functions. #

Total comments: 4

Patch Set 3 : Updated cf. comments + minor fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -75 lines) Patch
M pkg/compiler/lib/src/common/resolution.dart View 1 3 chunks +5 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/compiler.dart View 1 1 chunk +4 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/inferrer_visitor.dart View 1 chunk +4 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart View 7 chunks +24 lines, -8 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart View 7 chunks +20 lines, -19 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/backend.dart View 1 1 chunk +6 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/js_backend.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/resolution/tree_elements.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/serialization/modelz.dart View 1 chunk +6 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart View 1 2 4 chunks +40 lines, -12 lines 0 comments Download
M pkg/compiler/lib/src/serialization/task.dart View 1 2 chunks +4 lines, -4 lines 0 comments Download
M tests/compiler/dart2js/serialization_compilation_test.dart View 1 chunk +1 line, -3 lines 0 comments Download
M tests/compiler/dart2js/serialization_helper.dart View 1 3 chunks +15 lines, -12 lines 0 comments Download
M tests/compiler/dart2js/serialization_resolved_ast_test.dart View 1 2 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 6 (2 generated)
Johnni Winther
4 years, 7 months ago (2016-05-02 08:36:15 UTC) #2
Siggi Cherem (dart-lang)
lgtm https://codereview.chromium.org/1939703002/diff/20001/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart File pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart (right): https://codereview.chromium.org/1939703002/diff/20001/pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart#newcode347 pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart:347: /// with [TreeElements]. let's update the comment to ...
4 years, 7 months ago (2016-05-02 16:21:43 UTC) #3
Johnni Winther
Committed patchset #3 (id:40001) manually as f79ff62b2ee08ca518abe49d880847a5f3f334cd (presubmit successful).
4 years, 7 months ago (2016-05-03 09:29:31 UTC) #5
Johnni Winther
4 years, 7 months ago (2016-05-04 09:56:25 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/1939703002/diff/20001/pkg/compiler/lib/src/se...
File pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart (right):

https://codereview.chromium.org/1939703002/diff/20001/pkg/compiler/lib/src/se...
pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart:347: /// with
[TreeElements].
On 2016/05/02 16:21:43, Siggi Cherem (dart-lang) wrote:
> let's update the comment to say that this deserializes the resolved AST of an
> element and it's nested elements (maybe clarify also that the outer element is
a
> function/procedure, and that nested elements are closures)?

Done.

https://codereview.chromium.org/1939703002/diff/20001/pkg/compiler/lib/src/se...
pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart:645:
resolvedAstMap[function] = new ParsedResolvedAst(
On 2016/05/02 16:21:43, Siggi Cherem (dart-lang) wrote:
> do we need to assert that the key doesn't exist already? (seems like an
> invariant in how we are using this from serialization_helper.)
> 
> Alternatively, instead of passing in the output-map, we could return a fresh
map
> each time you call this function. It's more wasted memory, but that might be
> fine, then here we don't need to care about any invariants about the map.

Invariant test added!

Powered by Google App Engine
This is Rietveld 408576698