| OLD | NEW |
| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/debug.h" | 10 #include "src/debug.h" |
| (...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 // Set break point. | 2001 // Set break point. |
| 2002 if (!isolate->debug()->SetBreakPointForScript(script, break_point_object_arg, | 2002 if (!isolate->debug()->SetBreakPointForScript(script, break_point_object_arg, |
| 2003 &source_position, alignment)) { | 2003 &source_position, alignment)) { |
| 2004 return isolate->heap()->undefined_value(); | 2004 return isolate->heap()->undefined_value(); |
| 2005 } | 2005 } |
| 2006 | 2006 |
| 2007 return Smi::FromInt(source_position); | 2007 return Smi::FromInt(source_position); |
| 2008 } | 2008 } |
| 2009 | 2009 |
| 2010 | 2010 |
| 2011 // Collect all shared infos for a script |
| 2012 // args[0]: script to set break point in |
| 2013 RUNTIME_FUNCTION(Runtime_CollectSharedFunctionInfoInScript) { |
| 2014 HandleScope scope(isolate); |
| 2015 DCHECK(args.length() == 1); |
| 2016 CONVERT_ARG_HANDLE_CHECKED(JSValue, wrapper, 0); |
| 2017 |
| 2018 // Get the script from the script wrapper. |
| 2019 RUNTIME_ASSERT(wrapper->value()->IsScript()); |
| 2020 Handle<Script> script(Script::cast(wrapper->value())); |
| 2021 |
| 2022 isolate->debug()->CollectSharedFunctionInfoInScript(script); |
| 2023 |
| 2024 return isolate->heap()->undefined_value(); |
| 2025 } |
| 2026 |
| 2027 |
| 2011 // Clear a break point | 2028 // Clear a break point |
| 2012 // args[0]: number: break point object | 2029 // args[0]: number: break point object |
| 2013 RUNTIME_FUNCTION(Runtime_ClearBreakPoint) { | 2030 RUNTIME_FUNCTION(Runtime_ClearBreakPoint) { |
| 2014 HandleScope scope(isolate); | 2031 HandleScope scope(isolate); |
| 2015 DCHECK(args.length() == 1); | 2032 DCHECK(args.length() == 1); |
| 2016 CONVERT_ARG_HANDLE_CHECKED(Object, break_point_object_arg, 0); | 2033 CONVERT_ARG_HANDLE_CHECKED(Object, break_point_object_arg, 0); |
| 2017 | 2034 |
| 2018 // Clear break point. | 2035 // Clear break point. |
| 2019 isolate->debug()->ClearBreakPoint(break_point_object_arg); | 2036 isolate->debug()->ClearBreakPoint(break_point_object_arg); |
| 2020 | 2037 |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2836 return Smi::FromInt(isolate->debug()->is_active()); | 2853 return Smi::FromInt(isolate->debug()->is_active()); |
| 2837 } | 2854 } |
| 2838 | 2855 |
| 2839 | 2856 |
| 2840 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 2857 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
| 2841 UNIMPLEMENTED(); | 2858 UNIMPLEMENTED(); |
| 2842 return NULL; | 2859 return NULL; |
| 2843 } | 2860 } |
| 2844 } | 2861 } |
| 2845 } // namespace v8::internal | 2862 } // namespace v8::internal |
| OLD | NEW |