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

Side by Side Diff: test/cctest/test-debug.cc

Issue 410153002: Make --always-opt also optimize toplevel code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6606 matching lines...) Expand 10 before | Expand all | Expand 10 after
6617 6617
6618 6618
6619 // Test that debug messages get processed when ProcessDebugMessages is called. 6619 // Test that debug messages get processed when ProcessDebugMessages is called.
6620 TEST(Backtrace) { 6620 TEST(Backtrace) {
6621 DebugLocalContext env; 6621 DebugLocalContext env;
6622 v8::Isolate* isolate = env->GetIsolate(); 6622 v8::Isolate* isolate = env->GetIsolate();
6623 v8::HandleScope scope(isolate); 6623 v8::HandleScope scope(isolate);
6624 6624
6625 v8::Debug::SetMessageHandler(BacktraceData::MessageHandler); 6625 v8::Debug::SetMessageHandler(BacktraceData::MessageHandler);
6626 6626
6627 // TODO(mstarzinger): This doesn't work with --always-opt because we don't
6628 // have correct source positions in optimized code. Enable once we have.
6629 i::FLAG_always_opt = false;
6630
6627 const int kBufferSize = 1000; 6631 const int kBufferSize = 1000;
6628 uint16_t buffer[kBufferSize]; 6632 uint16_t buffer[kBufferSize];
6629 const char* scripts_command = 6633 const char* scripts_command =
6630 "{\"seq\":0," 6634 "{\"seq\":0,"
6631 "\"type\":\"request\"," 6635 "\"type\":\"request\","
6632 "\"command\":\"backtrace\"}"; 6636 "\"command\":\"backtrace\"}";
6633 6637
6634 // Check backtrace from ProcessDebugMessages. 6638 // Check backtrace from ProcessDebugMessages.
6635 BacktraceData::frame_counter = -10; 6639 BacktraceData::frame_counter = -10;
6636 v8::Debug::SendCommand( 6640 v8::Debug::SendCommand(
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
7398 v8::Isolate* isolate = env->GetIsolate(); 7402 v8::Isolate* isolate = env->GetIsolate();
7399 v8::HandleScope scope(isolate); 7403 v8::HandleScope scope(isolate);
7400 v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate); 7404 v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate);
7401 TerminationThread terminator(isolate); 7405 TerminationThread terminator(isolate);
7402 terminator.Start(); 7406 terminator.Start();
7403 v8::TryCatch try_catch; 7407 v8::TryCatch try_catch;
7404 v8::Debug::DebugBreak(isolate); 7408 v8::Debug::DebugBreak(isolate);
7405 CompileRun("while (true);"); 7409 CompileRun("while (true);");
7406 CHECK(try_catch.HasTerminated()); 7410 CHECK(try_catch.HasTerminated());
7407 } 7411 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698