Fix property access on ARM with the baseline JIT
authordinfuehr@igalia.com <dinfuehr@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2019 18:41:21 +0000 (18:41 +0000)
committerdinfuehr@igalia.com <dinfuehr@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2019 18:41:21 +0000 (18:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193393

Reviewed by Yusuke Suzuki.

Code was still using currentInstruction[4] to access the instruction's metadata.
Updated to use metadata.getPutInfo and metadata.resolveType.

* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp

index df78949..625178f 100644 (file)
@@ -1,3 +1,18 @@
+2019-01-14  Dominik Infuehr  <dinfuehr@igalia.com>
+
+        Fix property access on ARM with the baseline JIT
+        https://bugs.webkit.org/show_bug.cgi?id=193393
+
+        Reviewed by Yusuke Suzuki.
+
+        Code was still using currentInstruction[4] to access the instruction's metadata.
+        Updated to use metadata.getPutInfo and metadata.resolveType.
+
+        * jit/JITPropertyAccess32_64.cpp:
+        (JSC::JIT::emit_op_resolve_scope):
+        (JSC::JIT::emit_op_get_from_scope):
+        (JSC::JIT::emit_op_put_to_scope):
+
 2019-01-12  Timothy Hatcher  <timothy@apple.com>
 
         Have prefers-color-scheme: light always match on macOS versions before Mojave.
index 657d608..5aa27b8 100644 (file)
@@ -815,7 +815,7 @@ void JIT::emit_op_resolve_scope(const Instruction* currentInstruction)
     case UnresolvedProperty:
     case UnresolvedPropertyWithVarInjectionChecks: {
         JumpList skipToEnd;
-        load32(&currentInstruction[4], regT0);
+        load32(&metadata.resolveType, regT0);
 
         Jump notGlobalProperty = branch32(NotEqual, regT0, TrustedImm32(GlobalProperty));
         emitCode(GlobalProperty);
@@ -940,7 +940,7 @@ void JIT::emit_op_get_from_scope(const Instruction* currentInstruction)
     case GlobalProperty:
     case GlobalPropertyWithVarInjectionChecks: {
         JumpList skipToEnd;
-        load32(&currentInstruction[4], regT0);
+        load32(&metadata.getPutInfo, regT0);
         and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0
 
         Jump isNotGlobalProperty = branch32(NotEqual, regT0, TrustedImm32(resolveType));
@@ -955,7 +955,7 @@ void JIT::emit_op_get_from_scope(const Instruction* currentInstruction)
     case UnresolvedProperty:
     case UnresolvedPropertyWithVarInjectionChecks: {
         JumpList skipToEnd;
-        load32(&currentInstruction[4], regT0);
+        load32(&metadata.getPutInfo, regT0);
         and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0
 
         Jump isGlobalProperty = branch32(Equal, regT0, TrustedImm32(GlobalProperty));
@@ -1095,7 +1095,7 @@ void JIT::emit_op_put_to_scope(const Instruction* currentInstruction)
     case GlobalProperty:
     case GlobalPropertyWithVarInjectionChecks: {
         JumpList skipToEnd;
-        load32(&currentInstruction[4], regT0);
+        load32(&metadata.getPutInfo, regT0);
         and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0
 
         Jump isGlobalProperty = branch32(Equal, regT0, TrustedImm32(resolveType));
@@ -1114,7 +1114,7 @@ void JIT::emit_op_put_to_scope(const Instruction* currentInstruction)
     case UnresolvedProperty:
     case UnresolvedPropertyWithVarInjectionChecks: {
         JumpList skipToEnd;
-        load32(&currentInstruction[4], regT0);
+        load32(&metadata.getPutInfo, regT0);
         and32(TrustedImm32(GetPutInfo::typeBits), regT0); // Load ResolveType into T0
 
         Jump isGlobalProperty = branch32(Equal, regT0, TrustedImm32(GlobalProperty));