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

Issue 13947004: dart2js: Allow 'throw' when inlining (Closed)

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

Description

dart2js: Allow 'throw' when inlining R=karlklose@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=21259

Patch Set 1 #

Total comments: 30

Patch Set 2 : Feedback implmented #

Patch Set 3 : Nicolas' Code review feedback #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -41 lines) Patch
M runtime/tests/vm/vm.status View 1 chunk +4 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/compiler.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 2 chunks +12 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_helper.dart View 1 6 chunks +16 lines, -6 lines 2 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 1 chunk +5 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 2 17 chunks +62 lines, -21 lines 2 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 2 2 chunks +15 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/nodes.dart View 3 chunks +9 lines, -0 lines 1 comment Download
M sdk/lib/_internal/compiler/implementation/ssa/tracer.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/mock_compiler.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/language/inlined_throw_test.dart View 5 chunks +115 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
erikcorry
7 years, 8 months ago (2013-04-09 11:24:39 UTC) #1
karlklose
LGTM. https://codereview.chromium.org/13947004/diff/1/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart File sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart (right): https://codereview.chromium.org/13947004/diff/1/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart#newcode588 sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart:588: return JS("String|Null", r"(#['$name'] || #)", f, null); Why ...
7 years, 8 months ago (2013-04-09 11:58:46 UTC) #2
ngeoffray
https://codereview.chromium.org/13947004/diff/1/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right): https://codereview.chromium.org/13947004/diff/1/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart#newcode617 sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:617: $throw(ex) { We should rename this method. It does ...
7 years, 8 months ago (2013-04-10 12:06:38 UTC) #3
erikcorry
https://codereview.chromium.org/13947004/diff/1/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart File sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart (right): https://codereview.chromium.org/13947004/diff/1/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart#newcode588 sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart:588: return JS("String|Null", r"(#['$name'] || #)", f, null); On 2013/04/09 ...
7 years, 8 months ago (2013-04-10 12:52:32 UTC) #4
erikcorry
That should read: propagate a constant like '1' right into the JS, so it says ...
7 years, 8 months ago (2013-04-10 12:53:20 UTC) #5
ngeoffray
https://codereview.chromium.org/13947004/diff/1/sdk/lib/_internal/compiler/implementation/lib/math_patch.dart File sdk/lib/_internal/compiler/implementation/lib/math_patch.dart (right): https://codereview.chromium.org/13947004/diff/1/sdk/lib/_internal/compiler/implementation/lib/math_patch.dart#newcode8 sdk/lib/_internal/compiler/implementation/lib/math_patch.dart:8: patch double sqrt(num x) { On 2013/04/10 12:52:32, erikcorry ...
7 years, 8 months ago (2013-04-10 13:02:58 UTC) #6
erikcorry
https://codereview.chromium.org/13947004/diff/1/sdk/lib/_internal/compiler/implementation/lib/math_patch.dart File sdk/lib/_internal/compiler/implementation/lib/math_patch.dart (right): https://codereview.chromium.org/13947004/diff/1/sdk/lib/_internal/compiler/implementation/lib/math_patch.dart#newcode8 sdk/lib/_internal/compiler/implementation/lib/math_patch.dart:8: patch double sqrt(num x) { On 2013/04/10 13:02:58, ngeoffray ...
7 years, 8 months ago (2013-04-11 09:09:35 UTC) #7
erikcorry
Committed patchset #3 manually as r21259 (presubmit successful).
7 years, 8 months ago (2013-04-11 09:20:47 UTC) #8
ngeoffray
7 years, 8 months ago (2013-04-11 09:31:08 UTC) #9
Message was sent while issue was closed.
LGTM!

https://codereview.chromium.org/13947004/diff/14001/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right):

https://codereview.chromium.org/13947004/diff/14001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:637: * This wraos
the exception and actually does the throw too.  It is
wraos -> wraps

https://codereview.chromium.org/13947004/diff/14001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:637: * This wraos
the exception and actually does the throw too.  It is
actually does the throw too -> does the throw

https://codereview.chromium.org/13947004/diff/14001/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right):

https://codereview.chromium.org/13947004/diff/14001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/ssa/builder.dart:1775: if
(!isReachable) return;  // This can happen when inlining.
// This only happens when inlining

Can you add: assert(current != null) ?

https://codereview.chromium.org/13947004/diff/14001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/ssa/builder.dart:3906: if
(node.expression == null || !isReachable) {
I think you can remove the isReachable check.

https://codereview.chromium.org/13947004/diff/14001/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (right):

https://codereview.chromium.org/13947004/diff/14001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/ssa/nodes.dart:2025: toString() =>
'throwexpression';
throwexpression -> throw expression

Powered by Google App Engine
This is Rietveld 408576698