[JSC] FTL should handle LocalAllocator*
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2019 21:55:51 +0000 (21:55 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2019 21:55:51 +0000 (21:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193980

Reviewed by Saam Barati.

At some point, Allocator holds LocalAllocator* instead of 32bit integer. In FTL allocation path, we fail to use this constant LocalAllocator*
because the FTL still use the incoming value as 32bit integer there.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::allocateHeapCell):

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

index 2455a8f..a9f4332 100644 (file)
@@ -1,3 +1,16 @@
+2019-01-29  Yusuke Suzuki  <ysuzuki@apple.com>
+
+        [JSC] FTL should handle LocalAllocator*
+        https://bugs.webkit.org/show_bug.cgi?id=193980
+
+        Reviewed by Saam Barati.
+
+        At some point, Allocator holds LocalAllocator* instead of 32bit integer. In FTL allocation path, we fail to use this constant LocalAllocator*
+        because the FTL still use the incoming value as 32bit integer there.
+
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::allocateHeapCell):
+
 2019-01-29  Keith Rollin  <krollin@apple.com>
 
         Add .xcfilelists to Run Script build phases
index 078e12a..4f3a5a0 100644 (file)
@@ -13041,7 +13041,7 @@ private:
     LValue allocateHeapCell(LValue allocator, LBasicBlock slowPath)
     {
         JITAllocator actualAllocator;
-        if (allocator->hasInt32())
+        if (allocator->hasIntPtr())
             actualAllocator = JITAllocator::constant(Allocator(bitwise_cast<LocalAllocator*>(allocator->asIntPtr())));
         else
             actualAllocator = JITAllocator::variable();