Commit da9fe0f9 authored by ricow@chromium.org's avatar ricow@chromium.org

Remove GetProvidedParametersCount from JavaScriptFrame, it simply calls ComputeParametersCount.


Review URL: http://codereview.chromium.org/6635042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a8b41a0e
...@@ -791,7 +791,7 @@ MaybeObject* Accessors::FunctionGetArguments(Object* object, void*) { ...@@ -791,7 +791,7 @@ MaybeObject* Accessors::FunctionGetArguments(Object* object, void*) {
// Get the number of arguments and construct an arguments object // Get the number of arguments and construct an arguments object
// mirror for the right frame. // mirror for the right frame.
const int length = frame->GetProvidedParametersCount(); const int length = frame->ComputeParametersCount();
Handle<JSObject> arguments = Factory::NewArgumentsObject(function, Handle<JSObject> arguments = Factory::NewArgumentsObject(function,
length); length);
Handle<FixedArray> array = Factory::NewFixedArray(length); Handle<FixedArray> array = Factory::NewFixedArray(length);
......
...@@ -630,11 +630,6 @@ Code* JavaScriptFrame::unchecked_code() const { ...@@ -630,11 +630,6 @@ Code* JavaScriptFrame::unchecked_code() const {
} }
int JavaScriptFrame::GetProvidedParametersCount() const {
return ComputeParametersCount();
}
Address JavaScriptFrame::GetCallerStackPointer() const { Address JavaScriptFrame::GetCallerStackPointer() const {
int arguments; int arguments;
if (Heap::gc_state() != Heap::NOT_IN_GC || if (Heap::gc_state() != Heap::NOT_IN_GC ||
......
...@@ -452,12 +452,6 @@ class JavaScriptFrame: public StandardFrame { ...@@ -452,12 +452,6 @@ class JavaScriptFrame: public StandardFrame {
Object* GetParameter(int index) const; Object* GetParameter(int index) const;
int ComputeParametersCount() 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'. // Check if this frame is a constructor frame invoked through 'new'.
bool IsConstructor() const; bool IsConstructor() const;
......
...@@ -4344,7 +4344,7 @@ static MaybeObject* Runtime_GetArgumentsProperty(Arguments args) { ...@@ -4344,7 +4344,7 @@ static MaybeObject* Runtime_GetArgumentsProperty(Arguments args) {
JavaScriptFrame* frame = it.frame(); JavaScriptFrame* frame = it.frame();
// Get the actual number of provided arguments. // 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 // Try to convert the key to an index. If successful and within
// index return the the argument from the frame. // index return the the argument from the frame.
...@@ -6899,7 +6899,7 @@ static MaybeObject* Runtime_NewObjectFromBound(Arguments args) { ...@@ -6899,7 +6899,7 @@ static MaybeObject* Runtime_NewObjectFromBound(Arguments args) {
ASSERT(!frame->is_optimized()); ASSERT(!frame->is_optimized());
it.AdvanceToArgumentsFrame(); it.AdvanceToArgumentsFrame();
frame = it.frame(); frame = it.frame();
int argc = frame->GetProvidedParametersCount(); int argc = frame->ComputeParametersCount();
// Prepend bound arguments to caller's arguments. // Prepend bound arguments to caller's arguments.
int total_argc = bound_argc + argc; int total_argc = bound_argc + argc;
...@@ -7738,7 +7738,7 @@ static void PrintTransition(Object* result) { ...@@ -7738,7 +7738,7 @@ static void PrintTransition(Object* result) {
// supplied parameters, not all parameters required) // supplied parameters, not all parameters required)
PrintF("(this="); PrintF("(this=");
PrintObject(frame->receiver()); PrintObject(frame->receiver());
const int length = frame->GetProvidedParametersCount(); const int length = frame->ComputeParametersCount();
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
PrintF(", "); PrintF(", ");
PrintObject(frame->GetParameter(i)); PrintObject(frame->GetParameter(i));
...@@ -9251,8 +9251,8 @@ static MaybeObject* Runtime_GetFrameDetails(Arguments args) { ...@@ -9251,8 +9251,8 @@ static MaybeObject* Runtime_GetFrameDetails(Arguments args) {
// Find the number of arguments to fill. At least fill the number of // 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. // parameters for the function and fill more if more parameters are provided.
int argument_count = info.number_of_parameters(); int argument_count = info.number_of_parameters();
if (argument_count < it.frame()->GetProvidedParametersCount()) { if (argument_count < it.frame()->ComputeParametersCount()) {
argument_count = it.frame()->GetProvidedParametersCount(); argument_count = it.frame()->ComputeParametersCount();
} }
// Calculate the size of the result. // Calculate the size of the result.
...@@ -9309,7 +9309,7 @@ static MaybeObject* Runtime_GetFrameDetails(Arguments args) { ...@@ -9309,7 +9309,7 @@ static MaybeObject* Runtime_GetFrameDetails(Arguments args) {
// TODO(3141533): We should be able to get the actual parameter // TODO(3141533): We should be able to get the actual parameter
// value for optimized frames. // value for optimized frames.
if (!is_optimized_frame && if (!is_optimized_frame &&
(i < it.frame()->GetProvidedParametersCount())) { (i < it.frame()->ComputeParametersCount())) {
details->set(details_index++, it.frame()->GetParameter(i)); details->set(details_index++, it.frame()->GetParameter(i));
} else { } else {
details->set(details_index++, Heap::undefined_value()); details->set(details_index++, Heap::undefined_value());
...@@ -10189,7 +10189,7 @@ static Handle<Object> GetArgumentsObject(JavaScriptFrame* frame, ...@@ -10189,7 +10189,7 @@ static Handle<Object> GetArgumentsObject(JavaScriptFrame* frame,
} }
} }
const int length = frame->GetProvidedParametersCount(); const int length = frame->ComputeParametersCount();
Handle<JSObject> arguments = Factory::NewArgumentsObject(function, length); Handle<JSObject> arguments = Factory::NewArgumentsObject(function, length);
Handle<FixedArray> array = Factory::NewFixedArray(length); Handle<FixedArray> array = Factory::NewFixedArray(length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment