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

Side by Side Diff: src/x64/builtins-x64.cc

Issue 1463803002: [debugger] flood function for stepping before calling it. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years 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
« no previous file with comments | « src/snapshot/serialize.cc ('k') | src/x64/macro-assembler-x64.h » ('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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 __ j(greater_equal, &loop); 325 __ j(greater_equal, &loop);
326 326
327 // Call the function. 327 // Call the function.
328 if (is_api_function) { 328 if (is_api_function) {
329 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); 329 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
330 Handle<Code> code = 330 Handle<Code> code =
331 masm->isolate()->builtins()->HandleApiCallConstruct(); 331 masm->isolate()->builtins()->HandleApiCallConstruct();
332 __ Call(code, RelocInfo::CODE_TARGET); 332 __ Call(code, RelocInfo::CODE_TARGET);
333 } else { 333 } else {
334 ParameterCount actual(rax); 334 ParameterCount actual(rax);
335 __ InvokeFunction(rdi, rdx, actual, CALL_FUNCTION, NullCallWrapper()); 335 __ InvokeFunction(rdi, rdx, actual, CALL_FUNCTION,
336 CheckDebugStepCallWrapper());
336 } 337 }
337 338
338 // Store offset of return address for deoptimizer. 339 // Store offset of return address for deoptimizer.
339 if (create_implicit_receiver && !is_api_function) { 340 if (create_implicit_receiver && !is_api_function) {
340 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); 341 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset());
341 } 342 }
342 343
343 // Restore context from the frame. 344 // Restore context from the frame.
344 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); 345 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
345 346
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1728 1729
1729 // ----------- S t a t e ------------- 1730 // ----------- S t a t e -------------
1730 // -- rax : the number of arguments (not including the receiver) 1731 // -- rax : the number of arguments (not including the receiver)
1731 // -- rdx : the shared function info. 1732 // -- rdx : the shared function info.
1732 // -- rdi : the function to call (checked to be a JSFunction) 1733 // -- rdi : the function to call (checked to be a JSFunction)
1733 // -- rsi : the function context. 1734 // -- rsi : the function context.
1734 // ----------------------------------- 1735 // -----------------------------------
1735 1736
1736 __ LoadSharedFunctionInfoSpecialField( 1737 __ LoadSharedFunctionInfoSpecialField(
1737 rbx, rdx, SharedFunctionInfo::kFormalParameterCountOffset); 1738 rbx, rdx, SharedFunctionInfo::kFormalParameterCountOffset);
1738 __ movp(r8, FieldOperand(rdi, JSFunction::kCodeEntryOffset));
1739 ParameterCount actual(rax); 1739 ParameterCount actual(rax);
1740 ParameterCount expected(rbx); 1740 ParameterCount expected(rbx);
1741 __ InvokeCode(r8, no_reg, expected, actual, JUMP_FUNCTION, NullCallWrapper()); 1741
1742 __ InvokeFunctionCode(rdi, no_reg, expected, actual, JUMP_FUNCTION,
1743 CheckDebugStepCallWrapper());
1742 1744
1743 // The function is a "classConstructor", need to raise an exception. 1745 // The function is a "classConstructor", need to raise an exception.
1744 __ bind(&class_constructor); 1746 __ bind(&class_constructor);
1745 { 1747 {
1746 FrameScope frame(masm, StackFrame::INTERNAL); 1748 FrameScope frame(masm, StackFrame::INTERNAL);
1747 __ Push(rdi); 1749 __ Push(rdi);
1748 __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); 1750 __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
1749 } 1751 }
1750 } 1752 }
1751 1753
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
2061 __ ret(0); 2063 __ ret(0);
2062 } 2064 }
2063 2065
2064 2066
2065 #undef __ 2067 #undef __
2066 2068
2067 } // namespace internal 2069 } // namespace internal
2068 } // namespace v8 2070 } // namespace v8
2069 2071
2070 #endif // V8_TARGET_ARCH_X64 2072 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/snapshot/serialize.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698