Reviewers: Benedikt Meurer,
Message:
Could you take a look, please?
Description:
Couple more debugger tests working with Turbofan.
BUG=
Please review this at https://codereview.chromium.org/498493002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+14, -8 lines):
M src/compiler.cc
M src/compiler/ast-graph-builder.cc
M src/compiler/operator-properties-inl.h
M src/deoptimizer.cc
M test/mjsunit/debug-backtrace-text.js
M test/mjsunit/debug-break-inline.js
M test/mjsunit/debug-scopes.js
M test/mjsunit/mjsunit.status
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index
e496aee62d6760f3f13325fe5e84147aa1b7a91d..50e69a2c4dbbcfe2d0296fa142fdf8d19a7bfe2e
100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -417,6 +417,7 @@ OptimizedCompileJob::Status
OptimizedCompileJob::CreateGraph() {
compiler::Pipeline pipeline(info());
pipeline.GenerateCode();
if (!info()->code().is_null()) {
+
info()->context()->native_context()->AddOptimizedCode(*info()->code());
return SetLastStatus(SUCCEEDED);
}
}
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc
b/src/compiler/ast-graph-builder.cc
index
0144104e39a780e2788b71d78b38ba894dfdb200..4a024f3f8d74cb55a2eb8a382ce53cb21f134f41
100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -86,7 +86,8 @@ bool AstGraphBuilder::CreateGraph() {
VisitDeclarations(scope->declarations());
// TODO(mstarzinger): This should do an inlined stack check.
- NewNode(javascript()->Runtime(Runtime::kStackGuard, 0));
+ Node* node = NewNode(javascript()->Runtime(Runtime::kStackGuard, 0));
+ PrepareFrameState(node, BailoutId::FunctionEntry());
// Visit statements in the function body.
VisitStatements(info()->function()->body());
Index: src/compiler/operator-properties-inl.h
diff --git a/src/compiler/operator-properties-inl.h
b/src/compiler/operator-properties-inl.h
index
a65068d7fff97934a9ddf1ea26595b9e38ff0566..9d8cc0424e05f9be54c4f5654490b66e9a9fba06
100644
--- a/src/compiler/operator-properties-inl.h
+++ b/src/compiler/operator-properties-inl.h
@@ -47,6 +47,9 @@ inline bool
OperatorProperties::HasFrameStateInput(Operator* op) {
switch (function) {
case Runtime::kDebugBreak:
case Runtime::kDeoptimizeFunction:
+ case Runtime::kSetScriptBreakPoint:
+ case Runtime::kDebugGetLoadedScripts:
+ case Runtime::kStackGuard:
return true;
default:
return false;
@@ -178,6 +181,9 @@ inline bool
OperatorProperties::CanLazilyDeoptimize(Operator* op) {
switch (function) {
case Runtime::kDebugBreak:
case Runtime::kDeoptimizeFunction:
+ case Runtime::kSetScriptBreakPoint:
+ case Runtime::kDebugGetLoadedScripts:
+ case Runtime::kStackGuard:
return true;
default:
return false;
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index
1df7df84d03e4dbb0a2ecb6a7c44c51493c3b235..5209a51611915952c8ec44af98bfff76bdc581ce
100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -378,7 +378,8 @@ void
Deoptimizer::DeoptimizeMarkedCodeForContext(Context* context) {
CHECK_EQ(code->kind(), Code::OPTIMIZED_FUNCTION);
Object* next = code->next_code_link();
- if (code->marked_for_deoptimization()) {
+ if (code->marked_for_deoptimization() &&
+ (!code->is_turbofanned() || FLAG_turbo_deoptimization)) {
// Put the code into the list for later patching.
codes.Add(code, &zone);
Index: test/mjsunit/debug-backtrace-text.js
diff --git a/test/mjsunit/debug-backtrace-text.js
b/test/mjsunit/debug-backtrace-text.js
index
61648fa4e2e6ee4e8554556db02e18acd93fe0b1..3bfaeb0dad1846460d4085a144e4021d2aff1b5b
100644
--- a/test/mjsunit/debug-backtrace-text.js
+++ b/test/mjsunit/debug-backtrace-text.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --expose-debug-as debug
+// Flags: --expose-debug-as debug --turbo-deoptimization
// The functions used for testing backtraces.
function Point(x, y) {
Index: test/mjsunit/debug-break-inline.js
diff --git a/test/mjsunit/debug-break-inline.js
b/test/mjsunit/debug-break-inline.js
index
4418fa8d1b0dda0770b8387a6ccf673a66def529..3ef4d4eafe284348cdb3fbbb8d532f109a399485
100644
--- a/test/mjsunit/debug-break-inline.js
+++ b/test/mjsunit/debug-break-inline.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --expose-debug-as debug --allow-natives-syntax
+// Flags: --expose-debug-as debug --allow-natives-syntax
--turbo-deoptimization
// This test tests that deoptimization due to debug breaks works for
// inlined functions where the full-code is generated before the
Index: test/mjsunit/debug-scopes.js
diff --git a/test/mjsunit/debug-scopes.js b/test/mjsunit/debug-scopes.js
index
ce37d2402305f5200023794475f1e74a770eb450..4823496e3c921ccc48654b4cea0c0b33d11f8b52
100644
--- a/test/mjsunit/debug-scopes.js
+++ b/test/mjsunit/debug-scopes.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --expose-debug-as debug --allow-natives-syntax
+// Flags: --expose-debug-as debug --allow-natives-syntax
--turbo-deoptimization
// The functions used for testing backtraces. They are at the top to make
the
// testing of source line/column easier.
Index: test/mjsunit/mjsunit.status
diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status
index
64b9ef14b1c236cd78c55396ae5259257368b562..ff065c8cd6952cda7b5051db86ccd18a2978c187
100644
--- a/test/mjsunit/mjsunit.status
+++ b/test/mjsunit/mjsunit.status
@@ -94,8 +94,6 @@
'regress/regress-opt-after-debug-deopt': [PASS, NO_VARIANTS],
# Support for %GetFrameDetails is missing and requires checkpoints.
- 'debug-backtrace-text': [PASS, NO_VARIANTS],
- 'debug-break-inline': [PASS, NO_VARIANTS],
'debug-evaluate-bool-constructor': [PASS, NO_VARIANTS],
'debug-evaluate-closure': [PASS, NO_VARIANTS],
'debug-evaluate-const': [PASS, NO_VARIANTS],
@@ -107,7 +105,6 @@
'debug-liveedit-double-call': [PASS, NO_VARIANTS],
'debug-liveedit-restart-frame': [PASS, NO_VARIANTS],
'debug-return-value': [PASS, NO_VARIANTS],
- 'debug-scopes': [PASS, NO_VARIANTS],
'debug-set-variable-value': [PASS, NO_VARIANTS],
'debug-step-stub-callfunction': [PASS, NO_VARIANTS],
'debug-stepin-accessor': [PASS, NO_VARIANTS],
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.