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

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 2622863003: [debugger] infrastructure for side-effect-free debug-evaluate. (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/compiler.h"
8 #include "src/debug/debug-evaluate.h" 9 #include "src/debug/debug-evaluate.h"
9 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
10 #include "src/debug/debug-scopes.h" 11 #include "src/debug/debug-scopes.h"
11 #include "src/debug/debug.h" 12 #include "src/debug/debug.h"
12 #include "src/debug/liveedit.h" 13 #include "src/debug/liveedit.h"
13 #include "src/frames-inl.h" 14 #include "src/frames-inl.h"
14 #include "src/globals.h" 15 #include "src/globals.h"
15 #include "src/interpreter/bytecodes.h" 16 #include "src/interpreter/bytecodes.h"
16 #include "src/interpreter/interpreter.h" 17 #include "src/interpreter/interpreter.h"
17 #include "src/isolate-inl.h" 18 #include "src/isolate-inl.h"
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 // built-in function such as Array.forEach to enable stepping into the callback, 1851 // built-in function such as Array.forEach to enable stepping into the callback,
1851 // if we are indeed stepping and the callback is subject to debugging. 1852 // if we are indeed stepping and the callback is subject to debugging.
1852 RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) { 1853 RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) {
1853 HandleScope scope(isolate); 1854 HandleScope scope(isolate);
1854 DCHECK_EQ(1, args.length()); 1855 DCHECK_EQ(1, args.length());
1855 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); 1856 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
1856 isolate->debug()->PrepareStepIn(fun); 1857 isolate->debug()->PrepareStepIn(fun);
1857 return isolate->heap()->undefined_value(); 1858 return isolate->heap()->undefined_value();
1858 } 1859 }
1859 1860
1861 // Perform %DebugPrepareStepInIfStepping and a read-only check.
1862 RUNTIME_FUNCTION(Runtime_DebugOnFunctionCall) {
1863 HandleScope scope(isolate);
1864 DCHECK_EQ(1, args.length());
1865 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
1866 if (isolate->debug()->last_step_action() >= StepIn) {
jgruber 2017/01/10 12:46:38 Maybe we should refactor these '>= StepIn' checks
Yang 2017/01/10 14:14:07 We do have static asserts in many places to guard
1867 isolate->debug()->PrepareStepIn(fun);
1868 }
1869 if (isolate->debug()->needs_readonly_check() &&
1870 !isolate->debug()->PerformReadOnlyCheck(fun)) {
1871 return isolate->heap()->exception();
1872 }
1873 return isolate->heap()->undefined_value();
1874 }
1875
1860 // Set one shot breakpoints for the suspended generator object. 1876 // Set one shot breakpoints for the suspended generator object.
1861 RUNTIME_FUNCTION(Runtime_DebugPrepareStepInSuspendedGenerator) { 1877 RUNTIME_FUNCTION(Runtime_DebugPrepareStepInSuspendedGenerator) {
1862 HandleScope scope(isolate); 1878 HandleScope scope(isolate);
1863 DCHECK_EQ(0, args.length()); 1879 DCHECK_EQ(0, args.length());
1864 isolate->debug()->PrepareStepInSuspendedGenerator(); 1880 isolate->debug()->PrepareStepInSuspendedGenerator();
1865 return isolate->heap()->undefined_value(); 1881 return isolate->heap()->undefined_value();
1866 } 1882 }
1867 1883
1868 RUNTIME_FUNCTION(Runtime_DebugRecordGenerator) { 1884 RUNTIME_FUNCTION(Runtime_DebugRecordGenerator) {
1869 HandleScope scope(isolate); 1885 HandleScope scope(isolate);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 } 1931 }
1916 1932
1917 1933
1918 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 1934 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
1919 UNIMPLEMENTED(); 1935 UNIMPLEMENTED();
1920 return NULL; 1936 return NULL;
1921 } 1937 }
1922 1938
1923 } // namespace internal 1939 } // namespace internal
1924 } // namespace v8 1940 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698