aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_masm_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <[email protected]>2013-10-04 16:06:16 +0200
committerThe Qt Project <[email protected]>2013-10-10 09:54:24 +0200
commita967a9bdcc2c75a0270c2be48d845ded5332e4f0 (patch)
treebb19264f0e045239103678d568d506d8094bbcd9 /src/qml/compiler/qv4isel_masm_p.h
parentdcec03166c93fcbc9aa1ca97f53a6f436faa482c (diff)
V4 JIT: generate some strict (not) equal conditions
Checks for strict (not) equal to null, undefined, or a boolean value can be generated without reserving extra registers, or doing a call. This reduces the amount of runtime calls from >25mln to ~6500 for v8-bench.js Change-Id: If08d1124b2869227654b1233a89833c5b5e7b40c Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4isel_masm_p.h')
-rw-r--r--src/qml/compiler/qv4isel_masm_p.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4isel_masm_p.h b/src/qml/compiler/qv4isel_masm_p.h
index 1a8df9a833..3dfd979654 100644
--- a/src/qml/compiler/qv4isel_masm_p.h
+++ b/src/qml/compiler/qv4isel_masm_p.h
@@ -453,8 +453,14 @@ public:
void addPatch(DataLabelPtr patch, V4IR::BasicBlock *target);
void generateCJumpOnNonZero(RegisterID reg, V4IR::BasicBlock *currentBlock,
V4IR::BasicBlock *trueBlock, V4IR::BasicBlock *falseBlock);
-
- Pointer loadTempAddress(RegisterID reg, V4IR::Temp *t);
+ void generateCJumpOnCompare(RelationalCondition cond, RegisterID left, TrustedImm32 right,
+ V4IR::BasicBlock *currentBlock, V4IR::BasicBlock *trueBlock,
+ V4IR::BasicBlock *falseBlock);
+ void generateCJumpOnCompare(RelationalCondition cond, RegisterID left, RegisterID right,
+ V4IR::BasicBlock *currentBlock, V4IR::BasicBlock *trueBlock,
+ V4IR::BasicBlock *falseBlock);
+
+ Pointer loadTempAddress(RegisterID baseReg, V4IR::Temp *t);
Pointer loadStringAddress(RegisterID reg, const QString &string);
void loadStringRef(RegisterID reg, const QString &string);
Pointer stackSlotPointer(V4IR::Temp *t) const
@@ -1245,6 +1251,11 @@ public:
return target;
}
+ RegisterID toBoolRegister(V4IR::Expr *e, RegisterID scratchReg)
+ {
+ return toInt32Register(e, scratchReg);
+ }
+
RegisterID toInt32Register(V4IR::Expr *e, RegisterID scratchReg)
{
if (V4IR::Const *c = e->asConst()) {
@@ -1441,6 +1452,10 @@ protected:
Assembler::Jump branchDouble(bool invertCondition, V4IR::AluOp op, V4IR::Expr *left, V4IR::Expr *right);
bool visitCJumpDouble(V4IR::AluOp op, V4IR::Expr *left, V4IR::Expr *right,
V4IR::BasicBlock *iftrue, V4IR::BasicBlock *iffalse);
+ void visitCJumpStrict(V4IR::Binop *binop, V4IR::BasicBlock *trueBlock, V4IR::BasicBlock *falseBlock);
+ bool visitCJumpStrictNullUndefined(V4IR::Type nullOrUndef, V4IR::Binop *binop,
+ V4IR::BasicBlock *trueBlock, V4IR::BasicBlock *falseBlock);
+ bool visitCJumpStrictBool(V4IR::Binop *binop, V4IR::BasicBlock *trueBlock, V4IR::BasicBlock *falseBlock);
bool int32Binop(V4IR::AluOp oper, V4IR::Expr *leftSource, V4IR::Expr *rightSource,
V4IR::Temp *target);