From 4e6b3a206fa4ad8bb0b664f7674c9a70376d6e26 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 16 Jul 2012 14:51:15 +0200 Subject: Imported WebKit commit 953baa67aa07087b6ecd4199351ec554c724e27d (http://svn.webkit.org/repository/webkit/trunk@122676) --- Source/JavaScriptCore/bytecode/CodeOrigin.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Source/JavaScriptCore/bytecode/CodeOrigin.h') 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::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::max(); } + bool isSet() const { return bytecodeIndex != maximumBytecodeIndex; } unsigned bytecodeIndexForValueProfile() const { -- cgit v1.2.1