ee350c3149
Drop the deprecated CallConstructStub and remove the use of CallICStub from fullcodegen, since that feedback is unused completely every since Crankshaft got removed, thus we can safely unlink all the CallIC stuff from fullcodegen nowadays, and completely nuke the CallICStub and the CallICTrampolineStub now (we can also transitively nuke the unused CreateAllocationSiteStub and CreateWeakCellStub). Instead the CallIC logic is integrated into Ignition now, and part of the bytecode handlers for [[Call]] and [[Construct]]. There's still some follow-up cleanup with the way the Array constructor feedback is integrated, but that's way easier now. Bug: v8:5517, v8:6399, v8:6409, v8:6679 Change-Id: I0a6c6046faceca9b1606577bc9e63d9295e44619 Reviewed-on: https://chromium-review.googlesource.com/603609 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#47196}
118 lines
5.2 KiB
C++
118 lines
5.2 KiB
C++
// Copyright 2012 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef V8_CODE_FACTORY_H_
|
|
#define V8_CODE_FACTORY_H_
|
|
|
|
#include "src/allocation.h"
|
|
#include "src/assembler.h"
|
|
#include "src/callable.h"
|
|
#include "src/codegen.h"
|
|
#include "src/globals.h"
|
|
#include "src/interface-descriptors.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
class V8_EXPORT_PRIVATE CodeFactory final {
|
|
public:
|
|
// CEntryStub has var-args semantics (all the arguments are passed on the
|
|
// stack and the arguments count is passed via register) which currently
|
|
// can't be expressed in CallInterfaceDescriptor. Therefore only the code
|
|
// is exported here.
|
|
static Handle<Code> RuntimeCEntry(Isolate* isolate, int result_size = 1);
|
|
|
|
// Initial states for ICs.
|
|
static Callable LoadICProtoArray(Isolate* isolate, bool throw_if_nonexistent);
|
|
static Callable LoadGlobalIC(Isolate* isolate, TypeofMode typeof_mode);
|
|
static Callable LoadGlobalICInOptimizedCode(Isolate* isolate,
|
|
TypeofMode typeof_mode);
|
|
static Callable StoreGlobalIC(Isolate* isolate, LanguageMode mode);
|
|
static Callable StoreGlobalICInOptimizedCode(Isolate* isolate,
|
|
LanguageMode mode);
|
|
static Callable StoreIC(Isolate* isolate, LanguageMode mode);
|
|
static Callable StoreICInOptimizedCode(Isolate* isolate, LanguageMode mode);
|
|
static Callable StoreIC_Uninitialized(Isolate* isolate, LanguageMode mode);
|
|
static Callable StoreOwnIC(Isolate* isolate);
|
|
static Callable StoreOwnICInOptimizedCode(Isolate* isolate);
|
|
static Callable KeyedStoreIC(Isolate* isolate, LanguageMode mode);
|
|
static Callable KeyedStoreICInOptimizedCode(Isolate* isolate,
|
|
LanguageMode mode);
|
|
static Callable KeyedStoreIC_Megamorphic(Isolate* isolate, LanguageMode mode);
|
|
|
|
static Callable ResumeGenerator(Isolate* isolate);
|
|
|
|
static Callable FrameDropperTrampoline(Isolate* isolate);
|
|
static Callable HandleDebuggerStatement(Isolate* isolate);
|
|
|
|
static Callable CompareIC(Isolate* isolate, Token::Value op);
|
|
static Callable CompareNilIC(Isolate* isolate, NilValue nil_value);
|
|
|
|
static Callable BinaryOperation(Isolate* isolate, Token::Value op);
|
|
|
|
static Callable ApiGetter(Isolate* isolate);
|
|
|
|
// Code stubs. Add methods here as needed to reduce dependency on
|
|
// code-stubs.h.
|
|
static Callable GetProperty(Isolate* isolate);
|
|
|
|
static Callable NonPrimitiveToPrimitive(
|
|
Isolate* isolate, ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
|
|
static Callable OrdinaryToPrimitive(Isolate* isolate,
|
|
OrdinaryToPrimitiveHint hint);
|
|
static Callable NumberToString(Isolate* isolate);
|
|
|
|
static Callable StringAdd(Isolate* isolate,
|
|
StringAddFlags flags = STRING_ADD_CHECK_NONE,
|
|
PretenureFlag pretenure_flag = NOT_TENURED);
|
|
static Callable StringCompare(Isolate* isolate, Token::Value token);
|
|
static Callable SubString(Isolate* isolate);
|
|
|
|
static Callable FastCloneShallowArray(Isolate* isolate,
|
|
AllocationSiteMode allocation_mode);
|
|
|
|
static Callable FastNewFunctionContext(Isolate* isolate,
|
|
ScopeType scope_type);
|
|
|
|
static Callable AllocateHeapNumber(Isolate* isolate);
|
|
|
|
static Callable ArgumentAdaptor(Isolate* isolate);
|
|
static Callable Call(Isolate* isolate,
|
|
ConvertReceiverMode mode = ConvertReceiverMode::kAny);
|
|
static Callable CallWithArrayLike(Isolate* isolate);
|
|
static Callable CallWithSpread(Isolate* isolate);
|
|
static Callable CallFunction(
|
|
Isolate* isolate, ConvertReceiverMode mode = ConvertReceiverMode::kAny);
|
|
static Callable CallVarargs(Isolate* isolate);
|
|
static Callable CallForwardVarargs(Isolate* isolate);
|
|
static Callable CallFunctionForwardVarargs(Isolate* isolate);
|
|
static Callable Construct(Isolate* isolate);
|
|
static Callable ConstructWithSpread(Isolate* isolate);
|
|
static Callable ConstructFunction(Isolate* isolate);
|
|
static Callable ConstructVarargs(Isolate* isolate);
|
|
static Callable ConstructForwardVarargs(Isolate* isolate);
|
|
static Callable ConstructFunctionForwardVarargs(Isolate* isolate);
|
|
|
|
static Callable InterpreterPushArgsThenCall(Isolate* isolate,
|
|
ConvertReceiverMode receiver_mode,
|
|
InterpreterPushArgsMode mode);
|
|
static Callable InterpreterPushArgsThenConstruct(
|
|
Isolate* isolate, InterpreterPushArgsMode mode);
|
|
static Callable InterpreterCEntry(Isolate* isolate, int result_size = 1);
|
|
static Callable InterpreterOnStackReplacement(Isolate* isolate);
|
|
|
|
static Callable ArrayConstructor(Isolate* isolate);
|
|
static Callable ArrayPop(Isolate* isolate);
|
|
static Callable ArrayPush(Isolate* isolate);
|
|
static Callable ArrayShift(Isolate* isolate);
|
|
static Callable FunctionPrototypeBind(Isolate* isolate);
|
|
static Callable TransitionElementsKind(Isolate* isolate, ElementsKind from,
|
|
ElementsKind to, bool is_jsarray);
|
|
};
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|
|
|
|
#endif // V8_CODE_FACTORY_H_
|