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

Side by Side Diff: src/debug.cc

Issue 547293004: Rename Runtime_CompileUnoptimized to Runtime_CompileLazy, because that is what it does. Split Compi… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
« no previous file with comments | « src/compiler.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
1873 1873
1874 static void EnsureFunctionHasDebugBreakSlots(Handle<JSFunction> function) { 1874 static void EnsureFunctionHasDebugBreakSlots(Handle<JSFunction> function) {
1875 if (function->code()->kind() == Code::FUNCTION && 1875 if (function->code()->kind() == Code::FUNCTION &&
1876 function->code()->has_debug_break_slots()) { 1876 function->code()->has_debug_break_slots()) {
1877 // Nothing to do. Function code already had debug break slots. 1877 // Nothing to do. Function code already had debug break slots.
1878 return; 1878 return;
1879 } 1879 }
1880 // Make sure that the shared full code is compiled with debug 1880 // Make sure that the shared full code is compiled with debug
1881 // break slots. 1881 // break slots.
1882 if (!function->shared()->code()->has_debug_break_slots()) { 1882 if (!function->shared()->code()->has_debug_break_slots()) {
1883 MaybeHandle<Code> code = Compiler::GetCodeForDebugging(function); 1883 MaybeHandle<Code> code = Compiler::GetDebugCode(function);
1884 // Recompilation can fail. In that case leave the code as it was. 1884 // Recompilation can fail. In that case leave the code as it was.
1885 if (!code.is_null()) function->ReplaceCode(*code.ToHandleChecked()); 1885 if (!code.is_null()) function->ReplaceCode(*code.ToHandleChecked());
1886 } else { 1886 } else {
1887 // Simply use shared code if it has debug break slots. 1887 // Simply use shared code if it has debug break slots.
1888 function->ReplaceCode(function->shared()->code()); 1888 function->ReplaceCode(function->shared()->code());
1889 } 1889 }
1890 } 1890 }
1891 1891
1892 1892
1893 static void RecompileAndRelocateSuspendedGenerators( 1893 static void RecompileAndRelocateSuspendedGenerators(
(...skipping 13 matching lines...) Expand all
1907 void Debug::PrepareForBreakPoints() { 1907 void Debug::PrepareForBreakPoints() {
1908 // If preparing for the first break point make sure to deoptimize all 1908 // If preparing for the first break point make sure to deoptimize all
1909 // functions as debugging does not work with optimized code. 1909 // functions as debugging does not work with optimized code.
1910 if (!has_break_points_) { 1910 if (!has_break_points_) {
1911 if (isolate_->concurrent_recompilation_enabled()) { 1911 if (isolate_->concurrent_recompilation_enabled()) {
1912 isolate_->optimizing_compiler_thread()->Flush(); 1912 isolate_->optimizing_compiler_thread()->Flush();
1913 } 1913 }
1914 1914
1915 Deoptimizer::DeoptimizeAll(isolate_); 1915 Deoptimizer::DeoptimizeAll(isolate_);
1916 1916
1917 Handle<Code> lazy_compile = isolate_->builtins()->CompileUnoptimized(); 1917 Handle<Code> lazy_compile = isolate_->builtins()->CompileLazy();
1918 1918
1919 // There will be at least one break point when we are done. 1919 // There will be at least one break point when we are done.
1920 has_break_points_ = true; 1920 has_break_points_ = true;
1921 1921
1922 // Keep the list of activated functions in a handlified list as it 1922 // Keep the list of activated functions in a handlified list as it
1923 // is used both in GC and non-GC code. 1923 // is used both in GC and non-GC code.
1924 List<Handle<JSFunction> > active_functions(100); 1924 List<Handle<JSFunction> > active_functions(100);
1925 1925
1926 // A list of all suspended generators. 1926 // A list of all suspended generators.
1927 List<Handle<JSGeneratorObject> > suspended_generators; 1927 List<Handle<JSGeneratorObject> > suspended_generators;
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
3370 logger_->DebugEvent("Put", message.text()); 3370 logger_->DebugEvent("Put", message.text());
3371 } 3371 }
3372 3372
3373 3373
3374 void LockingCommandMessageQueue::Clear() { 3374 void LockingCommandMessageQueue::Clear() {
3375 base::LockGuard<base::Mutex> lock_guard(&mutex_); 3375 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3376 queue_.Clear(); 3376 queue_.Clear();
3377 } 3377 }
3378 3378
3379 } } // namespace v8::internal 3379 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698