Initialize interface descriptor for ToNumberStub.

R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/170303003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 609af84e
...@@ -747,6 +747,14 @@ void FastNewContextStub::InstallDescriptors(Isolate* isolate) { ...@@ -747,6 +747,14 @@ void FastNewContextStub::InstallDescriptors(Isolate* isolate) {
} }
// static
void FastCloneShallowArrayStub::InstallDescriptors(Isolate* isolate) {
FastCloneShallowArrayStub stub(FastCloneShallowArrayStub::CLONE_ELEMENTS,
DONT_TRACK_ALLOCATION_SITE, 0);
InstallDescriptor(isolate, &stub);
}
// static // static
void BinaryOpICStub::InstallDescriptors(Isolate* isolate) { void BinaryOpICStub::InstallDescriptors(Isolate* isolate) {
BinaryOpICStub stub(Token::ADD, NO_OVERWRITE); BinaryOpICStub stub(Token::ADD, NO_OVERWRITE);
......
...@@ -486,6 +486,13 @@ class ToNumberStub: public HydrogenCodeStub { ...@@ -486,6 +486,13 @@ class ToNumberStub: public HydrogenCodeStub {
Isolate* isolate, Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor); CodeStubInterfaceDescriptor* descriptor);
static void InstallDescriptors(Isolate* isolate) {
ToNumberStub stub;
stub.InitializeInterfaceDescriptor(
isolate,
isolate->code_stub_interface_descriptor(CodeStub::ToNumber));
}
private: private:
Major MajorKey() { return ToNumber; } Major MajorKey() { return ToNumber; }
int NotMissMinorKey() { return 0; } int NotMissMinorKey() { return 0; }
...@@ -624,6 +631,8 @@ class FastCloneShallowArrayStub : public HydrogenCodeStub { ...@@ -624,6 +631,8 @@ class FastCloneShallowArrayStub : public HydrogenCodeStub {
Isolate* isolate, Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor); CodeStubInterfaceDescriptor* descriptor);
static void InstallDescriptors(Isolate* isolate);
private: private:
Mode mode_; Mode mode_;
AllocationSiteMode allocation_site_mode_; AllocationSiteMode allocation_site_mode_;
...@@ -1375,7 +1384,7 @@ class CompareNilICStub : public HydrogenCodeStub { ...@@ -1375,7 +1384,7 @@ class CompareNilICStub : public HydrogenCodeStub {
Isolate* isolate, Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor); CodeStubInterfaceDescriptor* descriptor);
static void InitializeForIsolate(Isolate* isolate) { static void InstallDescriptors(Isolate* isolate) {
CompareNilICStub compare_stub(kNullValue, UNINITIALIZED); CompareNilICStub compare_stub(kNullValue, UNINITIALIZED);
compare_stub.InitializeInterfaceDescriptor( compare_stub.InitializeInterfaceDescriptor(
isolate, isolate,
...@@ -2332,7 +2341,7 @@ class ToBooleanStub: public HydrogenCodeStub { ...@@ -2332,7 +2341,7 @@ class ToBooleanStub: public HydrogenCodeStub {
virtual bool SometimesSetsUpAFrame() { return false; } virtual bool SometimesSetsUpAFrame() { return false; }
static void InitializeForIsolate(Isolate* isolate) { static void InstallDescriptors(Isolate* isolate) {
ToBooleanStub stub; ToBooleanStub stub;
stub.InitializeInterfaceDescriptor( stub.InitializeInterfaceDescriptor(
isolate, isolate,
......
...@@ -2106,17 +2106,14 @@ bool Isolate::Init(Deserializer* des) { ...@@ -2106,17 +2106,14 @@ bool Isolate::Init(Deserializer* des) {
CodeStub::GenerateFPStubs(this); CodeStub::GenerateFPStubs(this);
StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this); StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this);
StubFailureTrampolineStub::GenerateAheadOfTime(this); StubFailureTrampolineStub::GenerateAheadOfTime(this);
// TODO(mstarzinger): The following is an ugly hack to make sure the // Ensure interface descriptors are initialized even when stubs have been
// interface descriptor is initialized even when stubs have been // deserialized out of the snapshot without using the graph builder.
// deserialized out of the snapshot without the graph builder. FastCloneShallowArrayStub::InstallDescriptors(this);
FastCloneShallowArrayStub stub(FastCloneShallowArrayStub::CLONE_ELEMENTS,
DONT_TRACK_ALLOCATION_SITE, 0);
stub.InitializeInterfaceDescriptor(
this, code_stub_interface_descriptor(CodeStub::FastCloneShallowArray));
BinaryOpICStub::InstallDescriptors(this); BinaryOpICStub::InstallDescriptors(this);
BinaryOpWithAllocationSiteStub::InstallDescriptors(this); BinaryOpWithAllocationSiteStub::InstallDescriptors(this);
CompareNilICStub::InitializeForIsolate(this); CompareNilICStub::InstallDescriptors(this);
ToBooleanStub::InitializeForIsolate(this); ToBooleanStub::InstallDescriptors(this);
ToNumberStub::InstallDescriptors(this);
ArrayConstructorStubBase::InstallDescriptors(this); ArrayConstructorStubBase::InstallDescriptors(this);
InternalArrayConstructorStubBase::InstallDescriptors(this); InternalArrayConstructorStubBase::InstallDescriptors(this);
FastNewClosureStub::InstallDescriptors(this); FastNewClosureStub::InstallDescriptors(this);
......
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