summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/bytecode/CodeOrigin.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-16 14:51:15 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-16 14:51:15 +0200
commit4e6b3a206fa4ad8bb0b664f7674c9a70376d6e26 (patch)
tree7bb9ad7e31c24d1cf1707e03e6f1a80f6d033951 /Source/JavaScriptCore/bytecode/CodeOrigin.h
parent3977e3d2f72f7fe2c887c1ec0e0c342e1d169f42 (diff)
downloadqtwebkit-4e6b3a206fa4ad8bb0b664f7674c9a70376d6e26.tar.gz
Imported WebKit commit 953baa67aa07087b6ecd4199351ec554c724e27d (http://svn.webkit.org/repository/webkit/trunk@122676)
Diffstat (limited to 'Source/JavaScriptCore/bytecode/CodeOrigin.h')
-rw-r--r--Source/JavaScriptCore/bytecode/CodeOrigin.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/bytecode/CodeOrigin.h b/Source/JavaScriptCore/bytecode/CodeOrigin.h
index 034e48f3f..c9c0f7005 100644
--- a/Source/JavaScriptCore/bytecode/CodeOrigin.h
+++ b/Source/JavaScriptCore/bytecode/CodeOrigin.h
@@ -39,6 +39,8 @@ class ExecutableBase;
class JSFunction;
struct CodeOrigin {
+ static const unsigned maximumBytecodeIndex = (1u << 29) - 1;
+
// Bytecode offset that you'd use to re-execute this instruction.
unsigned bytecodeIndex : 29;
// Bytecode offset corresponding to the opcode that gives the result (needed to handle
@@ -48,7 +50,7 @@ struct CodeOrigin {
InlineCallFrame* inlineCallFrame;
CodeOrigin()
- : bytecodeIndex(std::numeric_limits<uint32_t>::max())
+ : bytecodeIndex(maximumBytecodeIndex)
, valueProfileOffset(0)
, inlineCallFrame(0)
{
@@ -59,11 +61,11 @@ struct CodeOrigin {
, valueProfileOffset(valueProfileOffset)
, inlineCallFrame(inlineCallFrame)
{
- ASSERT(bytecodeIndex < (1u << 29));
+ ASSERT(bytecodeIndex <= maximumBytecodeIndex);
ASSERT(valueProfileOffset < (1u << 3));
}
- bool isSet() const { return bytecodeIndex != std::numeric_limits<uint32_t>::max(); }
+ bool isSet() const { return bytecodeIndex != maximumBytecodeIndex; }
unsigned bytecodeIndexForValueProfile() const
{