summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/ftl/FTLCommonValues.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
commit32761a6cee1d0dee366b885b7b9c777e67885688 (patch)
treed6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/ftl/FTLCommonValues.cpp
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/ftl/FTLCommonValues.cpp')
-rw-r--r--Source/JavaScriptCore/ftl/FTLCommonValues.cpp69
1 files changed, 34 insertions, 35 deletions
diff --git a/Source/JavaScriptCore/ftl/FTLCommonValues.cpp b/Source/JavaScriptCore/ftl/FTLCommonValues.cpp
index a2801e123..653bb7ddd 100644
--- a/Source/JavaScriptCore/ftl/FTLCommonValues.cpp
+++ b/Source/JavaScriptCore/ftl/FTLCommonValues.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 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,45 +26,44 @@
#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 {
-using namespace B3;
-
-CommonValues::CommonValues()
- : voidType(B3::Void)
- , boolean(B3::Int32)
- , int32(B3::Int32)
- , int64(B3::Int64)
- , intPtr(B3::pointerType())
- , floatType(B3::Float)
- , doubleType(B3::Double)
-{
-}
-
-void CommonValues::initializeConstants(B3::Procedure& proc, B3::BasicBlock* block)
+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)
{
- 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