diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/dfg/DFGArgumentPosition.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
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 - |