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

Issue 2161263003: [debug] use catch prediction flag for promise rejections. (Closed)

Created:
4 years, 5 months ago by Yang
Modified:
4 years, 5 months ago
CC:
oth, rmcilroy, v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[debug] use catch prediction flag for promise rejections. This is in preparation to implementing exception prediction for async functions. Each handler table entry can now predict "caught", "uncaught", or "promise". The latter indicates that the exception will lead to a promise rejection. To mark the relevant try-catch blocks, we add a new native syntax. try { } %catch (e) { } indicates a TryCatchStatement with the "promise" prediction. The previous implementation of using the function to tell the relevant try-catch apart from inner try-catch blocks will not work for async functions since these can have inner try-catch blocks inside the same function. BUG=v8:5167 Committed: https://crrev.com/6d0a4202982529630e7f7e636b25f267b7fe8857 Cr-Commit-Position: refs/heads/master@{#37966}

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -132 lines) Patch
M src/ast/ast.h View 4 chunks +32 lines, -13 lines 0 comments Download
M src/ast/ast-numbering.cc View 4 chunks +12 lines, -11 lines 1 comment Download
M src/ast/prettyprinter.cc View 1 chunk +14 lines, -2 lines 0 comments Download
M src/compiler/ast-graph-builder.h View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/ast-graph-builder.cc View 6 chunks +7 lines, -8 lines 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 chunk +1 line, -3 lines 0 comments Download
M src/compiler/code-generator.h View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/code-generator.cc View 2 chunks +10 lines, -6 lines 0 comments Download
M src/compiler/common-operator.h View 1 chunk +8 lines, -1 line 0 comments Download
M src/compiler/common-operator.cc View 3 chunks +25 lines, -5 lines 0 comments Download
M src/compiler/instruction-selector.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/linkage.h View 1 chunk +8 lines, -7 lines 0 comments Download
M src/full-codegen/full-codegen.h View 2 chunks +3 lines, -2 lines 0 comments Download
M src/full-codegen/full-codegen.cc View 5 chunks +9 lines, -10 lines 0 comments Download
M src/interpreter/bytecode-array-builder.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/interpreter/control-flow-builders.h View 4 chunks +7 lines, -6 lines 0 comments Download
M src/interpreter/control-flow-builders.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/interpreter/handler-table-builder.h View 2 chunks +3 lines, -2 lines 0 comments Download
M src/interpreter/handler-table-builder.cc View 3 chunks +5 lines, -6 lines 0 comments Download
M src/isolate.h View 2 chunks +3 lines, -6 lines 0 comments Download
M src/isolate.cc View 4 chunks +6 lines, -13 lines 3 comments Download
M src/js/promise.js View 2 chunks +4 lines, -4 lines 0 comments Download
M src/objects.h View 2 chunks +7 lines, -3 lines 0 comments Download
M src/parsing/parser.cc View 2 chunks +22 lines, -5 lines 1 comment Download
M src/runtime/runtime.h View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime-debug.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js View 2 chunks +2 lines, -4 lines 1 comment Download
M test/mjsunit/regress/regress-crbug-401915.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (6 generated)
Yang
Please take a look.
4 years, 5 months ago (2016-07-20 09:00:04 UTC) #3
Michael Starzinger
LGTM. Thanks! I looked at everything aside from the parser. Also note that I don't ...
4 years, 5 months ago (2016-07-20 09:20:18 UTC) #5
Yang
On 2016/07/20 09:20:18, Michael Starzinger wrote: > LGTM. Thanks! I looked at everything aside from ...
4 years, 5 months ago (2016-07-21 05:43:55 UTC) #6
Dan Ehrenberg
lgtm Not necessarily the syntax I would have gone with (it's not very self-explanatory, and ...
4 years, 5 months ago (2016-07-21 21:07:34 UTC) #7
Dan Ehrenberg
https://codereview.chromium.org/2161263003/diff/1/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/2161263003/diff/1/src/isolate.cc#newcode1281 src/isolate.cc:1281: if (prediction != HandlerTable::UNCAUGHT) return CAUGHT_BY_JAVASCRIPT; On 2016/07/21 at ...
4 years, 5 months ago (2016-07-21 21:08:51 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2161263003/1
4 years, 5 months ago (2016-07-22 05:25:59 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-22 06:04:18 UTC) #12
commit-bot: I haz the power
4 years, 5 months ago (2016-07-22 06:05:04 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/6d0a4202982529630e7f7e636b25f267b7fe8857
Cr-Commit-Position: refs/heads/master@{#37966}

Powered by Google App Engine
This is Rietveld 408576698