Skip to content

Commit

Permalink
LLINT op_put_to_scope and op_get_from_scope should use loadpFromInstr…
Browse files Browse the repository at this point in the history
…uction to get operand from instruction

https://bugs.webkit.org/show_bug.cgi?id=132333

Unreviewed.

When loading operand variable from instruction in
_llint_op_get_from_scope and _llint_op_put_to_scope use
loadpFromInstruction instead of loadisFromInstruction. Also when
saving the operand in LLIntSlowPaths.cpp use the same way as in
CodeBlock.cpp.

Patch by Tomas Popela <tpopela@redhat.com> on 2016-03-12

* llint/LLIntSlowPaths.cpp:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
  • Loading branch information
tpopela authored and carlosgcampos committed Mar 12, 2016
1 parent e237ee1 commit 33e582f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
17 changes: 17 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,20 @@
2016-03-12 Tomas Popela <tpopela@redhat.com>

LLINT op_put_to_scope and op_get_from_scope should use loadpFromInstruction to get operand from instruction
https://bugs.webkit.org/show_bug.cgi?id=132333

Unreviewed.

When loading operand variable from instruction in
_llint_op_get_from_scope and _llint_op_put_to_scope use
loadpFromInstruction instead of loadisFromInstruction. Also when
saving the operand in LLIntSlowPaths.cpp use the same way as in
CodeBlock.cpp.

* llint/LLIntSlowPaths.cpp:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

2016-03-10 Carlos Garcia Campos <cgarcia@igalia.com>

Fix the build in Windows.
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
Expand Up @@ -1354,7 +1354,7 @@ LLINT_SLOW_PATH_DECL(slow_path_get_from_scope)
CodeBlock* codeBlock = exec->codeBlock();
ConcurrentJITLocker locker(codeBlock->m_lock);
pc[5].u.structure.set(exec->vm(), codeBlock->ownerExecutable(), scope->structure());
pc[6].u.operand = slot.cachedOffset();
pc[6].u.pointer = reinterpret_cast<void*>(slot.cachedOffset());
}
}

Expand All @@ -1381,7 +1381,7 @@ LLINT_SLOW_PATH_DECL(slow_path_put_to_scope)
if (slot.isCacheable() && slot.base() == scope && scope->structure()->propertyAccessesAreCacheable()) {
ConcurrentJITLocker locker(codeBlock->m_lock);
pc[5].u.structure.set(exec->vm(), codeBlock->ownerExecutable(), scope->structure());
pc[6].u.operand = slot.cachedOffset();
pc[6].u.pointer = reinterpret_cast<void*>(slot.cachedOffset());
}
}

Expand Down
8 changes: 4 additions & 4 deletions Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
Expand Up @@ -2277,7 +2277,7 @@ macro loadWithStructureCheck(operand, slowPath)
end

macro getProperty()
loadisFromInstruction(6, t3)
loadpFromInstruction(6, t3)
loadPropertyAtVariableOffset(t3, t0, t1, t2)
valueProfile(t1, t2, 28, t0)
loadisFromInstruction(1, t0)
Expand All @@ -2297,7 +2297,7 @@ end

macro getClosureVar()
loadp JSVariableObject::m_registers[t0], t0
loadisFromInstruction(6, t3)
loadpFromInstruction(6, t3)
loadp TagOffset[t0, t3, 8], t1
loadp PayloadOffset[t0, t3, 8], t2
valueProfile(t1, t2, 28, t0)
Expand Down Expand Up @@ -2356,7 +2356,7 @@ _llint_op_get_from_scope:
macro putProperty()
loadisFromInstruction(3, t1)
loadConstantOrVariable(t1, t2, t3)
loadisFromInstruction(6, t1)
loadpFromInstruction(6, t1)
storePropertyAtVariableOffset(t1, t0, t2, t3)
end

Expand All @@ -2374,7 +2374,7 @@ macro putClosureVar()
loadisFromInstruction(3, t1)
loadConstantOrVariable(t1, t2, t3)
loadp JSVariableObject::m_registers[t0], t0
loadisFromInstruction(6, t1)
loadpFromInstruction(6, t1)
storei t2, TagOffset[t0, t1, 8]
storei t3, PayloadOffset[t0, t1, 8]
end
Expand Down
8 changes: 4 additions & 4 deletions Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
Expand Up @@ -2047,7 +2047,7 @@ macro loadWithStructureCheck(operand, slowPath)
end

macro getProperty()
loadisFromInstruction(6, t1)
loadpFromInstruction(6, t1)
loadPropertyAtVariableOffset(t1, t0, t2)
valueProfile(t2, 7, t0)
loadisFromInstruction(1, t0)
Expand All @@ -2064,7 +2064,7 @@ end

macro getClosureVar()
loadp JSVariableObject::m_registers[t0], t0
loadisFromInstruction(6, t1)
loadpFromInstruction(6, t1)
loadq [t0, t1, 8], t0
valueProfile(t0, 7, t1)
loadisFromInstruction(1, t1)
Expand Down Expand Up @@ -2121,7 +2121,7 @@ _llint_op_get_from_scope:
macro putProperty()
loadisFromInstruction(3, t1)
loadConstantOrVariable(t1, t2)
loadisFromInstruction(6, t1)
loadpFromInstruction(6, t1)
storePropertyAtVariableOffset(t1, t0, t2)
end

Expand All @@ -2138,7 +2138,7 @@ macro putClosureVar()
loadisFromInstruction(3, t1)
loadConstantOrVariable(t1, t2)
loadp JSVariableObject::m_registers[t0], t0
loadisFromInstruction(6, t1)
loadpFromInstruction(6, t1)
storeq t2, [t0, t1, 8]
end

Expand Down

0 comments on commit 33e582f

Please sign in to comment.