summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/ftl/FTLSwitchCase.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/ftl/FTLSwitchCase.h')
-rw-r--r--Source/JavaScriptCore/ftl/FTLSwitchCase.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/ftl/FTLSwitchCase.h b/Source/JavaScriptCore/ftl/FTLSwitchCase.h
index e9f17d010..948e7462f 100644
--- a/Source/JavaScriptCore/ftl/FTLSwitchCase.h
+++ b/Source/JavaScriptCore/ftl/FTLSwitchCase.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 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,36 +23,40 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef FTLSwitchCase_h
-#define FTLSwitchCase_h
-
-#include <wtf/Platform.h>
+#pragma once
#if ENABLE(FTL_JIT)
#include "FTLAbbreviatedTypes.h"
+#include "FTLWeight.h"
namespace JSC { namespace FTL {
class SwitchCase {
public:
- SwitchCase(LValue value, LBasicBlock target)
+ SwitchCase()
+ : m_value(nullptr)
+ , m_target(nullptr)
+ {
+ }
+
+ SwitchCase(LValue value, LBasicBlock target, Weight weight = Weight())
: m_value(value)
, m_target(target)
+ , m_weight(weight)
{
}
LValue value() const { return m_value; }
LBasicBlock target() const { return m_target; }
+ Weight weight() const { return m_weight; }
private:
LValue m_value;
LBasicBlock m_target;
+ Weight m_weight;
};
} } // namespace JSC::FTL
#endif // ENABLE(FTL_JIT)
-
-#endif // FTLSwitchCase_h
-