X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/ftl/FTLState.cpp?ds=inline diff --git a/ftl/FTLState.cpp b/ftl/FTLState.cpp index 32944d6..038e9b1 100644 --- a/ftl/FTLState.cpp +++ b/ftl/FTLState.cpp @@ -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 @@ -32,6 +32,12 @@ #include "FTLForOSREntryJITCode.h" #include "FTLJITCode.h" #include "FTLJITFinalizer.h" +#include +#include + +#if ENABLE(FTL_NATIVE_CALL_INLINING) +#include "InlineRuntimeSymbolTable.h" +#endif namespace JSC { namespace FTL { @@ -43,9 +49,21 @@ State::State(Graph& graph) , module(0) , function(0) , generatedFunction(0) - , compactUnwind(0) - , compactUnwindSize(0) + , handleStackOverflowExceptionStackmapID(UINT_MAX) + , handleExceptionStackmapID(UINT_MAX) + , capturedStackmapID(UINT_MAX) + , varargsSpillSlotsStackmapID(UINT_MAX) + , unwindDataSection(0) + , unwindDataSectionSize(0) { + +#if ENABLE(FTL_NATIVE_CALL_INLINING) +#define SYMBOL_TABLE_ADD(symbol, file) \ + symbolTable.fastAdd(symbol, file); + FOR_EACH_LIBRARY_SYMBOL(SYMBOL_TABLE_ADD) +#undef SYMBOL_TABLE_ADD +#endif + switch (graph.m_plan.mode) { case FTLMode: { jitCode = adoptRef(new JITCode()); @@ -62,9 +80,9 @@ State::State(Graph& graph) RELEASE_ASSERT_NOT_REACHED(); break; } - - finalizer = new JITFinalizer(graph.m_plan); - graph.m_plan.finalizer = adoptPtr(finalizer); + + graph.m_plan.finalizer = std::make_unique(graph.m_plan); + finalizer = static_cast(graph.m_plan.finalizer.get()); } State::~State() @@ -73,6 +91,11 @@ State::~State() } void State::dumpState(const char* when) +{ + dumpState(module, when); +} + +void State::dumpState(LModule module, const char* when) { dataLog("LLVM IR for ", CodeBlockWithJITType(graph.m_codeBlock, FTL::JITCode::FTLJIT), " ", when, ":\n"); dumpModule(module);