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

Issue 1796893002: [Interpreter] Pops the context to the correct level on return. (Closed)

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

Description

[Interpreter] Pops the context to the correct level on return. We need to pop the context to correct level on return as well. This was incorrectly removed in this cl: https://codereview.chromium.org/1768123002/. For example when we have a try-catch-finally block and catch does a return, the return does not happen immediately. It should execute finally block before it returns. Return statement should pop the context to the correct level as expected by finally block. BUG=594369, v8:4280 LOG=N Committed: https://crrev.com/2fefc4827e2d8b69083194d8b3cc7ab6b9ba7115 Cr-Commit-Position: refs/heads/master@{#34822}

Patch Set 1 #

Patch Set 2 : Fixed for readability and removed a DCHECK. #

Patch Set 3 : Added a test for try-finally with return in test-interpreter. #

Total comments: 1

Patch Set 4 : Added a mjsunit test to check we don't pop outermost context before return. #

Patch Set 5 : Adds check that break/continue are not seen in top level scope. #

Total comments: 4

Patch Set 6 : Adress review comments. #

Patch Set 7 : Rebased the patch. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -20 lines) Patch
M src/interpreter/bytecode-generator.cc View 1 2 3 4 5 6 3 chunks +12 lines, -12 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/BasicLoops.golden View 1 3 chunks +6 lines, -5 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ContextVariables.golden View 2 chunks +2 lines, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/TryCatch.golden View 2 chunks +2 lines, -1 line 0 comments Download
M test/cctest/interpreter/bytecode_expectations/WithStatement.golden View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M test/cctest/interpreter/test-interpreter.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
A test/mjsunit/ignition/debug-scope-on-return.js View 1 2 3 1 chunk +31 lines, -0 lines 1 comment Download

Messages

Total messages: 41 (20 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1796893002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1796893002/1
4 years, 9 months ago (2016-03-14 15:43:26 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_rel_ng/builds/2876) v8_linux64_rel_ng_triggered on ...
4 years, 9 months ago (2016-03-14 16:07:58 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1796893002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1796893002/20001
4 years, 9 months ago (2016-03-15 09:13:50 UTC) #8
mythria
Michi, I am sorry I messed up this code in my last cl. I tried ...
4 years, 9 months ago (2016-03-15 09:49:11 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1796893002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1796893002/40001
4 years, 9 months ago (2016-03-15 09:49:29 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1796893002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1796893002/40001
4 years, 9 months ago (2016-03-15 10:07:11 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-15 10:23:45 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1796893002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1796893002/80001
4 years, 9 months ago (2016-03-15 12:05:51 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-15 12:28:02 UTC) #21
mythria
I added a new mjsunit test to check we don't pop the outermost context of ...
4 years, 9 months ago (2016-03-16 11:10:05 UTC) #22
rmcilroy
Looks good to me, but I'll leave it to Michi to approve. https://codereview.chromium.org/1796893002/diff/80001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc ...
4 years, 9 months ago (2016-03-16 12:07:28 UTC) #23
Michael Starzinger
LGTM. https://codereview.chromium.org/1796893002/diff/80001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/1796893002/diff/80001/src/interpreter/bytecode-generator.cc#newcode222 src/interpreter/bytecode-generator.cc:222: case CMD_BREAK: // We should never see break/continue ...
4 years, 9 months ago (2016-03-16 14:16:53 UTC) #24
mythria
Thanks. I fixed both of them. https://codereview.chromium.org/1796893002/diff/80001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/1796893002/diff/80001/src/interpreter/bytecode-generator.cc#newcode222 src/interpreter/bytecode-generator.cc:222: case CMD_BREAK: // ...
4 years, 9 months ago (2016-03-16 14:33:20 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1796893002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1796893002/100001
4 years, 9 months ago (2016-03-16 14:33:41 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_dbg_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg_ng/builds/3019) v8_linux_mipsel_compile_rel on ...
4 years, 9 months ago (2016-03-16 14:34:53 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1796893002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1796893002/120001
4 years, 9 months ago (2016-03-16 14:50:04 UTC) #31
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-16 15:11:39 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1796893002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1796893002/120001
4 years, 9 months ago (2016-03-16 15:36:17 UTC) #36
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 9 months ago (2016-03-16 15:51:21 UTC) #38
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/2fefc4827e2d8b69083194d8b3cc7ab6b9ba7115 Cr-Commit-Position: refs/heads/master@{#34822}
4 years, 9 months ago (2016-03-16 15:53:02 UTC) #40
Michael Achenbach
4 years, 9 months ago (2016-03-16 18:59:03 UTC) #41
Message was sent while issue was closed.
https://codereview.chromium.org/1796893002/diff/120001/test/mjsunit/ignition/...
File test/mjsunit/ignition/debug-scope-on-return.js (right):

https://codereview.chromium.org/1796893002/diff/120001/test/mjsunit/ignition/...
test/mjsunit/ignition/debug-scope-on-return.js:2: // Use of this source code is
governed by a BSD-style license that can be
Please skip this test with ignition+msan:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20...

Powered by Google App Engine
This is Rietveld 408576698