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

Issue 14404004: Throw NoSuchMethod or ArgumentError instead of generating a bailout, when we know the next instruct… (Closed)

Created:
7 years, 8 months ago by ngeoffray
Modified:
7 years, 8 months ago
Reviewers:
sra1, kasperl
CC:
reviews_dartlang.org, erikcorry
Visibility:
Public.

Description

Throw NoSuchMethod or ArgumentError instead of generating a bailout, when we know the next instruction after a type guard will throw. Committed: https://code.google.com/p/dart/source/detail?r=21870

Patch Set 1 : #

Total comments: 12

Patch Set 2 : #

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+378 lines, -176 lines) Patch
M sdk/lib/_internal/compiler/implementation/lib/interceptors.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/bailout.dart View 1 2 3 4 5 chunks +114 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 2 chunks +13 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 3 chunks +88 lines, -90 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart View 1 2 24 chunks +55 lines, -41 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/nodes.dart View 1 25 chunks +49 lines, -27 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/optimize.dart View 1 2 chunks +11 lines, -5 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart View 1 1 chunk +1 line, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/world.dart View 1 1 chunk +5 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/dead_bailout_target_test.dart View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/mock_compiler.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/type_inference_test.dart View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
A tests/language/bailout8_test.dart View 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
ngeoffray
7 years, 8 months ago (2013-04-22 13:39:31 UTC) #1
kasperl
https://codereview.chromium.org/14404004/diff/7001/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart File sdk/lib/_internal/compiler/implementation/ssa/bailout.dart (right): https://codereview.chromium.org/14404004/diff/7001/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart#newcode194 sdk/lib/_internal/compiler/implementation/ssa/bailout.dart:194: // Returns whether an invcation of [selector] on [receiver] ...
7 years, 8 months ago (2013-04-23 06:12:43 UTC) #2
sra1
in swarm I see: len = iterable.get$length(iterable); if (typeof len !== "number") return this.addAll$1$bailout1(1, iterable, ...
7 years, 8 months ago (2013-04-23 06:53:20 UTC) #3
ngeoffray
Thanks Kasper, PTAL. https://codereview.chromium.org/14404004/diff/7001/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart File sdk/lib/_internal/compiler/implementation/ssa/bailout.dart (right): https://codereview.chromium.org/14404004/diff/7001/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart#newcode194 sdk/lib/_internal/compiler/implementation/ssa/bailout.dart:194: // Returns whether an invcation of ...
7 years, 8 months ago (2013-04-23 08:06:04 UTC) #4
kasperl
LGTM. https://codereview.chromium.org/14404004/diff/11003/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart File sdk/lib/_internal/compiler/implementation/ssa/bailout.dart (right): https://codereview.chromium.org/14404004/diff/11003/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart#newcode233 sdk/lib/_internal/compiler/implementation/ssa/bailout.dart:233: // (meaning it will be a call), we ...
7 years, 8 months ago (2013-04-23 09:01:43 UTC) #5
ngeoffray
Thanks Kasper. I also added a new heuristic in typeGuardWouldBeValuable to not insert a type ...
7 years, 8 months ago (2013-04-23 11:00:56 UTC) #6
ngeoffray
7 years, 8 months ago (2013-04-23 11:52:01 UTC) #7
Message was sent while issue was closed.
Committed patchset #5 manually as r21870 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698