Revision: 7092
Author: [email protected]
Date: Tue Mar 8 06:18:28 2011
Log: Remove GetProvidedParametersCount from JavaScriptFrame, it simply
calls ComputeParametersCount.
Review URL: http://codereview.chromium.org/6635042
http://code.google.com/p/v8/source/detail?r=7092
Modified:
/branches/bleeding_edge/src/accessors.cc
/branches/bleeding_edge/src/frames.cc
/branches/bleeding_edge/src/frames.h
/branches/bleeding_edge/src/runtime.cc
=======================================
--- /branches/bleeding_edge/src/accessors.cc Tue Feb 22 04:27:36 2011
+++ /branches/bleeding_edge/src/accessors.cc Tue Mar 8 06:18:28 2011
@@ -791,7 +791,7 @@
// Get the number of arguments and construct an arguments object
// mirror for the right frame.
- const int length = frame->GetProvidedParametersCount();
+ const int length = frame->ComputeParametersCount();
Handle<JSObject> arguments = Factory::NewArgumentsObject(function,
length);
Handle<FixedArray> array = Factory::NewFixedArray(length);
=======================================
--- /branches/bleeding_edge/src/frames.cc Thu Jan 27 03:55:58 2011
+++ /branches/bleeding_edge/src/frames.cc Tue Mar 8 06:18:28 2011
@@ -628,11 +628,6 @@
JSFunction* function = JSFunction::cast(this->function());
return function->unchecked_code();
}
-
-
-int JavaScriptFrame::GetProvidedParametersCount() const {
- return ComputeParametersCount();
-}
Address JavaScriptFrame::GetCallerStackPointer() const {
=======================================
--- /branches/bleeding_edge/src/frames.h Wed Jan 12 06:14:14 2011
+++ /branches/bleeding_edge/src/frames.h Tue Mar 8 06:18:28 2011
@@ -452,12 +452,6 @@
Object* GetParameter(int index) const;
int ComputeParametersCount() const;
- // Temporary way of getting access to the number of parameters
- // passed on the stack by the caller. Once argument adaptor frames
- // has been introduced on ARM, this number will always match the
- // computed parameters count.
- int GetProvidedParametersCount() const;
-
// Check if this frame is a constructor frame invoked through 'new'.
bool IsConstructor() const;
=======================================
--- /branches/bleeding_edge/src/runtime.cc Thu Mar 3 16:28:54 2011
+++ /branches/bleeding_edge/src/runtime.cc Tue Mar 8 06:18:28 2011
@@ -4344,7 +4344,7 @@
JavaScriptFrame* frame = it.frame();
// Get the actual number of provided arguments.
- const uint32_t n = frame->GetProvidedParametersCount();
+ const uint32_t n = frame->ComputeParametersCount();
// Try to convert the key to an index. If successful and within
// index return the the argument from the frame.
@@ -6899,7 +6899,7 @@
ASSERT(!frame->is_optimized());
it.AdvanceToArgumentsFrame();
frame = it.frame();
- int argc = frame->GetProvidedParametersCount();
+ int argc = frame->ComputeParametersCount();
// Prepend bound arguments to caller's arguments.
int total_argc = bound_argc + argc;
@@ -7738,7 +7738,7 @@
// supplied parameters, not all parameters required)
PrintF("(this=");
PrintObject(frame->receiver());
- const int length = frame->GetProvidedParametersCount();
+ const int length = frame->ComputeParametersCount();
for (int i = 0; i < length; i++) {
PrintF(", ");
PrintObject(frame->GetParameter(i));
@@ -9251,8 +9251,8 @@
// Find the number of arguments to fill. At least fill the number of
// parameters for the function and fill more if more parameters are
provided.
int argument_count = info.number_of_parameters();
- if (argument_count < it.frame()->GetProvidedParametersCount()) {
- argument_count = it.frame()->GetProvidedParametersCount();
+ if (argument_count < it.frame()->ComputeParametersCount()) {
+ argument_count = it.frame()->ComputeParametersCount();
}
// Calculate the size of the result.
@@ -9309,7 +9309,7 @@
// TODO(3141533): We should be able to get the actual parameter
// value for optimized frames.
if (!is_optimized_frame &&
- (i < it.frame()->GetProvidedParametersCount())) {
+ (i < it.frame()->ComputeParametersCount())) {
details->set(details_index++, it.frame()->GetParameter(i));
} else {
details->set(details_index++, Heap::undefined_value());
@@ -10189,7 +10189,7 @@
}
}
- const int length = frame->GetProvidedParametersCount();
+ const int length = frame->ComputeParametersCount();
Handle<JSObject> arguments = Factory::NewArgumentsObject(function,
length);
Handle<FixedArray> array = Factory::NewFixedArray(length);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev