Author: [EMAIL PROTECTED]
Date: Fri Oct 24 02:28:30 2008
New Revision: 582
Added:
changes/[EMAIL PROTECTED]/runtime_calls/
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/
- copied from r578, /branches/bleeding_edge/
Modified:
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/codegen-arm.cc
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/codegen-ia32.cc
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/runtime.cc
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/runtime.h
Log:
Change a few runtime functions that took and returned a dummy argument
to instead take no arguments and return the undefined value.
Modified:
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/codegen-arm.cc
==============================================================================
--- /branches/bleeding_edge/src/codegen-arm.cc (original)
+++
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/codegen-arm.cc
Fri Oct 24 02:28:30 2008
@@ -226,9 +226,7 @@
if (FLAG_trace) {
// Push a valid value as the parameter. The runtime call only uses
// it as the return value to indicate non-failure.
- __ mov(r0, Operand(Smi::FromInt(0)));
- __ push(r0);
- __ CallRuntime(Runtime::kTraceEnter, 1);
+ __ CallRuntime(Runtime::kTraceEnter, 0);
}
CheckStack();
@@ -242,11 +240,7 @@
bool should_trace =
is_builtin ? FLAG_trace_builtin_calls : FLAG_trace_calls;
if (should_trace) {
- // Push a valid value as the parameter. The runtime call only uses
- // it as the return value to indicate non-failure.
- __ mov(r0, Operand(Smi::FromInt(0)));
- __ push(r0);
- __ CallRuntime(Runtime::kDebugTrace, 1);
+ __ CallRuntime(Runtime::kDebugTrace, 0);
}
#endif
VisitStatements(body);
@@ -1846,8 +1840,8 @@
void CodeGenerator::VisitDebuggerStatement(DebuggerStatement* node) {
Comment cmnt(masm_, "[ DebuggerStatament");
if (FLAG_debug_info) RecordStatementPosition(node);
- __ CallRuntime(Runtime::kDebugBreak, 1);
- __ push(r0);
+ __ CallRuntime(Runtime::kDebugBreak, 0);
+ // Ignore the return value.
}
Modified:
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/codegen-ia32.cc
==============================================================================
--- /branches/bleeding_edge/src/codegen-ia32.cc (original)
+++
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/codegen-ia32.cc
Fri Oct 24 02:28:30 2008
@@ -356,8 +356,8 @@
}
if (FLAG_trace) {
- __ CallRuntime(Runtime::kTraceEnter, 1);
- frame_->Push(eax);
+ __ CallRuntime(Runtime::kTraceEnter, 0);
+ // Ignore the return value.
}
CheckStack();
@@ -371,8 +371,8 @@
bool should_trace =
is_builtin ? FLAG_trace_builtin_calls : FLAG_trace_calls;
if (should_trace) {
- __ CallRuntime(Runtime::kDebugTrace, 1);
- frame_->Push(eax);
+ __ CallRuntime(Runtime::kDebugTrace, 0);
+ // Ignore the return value.
}
#endif
VisitStatements(body);
@@ -2218,8 +2218,8 @@
void CodeGenerator::VisitDebuggerStatement(DebuggerStatement* node) {
Comment cmnt(masm_, "[ DebuggerStatement");
RecordStatementPosition(node);
- __ CallRuntime(Runtime::kDebugBreak, 1);
- frame_->Push(eax);
+ __ CallRuntime(Runtime::kDebugBreak, 0);
+ // Ignore the return value.
}
Modified:
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/runtime.cc
==============================================================================
--- /branches/bleeding_edge/src/runtime.cc (original)
+++
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/runtime.cc
Fri Oct 24 02:28:30 2008
@@ -3581,10 +3581,10 @@
}
-static Object* Runtime_DebugBreak(Arguments args) {
+static Object* DebugBreakHelper() {
// Just continue if breaks are disabled.
if (Debug::disable_break()) {
- return args[0];
+ return Heap::undefined_value();
}
// Don't break in system functions. If the current function is
@@ -3596,7 +3596,7 @@
if (fun->IsJSFunction()) {
GlobalObject* global = JSFunction::cast(fun)->context()->global();
if (global->IsJSBuiltinsObject() || Debug::IsDebugGlobal(global)) {
- return args[0];
+ return Heap::undefined_value();
}
}
@@ -3607,14 +3607,20 @@
// Enter the debugger. Just continue if we fail to enter the debugger.
EnterDebugger debugger;
if (debugger.FailedToEnter()) {
- return args[0];
+ return Heap::undefined_value();
}
// Notify the debug event listeners.
Debugger::OnDebugBreak(Factory::undefined_value());
// Return to continue execution.
- return args[0];
+ return Heap::undefined_value();
+}
+
+
+static Object* Runtime_DebugBreak(Arguments args) {
+ ASSERT(args.length() == 0);
+ return DebugBreakHelper();
}
@@ -3626,7 +3632,7 @@
// If not real stack overflow the stack guard was used to interrupt
// execution for another purpose.
- if (StackGuard::IsDebugBreak()) Runtime_DebugBreak(args);
+ if (StackGuard::IsDebugBreak()) DebugBreakHelper();
if (StackGuard::IsPreempted()) RuntimePreempt(args);
if (StackGuard::IsInterrupted()) {
// interrupt
@@ -3724,9 +3730,10 @@
static Object* Runtime_TraceEnter(Arguments args) {
+ ASSERT(args.length() == 0);
NoHandleAllocation ha;
PrintTransition(NULL);
- return args[0]; // return TOS
+ return Heap::undefined_value();
}
@@ -3765,10 +3772,10 @@
static Object* Runtime_DebugTrace(Arguments args) {
- ASSERT(args.length() == 1);
+ ASSERT(args.length() == 0);
NoHandleAllocation ha;
Top::PrintStack();
- return args[0]; // return TOS
+ return Heap::undefined_value();
}
Modified:
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/runtime.h
==============================================================================
--- /branches/bleeding_edge/src/runtime.h (original)
+++
changes/[EMAIL PROTECTED]/runtime_calls/bleeding_edge/src/runtime.h
Fri Oct 24 02:28:30 2008
@@ -277,10 +277,10 @@
\
/* Debugging */ \
F(DebugPrint, 1) \
- F(DebugTrace, 1) \
- F(TraceEnter, 1) \
+ F(DebugTrace, 0) \
+ F(TraceEnter, 0) \
F(TraceExit, 1) \
- F(DebugBreak, 1) \
+ F(DebugBreak, 0) \
F(FunctionGetAssemblerCode, 1) \
F(Abort, 2) \
\
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---