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

Unified Diff: src/code-stubs.h

Issue 350293003: Cleanup CallInterfaceDescriptor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments. Created 6 years, 6 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/code-stubs-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 7f4d91012731eb26ac8ce5451daf29dc79e05ec6..c68862e93c887442a22528015f0b1d33d5731a55 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -367,16 +367,28 @@ class CodeStubInterfaceDescriptor {
};
-struct PlatformCallInterfaceDescriptor;
+class PlatformCallInterfaceDescriptor;
-struct CallInterfaceDescriptor {
+class CallInterfaceDescriptor {
+ public:
CallInterfaceDescriptor()
: register_param_count_(-1),
register_params_(NULL),
param_representations_(NULL),
platform_specific_descriptor_(NULL) { }
+ // A copy of the passed in registers and param_representations is made
+ // and owned by the CallInterfaceDescriptor.
+
+ // TODO(mvstanton): Instead of taking parallel arrays register and
+ // param_representations, how about a struct that puts the representation
+ // and register side by side (eg, RegRep(r1, Representation::Tagged()).
+ // The same should go for the CodeStubInterfaceDescriptor class.
+ void Initialize(int register_parameter_count, Register* registers,
+ Representation* param_representations,
+ PlatformCallInterfaceDescriptor* platform_descriptor = NULL);
+
bool initialized() const { return register_param_count_ >= 0; }
int environment_length() const {
@@ -395,9 +407,10 @@ struct CallInterfaceDescriptor {
return platform_specific_descriptor_;
}
+ private:
int register_param_count_;
- Register* register_params_;
- Representation* param_representations_;
+ SmartArrayPointer<Register> register_params_;
+ SmartArrayPointer<Representation> param_representations_;
PlatformCallInterfaceDescriptor* platform_specific_descriptor_;
};
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698