diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-05-20 09:56:07 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-05-20 09:56:07 +0000 |
| commit | 41386e9cb918eed93b3f13648cbef387e371e451 (patch) | |
| tree | a97f9d7bd1d9d091833286085f72da9d83fd0606 /Source/JavaScriptCore/ftl/FTLJITCode.cpp | |
| parent | e15dd966d523731101f70ccf768bba12435a0208 (diff) | |
| download | WebKitGtk-tarball-41386e9cb918eed93b3f13648cbef387e371e451.tar.gz | |
webkitgtk-2.4.9webkitgtk-2.4.9
Diffstat (limited to 'Source/JavaScriptCore/ftl/FTLJITCode.cpp')
| -rw-r--r-- | Source/JavaScriptCore/ftl/FTLJITCode.cpp | 55 |
1 files changed, 17 insertions, 38 deletions
diff --git a/Source/JavaScriptCore/ftl/FTLJITCode.cpp b/Source/JavaScriptCore/ftl/FTLJITCode.cpp index 66d38de6c..cdc7de0c3 100644 --- a/Source/JavaScriptCore/ftl/FTLJITCode.cpp +++ b/Source/JavaScriptCore/ftl/FTLJITCode.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013, 2015 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,8 +28,6 @@ #if ENABLE(FTL_JIT) -#include "FTLState.h" - namespace JSC { namespace FTL { JITCode::JITCode() @@ -39,15 +37,6 @@ JITCode::JITCode() JITCode::~JITCode() { - if (FTL::shouldShowDisassembly()) { - dataLog("Destroying FTL JIT code at "); - CommaPrinter comma; - for (auto& handle : m_handles) - dataLog(comma, pointerDump(handle.get())); - dataLog(comma, pointerDump(m_arityCheckEntrypoint.executableMemory())); - dataLog(comma, pointerDump(m_exitThunks.executableMemory())); - dataLog("\n"); - } } void JITCode::initializeExitThunks(CodeRef exitThunks) @@ -60,40 +49,32 @@ void JITCode::addHandle(PassRefPtr<ExecutableMemoryHandle> handle) m_handles.append(handle); } -void JITCode::addDataSection(PassRefPtr<DataSection> dataSection) +void JITCode::addDataSection(RefCountedArray<LSectionWord> dataSection) { m_dataSections.append(dataSection); } -void JITCode::initializeArityCheckEntrypoint(CodeRef entrypoint) -{ - m_arityCheckEntrypoint = entrypoint; -} - -void JITCode::initializeAddressForCall(CodePtr address) +void JITCode::initializeCode(CodeRef entrypoint) { - m_addressForCall = address; + m_entrypoint = entrypoint; } -JITCode::CodePtr JITCode::addressForCall(VM&, ExecutableBase*, ArityCheckMode arityCheck, RegisterPreservationMode) +JITCode::CodePtr JITCode::addressForCall() { - switch (arityCheck) { - case ArityCheckNotRequired: - return m_addressForCall; - case MustCheckArity: - return m_arityCheckEntrypoint.code(); - } - RELEASE_ASSERT_NOT_REACHED(); - return CodePtr(); + RELEASE_ASSERT(m_entrypoint); + return m_entrypoint.code(); } void* JITCode::executableAddressAtOffset(size_t offset) { - return reinterpret_cast<char*>(m_addressForCall.executableAddress()) + offset; + RELEASE_ASSERT(m_entrypoint); + return reinterpret_cast<char*>(m_entrypoint.code().executableAddress()) + offset; } void* JITCode::dataAddressAtOffset(size_t) { + RELEASE_ASSERT(m_entrypoint); + // We can't patch FTL code, yet. Even if we did, it's not clear that we would do so // through this API. RELEASE_ASSERT_NOT_REACHED(); @@ -102,6 +83,8 @@ void* JITCode::dataAddressAtOffset(size_t) unsigned JITCode::offsetOf(void*) { + RELEASE_ASSERT(m_entrypoint); + // We currently don't have visibility into the FTL code. RELEASE_ASSERT_NOT_REACHED(); return 0; @@ -109,6 +92,8 @@ unsigned JITCode::offsetOf(void*) size_t JITCode::size() { + RELEASE_ASSERT(m_entrypoint); + // We don't know the size of FTL code, yet. Make a wild guess. This is mostly used for // GC load estimates. return 1000; @@ -116,6 +101,8 @@ size_t JITCode::size() bool JITCode::contains(void*) { + RELEASE_ASSERT(m_entrypoint); + // We have no idea what addresses the FTL code contains, yet. RELEASE_ASSERT_NOT_REACHED(); return false; @@ -136,14 +123,6 @@ DFG::CommonData* JITCode::dfgCommon() return &common; } -void JITCode::validateReferences(const TrackedReferences& trackedReferences) -{ - common.validateReferences(trackedReferences); - - for (OSRExit& exit : osrExit) - exit.validateReferences(trackedReferences); -} - } } // namespace JSC::FTL #endif // ENABLE(FTL_JIT) |
