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

Side by Side Diff: src/debug.cc

Issue 23513023: Support stepin for combination of apply and bound function (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: format Created 7 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 | « no previous file | test/mjsunit/debug-stepin-function-call.js » ('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 // 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 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 } else if (!function->IsBuiltin()) { 1786 } else if (!function->IsBuiltin()) {
1787 // Don't allow step into functions in the native context. 1787 // Don't allow step into functions in the native context.
1788 if (function->shared()->code() == 1788 if (function->shared()->code() ==
1789 isolate->builtins()->builtin(Builtins::kFunctionApply) || 1789 isolate->builtins()->builtin(Builtins::kFunctionApply) ||
1790 function->shared()->code() == 1790 function->shared()->code() ==
1791 isolate->builtins()->builtin(Builtins::kFunctionCall)) { 1791 isolate->builtins()->builtin(Builtins::kFunctionCall)) {
1792 // Handle function.apply and function.call separately to flood the 1792 // Handle function.apply and function.call separately to flood the
1793 // function to be called and not the code for Builtins::FunctionApply or 1793 // function to be called and not the code for Builtins::FunctionApply or
1794 // Builtins::FunctionCall. The receiver of call/apply is the target 1794 // Builtins::FunctionCall. The receiver of call/apply is the target
1795 // function. 1795 // function.
1796 if (!holder.is_null() && holder->IsJSFunction() && 1796 if (!holder.is_null() && holder->IsJSFunction()) {
1797 !JSFunction::cast(*holder)->IsBuiltin()) {
1798 Handle<JSFunction> js_function = Handle<JSFunction>::cast(holder); 1797 Handle<JSFunction> js_function = Handle<JSFunction>::cast(holder);
1799 Debug::FloodWithOneShot(js_function); 1798 if (!js_function->IsBuiltin()) {
1799 Debug::FloodWithOneShot(js_function);
1800 } else if (js_function->shared()->bound()) {
1801 // Handle Function.prototype.bind
1802 Debug::FloodBoundFunctionWithOneShot(js_function);
1803 }
1800 } 1804 }
1801 } else { 1805 } else {
1802 Debug::FloodWithOneShot(function); 1806 Debug::FloodWithOneShot(function);
1803 } 1807 }
1804 } 1808 }
1805 } 1809 }
1806 } 1810 }
1807 1811
1808 1812
1809 void Debug::ClearStepping() { 1813 void Debug::ClearStepping() {
(...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after
3844 { 3848 {
3845 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); 3849 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_));
3846 isolate_->debugger()->CallMessageDispatchHandler(); 3850 isolate_->debugger()->CallMessageDispatchHandler();
3847 } 3851 }
3848 } 3852 }
3849 } 3853 }
3850 3854
3851 #endif // ENABLE_DEBUGGER_SUPPORT 3855 #endif // ENABLE_DEBUGGER_SUPPORT
3852 3856
3853 } } // namespace v8::internal 3857 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/debug-stepin-function-call.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698