summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/ftl/FTLSwitchCase.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/ftl/FTLSwitchCase.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
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
-