X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/6fe7ccc865dc7d7541b93c5bcaf6368d2c98a174..refs/heads/master:/dfg/DFGDriver.h diff --git a/dfg/DFGDriver.h b/dfg/DFGDriver.h index 639b13f..a456dc6 100644 --- a/dfg/DFGDriver.h +++ b/dfg/DFGDriver.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Apple Inc. All rights reserved. + * Copyright (C) 2011, 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,24 +26,27 @@ #ifndef DFGDriver_h #define DFGDriver_h -#include +#include "CallFrame.h" +#include "DFGCompilationMode.h" +#include "DFGPlan.h" namespace JSC { class CodeBlock; class JITCode; -class JSGlobalData; class MacroAssemblerCodePtr; +class VM; namespace DFG { -#if ENABLE(DFG_JIT) -bool tryCompile(JSGlobalData&, CodeBlock*, JITCode&); -bool tryCompileFunction(JSGlobalData&, CodeBlock*, JITCode&, MacroAssemblerCodePtr& jitCodeWithArityCheck); -#else -inline bool tryCompile(JSGlobalData&, CodeBlock*, JITCode&) { return false; } -inline bool tryCompileFunction(JSGlobalData&, CodeBlock*, JITCode&, MacroAssemblerCodePtr&) { return false; } -#endif +JS_EXPORT_PRIVATE unsigned getNumCompilations(); + +// If the worklist is non-null, we do a concurrent compile. Otherwise we do a synchronous +// compile. Even if we do a synchronous compile, we call the callback with the result. +CompilationResult compile( + VM&, CodeBlock*, CodeBlock* profiledDFGCodeBlock, CompilationMode, + unsigned osrEntryBytecodeIndex, const Operands& mustHandleValues, + PassRefPtr); } } // namespace JSC::DFG