source: webkit/trunk/Source/JavaScriptCore/jit/SnippetParams.h

Last change on this file was 218794, checked in by Konstantin Tokarev, 8 years ago

Remove excessive headers from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=173812

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • API/APIUtils.h:
  • assembler/LinkBuffer.cpp:
  • assembler/MacroAssemblerCodeRef.cpp:
  • b3/air/AirLiveness.h:
  • b3/air/AirLowerAfterRegAlloc.cpp:
  • bindings/ScriptValue.cpp:
  • bindings/ScriptValue.h:
  • bytecode/AccessCase.cpp:
  • bytecode/AccessCase.h:
  • bytecode/ArrayProfile.h:
  • bytecode/BytecodeDumper.h:
  • bytecode/BytecodeIntrinsicRegistry.cpp:
  • bytecode/BytecodeKills.h:
  • bytecode/BytecodeLivenessAnalysis.h:
  • bytecode/BytecodeUseDef.h:
  • bytecode/CallLinkStatus.h:
  • bytecode/CodeBlock.h:
  • bytecode/CodeOrigin.h:
  • bytecode/ComplexGetStatus.h:
  • bytecode/GetByIdStatus.h:
  • bytecode/GetByIdVariant.h:
  • bytecode/InlineCallFrame.h:
  • bytecode/InlineCallFrameSet.h:
  • bytecode/Instruction.h:
  • bytecode/InternalFunctionAllocationProfile.h:
  • bytecode/JumpTable.h:
  • bytecode/MethodOfGettingAValueProfile.h:
  • bytecode/ObjectPropertyConditionSet.h:
  • bytecode/Operands.h:
  • bytecode/PolymorphicAccess.h:
  • bytecode/PutByIdStatus.h:
  • bytecode/SpeculatedType.cpp:
  • bytecode/StructureSet.h:
  • bytecode/StructureStubInfo.h:
  • bytecode/UnlinkedCodeBlock.h:
  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecode/ValueProfile.h:
  • bytecompiler/BytecodeGenerator.cpp:
  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/Label.h:
  • bytecompiler/StaticPropertyAnalysis.h:
  • debugger/DebuggerCallFrame.cpp:
  • dfg/DFGAbstractInterpreter.h:
  • dfg/DFGAdjacencyList.h:
  • dfg/DFGArgumentsUtilities.h:
  • dfg/DFGArrayMode.h:
  • dfg/DFGArrayifySlowPathGenerator.h:
  • dfg/DFGBackwardsPropagationPhase.h:
  • dfg/DFGBasicBlock.h:
  • dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
  • dfg/DFGCallCreateDirectArgumentsSlowPathGenerator.h:
  • dfg/DFGCapabilities.h:
  • dfg/DFGCommon.h:
  • dfg/DFGCommonData.h:
  • dfg/DFGDesiredIdentifiers.h:
  • dfg/DFGDesiredWatchpoints.h:
  • dfg/DFGDisassembler.cpp:
  • dfg/DFGDominators.h:
  • dfg/DFGDriver.cpp:
  • dfg/DFGDriver.h:
  • dfg/DFGEdgeDominates.h:
  • dfg/DFGFinalizer.h:
  • dfg/DFGGenerationInfo.h:
  • dfg/DFGJITCompiler.cpp:
  • dfg/DFGJITCompiler.h:
  • dfg/DFGJITFinalizer.h:
  • dfg/DFGLivenessAnalysisPhase.h:
  • dfg/DFGMinifiedNode.h:
  • dfg/DFGMultiGetByOffsetData.h:
  • dfg/DFGNaturalLoops.cpp:
  • dfg/DFGNaturalLoops.h:
  • dfg/DFGNode.h:
  • dfg/DFGOSRAvailabilityAnalysisPhase.h:
  • dfg/DFGOSRExit.h:
  • dfg/DFGOSRExitCompilationInfo.h:
  • dfg/DFGOSRExitCompiler.cpp:
  • dfg/DFGOSRExitCompiler.h:
  • dfg/DFGOSRExitJumpPlaceholder.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPlan.h:
  • dfg/DFGPreciseLocalClobberize.h:
  • dfg/DFGPromotedHeapLocation.h:
  • dfg/DFGRegisteredStructure.h:
  • dfg/DFGRegisteredStructureSet.h:
  • dfg/DFGSaneStringGetByValSlowPathGenerator.h:
  • dfg/DFGSlowPathGenerator.h:
  • dfg/DFGSnippetParams.h:
  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGToFTLDeferredCompilationCallback.h:
  • dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h:
  • dfg/DFGValidate.h:
  • dfg/DFGValueSource.h:
  • dfg/DFGVariableEvent.h:
  • dfg/DFGVariableEventStream.h:
  • dfg/DFGWorklist.h:
  • domjit/DOMJITCallDOMGetterSnippet.h:
  • domjit/DOMJITEffect.h:
  • ftl/FTLLink.cpp:
  • ftl/FTLLowerDFGToB3.cpp:
  • ftl/FTLPatchpointExceptionHandle.h:
  • heap/AllocatorAttributes.h:
  • heap/CodeBlockSet.h:
  • heap/DeferGC.h:
  • heap/GCSegmentedArray.h:
  • heap/Heap.cpp:
  • heap/Heap.h:
  • heap/IncrementalSweeper.h:
  • heap/ListableHandler.h:
  • heap/MachineStackMarker.h:
  • heap/MarkedAllocator.h:
  • heap/MarkedBlock.cpp:
  • heap/MarkedBlock.h:
  • heap/MarkingConstraint.h:
  • heap/SlotVisitor.cpp:
  • heap/SlotVisitor.h:
  • inspector/ConsoleMessage.cpp:
  • inspector/ConsoleMessage.h:
  • inspector/InjectedScript.h:
  • inspector/InjectedScriptHost.h:
  • inspector/InjectedScriptManager.cpp:
  • inspector/JSGlobalObjectInspectorController.cpp:
  • inspector/JavaScriptCallFrame.h:
  • inspector/ScriptCallStack.h:
  • inspector/ScriptCallStackFactory.cpp:
  • inspector/ScriptDebugServer.h:
  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:
  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorHeapAgent.cpp:
  • inspector/agents/InspectorHeapAgent.h:
  • inspector/agents/InspectorRuntimeAgent.h:
  • inspector/agents/InspectorScriptProfilerAgent.cpp:
  • inspector/agents/InspectorScriptProfilerAgent.h:
  • inspector/agents/JSGlobalObjectConsoleAgent.h:
  • inspector/agents/JSGlobalObjectDebuggerAgent.cpp:
  • inspector/agents/JSGlobalObjectDebuggerAgent.h:
  • inspector/agents/JSGlobalObjectRuntimeAgent.h:
  • inspector/augmentable/AlternateDispatchableAgent.h:
  • interpreter/CLoopStack.h:
  • interpreter/CachedCall.h:
  • interpreter/CallFrame.h:
  • interpreter/Interpreter.cpp:
  • interpreter/Interpreter.h:
  • jit/AssemblyHelpers.cpp:
  • jit/AssemblyHelpers.h:
  • jit/CCallHelpers.h:
  • jit/CallFrameShuffler.h:
  • jit/ExecutableAllocator.h:
  • jit/GCAwareJITStubRoutine.h:
  • jit/HostCallReturnValue.h:
  • jit/ICStats.h:
  • jit/JIT.cpp:
  • jit/JIT.h:
  • jit/JITAddGenerator.h:
  • jit/JITCall32_64.cpp:
  • jit/JITCode.h:
  • jit/JITDisassembler.cpp:
  • jit/JITExceptions.cpp:
  • jit/JITMathIC.h:
  • jit/JITOpcodes.cpp:
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITThunks.cpp:
  • jit/JITThunks.h:
  • jit/JSInterfaceJIT.h:
  • jit/PCToCodeOriginMap.h:
  • jit/PolymorphicCallStubRoutine.h:
  • jit/RegisterSet.h:
  • jit/Repatch.h:
  • jit/SetupVarargsFrame.h:
  • jit/Snippet.h:
  • jit/SnippetParams.h:
  • jit/ThunkGenerators.h:
  • jsc.cpp:
  • llint/LLIntCLoop.h:
  • llint/LLIntEntrypoint.h:
  • llint/LLIntExceptions.h:
  • llint/LLIntOfflineAsmConfig.h:
  • llint/LLIntSlowPaths.cpp:
  • parser/NodeConstructors.h:
  • parser/Nodes.cpp:
  • parser/Nodes.h:
  • parser/Parser.cpp:
  • parser/Parser.h:
  • parser/ParserTokens.h:
  • parser/SourceProviderCacheItem.h:
  • profiler/ProfilerBytecodeSequence.h:
  • profiler/ProfilerDatabase.cpp:
  • profiler/ProfilerDatabase.h:
  • profiler/ProfilerOrigin.h:
  • profiler/ProfilerOriginStack.h:
  • profiler/ProfilerProfiledBytecodes.h:
  • profiler/ProfilerUID.h:
  • runtime/AbstractModuleRecord.h:
  • runtime/ArrayConstructor.h:
  • runtime/ArrayConventions.h:
  • runtime/ArrayIteratorPrototype.h:
  • runtime/ArrayPrototype.h:
  • runtime/BasicBlockLocation.h:
  • runtime/Butterfly.h:
  • runtime/CallData.cpp:
  • runtime/CodeCache.h:
  • runtime/CommonSlowPaths.cpp:
  • runtime/CommonSlowPaths.h:
  • runtime/CommonSlowPathsExceptions.cpp:
  • runtime/Completion.cpp:
  • runtime/ControlFlowProfiler.h:
  • runtime/DateInstanceCache.h:
  • runtime/ErrorConstructor.h:
  • runtime/ErrorInstance.h:
  • runtime/ExceptionHelpers.cpp:
  • runtime/ExceptionHelpers.h:
  • runtime/ExecutableBase.h:
  • runtime/FunctionExecutable.h:
  • runtime/HasOwnPropertyCache.h:
  • runtime/Identifier.h:
  • runtime/InternalFunction.h:
  • runtime/IntlCollator.cpp:
  • runtime/IntlCollatorPrototype.h:
  • runtime/IntlDateTimeFormatPrototype.h:
  • runtime/IntlNumberFormat.cpp:
  • runtime/IntlNumberFormatPrototype.h:
  • runtime/IteratorOperations.cpp:
  • runtime/JSArray.h:
  • runtime/JSArrayBufferPrototype.h:
  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:
  • runtime/JSCell.h:
  • runtime/JSFunction.cpp:
  • runtime/JSFunction.h:
  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/JSGlobalObjectDebuggable.cpp:
  • runtime/JSGlobalObjectDebuggable.h:
  • runtime/JSGlobalObjectFunctions.cpp:
  • runtime/JSGlobalObjectFunctions.h:
  • runtime/JSJob.cpp:
  • runtime/JSLock.h:
  • runtime/JSModuleLoader.cpp:
  • runtime/JSModuleNamespaceObject.h:
  • runtime/JSModuleRecord.h:
  • runtime/JSObject.cpp:
  • runtime/JSObject.h:
  • runtime/JSRunLoopTimer.h:
  • runtime/JSTemplateRegistryKey.h:
  • runtime/JSTypedArrayPrototypes.cpp:
  • runtime/JSTypedArrayPrototypes.h:
  • runtime/JSTypedArrays.h:
  • runtime/LiteralParser.h:
  • runtime/MatchResult.h:
  • runtime/MemoryStatistics.h:
  • runtime/PrivateName.h:
  • runtime/PromiseDeferredTimer.h:
  • runtime/ProxyObject.h:
  • runtime/RegExp.h:
  • runtime/SamplingProfiler.cpp:
  • runtime/SmallStrings.h:
  • runtime/StringPrototype.cpp:
  • runtime/StringRecursionChecker.h:
  • runtime/Structure.h:
  • runtime/SymbolConstructor.h:
  • runtime/SymbolPrototype.cpp:
  • runtime/SymbolPrototype.h:
  • runtime/TypeProfiler.h:
  • runtime/TypeProfilerLog.h:
  • runtime/TypedArrayType.h:
  • runtime/VM.cpp:
  • runtime/VM.h:
  • runtime/VMEntryScope.h:
  • runtime/WeakMapData.h:
  • runtime/WriteBarrier.h:
  • tools/FunctionOverrides.cpp:
  • tools/FunctionOverrides.h:
  • wasm/WasmBinding.cpp:
  • wasm/js/JSWebAssemblyCodeBlock.h:
  • wasm/js/WebAssemblyPrototype.cpp:
  • yarr/Yarr.h:
  • yarr/YarrJIT.cpp:
  • yarr/YarrJIT.h:
  • yarr/YarrParser.h:

Source/WebCore:

No new tests needed.

  • Modules/indexeddb/IDBObjectStore.cpp:
  • bindings/js/JSDOMPromiseDeferred.h:
  • bindings/js/JSLazyEventListener.cpp:
  • bindings/js/JSMainThreadExecState.h:
  • bindings/js/ReadableStreamDefaultController.cpp:
  • bindings/js/ScriptGlobalObject.cpp:
  • bindings/js/SerializedScriptValue.cpp:
  • bridge/NP_jsobject.cpp:
  • dom/ScriptExecutionContext.cpp:
  • html/HTMLPlugInImageElement.cpp:

Source/WebKit/mac:

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:
  • WebView/WebView.mm:

Source/WebKit/win:

  • Plugins/PluginPackage.cpp:

Source/WebKit2:

  • WebProcess/Plugins/Netscape/NPJSObject.cpp:

Source/WTF:

  • wtf/Bag.h:
File size: 3.7 KB
Line 
1/*
2 * Copyright (C) 2016 Apple Inc. All rights reserved.
3 * Copyright (C) 2017 Yusuke Suzuki <[email protected]>.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#pragma once
28
29#if ENABLE(JIT)
30
31#include "CCallHelpers.h"
32#include "SnippetReg.h"
33#include "SnippetSlowPathCalls.h"
34
35namespace JSC {
36
37class SnippetParams {
38WTF_MAKE_NONCOPYABLE(SnippetParams);
39public:
40 virtual ~SnippetParams() { }
41
42 class Value {
43 public:
44 Value(SnippetReg reg)
45 : m_reg(reg)
46 {
47 }
48
49 Value(SnippetReg reg, JSValue value)
50 : m_reg(reg)
51 , m_value(value)
52 {
53 }
54
55 bool isGPR() const { return m_reg.isGPR(); }
56 bool isFPR() const { return m_reg.isFPR(); }
57 bool isJSValueRegs() const { return m_reg.isJSValueRegs(); }
58 GPRReg gpr() const { return m_reg.gpr(); }
59 FPRReg fpr() const { return m_reg.fpr(); }
60 JSValueRegs jsValueRegs() const { return m_reg.jsValueRegs(); }
61
62 SnippetReg reg() const
63 {
64 return m_reg;
65 }
66
67 JSValue value() const
68 {
69 return m_value;
70 }
71
72 private:
73 SnippetReg m_reg;
74 JSValue m_value;
75 };
76
77 unsigned size() const { return m_regs.size(); }
78 const Value& at(unsigned index) const { return m_regs[index]; }
79 const Value& operator[](unsigned index) const { return at(index); }
80
81 GPRReg gpScratch(unsigned index) const { return m_gpScratch[index]; }
82 FPRReg fpScratch(unsigned index) const { return m_fpScratch[index]; }
83
84 SnippetParams(VM& vm, Vector<Value>&& regs, Vector<GPRReg>&& gpScratch, Vector<FPRReg>&& fpScratch)
85 : m_vm(vm)
86 , m_regs(WTFMove(regs))
87 , m_gpScratch(WTFMove(gpScratch))
88 , m_fpScratch(WTFMove(fpScratch))
89 {
90 }
91
92 VM& vm() { return m_vm; }
93
94 template<typename FunctionType, typename ResultType, typename... Arguments>
95 void addSlowPathCall(CCallHelpers::JumpList from, CCallHelpers& jit, FunctionType function, ResultType result, Arguments... arguments)
96 {
97 addSlowPathCallImpl(from, jit, function, result, std::make_tuple(arguments...));
98 }
99
100private:
101#define JSC_DEFINE_CALL_OPERATIONS(OperationType, ResultType, ...) JS_EXPORT_PRIVATE virtual void addSlowPathCallImpl(CCallHelpers::JumpList, CCallHelpers&, OperationType, ResultType, std::tuple<__VA_ARGS__> args) = 0;
102 SNIPPET_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
103#undef JSC_DEFINE_CALL_OPERATIONS
104
105 VM& m_vm;
106 Vector<Value> m_regs;
107 Vector<GPRReg> m_gpScratch;
108 Vector<FPRReg> m_fpScratch;
109};
110
111}
112
113#endif
Note: See TracBrowser for help on using the repository browser.