X87: Do not cache CodeStubInterfaceDescriptor on the isolate.
authorweiliang.lin@intel.com <weiliang.lin@intel.com>
Thu, 11 Sep 2014 05:30:19 +0000 (05:30 +0000)
committerweiliang.lin@intel.com <weiliang.lin@intel.com>
Thu, 11 Sep 2014 05:30:19 +0000 (05:30 +0000)
port r23744.

original commit message:

  Do not cache CodeStubInterfaceDescriptor on the isolate.

BUG=
R=weiliang.lin@intel.com

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

Patch from Jing Bao <jing.bao@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/x87/code-stubs-x87.cc
src/x87/lithium-x87.cc

index f36ef80..f9358aa 100644 (file)
@@ -115,19 +115,19 @@ void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
   // Update the static counter each time a new code stub is generated.
   isolate()->counters()->code_stubs()->Increment();
 
-  CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor();
-  int param_count = descriptor->GetEnvironmentParameterCount();
+  CodeStubInterfaceDescriptor descriptor;
+  InitializeInterfaceDescriptor(&descriptor);
+  int param_count = descriptor.GetEnvironmentParameterCount();
   {
     // Call the runtime system in a fresh internal frame.
     FrameScope scope(masm, StackFrame::INTERNAL);
     DCHECK(param_count == 0 ||
-           eax.is(descriptor->GetEnvironmentParameterRegister(
-               param_count - 1)));
+           eax.is(descriptor.GetEnvironmentParameterRegister(param_count - 1)));
     // Push arguments
     for (int i = 0; i < param_count; ++i) {
-      __ push(descriptor->GetEnvironmentParameterRegister(i));
+      __ push(descriptor.GetEnvironmentParameterRegister(i));
     }
-    ExternalReference miss = descriptor->miss_handler();
+    ExternalReference miss = descriptor.miss_handler();
     __ CallExternalReference(miss, param_count);
   }
 
index 3e64f19..392335b 100644 (file)
@@ -2477,10 +2477,10 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
     return DefineAsSpilled(result, spill_index);
   } else {
     DCHECK(info()->IsStub());
-    CodeStubInterfaceDescriptor* descriptor =
-        info()->code_stub()->GetInterfaceDescriptor();
+    CodeStubInterfaceDescriptor descriptor;
+    info()->code_stub()->InitializeInterfaceDescriptor(&descriptor);
     int index = static_cast<int>(instr->index());
-    Register reg = descriptor->GetEnvironmentParameterRegister(index);
+    Register reg = descriptor.GetEnvironmentParameterRegister(index);
     return DefineFixed(result, reg);
   }
 }