Commit d0d73999 authored by yangguo's avatar yangguo Committed by Commit bot

[interpreter, debugger] fix remaining cctest failures.

R=rmcilroy@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

Review URL: https://codereview.chromium.org/1802903002

Cr-Commit-Position: refs/heads/master@{#34781}
parent 2ee59e5e
......@@ -200,7 +200,6 @@ void BreakLocation::BytecodeArrayIterator::Next() {
}
DCHECK(position_ >= 0);
DCHECK(statement_position_ >= 0);
break_index_++;
enum DebugBreakType type = GetDebugBreakType();
if (type == NOT_DEBUG_BREAK) continue;
......@@ -215,6 +214,7 @@ void BreakLocation::BytecodeArrayIterator::Next() {
break;
}
}
break_index_++;
}
BreakLocation::DebugBreakType
......
......@@ -968,7 +968,6 @@ void BytecodeGenerator::VisitIterationBody(IterationStatement* stmt,
}
void BytecodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) {
builder()->SetStatementPosition(stmt);
LoopBuilder loop_builder(builder());
loop_builder.LoopHeader();
if (stmt->cond()->ToBooleanIsFalse()) {
......@@ -1010,7 +1009,6 @@ void BytecodeGenerator::VisitWhileStatement(WhileStatement* stmt) {
void BytecodeGenerator::VisitForStatement(ForStatement* stmt) {
if (stmt->init() != nullptr) {
builder()->SetStatementPosition(stmt->init());
Visit(stmt->init());
}
if (stmt->cond() && stmt->cond()->ToBooleanIsFalse()) {
......@@ -1146,6 +1144,7 @@ void BytecodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// The loop
loop_builder.LoopHeader();
builder()->SetExpressionAsStatementPosition(stmt->each());
loop_builder.Condition();
builder()->ForInDone(index, cache_length);
loop_builder.BreakIfTrue();
......@@ -1153,7 +1152,6 @@ void BytecodeGenerator::VisitForInStatement(ForInStatement* stmt) {
FeedbackVectorSlot slot = stmt->ForInFeedbackSlot();
builder()->ForInNext(receiver, index, cache_type, feedback_index(slot));
loop_builder.ContinueIfUndefined();
builder()->SetExpressionAsStatementPosition(stmt->each());
VisitForInAssignment(stmt->each(), stmt->EachFeedbackSlot());
VisitIterationBody(stmt, &loop_builder);
loop_builder.Next();
......
......@@ -509,12 +509,6 @@
##############################################################################
['ignition == True', {
# TODO(yangguo,4690): Test failures in debugger tests.
'test-debug/DebugStepNamedLoadLoop': [FAIL],
'test-debug/DebugStepForIn': [FAIL],
'test-debug/DebugStepDoWhile': [FAIL],
'test-debug/DebugConditional': [FAIL],
# BUG(4333). Function name inferrer does not work for ES6 clases.
'test-func-name-inference/UpperCaseClass': [TIMEOUT],
'test-func-name-inference/LowerCaseClass': [TIMEOUT],
......
......@@ -3458,26 +3458,25 @@ TEST(DebugConditional) {
v8::Local<v8::Context> context = env.context();
// Create a function for testing stepping. Run it to allow it to get
// optimized.
const char* src = "function foo(x) { "
" var a;"
" a = x ? 1 : 2;"
" return a;"
"}"
"foo()";
const char* src =
"function foo(x) { "
" return x ? 1 : 2;"
"}"
"foo()";
v8::Local<v8::Function> foo = CompileFunction(&env, src, "foo");
SetBreakPoint(foo, 0); // "var a;"
step_action = StepIn;
break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
CHECK_EQ(3, break_point_hit_count);
CHECK_EQ(2, break_point_hit_count);
step_action = StepIn;
break_point_hit_count = 0;
const int argc = 1;
v8::Local<v8::Value> argv_true[argc] = {v8::True(isolate)};
foo->Call(context, env->Global(), argc, argv_true).ToLocalChecked();
CHECK_EQ(3, break_point_hit_count);
CHECK_EQ(2, break_point_hit_count);
// Get rid of the debug event listener.
v8::Debug::SetDebugEventListener(isolate, nullptr);
......
......@@ -761,7 +761,6 @@
'harmony/debug-stepin-proxies': [FAIL],
'regress/regress-crbug-119800': [FAIL],
'regress/regress-opt-after-debug-deopt': [FAIL],
'regress/regress-crbug-568477-2': [FAIL],
# TODO(rmcilroy,4765): assertion failures in LiveEdit tests.
'debug-liveedit-restart-frame': [FAIL],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment