Optimized VM access from C++ code
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Oct 2013 22:14:54 +0000 (22:14 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Oct 2013 22:14:54 +0000 (22:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=122241

Reviewed by Filip Pizlo.

* runtime/JSScope.h:
(JSC::JSScope::vm): Use MarkedBlock instead of Heap, since both have a
pointer to the VM, and Heap is one extra load.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156802 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSScope.h

index e3d4628..c6fe97f 100644 (file)
@@ -1,3 +1,14 @@
+2013-10-02  Geoffrey Garen  <ggaren@apple.com>
+
+        Optimized VM access from C++ code
+        https://bugs.webkit.org/show_bug.cgi?id=122241
+
+        Reviewed by Filip Pizlo.
+
+        * runtime/JSScope.h:
+        (JSC::JSScope::vm): Use MarkedBlock instead of Heap, since both have a
+        pointer to the VM, and Heap is one extra load.
+
 2013-10-02  Michael Saboff  <msaboff@apple.com>
 
         The LLInt should not use JITStackFrame
index 553fb57..db66237 100644 (file)
@@ -215,7 +215,7 @@ inline JSGlobalObject* JSScope::globalObject()
 
 inline VM* JSScope::vm()
 { 
-    return Heap::heap(this)->vm();
+    return MarkedBlock::blockFor(this)->vm();
 }
 
 inline Register& Register::operator=(JSScope* scope)