summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/bytecode/Operands.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
commit32761a6cee1d0dee366b885b7b9c777e67885688 (patch)
treed6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/bytecode/Operands.h
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/bytecode/Operands.h')
-rw-r--r--Source/JavaScriptCore/bytecode/Operands.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/Source/JavaScriptCore/bytecode/Operands.h b/Source/JavaScriptCore/bytecode/Operands.h
index 78ddaa525..f21e05f5f 100644
--- a/Source/JavaScriptCore/bytecode/Operands.h
+++ b/Source/JavaScriptCore/bytecode/Operands.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, 2012, 2013, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -52,10 +52,10 @@ class Operands {
public:
Operands() { }
- explicit Operands(size_t numArguments, size_t numLocals, const T& initialValue = Traits::defaultValue())
+ explicit Operands(size_t numArguments, size_t numLocals)
{
- m_arguments.fill(initialValue, numArguments);
- m_locals.fill(initialValue, numLocals);
+ m_arguments.fill(Traits::defaultValue(), numArguments);
+ m_locals.fill(Traits::defaultValue(), numLocals);
}
template<typename U, typename OtherTraits>
@@ -96,7 +96,7 @@ public:
return local(idx);
}
- void ensureLocals(size_t size, const T& ensuredValue = Traits::defaultValue())
+ void ensureLocals(size_t size)
{
if (size <= m_locals.size())
return;
@@ -104,7 +104,7 @@ public:
size_t oldSize = m_locals.size();
m_locals.resize(size);
for (size_t i = oldSize; i < m_locals.size(); ++i)
- m_locals[i] = ensuredValue;
+ m_locals[i] = Traits::defaultValue();
}
void setLocal(size_t idx, const T& value)
@@ -149,7 +149,6 @@ public:
}
const T& operand(int operand) const { return const_cast<const T&>(const_cast<Operands*>(this)->operand(operand)); }
- const T& operand(VirtualRegister operand) const { return const_cast<const T&>(const_cast<Operands*>(this)->operand(operand)); }
bool hasOperand(int operand) const
{
@@ -210,10 +209,6 @@ public:
return virtualRegisterForArgument(index).offset();
return virtualRegisterForLocal(index - numberOfArguments()).offset();
}
- VirtualRegister virtualRegisterForIndex(size_t index) const
- {
- return VirtualRegister(operandForIndex(index));
- }
size_t indexForOperand(int operand) const
{
if (operandIsArgument(operand))
@@ -257,7 +252,11 @@ public:
}
void dumpInContext(PrintStream& out, DumpContext* context) const;
- void dump(PrintStream& out) const;
+
+ void dump(PrintStream& out) const
+ {
+ dumpInContext(out, 0);
+ }
private:
Vector<T, 8> m_arguments;