Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 4a1ce917f487cbe72c6e47539b1830e7da0e3fe0..f83e736407a8c3e2294808e997a765d63b857575 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -423,7 +423,6 @@ class PlatformCodeStub : public CodeStub { |
enum StubFunctionMode { NOT_JS_FUNCTION_STUB_MODE, JS_FUNCTION_STUB_MODE }; |
-enum HandlerArgumentsMode { DONT_PASS_ARGUMENTS, PASS_ARGUMENTS }; |
class CodeStubDescriptor { |
@@ -438,8 +437,7 @@ class CodeStubDescriptor { |
void Initialize(Register stack_parameter_count, |
Address deoptimization_handler = NULL, |
int hint_stack_parameter_count = -1, |
- StubFunctionMode function_mode = NOT_JS_FUNCTION_STUB_MODE, |
- HandlerArgumentsMode handler_mode = DONT_PASS_ARGUMENTS); |
+ StubFunctionMode function_mode = NOT_JS_FUNCTION_STUB_MODE); |
void SetMissHandler(ExternalReference handler) { |
miss_handler_ = handler; |
@@ -456,6 +454,14 @@ class CodeStubDescriptor { |
return call_descriptor().GetRegisterParameterCount(); |
} |
+ int GetStackParameterCount() const { |
+ return call_descriptor().GetStackParameterCount(); |
+ } |
+ |
+ int GetParameterCount() const { |
+ return call_descriptor().GetParameterCount(); |
+ } |
+ |
Register GetRegisterParameter(int index) const { |
return call_descriptor().GetRegisterParameter(index); |
} |
@@ -474,8 +480,8 @@ class CodeStubDescriptor { |
} |
int GetHandlerParameterCount() const { |
- int params = GetRegisterParameterCount(); |
- if (handler_arguments_mode_ == PASS_ARGUMENTS) { |
+ int params = GetParameterCount(); |
+ if (PassesArgumentsToDeoptimizationHandler()) { |
params += 1; |
} |
return params; |
@@ -487,6 +493,10 @@ class CodeStubDescriptor { |
Address deoptimization_handler() const { return deoptimization_handler_; } |
private: |
+ bool PassesArgumentsToDeoptimizationHandler() const { |
+ return stack_parameter_count_.is_valid(); |
+ } |
+ |
CallInterfaceDescriptor call_descriptor_; |
Register stack_parameter_count_; |
// If hint_stack_parameter_count_ > 0, the code stub can optimize the |
@@ -495,7 +505,6 @@ class CodeStubDescriptor { |
StubFunctionMode function_mode_; |
Address deoptimization_handler_; |
- HandlerArgumentsMode handler_arguments_mode_; |
ExternalReference miss_handler_; |
bool has_miss_handler_; |