Title: [160660] branches/jsCStack/Source/_javascript_Core
Revision
160660
Author
msab...@apple.com
Date
2013-12-16 13:31:42 -0800 (Mon, 16 Dec 2013)

Log Message

CStack Branch: Eliminate topOfStack parameter from callToJavaScript() and callToNativeFunction()
https://bugs.webkit.org/show_bug.cgi?id=125791

Reviewed by Geoffrey Garen.

Eliminated topOfStack from the callToJavaScript() and callToNativeFunction() calling chains.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
* jit/JITCode.cpp:
(JSC::JITCode::execute):
* jit/JITCode.h:
* jit/JITStubs.h:
* llint/LLIntThunks.h:
* llint/LowLevelInterpreter.asm:

Modified Paths

Diff

Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (160659 => 160660)


--- branches/jsCStack/Source/_javascript_Core/ChangeLog	2013-12-16 21:26:59 UTC (rev 160659)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog	2013-12-16 21:31:42 UTC (rev 160660)
@@ -1,5 +1,25 @@
 2013-12-16  Michael Saboff  <msab...@apple.com>
 
+        CStack Branch: Eliminate topOfStack parameter from callToJavaScript() and callToNativeFunction()
+        https://bugs.webkit.org/show_bug.cgi?id=125791
+
+        Reviewed by Geoffrey Garen.
+
+        Eliminated topOfStack from the callToJavaScript() and callToNativeFunction() calling chains.
+
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::execute):
+        (JSC::Interpreter::executeCall):
+        (JSC::Interpreter::executeConstruct):
+        * jit/JITCode.cpp:
+        (JSC::JITCode::execute):
+        * jit/JITCode.h:
+        * jit/JITStubs.h:
+        * llint/LLIntThunks.h:
+        * llint/LowLevelInterpreter.asm:
+
+2013-12-16  Michael Saboff  <msab...@apple.com>
+
         CStack Branch: REGRESSION(r160600) ASSERT failure in Heap::collect()
         https://bugs.webkit.org/show_bug.cgi?id=125789
 

Modified: branches/jsCStack/Source/_javascript_Core/interpreter/Interpreter.cpp (160659 => 160660)


--- branches/jsCStack/Source/_javascript_Core/interpreter/Interpreter.cpp	2013-12-16 21:26:59 UTC (rev 160659)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/Interpreter.cpp	2013-12-16 21:31:42 UTC (rev 160660)
@@ -899,7 +899,7 @@
         SamplingTool::CallRecord callRecord(m_sampler.get());
         Watchdog::Scope watchdogScope(vm.watchdog);
 
-        result = program->generatedJITCode()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack());
+        result = program->generatedJITCode()->execute(&vm, &protoCallFrame);
     }
 
     if (LegacyProfiler* profiler = vm.enabledProfiler())
@@ -963,9 +963,9 @@
 
         // Execute the code:
         if (isJSCall)
-            result = callData.js.functionExecutable->generatedJITCodeForCall()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack());
+            result = callData.js.functionExecutable->generatedJITCodeForCall()->execute(&vm, &protoCallFrame);
         else
-            result = JSValue::decode(callToNativeFunction(reinterpret_cast<void*>(callData.native.function), &vm.topCallFrame, &protoCallFrame, m_stack.getTopOfStack()));
+            result = JSValue::decode(callToNativeFunction(reinterpret_cast<void*>(callData.native.function), &vm.topCallFrame, &protoCallFrame));
     }
 
     if (LegacyProfiler* profiler = vm.enabledProfiler())
@@ -1031,9 +1031,9 @@
 
         // Execute the code.
         if (isJSConstruct)
-            result = constructData.js.functionExecutable->generatedJITCodeForConstruct()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack());
+            result = constructData.js.functionExecutable->generatedJITCodeForConstruct()->execute(&vm, &protoCallFrame);
         else {
-            result = JSValue::decode(callToNativeFunction(reinterpret_cast<void*>(constructData.native.function), &vm.topCallFrame, &protoCallFrame, m_stack.getTopOfStack()));
+            result = JSValue::decode(callToNativeFunction(reinterpret_cast<void*>(constructData.native.function), &vm.topCallFrame, &protoCallFrame));
 
             if (!callFrame->hadException())
                 RELEASE_ASSERT(result.isObject());
@@ -1103,7 +1103,7 @@
         SamplingTool::CallRecord callRecord(m_sampler.get());
         Watchdog::Scope watchdogScope(vm.watchdog);
 
-        result = closure.functionExecutable->generatedJITCodeForCall()->execute(&vm, closure.protoCallFrame, m_stack.getTopOfStack());
+        result = closure.functionExecutable->generatedJITCodeForCall()->execute(&vm, closure.protoCallFrame);
     }
 
     if (LegacyProfiler* profiler = vm.enabledProfiler())
@@ -1189,7 +1189,7 @@
         SamplingTool::CallRecord callRecord(m_sampler.get());
         Watchdog::Scope watchdogScope(vm.watchdog);
 
-        result = eval->generatedJITCode()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack());
+        result = eval->generatedJITCode()->execute(&vm, &protoCallFrame);
     }
 
     if (LegacyProfiler* profiler = vm.enabledProfiler())

Modified: branches/jsCStack/Source/_javascript_Core/jit/JITCode.cpp (160659 => 160660)


--- branches/jsCStack/Source/_javascript_Core/jit/JITCode.cpp	2013-12-16 21:26:59 UTC (rev 160659)
+++ branches/jsCStack/Source/_javascript_Core/jit/JITCode.cpp	2013-12-16 21:31:42 UTC (rev 160660)
@@ -41,11 +41,9 @@
 {
 }
 
-JSValue JITCode::execute(VM* vm, ProtoCallFrame* protoCallFrame, Register* topOfStack)
+JSValue JITCode::execute(VM* vm, ProtoCallFrame* protoCallFrame)
 {
-    ASSERT(!vm->topCallFrame || ((Register*)(vm->topCallFrame) >= topOfStack));
-
-    JSValue result = JSValue::decode(callToJavaScript(executableAddress(), &vm->topCallFrame, protoCallFrame, topOfStack));
+    JSValue result = JSValue::decode(callToJavaScript(executableAddress(), &vm->topCallFrame, protoCallFrame));
     return vm->exception() ? jsNull() : result;
 }
 

Modified: branches/jsCStack/Source/_javascript_Core/jit/JITCode.h (160659 => 160660)


--- branches/jsCStack/Source/_javascript_Core/jit/JITCode.h	2013-12-16 21:26:59 UTC (rev 160659)
+++ branches/jsCStack/Source/_javascript_Core/jit/JITCode.h	2013-12-16 21:31:42 UTC (rev 160660)
@@ -175,7 +175,7 @@
     virtual FTL::JITCode* ftl();
     virtual FTL::ForOSREntryJITCode* ftlForOSREntry();
     
-    JSValue execute(VM*, ProtoCallFrame*, Register*);
+    JSValue execute(VM*, ProtoCallFrame*);
     
     void* start() { return dataAddressAtOffset(0); }
     virtual size_t size() = 0;

Modified: branches/jsCStack/Source/_javascript_Core/jit/JITStubs.h (160659 => 160660)


--- branches/jsCStack/Source/_javascript_Core/jit/JITStubs.h	2013-12-16 21:26:59 UTC (rev 160659)
+++ branches/jsCStack/Source/_javascript_Core/jit/JITStubs.h	2013-12-16 21:31:42 UTC (rev 160660)
@@ -42,9 +42,9 @@
 struct ProtoCallFrame;
 
 extern "C" {
-    EncodedJSValue callToJavaScript(void*, ExecState**, ProtoCallFrame*, Register*);
+    EncodedJSValue callToJavaScript(void*, ExecState**, ProtoCallFrame*);
     void handleUncaughtException();
-    EncodedJSValue callToNativeFunction(void*, ExecState**, ProtoCallFrame*, Register*);
+    EncodedJSValue callToNativeFunction(void*, ExecState**, ProtoCallFrame*);
 }
 #endif
 

Modified: branches/jsCStack/Source/_javascript_Core/llint/LLIntThunks.h (160659 => 160660)


--- branches/jsCStack/Source/_javascript_Core/llint/LLIntThunks.h	2013-12-16 21:26:59 UTC (rev 160659)
+++ branches/jsCStack/Source/_javascript_Core/llint/LLIntThunks.h	2013-12-16 21:31:42 UTC (rev 160660)
@@ -40,8 +40,8 @@
 struct ProtoCallFrame;
 
 extern "C" {
-    EncodedJSValue callToJavaScript(void*, ExecState**, ProtoCallFrame*, Register*);
-    EncodedJSValue callToNativeFunction(void*, ExecState**, ProtoCallFrame*, Register*);
+    EncodedJSValue callToJavaScript(void*, ExecState**, ProtoCallFrame*);
+    EncodedJSValue callToNativeFunction(void*, ExecState**, ProtoCallFrame*);
 #if ENABLE(JIT)
     void handleUncaughtException();
 #endif

Modified: branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter.asm (160659 => 160660)


--- branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2013-12-16 21:26:59 UTC (rev 160659)
+++ branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2013-12-16 21:31:42 UTC (rev 160660)
@@ -464,8 +464,8 @@
 if C_LOOP
 else
 # stub to call into _javascript_ or Native functions
-# EncodedJSValue callToJavaScript(void* code, ExecState** vm, ProtoCallFrame* protoFrame, Register* topOfStack)
-# EncodedJSValue callToNativeFunction(void* code, ExecState** vm, ProtoCallFrame* protoFrame, Register* topOfStack)
+# EncodedJSValue callToJavaScript(void* code, ExecState** vmTopCallFrame, ProtoCallFrame* protoFrame)
+# EncodedJSValue callToNativeFunction(void* code, ExecState** vmTopCallFrame, ProtoCallFrame* protoFrame)
 # Note, if these stubs or one of their related macros are changed, make the
 # equivalent changes in jit/JITStubsX86.h and/or jit/JITStubsMSVC64.asm
 _callToJavaScript:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to