summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.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/FTLAbstractHeapRepository.cpp
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.cpp')
-rw-r--r--Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.cpp96
1 files changed, 16 insertions, 80 deletions
diff --git a/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.cpp b/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.cpp
index 04d7a689d..d7f83c960 100644
--- a/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.cpp
+++ b/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2016 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
@@ -28,26 +28,14 @@
#if ENABLE(FTL_JIT)
-#include "B3CCallValue.h"
-#include "B3MemoryValue.h"
-#include "B3PatchpointValue.h"
-#include "B3ValueInlines.h"
-#include "DirectArguments.h"
-#include "FTLState.h"
-#include "GetterSetter.h"
-#include "JSEnvironmentRecord.h"
-#include "JSPropertyNameEnumerator.h"
#include "JSScope.h"
-#include "JSCInlines.h"
-#include "ScopedArguments.h"
-#include "ScopedArgumentsTable.h"
+#include "JSVariableObject.h"
+#include "Operations.h"
namespace JSC { namespace FTL {
-using namespace B3;
-
-AbstractHeapRepository::AbstractHeapRepository()
- : root(nullptr, "jscRoot")
+AbstractHeapRepository::AbstractHeapRepository(LContext context)
+ : root(0, "jscRoot")
#define ABSTRACT_HEAP_INITIALIZATION(name) , name(&root, #name)
FOR_EACH_ABSTRACT_HEAP(ABSTRACT_HEAP_INITIALIZATION)
@@ -57,31 +45,25 @@ AbstractHeapRepository::AbstractHeapRepository()
FOR_EACH_ABSTRACT_FIELD(ABSTRACT_FIELD_INITIALIZATION)
#undef ABSTRACT_FIELD_INITIALIZATION
- , JSCell_freeListNext(JSCell_header)
+ , JSCell_freeListNext(JSCell_structure)
-#define INDEXED_ABSTRACT_HEAP_INITIALIZATION(name, offset, size) , name(&root, #name, offset, size)
+#define INDEXED_ABSTRACT_HEAP_INITIALIZATION(name, size) , name(context, &root, #name, size)
FOR_EACH_INDEXED_ABSTRACT_HEAP(INDEXED_ABSTRACT_HEAP_INITIALIZATION)
#undef INDEXED_ABSTRACT_HEAP_INITIALIZATION
-#define NUMBERED_ABSTRACT_HEAP_INITIALIZATION(name) , name(&root, #name)
+#define NUMBERED_ABSTRACT_HEAP_INITIALIZATION(name) , name(context, &root, #name)
FOR_EACH_NUMBERED_ABSTRACT_HEAP(NUMBERED_ABSTRACT_HEAP_INITIALIZATION)
#undef NUMBERED_ABSTRACT_HEAP_INITIALIZATION
- , absolute(&root, "absolute")
+ , absolute(context, &root, "absolute")
+ , m_context(context)
+ , m_tbaaKind(mdKindID(m_context, "tbaa"))
{
- // Make sure that our explicit assumptions about the StructureIDBlob match reality.
- RELEASE_ASSERT(!(JSCell_indexingType.offset() & (sizeof(int32_t) - 1)));
- RELEASE_ASSERT(JSCell_indexingType.offset() + 1 == JSCell_typeInfoType.offset());
- RELEASE_ASSERT(JSCell_indexingType.offset() + 2 == JSCell_typeInfoFlags.offset());
- RELEASE_ASSERT(JSCell_indexingType.offset() + 3 == JSCell_cellState.offset());
-
- JSCell_structureID.changeParent(&JSCell_header);
- JSCell_usefulBytes.changeParent(&JSCell_header);
- JSCell_indexingType.changeParent(&JSCell_usefulBytes);
- JSCell_typeInfoType.changeParent(&JSCell_usefulBytes);
- JSCell_typeInfoFlags.changeParent(&JSCell_usefulBytes);
- JSCell_cellState.changeParent(&JSCell_usefulBytes);
-
+ root.m_tbaaMetadata = mdNode(m_context, mdString(m_context, root.m_heapName));
+
+ RELEASE_ASSERT(m_tbaaKind);
+ RELEASE_ASSERT(root.m_tbaaMetadata);
+
RELEASE_ASSERT(!JSCell_freeListNext.offset());
}
@@ -89,52 +71,6 @@ AbstractHeapRepository::~AbstractHeapRepository()
{
}
-void AbstractHeapRepository::decorateMemory(const AbstractHeap* heap, Value* value)
-{
- m_heapForMemory.append(HeapForValue(heap, value));
-}
-
-void AbstractHeapRepository::decorateCCallRead(const AbstractHeap* heap, Value* value)
-{
- m_heapForCCallRead.append(HeapForValue(heap, value));
-}
-
-void AbstractHeapRepository::decorateCCallWrite(const AbstractHeap* heap, Value* value)
-{
- m_heapForCCallWrite.append(HeapForValue(heap, value));
-}
-
-void AbstractHeapRepository::decoratePatchpointRead(const AbstractHeap* heap, Value* value)
-{
- m_heapForPatchpointRead.append(HeapForValue(heap, value));
-}
-
-void AbstractHeapRepository::decoratePatchpointWrite(const AbstractHeap* heap, Value* value)
-{
- m_heapForPatchpointWrite.append(HeapForValue(heap, value));
-}
-
-void AbstractHeapRepository::computeRangesAndDecorateInstructions()
-{
- root.compute();
-
- if (verboseCompilationEnabled()) {
- dataLog("Abstract Heap Repository:\n");
- root.deepDump(WTF::dataFile());
- }
-
- for (HeapForValue entry : m_heapForMemory)
- entry.value->as<MemoryValue>()->setRange(entry.heap->range());
- for (HeapForValue entry : m_heapForCCallRead)
- entry.value->as<CCallValue>()->effects.reads = entry.heap->range();
- for (HeapForValue entry : m_heapForCCallWrite)
- entry.value->as<CCallValue>()->effects.writes = entry.heap->range();
- for (HeapForValue entry : m_heapForPatchpointRead)
- entry.value->as<CCallValue>()->effects.reads = entry.heap->range();
- for (HeapForValue entry : m_heapForPatchpointWrite)
- entry.value->as<CCallValue>()->effects.writes = entry.heap->range();
-}
-
} } // namespace JSC::FTL
#endif // ENABLE(FTL_JIT)