Bug 687683: Some random comment fixes I came across. r=jorendorff
authorJim Blandy <jimb@mozilla.com>
Tue, 06 Dec 2011 11:40:27 -0800
changeset 82880 2e7abb74ed3e960add927b34721470b1918533e5
parent 82879 9aca452cf4519114e31f6917a37050366e5a3d57
child 82881 cca7e56a13d91604ff2326832b0e676027d0cdce
push idunknown
push userunknown
push dateunknown
reviewersjorendorff
bugs687683
milestone11.0a1
Bug 687683: Some random comment fixes I came across. r=jorendorff
js/src/methodjit/Compiler.cpp
js/src/methodjit/MethodJIT.h
--- a/js/src/methodjit/Compiler.cpp
+++ b/js/src/methodjit/Compiler.cpp
@@ -3418,17 +3418,17 @@ mjit::Compiler::emitReturn(FrameEntry *f
             a->returnJumps->append(masm.jump());
 
         if (a->returnSet)
             frame.freeReg(a->returnRegister);
         return;
     }
 
     /*
-     * Outside the mjit, activation objects are put by StackSpace::pop*
+     * Outside the mjit, activation objects are put by ContextStack::pop*
      * members. For JSOP_RETURN, the interpreter only calls popInlineFrame if
      * fp != entryFrame since the VM protocol is that Invoke/Execute are
      * responsible for pushing/popping the initial frame. The mjit does not
      * perform this branch (by instead using a trampoline at the return address
      * to handle exiting mjit code) and thus always puts activation objects,
      * even on the entry frame. To avoid double-putting, EnterMethodJIT clears
      * out the entry frame's activation objects.
      */
--- a/js/src/methodjit/MethodJIT.h
+++ b/js/src/methodjit/MethodJIT.h
@@ -457,20 +457,31 @@ class JaegerCompartment {
     }
 
     JaegerStatus lastUnfinished() {
         JaegerStatus result = lastUnfinished_;
         lastUnfinished_ = (JaegerStatus) 0;
         return result;
     }
 
+    /*
+     * To force the top StackFrame in a VMFrame to return, when that VMFrame
+     * has called an extern "C" function (say, js_InternalThrow or
+     * js_InternalInterpret), change the extern "C" function's return address
+     * to the value this method returns.
+     */
     void *forceReturnFromExternC() const {
         return JS_FUNC_TO_DATA_PTR(void *, trampolines.forceReturn);
     }
 
+    /*
+     * To force the top StackFrame in a VMFrame to return, when that VMFrame has
+     * called a fastcall function (say, most stubs:: functions), change the
+     * fastcall function's return address to the value this method returns.
+     */
     void *forceReturnFromFastCall() const {
 #if (defined(JS_NO_FASTCALL) && defined(JS_CPU_X86)) || defined(_WIN64)
         return JS_FUNC_TO_DATA_PTR(void *, trampolines.forceReturnFast);
 #else
         return JS_FUNC_TO_DATA_PTR(void *, trampolines.forceReturn);
 #endif
     }