Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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):


Canonical link: https://commits.webkit.org/207908@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Dominik Infuehr committed Jan 14, 2019
1 parent 401bd33 commit 4a3241d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
15 changes: 15 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -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.
Expand Down
10 changes: 5 additions & 5 deletions Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand All @@ -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));
Expand Down Expand Up @@ -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));
Expand All @@ -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));
Expand Down

0 comments on commit 4a3241d

Please sign in to comment.