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

Unified Diff: src/code-stubs.h

Issue 1250563004: HydrogenCodeStubs consume stack arguments via descriptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 5 months 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/arm64/interface-descriptors-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698