summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGArgumentPosition.h
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
commit881da28418d380042aa95a97f0cbd42560a64f7c (patch)
treea794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/dfg/DFGArgumentPosition.h
parent7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff)
parent0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff)
downloadqtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGArgumentPosition.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGArgumentPosition.h30
1 files changed, 22 insertions, 8 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGArgumentPosition.h b/Source/JavaScriptCore/dfg/DFGArgumentPosition.h
index 822b45474..a6983a735 100644
--- a/Source/JavaScriptCore/dfg/DFGArgumentPosition.h
+++ b/Source/JavaScriptCore/dfg/DFGArgumentPosition.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2013, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -46,11 +46,28 @@ public:
void addVariable(VariableAccessData* variable)
{
m_variables.append(variable);
+
+ // We may set this early. Merging it here saves us time in prediction propagation.
+ variable->mergeShouldNeverUnbox(m_shouldNeverUnbox);
+ }
+
+ VariableAccessData* someVariable() const
+ {
+ if (m_variables.isEmpty())
+ return 0;
+ return m_variables[0]->find();
+ }
+
+ FlushFormat flushFormat() const
+ {
+ if (VariableAccessData* variable = someVariable())
+ return variable->flushFormat();
+ return DeadFlush;
}
bool mergeShouldNeverUnbox(bool shouldNeverUnbox)
{
- return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox | shouldNeverUnbox);
+ return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox || shouldNeverUnbox);
}
bool mergeArgumentPredictionAwareness()
@@ -79,7 +96,7 @@ public:
bool changed = false;
for (unsigned i = 0; i < m_variables.size(); ++i) {
VariableAccessData* variable = m_variables[i]->find();
- changed |= checkAndSet(m_isProfitableToUnbox, m_isProfitableToUnbox | variable->isProfitableToUnbox());
+ changed |= checkAndSet(m_isProfitableToUnbox, m_isProfitableToUnbox || variable->isProfitableToUnbox());
}
if (!changed)
return false;
@@ -104,15 +121,12 @@ public:
{
for (unsigned i = 0; i < m_variables.size(); ++i) {
VariableAccessData* variable = m_variables[i]->find();
- int operand = variable->operand();
+ VirtualRegister operand = variable->local();
if (i)
out.print(" ");
- if (operandIsArgument(operand))
- out.print("arg", operandToArgument(operand), "(", VariableAccessDataDump(*graph, variable), ")");
- else
- out.print("r", operand, "(", VariableAccessDataDump(*graph, variable), ")");
+ out.print(operand, "(", VariableAccessDataDump(*graph, variable), ")");
}
out.print("\n");
}