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

Unified Diff: test/cctest/test-debug.cc

Issue 1053063003: Make --always-opt also optimize top-level code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Skip failing tests. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index 5929379663103208e80375734c5c3cf9e036d977..6569942c6168c21195770fb470d248e5f4dc2d70 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -6732,6 +6732,10 @@ TEST(Backtrace) {
v8::Debug::SetMessageHandler(BacktraceData::MessageHandler);
+ // TODO(3995): This doesn't work with --always-opt because we don't have
+ // correct source positions in optimized code. Enable once we have.
+ i::FLAG_always_opt = false;
+
const int kBufferSize = 1000;
uint16_t buffer[kBufferSize];
const char* scripts_command =
@@ -7062,7 +7066,6 @@ TEST(DeoptimizeDuringDebugBreak) {
frame_function_name_source,
"frame_function_name");
-
// Set a debug event listener which will keep interrupting execution until
// debug break. When inside function bar it will deoptimize all functions.
// This tests lazy deoptimization bailout for the stack check, as the first
@@ -7071,13 +7074,12 @@ TEST(DeoptimizeDuringDebugBreak) {
v8::Debug::SetDebugEventListener(DebugEventBreakDeoptimize);
// Compile and run function bar which will optimize it for some flag settings.
- v8::Script::Compile(v8::String::NewFromUtf8(
- env->GetIsolate(), "function bar(){}; bar()"))->Run();
+ v8::Local<v8::Function> f = CompileFunction(&env, "function bar(){}", "bar");
+ f->Call(v8::Undefined(env->GetIsolate()), 0, NULL);
// Set debug break and call bar again.
v8::Debug::DebugBreak(env->GetIsolate());
- v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(), "bar()"))
- ->Run();
+ f->Call(v8::Undefined(env->GetIsolate()), 0, NULL);
CHECK(debug_event_break_deoptimize_done);

Powered by Google App Engine
This is Rietveld 408576698