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

Unified Diff: src/ia32/macro-assembler-ia32.cc

Issue 1474943005: Revert of [debugger] flood function for stepping before calling it. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic/arm/handler-compiler-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index 8332751f251f7bf63daac379d893dac7c857842f..7a5fa6c169cee6262ddfdfb03948e896cc8dc535 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -1986,63 +1986,18 @@
}
-void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target,
- const ParameterCount& expected,
- const ParameterCount& actual) {
- Label skip_flooding;
- ExternalReference debug_step_action =
- ExternalReference::debug_last_step_action_address(isolate());
- cmpb(Operand::StaticVariable(debug_step_action), StepIn);
- j(not_equal, &skip_flooding);
- {
- FrameScope frame(this,
- has_frame() ? StackFrame::NONE : StackFrame::INTERNAL);
- if (expected.is_reg()) {
- SmiTag(expected.reg());
- Push(expected.reg());
- }
- if (actual.is_reg()) {
- SmiTag(actual.reg());
- Push(actual.reg());
- }
- if (new_target.is_valid()) {
- Push(new_target);
- }
- Push(fun);
- Push(fun);
- CallRuntime(Runtime::kDebugPrepareStepInIfStepping, 1);
- Pop(fun);
- if (new_target.is_valid()) {
- Pop(new_target);
- }
- if (actual.is_reg()) {
- Pop(actual.reg());
- SmiUntag(actual.reg());
- }
- if (expected.is_reg()) {
- Pop(expected.reg());
- SmiUntag(expected.reg());
- }
- }
- bind(&skip_flooding);
-}
-
-
-void MacroAssembler::InvokeFunctionCode(Register function, Register new_target,
- const ParameterCount& expected,
- const ParameterCount& actual,
- InvokeFlag flag,
- const CallWrapper& call_wrapper) {
+void MacroAssembler::InvokeCode(const Operand& code,
+ Register new_target,
+ const ParameterCount& expected,
+ const ParameterCount& actual,
+ InvokeFlag flag,
+ const CallWrapper& call_wrapper) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
- DCHECK(function.is(edi));
+
+ // Ensure new target is passed in the correct register. Otherwise clear the
+ // appropriate register in case new target is not given.
DCHECK_IMPLIES(new_target.is_valid(), new_target.is(edx));
-
- if (call_wrapper.NeedsDebugStepCheck()) {
- FloodFunctionIfStepping(function, new_target, expected, actual);
- }
-
- // Clear the new.target register if not given.
if (!new_target.is_valid()) {
mov(edx, isolate()->factory()->undefined_value());
}
@@ -2052,10 +2007,6 @@
InvokePrologue(expected, actual, &done, &definitely_mismatches, flag,
Label::kNear, call_wrapper);
if (!definitely_mismatches) {
- // We call indirectly through the code field in the function to
- // allow recompilation to take effect without changing any of the
- // call sites.
- Operand code = FieldOperand(function, JSFunction::kCodeEntryOffset);
if (flag == CALL_FUNCTION) {
call_wrapper.BeforeCall(CallSize(code));
call(code);
@@ -2084,7 +2035,8 @@
SmiUntag(ebx);
ParameterCount expected(ebx);
- InvokeFunctionCode(edi, new_target, expected, actual, flag, call_wrapper);
+ InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), new_target,
+ expected, actual, flag, call_wrapper);
}
@@ -2099,7 +2051,8 @@
DCHECK(fun.is(edi));
mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
- InvokeFunctionCode(edi, no_reg, expected, actual, flag, call_wrapper);
+ InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), no_reg,
+ expected, actual, flag, call_wrapper);
}
@@ -2123,7 +2076,8 @@
// parameter count to avoid emitting code to do the check.
ParameterCount expected(0);
GetBuiltinFunction(edi, native_context_index);
- InvokeFunctionCode(edi, no_reg, expected, expected, flag, call_wrapper);
+ InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), no_reg,
+ expected, expected, flag, call_wrapper);
}
@@ -2133,6 +2087,16 @@
mov(target, GlobalObjectOperand());
mov(target, FieldOperand(target, JSGlobalObject::kNativeContextOffset));
mov(target, ContextOperand(target, native_context_index));
+}
+
+
+void MacroAssembler::GetBuiltinEntry(Register target,
+ int native_context_index) {
+ DCHECK(!target.is(edi));
+ // Load the JavaScript builtin function from the builtins object.
+ GetBuiltinFunction(edi, native_context_index);
+ // Load the code entry point from the function into the target register.
+ mov(target, FieldOperand(edi, JSFunction::kCodeEntryOffset));
}
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic/arm/handler-compiler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698