Revision: 19526
Author:   [email protected]
Date:     Fri Feb 21 11:19:32 2014 UTC
Log:      Initialize interface descriptor for ToNumberStub.

[email protected]
BUG=

Review URL: https://codereview.chromium.org/170303003
http://code.google.com/p/v8/source/detail?r=19526

Modified:
 /branches/bleeding_edge/src/code-stubs.cc
 /branches/bleeding_edge/src/code-stubs.h
 /branches/bleeding_edge/src/isolate.cc

=======================================
--- /branches/bleeding_edge/src/code-stubs.cc   Fri Feb 14 15:15:08 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.cc   Fri Feb 21 11:19:32 2014 UTC
@@ -745,6 +745,14 @@
   FastNewContextStub stub(FastNewContextStub::kMaximumSlots);
   InstallDescriptor(isolate, &stub);
 }
+
+
+// static
+void FastCloneShallowArrayStub::InstallDescriptors(Isolate* isolate) {
+  FastCloneShallowArrayStub stub(FastCloneShallowArrayStub::CLONE_ELEMENTS,
+                                 DONT_TRACK_ALLOCATION_SITE, 0);
+  InstallDescriptor(isolate, &stub);
+}


 // static
=======================================
--- /branches/bleeding_edge/src/code-stubs.h    Tue Feb 18 10:10:06 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.h    Fri Feb 21 11:19:32 2014 UTC
@@ -486,6 +486,13 @@
       Isolate* isolate,
       CodeStubInterfaceDescriptor* descriptor);

+  static void InstallDescriptors(Isolate* isolate) {
+    ToNumberStub stub;
+    stub.InitializeInterfaceDescriptor(
+        isolate,
+        isolate->code_stub_interface_descriptor(CodeStub::ToNumber));
+  }
+
  private:
   Major MajorKey() { return ToNumber; }
   int NotMissMinorKey() { return 0; }
@@ -624,6 +631,8 @@
       Isolate* isolate,
       CodeStubInterfaceDescriptor* descriptor);

+  static void InstallDescriptors(Isolate* isolate);
+
  private:
   Mode mode_;
   AllocationSiteMode allocation_site_mode_;
@@ -1375,7 +1384,7 @@
       Isolate* isolate,
       CodeStubInterfaceDescriptor* descriptor);

-  static void InitializeForIsolate(Isolate* isolate) {
+  static void InstallDescriptors(Isolate* isolate) {
     CompareNilICStub compare_stub(kNullValue, UNINITIALIZED);
     compare_stub.InitializeInterfaceDescriptor(
         isolate,
@@ -2332,7 +2341,7 @@

   virtual bool SometimesSetsUpAFrame() { return false; }

-  static void InitializeForIsolate(Isolate* isolate) {
+  static void InstallDescriptors(Isolate* isolate) {
     ToBooleanStub stub;
     stub.InitializeInterfaceDescriptor(
         isolate,
=======================================
--- /branches/bleeding_edge/src/isolate.cc      Tue Feb 18 10:10:06 2014 UTC
+++ /branches/bleeding_edge/src/isolate.cc      Fri Feb 21 11:19:32 2014 UTC
@@ -2106,17 +2106,14 @@
     CodeStub::GenerateFPStubs(this);
     StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this);
     StubFailureTrampolineStub::GenerateAheadOfTime(this);
-    // TODO(mstarzinger): The following is an ugly hack to make sure the
-    // interface descriptor is initialized even when stubs have been
-    // deserialized out of the snapshot without the graph builder.
- FastCloneShallowArrayStub stub(FastCloneShallowArrayStub::CLONE_ELEMENTS,
-                                   DONT_TRACK_ALLOCATION_SITE, 0);
-    stub.InitializeInterfaceDescriptor(
- this, code_stub_interface_descriptor(CodeStub::FastCloneShallowArray)); + // Ensure interface descriptors are initialized even when stubs have been
+    // deserialized out of the snapshot without using the graph builder.
+    FastCloneShallowArrayStub::InstallDescriptors(this);
     BinaryOpICStub::InstallDescriptors(this);
     BinaryOpWithAllocationSiteStub::InstallDescriptors(this);
-    CompareNilICStub::InitializeForIsolate(this);
-    ToBooleanStub::InitializeForIsolate(this);
+    CompareNilICStub::InstallDescriptors(this);
+    ToBooleanStub::InstallDescriptors(this);
+    ToNumberStub::InstallDescriptors(this);
     ArrayConstructorStubBase::InstallDescriptors(this);
     InternalArrayConstructorStubBase::InstallDescriptors(this);
     FastNewClosureStub::InstallDescriptors(this);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to