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

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

Issue 1463803002: [debugger] flood function for stepping before calling it. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase, ports, deoptimize builtins 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
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_IA32 5 #if V8_TARGET_ARCH_IA32
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 __ j(greater_equal, &loop); 334 __ j(greater_equal, &loop);
335 335
336 // Call the function. 336 // Call the function.
337 if (is_api_function) { 337 if (is_api_function) {
338 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 338 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
339 Handle<Code> code = 339 Handle<Code> code =
340 masm->isolate()->builtins()->HandleApiCallConstruct(); 340 masm->isolate()->builtins()->HandleApiCallConstruct();
341 __ call(code, RelocInfo::CODE_TARGET); 341 __ call(code, RelocInfo::CODE_TARGET);
342 } else { 342 } else {
343 ParameterCount actual(eax); 343 ParameterCount actual(eax);
344 __ InvokeFunction(edi, edx, actual, CALL_FUNCTION, NullCallWrapper()); 344 __ InvokeFunction(edi, edx, actual, CALL_FUNCTION,
345 CheckDebugStepCallWrapper());
345 } 346 }
346 347
347 // Store offset of return address for deoptimizer. 348 // Store offset of return address for deoptimizer.
348 if (create_implicit_receiver && !is_api_function) { 349 if (create_implicit_receiver && !is_api_function) {
349 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); 350 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset());
350 } 351 }
351 352
352 // Restore context from the frame. 353 // Restore context from the frame.
353 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 354 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
354 355
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 // -- edx : the shared function info. 1537 // -- edx : the shared function info.
1537 // -- edi : the function to call (checked to be a JSFunction) 1538 // -- edi : the function to call (checked to be a JSFunction)
1538 // -- esi : the function context. 1539 // -- esi : the function context.
1539 // ----------------------------------- 1540 // -----------------------------------
1540 1541
1541 __ mov(ebx, 1542 __ mov(ebx,
1542 FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); 1543 FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset));
1543 __ SmiUntag(ebx); 1544 __ SmiUntag(ebx);
1544 ParameterCount actual(eax); 1545 ParameterCount actual(eax);
1545 ParameterCount expected(ebx); 1546 ParameterCount expected(ebx);
1546 __ InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), no_reg, 1547 __ InvokeFunctionCode(edi, no_reg, expected, actual, JUMP_FUNCTION,
1547 expected, actual, JUMP_FUNCTION, NullCallWrapper()); 1548 CheckDebugStepCallWrapper());
1548
1549 // The function is a "classConstructor", need to raise an exception. 1549 // The function is a "classConstructor", need to raise an exception.
1550 __ bind(&class_constructor); 1550 __ bind(&class_constructor);
1551 { 1551 {
1552 FrameScope frame(masm, StackFrame::INTERNAL); 1552 FrameScope frame(masm, StackFrame::INTERNAL);
1553 __ push(edi); 1553 __ push(edi);
1554 __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); 1554 __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1);
1555 } 1555 }
1556 } 1556 }
1557 1557
1558 1558
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 1993
1994 __ bind(&ok); 1994 __ bind(&ok);
1995 __ ret(0); 1995 __ ret(0);
1996 } 1996 }
1997 1997
1998 #undef __ 1998 #undef __
1999 } // namespace internal 1999 } // namespace internal
2000 } // namespace v8 2000 } // namespace v8
2001 2001
2002 #endif // V8_TARGET_ARCH_IA32 2002 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698