diff options
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGArgumentPosition.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGArgumentPosition.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGArgumentPosition.h b/Source/JavaScriptCore/dfg/DFGArgumentPosition.h index b4e4ade15..d73247b93 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 @@ -23,8 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DFGArgumentPosition_h -#define DFGArgumentPosition_h +#pragma once #include "DFGDoubleFormatState.h" #include "DFGVariableAccessData.h" @@ -46,6 +45,9 @@ 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 @@ -64,7 +66,7 @@ public: bool mergeShouldNeverUnbox(bool shouldNeverUnbox) { - return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox | shouldNeverUnbox); + return checkAndSet(m_shouldNeverUnbox, m_shouldNeverUnbox || shouldNeverUnbox); } bool mergeArgumentPredictionAwareness() @@ -93,7 +95,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; @@ -123,10 +125,7 @@ public: if (i) out.print(" "); - if (operand.isArgument()) - out.print("arg", operand.toArgument(), "(", VariableAccessDataDump(*graph, variable), ")"); - else - out.print("r", operand.toLocal(), "(", VariableAccessDataDump(*graph, variable), ")"); + out.print(operand, "(", VariableAccessDataDump(*graph, variable), ")"); } out.print("\n"); } @@ -141,6 +140,3 @@ private: }; } } // namespace JSC::DFG - -#endif // DFGArgumentPosition_h - |