summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/ftl/FTLCommonValues.cpp
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/FTLCommonValues.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/ftl/FTLCommonValues.cpp')
-rw-r--r--Source/JavaScriptCore/ftl/FTLCommonValues.cpp62
1 files changed, 28 insertions, 34 deletions
diff --git a/Source/JavaScriptCore/ftl/FTLCommonValues.cpp b/Source/JavaScriptCore/ftl/FTLCommonValues.cpp
index 653bb7ddd..5b4925cff 100644
--- a/Source/JavaScriptCore/ftl/FTLCommonValues.cpp
+++ b/Source/JavaScriptCore/ftl/FTLCommonValues.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,44 +26,38 @@
#include "config.h"
#include "FTLCommonValues.h"
+#include "B3BasicBlockInlines.h"
+#include "B3Const32Value.h"
+#include "B3Const64Value.h"
+#include "B3ConstDoubleValue.h"
+#include "B3ConstPtrValue.h"
+#include "B3ProcedureInlines.h"
+#include "B3Type.h"
+#include "B3ValueInlines.h"
+
#if ENABLE(FTL_JIT)
namespace JSC { namespace FTL {
-CommonValues::CommonValues(LContext context)
- : voidType(FTL::voidType(context))
- , boolean(int1Type(context))
- , int8(int8Type(context))
- , int16(int16Type(context))
- , int32(int32Type(context))
- , int64(int64Type(context))
- , intPtr(intPtrType(context))
- , floatType(FTL::floatType(context))
- , doubleType(FTL::doubleType(context))
- , ref8(pointerType(int8))
- , ref16(pointerType(int16))
- , ref32(pointerType(int32))
- , ref64(pointerType(int64))
- , refPtr(pointerType(intPtr))
- , refFloat(pointerType(floatType))
- , refDouble(pointerType(doubleType))
- , booleanTrue(constInt(boolean, true, ZeroExtend))
- , booleanFalse(constInt(boolean, false, ZeroExtend))
- , int8Zero(constInt(int8, 0, SignExtend))
- , int32Zero(constInt(int32, 0, SignExtend))
- , int32One(constInt(int32, 1, SignExtend))
- , int64Zero(constInt(int64, 0, SignExtend))
- , intPtrZero(constInt(intPtr, 0, SignExtend))
- , intPtrOne(constInt(intPtr, 1, SignExtend))
- , intPtrTwo(constInt(intPtr, 2, SignExtend))
- , intPtrThree(constInt(intPtr, 3, SignExtend))
- , intPtrFour(constInt(intPtr, 4, SignExtend))
- , intPtrEight(constInt(intPtr, 8, SignExtend))
- , intPtrPtr(constInt(intPtr, sizeof(void*), SignExtend))
- , doubleZero(constReal(doubleType, 0))
- , m_context(context)
- , m_module(0)
+using namespace B3;
+
+CommonValues::CommonValues()
+{
+}
+
+void CommonValues::initializeConstants(B3::Procedure& proc, B3::BasicBlock* block)
{
+ int32Zero = block->appendNew<Const32Value>(proc, Origin(), 0);
+ int32One = block->appendNew<Const32Value>(proc, Origin(), 1);
+ booleanTrue = int32One;
+ booleanFalse = int32Zero;
+ int64Zero = block->appendNew<Const64Value>(proc, Origin(), 0);
+ intPtrZero = block->appendNew<ConstPtrValue>(proc, Origin(), 0);
+ intPtrOne = block->appendNew<ConstPtrValue>(proc, Origin(), 1);
+ intPtrTwo = block->appendNew<ConstPtrValue>(proc, Origin(), 2);
+ intPtrThree = block->appendNew<ConstPtrValue>(proc, Origin(), 3);
+ intPtrEight = block->appendNew<ConstPtrValue>(proc, Origin(), 8);
+ doubleZero = block->appendNew<ConstDoubleValue>(proc, Origin(), 0.);
}
} } // namespace JSC::FTL