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

Unified Diff: src/code-stubs.h

Issue 11441013: Fix isolate bug introduced by generated code stubs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years 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/arm/lithium-arm.cc ('k') | src/code-stubs-hydrogen.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 c6e328c43da9edec8be2492dfec1889da951cb3c..527abde958843aa2bbaa255949b43c0a4316efb8 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -242,9 +242,12 @@ class PlatformCodeStub : public CodeStub {
struct CodeStubInterfaceDescriptor {
- int number_of_register_params;
- Register* register_params;
- Handle<Code> deoptimization_handler;
+ CodeStubInterfaceDescriptor()
+ : register_param_count_(-1),
+ register_params_(NULL) { }
+ int register_param_count_;
+ Register* register_params_;
+ Handle<Code> deoptimization_handler_;
};
@@ -257,8 +260,13 @@ class HydrogenCodeStub : public CodeStub {
virtual int GetCodeKind() { return Code::COMPILED_STUB; }
- virtual CodeStubInterfaceDescriptor* GetInterfaceDescriptor(
- Isolate* isolate) = 0;
+ CodeStubInterfaceDescriptor* GetInterfaceDescriptor(Isolate* isolate) {
+ return isolate->code_stub_interface_descriptor(MajorKey());
+ }
+
+ virtual void InitializeInterfaceDescriptor(
+ Isolate* isolate,
+ CodeStubInterfaceDescriptor* descriptor) = 0;
protected:
Handle<Code> CodeFromGraph(HGraph* graph);
@@ -1084,8 +1092,9 @@ class KeyedLoadFastElementStub : public HydrogenCodeStub {
virtual Handle<Code> GenerateCode();
- virtual CodeStubInterfaceDescriptor* GetInterfaceDescriptor(
- Isolate* isolate);
+ virtual void InitializeInterfaceDescriptor(
+ Isolate* isolate,
+ CodeStubInterfaceDescriptor* descriptor);
private:
class IsJSArrayBits: public BitField<bool, 8, 1> {};
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698