mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 08:03:29 +00:00
!3323 Explicit only works on single-argument constructor
Merge pull request !3323 from guobingbing3/optimize
This commit is contained in:
commit
27e070fda9
@ -81,7 +81,7 @@ struct ModuleSectionDes {
|
||||
arkStackMapRawPtr_ = ptr;
|
||||
}
|
||||
|
||||
uint8_t* GetArkStackMapRawPtr()
|
||||
uint8_t* GetArkStackMapRawPtr() const
|
||||
{
|
||||
return arkStackMapRawPtr_;
|
||||
}
|
||||
@ -145,7 +145,7 @@ struct ModuleSectionDes {
|
||||
return it == sectionsInfo_.end() ? 0 : it->second.second;
|
||||
}
|
||||
|
||||
uint32_t GetSecInfosSize()
|
||||
uint32_t GetSecInfosSize() const
|
||||
{
|
||||
return sectionsInfo_.size();
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ template<typename T>
|
||||
class JsonParser {
|
||||
public:
|
||||
using Text = const T *;
|
||||
explicit JsonParser() = default;
|
||||
JsonParser() = default;
|
||||
explicit JsonParser(JSThread *thread) : thread_(thread) {}
|
||||
~JsonParser() = default;
|
||||
NO_COPY_SEMANTIC(JsonParser);
|
||||
|
@ -25,7 +25,7 @@
|
||||
namespace panda::ecmascript::base {
|
||||
class JsonStringifier {
|
||||
public:
|
||||
explicit JsonStringifier() = default;
|
||||
JsonStringifier() = default;
|
||||
|
||||
explicit JsonStringifier(JSThread *thread) : thread_(thread) {}
|
||||
|
||||
|
@ -35,7 +35,7 @@ enum FunctionLength : uint8_t { ZERO = 0, ONE, TWO, THREE, FOUR };
|
||||
|
||||
class Builtins {
|
||||
public:
|
||||
explicit Builtins() = default;
|
||||
Builtins() = default;
|
||||
~Builtins() = default;
|
||||
NO_COPY_SEMANTIC(Builtins);
|
||||
NO_MOVE_SEMANTIC(Builtins);
|
||||
|
@ -43,7 +43,7 @@ JSTaggedValue BuiltinsProxy::ProxyConstructor(EcmaRuntimeCallInfo *argv)
|
||||
}
|
||||
|
||||
// 26.2.2.1 Proxy.revocable ( target, handler )
|
||||
JSTaggedValue BuiltinsProxy::Revocable([[maybe_unused]] EcmaRuntimeCallInfo *argv)
|
||||
JSTaggedValue BuiltinsProxy::Revocable(EcmaRuntimeCallInfo *argv)
|
||||
{
|
||||
ASSERT(argv);
|
||||
BUILTINS_API_TRACE(argv->GetThread(), Proxy, Revocable);
|
||||
|
@ -178,7 +178,7 @@ JSTaggedValue BuiltinsSet::Has(EcmaRuntimeCallInfo *argv)
|
||||
return GetTaggedBoolean(flag);
|
||||
}
|
||||
|
||||
JSTaggedValue BuiltinsSet::ForEach([[maybe_unused]] EcmaRuntimeCallInfo *argv)
|
||||
JSTaggedValue BuiltinsSet::ForEach(EcmaRuntimeCallInfo *argv)
|
||||
{
|
||||
JSThread *thread = argv->GetThread();
|
||||
BUILTINS_API_TRACE(thread, Set, ForEach);
|
||||
@ -232,7 +232,7 @@ JSTaggedValue BuiltinsSet::ForEach([[maybe_unused]] EcmaRuntimeCallInfo *argv)
|
||||
return JSTaggedValue::Undefined();
|
||||
}
|
||||
|
||||
JSTaggedValue BuiltinsSet::Species([[maybe_unused]] EcmaRuntimeCallInfo *argv)
|
||||
JSTaggedValue BuiltinsSet::Species(EcmaRuntimeCallInfo *argv)
|
||||
{
|
||||
return GetThis(argv).GetTaggedValue();
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class ExtendedAssembler : public AssemblerAarch64 {
|
||||
public:
|
||||
static constexpr int FRAME_SLOT_SIZE = 8;
|
||||
static constexpr int PAIR_SLOT_SIZE = 16;
|
||||
explicit ExtendedAssembler(Chunk *chunk, AssemblerModule *module)
|
||||
ExtendedAssembler(Chunk *chunk, AssemblerModule *module)
|
||||
: AssemblerAarch64(chunk), module_(module)
|
||||
{
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ namespace panda::ecmascript::x64 {
|
||||
class ExtendedAssembler : public AssemblerX64 {
|
||||
public:
|
||||
static constexpr int FRAME_SLOT_SIZE = 8;
|
||||
explicit ExtendedAssembler(Chunk *chunk, kungfu::AssemblerModule *module)
|
||||
ExtendedAssembler(Chunk *chunk, kungfu::AssemblerModule *module)
|
||||
: AssemblerX64(chunk), module_(module)
|
||||
{
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public:
|
||||
#define DECLARE_BUILTINS_STUB_CLASS(name) \
|
||||
class name##StubBuilder : public BuiltinsStubBuilder { \
|
||||
public: \
|
||||
explicit name##StubBuilder(CallSignature *callSignature, Environment *env) \
|
||||
name##StubBuilder(CallSignature *callSignature, Environment *env) \
|
||||
: BuiltinsStubBuilder(callSignature, env) {} \
|
||||
~name##StubBuilder() = default; \
|
||||
NO_MOVE_SEMANTIC(name##StubBuilder); \
|
||||
|
@ -253,17 +253,17 @@ using BytecodeGraph = std::vector<BytecodeRegion>;
|
||||
|
||||
class BytecodeCircuitBuilder {
|
||||
public:
|
||||
explicit BytecodeCircuitBuilder(const JSPandaFile *jsPandaFile,
|
||||
const MethodLiteral *methodLiteral,
|
||||
const MethodPcInfo &methodPCInfo,
|
||||
TSManager *tsManager,
|
||||
Circuit *circuit,
|
||||
Bytecodes *bytecodes,
|
||||
bool hasTypes,
|
||||
bool enableLog,
|
||||
bool enableTypeLowering,
|
||||
std::string name,
|
||||
const CString &recordName)
|
||||
BytecodeCircuitBuilder(const JSPandaFile *jsPandaFile,
|
||||
const MethodLiteral *methodLiteral,
|
||||
const MethodPcInfo &methodPCInfo,
|
||||
TSManager *tsManager,
|
||||
Circuit *circuit,
|
||||
Bytecodes *bytecodes,
|
||||
bool hasTypes,
|
||||
bool enableLog,
|
||||
bool enableTypeLowering,
|
||||
std::string name,
|
||||
const CString &recordName)
|
||||
: tsManager_(tsManager), circuit_(circuit), file_(jsPandaFile), pf_(jsPandaFile->GetPandaFile()),
|
||||
method_(methodLiteral), gateAcc_(circuit), argAcc_(circuit, method_),
|
||||
typeRecorder_(jsPandaFile, method_, tsManager, recordName), hasTypes_(hasTypes),
|
||||
|
@ -112,9 +112,9 @@ struct MethodPcInfo {
|
||||
|
||||
class MethodInfo {
|
||||
public:
|
||||
explicit MethodInfo(uint32_t methodInfoIndex, uint32_t methodPcInfoIndex, uint32_t outMethodIdx,
|
||||
uint32_t outMethodOffset = MethodInfo::DEFAULT_OUTMETHOD_OFFSET, uint32_t num = 0,
|
||||
LexicalEnvStatus lexEnvStatus = LexicalEnvStatus::VIRTUAL_LEXENV)
|
||||
MethodInfo(uint32_t methodInfoIndex, uint32_t methodPcInfoIndex, uint32_t outMethodIdx,
|
||||
uint32_t outMethodOffset = MethodInfo::DEFAULT_OUTMETHOD_OFFSET, uint32_t num = 0,
|
||||
LexicalEnvStatus lexEnvStatus = LexicalEnvStatus::VIRTUAL_LEXENV)
|
||||
: methodInfoIndex_(methodInfoIndex), methodPcInfoIndex_(methodPcInfoIndex), outerMethodId_(outMethodIdx),
|
||||
outerMethodOffset_(outMethodOffset), numOfLexVars_(num), status_(lexEnvStatus)
|
||||
{
|
||||
@ -414,8 +414,8 @@ private:
|
||||
|
||||
class BytecodeInfoCollector {
|
||||
public:
|
||||
explicit BytecodeInfoCollector(EcmaVM *vm, JSPandaFile *jsPandaFile,
|
||||
size_t maxAotMethodSize, bool enableCollectLiteralInfo)
|
||||
BytecodeInfoCollector(EcmaVM *vm, JSPandaFile *jsPandaFile,
|
||||
size_t maxAotMethodSize, bool enableCollectLiteralInfo)
|
||||
: vm_(vm), jsPandaFile_(jsPandaFile), bytecodeInfo_(maxAotMethodSize),
|
||||
enableCollectLiteralInfo_(enableCollectLiteralInfo)
|
||||
{
|
||||
|
@ -334,7 +334,7 @@ private:
|
||||
|
||||
class ConstDataId {
|
||||
public:
|
||||
explicit ConstDataId(ConstDataIDType type, uint16_t id)
|
||||
ConstDataId(ConstDataIDType type, uint16_t id)
|
||||
:type_(type), id_(id)
|
||||
{
|
||||
}
|
||||
@ -521,7 +521,7 @@ private:
|
||||
class BytecodeIterator {
|
||||
public:
|
||||
BytecodeIterator() = default;
|
||||
explicit BytecodeIterator(BytecodeCircuitBuilder *builder,
|
||||
BytecodeIterator(BytecodeCircuitBuilder *builder,
|
||||
uint32_t start, uint32_t end)
|
||||
: builder_(builder), start_(start), end_(end) {}
|
||||
void Reset(BytecodeCircuitBuilder *builder,
|
||||
|
@ -67,8 +67,8 @@ public:
|
||||
using TailCallBit = VariadicArgsBit::NextField<bool, 1>;
|
||||
using GCLeafFunctionBit = TailCallBit::NextField<bool, 1>;
|
||||
|
||||
explicit CallSignature(std::string name, int flags, size_t paramCounter, ArgumentsOrder order,
|
||||
VariableType returnType)
|
||||
CallSignature(std::string name, int flags, size_t paramCounter, ArgumentsOrder order,
|
||||
VariableType returnType)
|
||||
: name_(name), paramCounter_(paramCounter), order_(order), returnType_(returnType)
|
||||
{
|
||||
SetTargetKind(TargetKind::COMMON_STUB);
|
||||
|
@ -214,7 +214,7 @@ private:
|
||||
class CircuitBuilder {
|
||||
public:
|
||||
explicit CircuitBuilder(Circuit *circuit) : circuit_(circuit), acc_(circuit) {}
|
||||
explicit CircuitBuilder(Circuit *circuit, CompilationConfig *cmpCfg)
|
||||
CircuitBuilder(Circuit *circuit, CompilationConfig *cmpCfg)
|
||||
: circuit_(circuit), acc_(circuit), cmpCfg_(cmpCfg)
|
||||
{
|
||||
}
|
||||
@ -520,7 +520,7 @@ private:
|
||||
|
||||
class Label {
|
||||
public:
|
||||
explicit Label() = default;
|
||||
Label() = default;
|
||||
explicit Label(Environment *env);
|
||||
explicit Label(CircuitBuilder *cirBuilder);
|
||||
~Label() = default;
|
||||
|
@ -31,7 +31,7 @@ enum class LatticeStatus {
|
||||
|
||||
class ValueLattice {
|
||||
public:
|
||||
explicit ValueLattice();
|
||||
ValueLattice();
|
||||
explicit ValueLattice(LatticeStatus status);
|
||||
explicit ValueLattice(uint64_t value);
|
||||
~ValueLattice() = default;
|
||||
@ -57,7 +57,7 @@ private:
|
||||
|
||||
class ReachabilityLattice {
|
||||
public:
|
||||
explicit ReachabilityLattice();
|
||||
ReachabilityLattice();
|
||||
explicit ReachabilityLattice(bool reachable);
|
||||
~ReachabilityLattice() = default;
|
||||
[[nodiscard]] bool IsReachable() const;
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
|
||||
class CodeGenerator {
|
||||
public:
|
||||
explicit CodeGenerator(std::unique_ptr<CodeGeneratorImpl> &impl, const std::string& methodName)
|
||||
CodeGenerator(std::unique_ptr<CodeGeneratorImpl> &impl, const std::string& methodName)
|
||||
: impl_(std::move(impl)), methodName_(methodName)
|
||||
{
|
||||
}
|
||||
|
@ -21,8 +21,8 @@
|
||||
namespace panda::ecmascript::kungfu {
|
||||
class CompilationDriver {
|
||||
public:
|
||||
explicit CompilationDriver(JSPandaFile *jsPandaFile, PGOProfilerLoader &profilerLoader,
|
||||
BCInfo &bytecodeInfo)
|
||||
CompilationDriver(JSPandaFile *jsPandaFile, PGOProfilerLoader &profilerLoader,
|
||||
BCInfo &bytecodeInfo)
|
||||
: jsPandaFile_(jsPandaFile), pfLoader_(profilerLoader), bytecodeInfo_(bytecodeInfo)
|
||||
{
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class GateAccessor {
|
||||
public:
|
||||
// do not create new gate or modify self during iteration
|
||||
struct ConstUseIterator {
|
||||
explicit ConstUseIterator(const Circuit* circuit, const Out* out) : circuit_(circuit), out_(out)
|
||||
ConstUseIterator(const Circuit* circuit, const Out* out) : circuit_(circuit), out_(out)
|
||||
{
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ public:
|
||||
|
||||
// do not create new gate or modify self during iteration
|
||||
struct UseIterator {
|
||||
explicit UseIterator(Circuit* circuit, Out* out) : circuit_(circuit), out_(out)
|
||||
UseIterator(Circuit* circuit, Out* out) : circuit_(circuit), out_(out)
|
||||
{
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ public:
|
||||
};
|
||||
|
||||
struct ConstInsIterator {
|
||||
explicit ConstInsIterator(const Circuit* circuit, const In* in) : circuit_(circuit), in_(in)
|
||||
ConstInsIterator(const Circuit* circuit, const In* in) : circuit_(circuit), in_(in)
|
||||
{
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ public:
|
||||
};
|
||||
|
||||
struct InsIterator {
|
||||
explicit InsIterator(const Circuit* circuit, In* in) : circuit_(circuit), in_(in)
|
||||
InsIterator(const Circuit* circuit, In* in) : circuit_(circuit), in_(in)
|
||||
{
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ private:
|
||||
class ConstGateAccessor {
|
||||
public:
|
||||
struct ConstInsIterator {
|
||||
explicit ConstInsIterator(const Circuit* circuit, const In* in) : circuit_(circuit), in_(in)
|
||||
ConstInsIterator(const Circuit* circuit, const In* in) : circuit_(circuit), in_(in)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -272,7 +272,7 @@ public:
|
||||
RESTORE_REGISTERS_OP,
|
||||
};
|
||||
GateMetaData() = default;
|
||||
explicit GateMetaData(OpCode opcode, bool hasRoot,
|
||||
GateMetaData(OpCode opcode, bool hasRoot,
|
||||
uint32_t statesIn, uint16_t dependsIn, uint32_t valuesIn)
|
||||
: opcode_(opcode), bitField_(HasRootBit::Encode(hasRoot)),
|
||||
statesIn_(statesIn), dependsIn_(dependsIn), valuesIn_(valuesIn) {}
|
||||
@ -408,7 +408,7 @@ inline std::ostream& operator<<(std::ostream& os, OpCode opcode)
|
||||
|
||||
class JSBytecodeMegaData : public GateMetaData {
|
||||
public:
|
||||
explicit JSBytecodeMegaData(size_t valuesIn, EcmaOpcode opcode, uint32_t bcIndex)
|
||||
JSBytecodeMegaData(size_t valuesIn, EcmaOpcode opcode, uint32_t bcIndex)
|
||||
: GateMetaData(OpCode::JS_BYTECODE, false, 1, 1, valuesIn),
|
||||
opcode_(opcode), bcIndex_(bcIndex)
|
||||
{
|
||||
@ -437,7 +437,7 @@ private:
|
||||
|
||||
class OneParameterMetaData : public GateMetaData {
|
||||
public:
|
||||
explicit OneParameterMetaData(OpCode opcode, bool hasRoot, uint32_t statesIn,
|
||||
OneParameterMetaData(OpCode opcode, bool hasRoot, uint32_t statesIn,
|
||||
uint16_t dependsIn, uint32_t valuesIn, uint64_t value)
|
||||
: GateMetaData(opcode, hasRoot, statesIn, dependsIn, valuesIn), value_(value)
|
||||
{
|
||||
@ -461,7 +461,7 @@ private:
|
||||
|
||||
class SaveRegsMetaData : public GateMetaData {
|
||||
public:
|
||||
explicit SaveRegsMetaData(OpCode opcode, bool hasRoot, uint32_t statesIn, uint16_t dependsIn, uint32_t valuesIn,
|
||||
SaveRegsMetaData(OpCode opcode, bool hasRoot, uint32_t statesIn, uint16_t dependsIn, uint32_t valuesIn,
|
||||
uint64_t value) : GateMetaData(opcode, hasRoot, statesIn, dependsIn, valuesIn), numValue_(value)
|
||||
{
|
||||
SetKind(GateMetaData::SAVE_REGISTERS_OP);
|
||||
@ -483,7 +483,7 @@ private:
|
||||
|
||||
class RestoreRegsMetaData : public GateMetaData {
|
||||
public:
|
||||
explicit RestoreRegsMetaData() : GateMetaData(OpCode::RESTORE_REGISTER, false, 0, 1, 0)
|
||||
RestoreRegsMetaData() : GateMetaData(OpCode::RESTORE_REGISTER, false, 0, 1, 0)
|
||||
{
|
||||
SetKind(GateMetaData::RESTORE_REGISTERS_OP);
|
||||
}
|
||||
@ -510,7 +510,7 @@ private:
|
||||
|
||||
class TypedBinaryMegaData : public OneParameterMetaData {
|
||||
public:
|
||||
explicit TypedBinaryMegaData(uint64_t value, TypedBinOp binOp)
|
||||
TypedBinaryMegaData(uint64_t value, TypedBinOp binOp)
|
||||
: OneParameterMetaData(OpCode::TYPED_BINARY_OP, false, 1, 1, 2, value), // 2: valuesIn
|
||||
binOp_(binOp)
|
||||
{
|
||||
@ -533,7 +533,7 @@ private:
|
||||
|
||||
class StringMetaData : public GateMetaData {
|
||||
public:
|
||||
explicit StringMetaData(OpCode opcode, bool hasRoot, uint32_t statesIn,
|
||||
StringMetaData(OpCode opcode, bool hasRoot, uint32_t statesIn,
|
||||
uint16_t dependsIn, uint32_t valuesIn, const std::string &str)
|
||||
: GateMetaData(opcode, hasRoot, statesIn, dependsIn, valuesIn), str_(str)
|
||||
{
|
||||
|
@ -155,7 +155,7 @@ private:
|
||||
|
||||
class InterpreterToolsStubBuilder : private InterpreterStubBuilder {
|
||||
public:
|
||||
explicit InterpreterToolsStubBuilder(CallSignature *callSignature, Environment *env)
|
||||
InterpreterToolsStubBuilder(CallSignature *callSignature, Environment *env)
|
||||
: InterpreterStubBuilder(callSignature, env) {}
|
||||
~InterpreterToolsStubBuilder() override = default;
|
||||
NO_MOVE_SEMANTIC(InterpreterToolsStubBuilder);
|
||||
|
@ -258,7 +258,7 @@ private:
|
||||
|
||||
class LLVMIRGeneratorImpl : public CodeGeneratorImpl {
|
||||
public:
|
||||
explicit LLVMIRGeneratorImpl(LLVMModule *module, bool enableLog)
|
||||
LLVMIRGeneratorImpl(LLVMModule *module, bool enableLog)
|
||||
: module_(module), enableLog_(enableLog) {}
|
||||
~LLVMIRGeneratorImpl() override = default;
|
||||
void GenerateCodeForStub(Circuit *circuit, const ControlFlowGraph &graph, size_t index,
|
||||
|
@ -240,9 +240,9 @@ private:
|
||||
using StubIdType = std::variant<RuntimeStubCSigns::ID, CommonStubCSigns::ID, LLVMValueRef>;
|
||||
class LLVMIRBuilder {
|
||||
public:
|
||||
explicit LLVMIRBuilder(const std::vector<std::vector<GateRef>> *schedule, Circuit *circuit,
|
||||
LLVMModule *module, LLVMValueRef function, const CompilationConfig *cfg,
|
||||
CallSignature::CallConv callConv, bool enableLog = false);
|
||||
LLVMIRBuilder(const std::vector<std::vector<GateRef>> *schedule, Circuit *circuit,
|
||||
LLVMModule *module, LLVMValueRef function, const CompilationConfig *cfg,
|
||||
CallSignature::CallConv callConv, bool enableLog = false);
|
||||
~LLVMIRBuilder();
|
||||
void Build();
|
||||
|
||||
|
@ -36,10 +36,10 @@ class PassInfo;
|
||||
|
||||
class PassData {
|
||||
public:
|
||||
explicit PassData(BytecodeCircuitBuilder *builder, Circuit *circuit, PassInfo *info, CompilerLog *log,
|
||||
std::string methodName, size_t methodInfoIndex = 0,
|
||||
bool hasTypes = false, const CString &recordName = "",
|
||||
MethodLiteral *methodLiteral = nullptr, uint32_t methodOffset = 0)
|
||||
PassData(BytecodeCircuitBuilder *builder, Circuit *circuit, PassInfo *info, CompilerLog *log,
|
||||
std::string methodName, size_t methodInfoIndex = 0,
|
||||
bool hasTypes = false, const CString &recordName = "",
|
||||
MethodLiteral *methodLiteral = nullptr, uint32_t methodOffset = 0)
|
||||
: builder_(builder), circuit_(circuit), info_(info), log_(log), methodName_(methodName),
|
||||
methodInfoIndex_(methodInfoIndex), hasTypes_(hasTypes), recordName_(recordName),
|
||||
methodLiteral_(methodLiteral), methodOffset_(methodOffset)
|
||||
|
@ -29,9 +29,9 @@ class BytecodeInfoCollector;
|
||||
|
||||
class PassInfo {
|
||||
public:
|
||||
explicit PassInfo(TSManager *tsManager, Bytecodes *bytecodes, LexEnvManager *lexEnvManager,
|
||||
CompilationConfig *cmpCfg, CompilerLog *log, const JSPandaFile *jsPandaFile,
|
||||
BytecodeInfoCollector* bcInfoCollector, LLVMModule *aotModule)
|
||||
PassInfo(TSManager *tsManager, Bytecodes *bytecodes, LexEnvManager *lexEnvManager,
|
||||
CompilationConfig *cmpCfg, CompilerLog *log, const JSPandaFile *jsPandaFile,
|
||||
BytecodeInfoCollector* bcInfoCollector, LLVMModule *aotModule)
|
||||
: tsManager_(tsManager), bytecodes_(bytecodes), lexEnvManager_(lexEnvManager), cmpCfg_(cmpCfg),
|
||||
log_(log), jsPandaFile_(jsPandaFile), bcInfoCollector_(bcInfoCollector), aotModule_(aotModule)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ namespace panda::ecmascript::kungfu {
|
||||
class StubBuilder;
|
||||
class Stub {
|
||||
public:
|
||||
explicit Stub(const CallSignature *callSignature, Circuit *circuit);
|
||||
Stub(const CallSignature *callSignature, Circuit *circuit);
|
||||
NO_MOVE_SEMANTIC(Stub);
|
||||
NO_COPY_SEMANTIC(Stub);
|
||||
|
||||
|
@ -71,7 +71,7 @@ class StubBuilder {
|
||||
public:
|
||||
explicit StubBuilder(StubBuilder *parent)
|
||||
: callSignature_(parent->GetCallSignature()), env_(parent->GetEnvironment()) {}
|
||||
explicit StubBuilder(CallSignature *callSignature, Environment *env)
|
||||
StubBuilder(CallSignature *callSignature, Environment *env)
|
||||
: callSignature_(callSignature), env_(env) {}
|
||||
explicit StubBuilder(Environment *env)
|
||||
: env_(env) {}
|
||||
|
@ -33,7 +33,7 @@
|
||||
namespace panda::ecmascript::kungfu {
|
||||
class StubPassData : public PassData {
|
||||
public:
|
||||
explicit StubPassData(Stub *stub, LLVMModule *module, CompilerLog *log)
|
||||
StubPassData(Stub *stub, LLVMModule *module, CompilerLog *log)
|
||||
: PassData(nullptr, nullptr, nullptr, log, "stubs"), module_(module), stub_(stub) {}
|
||||
~StubPassData() = default;
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace panda::ecmascript::kungfu {
|
||||
#define DECLARE_STUB_CLASS(name) \
|
||||
class name##StubBuilder : public StubBuilder { \
|
||||
public: \
|
||||
explicit name##StubBuilder(CallSignature *callSignature, Environment *env) \
|
||||
name##StubBuilder(CallSignature *callSignature, Environment *env) \
|
||||
: StubBuilder(callSignature, env) {} \
|
||||
~name##StubBuilder() = default; \
|
||||
NO_MOVE_SEMANTIC(name##StubBuilder); \
|
||||
|
@ -31,8 +31,8 @@ enum class TypedArgIdx : uint8_t {
|
||||
|
||||
class TypeRecorder {
|
||||
public:
|
||||
explicit TypeRecorder(const JSPandaFile *jsPandaFile, const MethodLiteral *methodLiteral,
|
||||
TSManager *tsManager, const CString &recordName);
|
||||
TypeRecorder(const JSPandaFile *jsPandaFile, const MethodLiteral *methodLiteral,
|
||||
TSManager *tsManager, const CString &recordName);
|
||||
~TypeRecorder() = default;
|
||||
|
||||
GateType GetType(const int32_t offset) const;
|
||||
|
@ -21,12 +21,12 @@
|
||||
namespace panda::ecmascript::kungfu {
|
||||
class VariableType {
|
||||
public:
|
||||
explicit VariableType()
|
||||
VariableType()
|
||||
: machineType_(MachineType::NOVALUE), gateType_(GateType::Empty())
|
||||
{
|
||||
}
|
||||
|
||||
explicit VariableType(MachineType machine_type, GateType gate_type)
|
||||
VariableType(MachineType machine_type, GateType gate_type)
|
||||
: machineType_(machine_type), gateType_(gate_type)
|
||||
{
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class JSPtLocation {
|
||||
public:
|
||||
using EntityId = panda_file::File::EntityId;
|
||||
|
||||
explicit JSPtLocation(const JSPandaFile *jsPandaFile, EntityId methodId, uint32_t bytecodeOffset,
|
||||
JSPtLocation(const JSPandaFile *jsPandaFile, EntityId methodId, uint32_t bytecodeOffset,
|
||||
const std::string &sourceFile = "") : jsPandaFile_(jsPandaFile), methodId_(methodId),
|
||||
bytecodeOffset_(bytecodeOffset), sourceFile_(sourceFile)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
namespace panda::ecmascript::tooling {
|
||||
class PtMethod {
|
||||
public:
|
||||
explicit PtMethod(const JSPandaFile *jsPandaFile, EntityId methodId, bool isNative)
|
||||
PtMethod(const JSPandaFile *jsPandaFile, EntityId methodId, bool isNative)
|
||||
: jsPandaFile_(jsPandaFile), methodId_(methodId), isNative_(isNative)
|
||||
{
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ struct FrameInfoTemp {
|
||||
|
||||
class SamplesRecord {
|
||||
public:
|
||||
explicit SamplesRecord();
|
||||
SamplesRecord();
|
||||
virtual ~SamplesRecord();
|
||||
|
||||
void AddSample(uint64_t sampleTimeStamp);
|
||||
|
@ -31,7 +31,7 @@ class SamplingProcessor : public Task {
|
||||
public:
|
||||
static uint64_t GetMicrosecondsTimeStamp();
|
||||
|
||||
explicit SamplingProcessor(int32_t id, SamplesRecord *generator, int interval);
|
||||
SamplingProcessor(int32_t id, SamplesRecord *generator, int interval);
|
||||
virtual ~SamplingProcessor();
|
||||
|
||||
bool Run(uint32_t threadIndex) override;
|
||||
|
@ -49,8 +49,8 @@ enum class EdgeType { CONTEXT, ELEMENT, PROPERTY, INTERNAL, HIDDEN, SHORTCUT, WE
|
||||
|
||||
class Node {
|
||||
public:
|
||||
explicit Node(uint64_t id, uint64_t index, const CString *name, NodeType type, size_t size, uint64_t traceId,
|
||||
Address address, bool isLive = true)
|
||||
Node(uint64_t id, uint64_t index, const CString *name, NodeType type, size_t size, uint64_t traceId,
|
||||
Address address, bool isLive = true)
|
||||
: id_(id),
|
||||
index_(index),
|
||||
name_(name),
|
||||
@ -144,7 +144,7 @@ private:
|
||||
|
||||
class Edge {
|
||||
public:
|
||||
explicit Edge(uint64_t id, EdgeType type, Node *from, Node *to, CString *name)
|
||||
Edge(uint64_t id, EdgeType type, Node *from, Node *to, CString *name)
|
||||
: id_(id), edgeType_(type), from_(from), to_(to), name_(name)
|
||||
{
|
||||
}
|
||||
@ -356,8 +356,8 @@ public:
|
||||
static constexpr int SEQ_STEP = 2;
|
||||
NO_MOVE_SEMANTIC(HeapSnapshot);
|
||||
NO_COPY_SEMANTIC(HeapSnapshot);
|
||||
explicit HeapSnapshot(const EcmaVM *vm, const bool isVmMode, const bool isPrivate, const bool trackAllocations,
|
||||
Chunk *chunk)
|
||||
HeapSnapshot(const EcmaVM *vm, const bool isVmMode, const bool isPrivate, const bool trackAllocations,
|
||||
Chunk *chunk)
|
||||
: stringTable_(vm), vm_(vm), isVmMode_(isVmMode), isPrivate_(isPrivate), trackAllocations_(trackAllocations),
|
||||
chunk_(chunk)
|
||||
{
|
||||
@ -498,7 +498,7 @@ class EntryVisitor {
|
||||
public:
|
||||
NO_MOVE_SEMANTIC(EntryVisitor);
|
||||
NO_COPY_SEMANTIC(EntryVisitor);
|
||||
explicit EntryVisitor() = default;
|
||||
EntryVisitor() = default;
|
||||
~EntryVisitor() = default;
|
||||
static CString ConvertKey(JSTaggedValue key);
|
||||
};
|
||||
@ -523,7 +523,7 @@ enum class FrontType {
|
||||
|
||||
class NodeTypeConverter {
|
||||
public:
|
||||
explicit NodeTypeConverter() = default;
|
||||
NodeTypeConverter() = default;
|
||||
~NodeTypeConverter() = default;
|
||||
NO_MOVE_SEMANTIC(NodeTypeConverter);
|
||||
NO_COPY_SEMANTIC(NodeTypeConverter);
|
||||
|
@ -88,7 +88,7 @@ private:
|
||||
|
||||
class HeapSnapshotJSONSerializer {
|
||||
public:
|
||||
explicit HeapSnapshotJSONSerializer() = default;
|
||||
HeapSnapshotJSONSerializer() = default;
|
||||
~HeapSnapshotJSONSerializer() = default;
|
||||
NO_MOVE_SEMANTIC(HeapSnapshotJSONSerializer);
|
||||
NO_COPY_SEMANTIC(HeapSnapshotJSONSerializer);
|
||||
|
@ -30,7 +30,7 @@ class HeapSnapshot;
|
||||
|
||||
class HeapTrackerSample {
|
||||
public:
|
||||
explicit HeapTrackerSample(HeapSnapshot *snapshot, double timeInterval, Stream *stream)
|
||||
HeapTrackerSample(HeapSnapshot *snapshot, double timeInterval, Stream *stream)
|
||||
: timeInterval_(timeInterval), snapshot_(snapshot), stream_(stream)
|
||||
{
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
|
||||
class HProfTestHelper {
|
||||
public:
|
||||
explicit HProfTestHelper(const std::string &aFilePath, EcmaVM *vm)
|
||||
HProfTestHelper(const std::string &aFilePath, EcmaVM *vm)
|
||||
: instance(vm),
|
||||
filePath(aFilePath)
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
static const int32_t GLOBAL_BLOCK_SIZE = 256;
|
||||
using WeakClearCallback = void (*)(void *);
|
||||
|
||||
explicit EcmaGlobalStorage(JSThread *thread, NativeAreaAllocator *allocator)
|
||||
EcmaGlobalStorage(JSThread *thread, NativeAreaAllocator *allocator)
|
||||
: thread_(thread), allocator_(allocator)
|
||||
{
|
||||
topGlobalNodes_ = lastGlobalNodes_ = allocator_->New<NodeList<Node>>();
|
||||
@ -97,7 +97,7 @@ public:
|
||||
prev_ = node;
|
||||
}
|
||||
|
||||
int32_t GetIndex()
|
||||
int32_t GetIndex() const
|
||||
{
|
||||
return index_;
|
||||
}
|
||||
@ -246,7 +246,7 @@ public:
|
||||
template<typename T>
|
||||
class NodeList {
|
||||
public:
|
||||
explicit NodeList()
|
||||
NodeList()
|
||||
{
|
||||
bool isWeak = std::is_same<T, EcmaGlobalStorage::WeakNode>::value;
|
||||
for (int i = 0; i < GLOBAL_BLOCK_SIZE; i++) {
|
||||
|
@ -135,7 +135,7 @@ public:
|
||||
|
||||
static bool Destroy(EcmaVM *vm);
|
||||
|
||||
explicit EcmaVM(JSRuntimeOptions options, EcmaParamConfiguration config);
|
||||
EcmaVM(JSRuntimeOptions options, EcmaParamConfiguration config);
|
||||
|
||||
EcmaVM();
|
||||
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
inline void SetEntry(const JSThread *thread, int entry, const JSTaggedValue &key, const JSTaggedValue &value,
|
||||
const PropertyAttributes &detail);
|
||||
|
||||
inline void ClearEntry([[maybe_unused]] const JSThread *thread, int entry);
|
||||
inline void ClearEntry(const JSThread *thread, int entry);
|
||||
|
||||
inline void UpdateValueAndAttributes(const JSThread *thread, int entry, const JSTaggedValue &value,
|
||||
const PropertyAttributes &metaData);
|
||||
|
@ -444,13 +444,12 @@ enum class ConstantIndex : size_t {
|
||||
|
||||
class GlobalEnvConstants {
|
||||
public:
|
||||
explicit GlobalEnvConstants() = default;
|
||||
GlobalEnvConstants() = default;
|
||||
~GlobalEnvConstants() = default;
|
||||
|
||||
DEFAULT_MOVE_SEMANTIC(GlobalEnvConstants);
|
||||
DEFAULT_COPY_SEMANTIC(GlobalEnvConstants);
|
||||
|
||||
~GlobalEnvConstants() = default;
|
||||
|
||||
const JSTaggedValue *BeginSlot() const;
|
||||
|
||||
const JSTaggedValue *EndSlot() const;
|
||||
|
@ -35,7 +35,7 @@ class FrameHandler {
|
||||
public:
|
||||
explicit FrameHandler(const JSThread *thread);
|
||||
|
||||
explicit FrameHandler(const JSThread *thread, void *fp);
|
||||
FrameHandler(const JSThread *thread, void *fp);
|
||||
~FrameHandler() = default;
|
||||
|
||||
DEFAULT_COPY_SEMANTIC(FrameHandler);
|
||||
|
@ -30,7 +30,7 @@ using namespace OHOS::HiviewDFX;
|
||||
class PendingJob;
|
||||
class EnqueueJobScope {
|
||||
public:
|
||||
explicit EnqueueJobScope(const JSHandle<PendingJob> &pendingJob, job::QueueType queueType);
|
||||
EnqueueJobScope(const JSHandle<PendingJob> &pendingJob, job::QueueType queueType);
|
||||
|
||||
~EnqueueJobScope();
|
||||
};
|
||||
|
@ -75,17 +75,17 @@ class NameDictionary;
|
||||
template <typename T>
|
||||
class JSHandle {
|
||||
public:
|
||||
inline explicit JSHandle() : address_(reinterpret_cast<uintptr_t>(nullptr)) {}
|
||||
inline JSHandle() : address_(reinterpret_cast<uintptr_t>(nullptr)) {}
|
||||
~JSHandle() = default;
|
||||
DEFAULT_NOEXCEPT_MOVE_SEMANTIC(JSHandle);
|
||||
DEFAULT_COPY_SEMANTIC(JSHandle);
|
||||
|
||||
explicit JSHandle(const JSThread *thread, JSTaggedValue value)
|
||||
JSHandle(const JSThread *thread, JSTaggedValue value)
|
||||
{
|
||||
address_ = EcmaHandleScope::NewHandle(const_cast<JSThread *>(thread), value.GetRawData());
|
||||
}
|
||||
|
||||
explicit JSHandle(const JSThread *thread, const TaggedObject *value)
|
||||
JSHandle(const JSThread *thread, const TaggedObject *value)
|
||||
{
|
||||
address_ = EcmaHandleScope::NewHandle(const_cast<JSThread *>(thread), JSTaggedValue(value).GetRawData());
|
||||
}
|
||||
@ -189,18 +189,6 @@ inline JSTaggedValue *JSHandle<JSTaggedValue>::operator*() const
|
||||
return reinterpret_cast<JSTaggedValue *>(GetAddress());
|
||||
}
|
||||
|
||||
template <>
|
||||
inline JSTaggedNumber *JSHandle<JSTaggedNumber>::operator->() const
|
||||
{
|
||||
return reinterpret_cast<JSTaggedNumber *>(GetAddress());
|
||||
}
|
||||
|
||||
template <>
|
||||
inline JSTaggedNumber *JSHandle<JSTaggedNumber>::operator*() const
|
||||
{
|
||||
return reinterpret_cast<JSTaggedNumber *>(GetAddress());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
class JSMutableHandle : public JSHandle<T> {
|
||||
public:
|
||||
@ -209,10 +197,10 @@ public:
|
||||
DEFAULT_NOEXCEPT_MOVE_SEMANTIC(JSMutableHandle);
|
||||
DEFAULT_COPY_SEMANTIC(JSMutableHandle);
|
||||
|
||||
explicit JSMutableHandle(const JSThread *thread, JSTaggedValue value) : JSHandle<T>(thread, value) {}
|
||||
explicit JSMutableHandle(const JSThread *thread, const TaggedArray *value) : JSHandle<T>(thread, value) {}
|
||||
JSMutableHandle(const JSThread *thread, JSTaggedValue value) : JSHandle<T>(thread, value) {}
|
||||
JSMutableHandle(const JSThread *thread, const TaggedArray *value) : JSHandle<T>(thread, value) {}
|
||||
template <typename S>
|
||||
explicit JSMutableHandle(const JSThread *thread, const JSHandle<S> &handle)
|
||||
JSMutableHandle(const JSThread *thread, const JSHandle<S> &handle)
|
||||
: JSHandle<T>(thread, handle.GetTaggedValue())
|
||||
{
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ public:
|
||||
static JSHandle<JSHClass> TransitionProto(const JSThread *thread, const JSHandle<JSHClass> &jshclass,
|
||||
const JSHandle<JSTaggedValue> &proto);
|
||||
static JSHandle<JSHClass> TransProtoWithoutLayout(const JSThread *thread, const JSHandle<JSHClass> &jshclass,
|
||||
const JSHandle<JSTaggedValue> &proto);
|
||||
const JSHandle<JSTaggedValue> &proto);
|
||||
static void TransitionToDictionary(const JSThread *thread, const JSHandle<JSObject> &obj);
|
||||
|
||||
static JSHandle<JSTaggedValue> EnableProtoChangeMarker(const JSThread *thread, const JSHandle<JSHClass> &jshclass);
|
||||
@ -692,7 +692,7 @@ public:
|
||||
inline bool IsJsPrimitiveRef() const
|
||||
{
|
||||
return GetObjectType() == JSType::JS_PRIMITIVE_REF;
|
||||
};
|
||||
}
|
||||
|
||||
bool IsJSSet() const
|
||||
{
|
||||
|
@ -1162,7 +1162,6 @@ bool JSObject::PreventExtensions(JSThread *thread, const JSHandle<JSObject> &obj
|
||||
// 9.1.12 [[OwnPropertyKeys]] ( )
|
||||
JSHandle<TaggedArray> JSObject::GetOwnPropertyKeys(JSThread *thread, const JSHandle<JSObject> &obj)
|
||||
{
|
||||
[[maybe_unused]] uint32_t elementIndex = 0;
|
||||
uint32_t numOfElements = obj->GetNumberOfElements();
|
||||
uint32_t keyLen = numOfElements + obj->GetNumberOfKeys();
|
||||
|
||||
@ -1177,7 +1176,6 @@ JSHandle<TaggedArray> JSObject::GetOwnPropertyKeys(JSThread *thread, const JSHan
|
||||
|
||||
JSHandle<TaggedArray> JSObject::GetOwnEnumPropertyKeys(JSThread *thread, const JSHandle<JSObject> &obj)
|
||||
{
|
||||
[[maybe_unused]] uint32_t elementIndex = 0;
|
||||
uint32_t numOfElements = obj->GetNumberOfElements();
|
||||
uint32_t keyLen = numOfElements + obj->GetNumberOfKeys();
|
||||
|
||||
|
@ -48,7 +48,7 @@ enum PropertyKind { KEY = 0, VALUE, KEY_VALUE };
|
||||
// ecma6.0 6.2.4 The Property Descriptor Specification Type
|
||||
class PropertyDescriptor final {
|
||||
public:
|
||||
explicit PropertyDescriptor() = delete;
|
||||
PropertyDescriptor() = delete;
|
||||
|
||||
~PropertyDescriptor() = default;
|
||||
DEFAULT_NOEXCEPT_MOVE_SEMANTIC(PropertyDescriptor);
|
||||
@ -56,9 +56,9 @@ public:
|
||||
|
||||
explicit PropertyDescriptor(const JSThread *thread) : thread_(thread) {}
|
||||
|
||||
explicit PropertyDescriptor(const JSThread *thread, JSHandle<JSTaggedValue> v) : thread_(thread), value_(v) {}
|
||||
PropertyDescriptor(const JSThread *thread, JSHandle<JSTaggedValue> v) : thread_(thread), value_(v) {}
|
||||
|
||||
explicit PropertyDescriptor(const JSThread *thread, JSHandle<JSTaggedValue> v, bool w, bool e, bool c)
|
||||
PropertyDescriptor(const JSThread *thread, JSHandle<JSTaggedValue> v, bool w, bool e, bool c)
|
||||
: thread_(thread),
|
||||
writable_(w),
|
||||
enumerable_(e),
|
||||
@ -70,7 +70,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
explicit PropertyDescriptor(const JSThread *thread, bool w, bool e, bool c)
|
||||
PropertyDescriptor(const JSThread *thread, bool w, bool e, bool c)
|
||||
: PropertyDescriptor(thread, JSHandle<JSTaggedValue>(), w, e, c)
|
||||
{
|
||||
}
|
||||
@ -284,7 +284,7 @@ private:
|
||||
|
||||
class OperationResult {
|
||||
public:
|
||||
explicit OperationResult(const JSThread *thread, JSTaggedValue value, PropertyMetaData metaData)
|
||||
OperationResult(const JSThread *thread, JSTaggedValue value, PropertyMetaData metaData)
|
||||
: metaData_(metaData)
|
||||
{
|
||||
thread_ = thread;
|
||||
@ -317,7 +317,7 @@ public:
|
||||
private:
|
||||
const JSThread *thread_ {nullptr};
|
||||
JSHandle<JSTaggedValue> value_ {};
|
||||
PropertyMetaData metaData_{0U};
|
||||
PropertyMetaData metaData_ {0U};
|
||||
};
|
||||
|
||||
class ECMAObject : public TaggedObject {
|
||||
|
@ -111,7 +111,7 @@ enum CommandValues {
|
||||
|
||||
class PUBLIC_API JSRuntimeOptions {
|
||||
public:
|
||||
explicit JSRuntimeOptions() {}
|
||||
JSRuntimeOptions() {}
|
||||
~JSRuntimeOptions() = default;
|
||||
DEFAULT_COPY_SEMANTIC(JSRuntimeOptions);
|
||||
DEFAULT_MOVE_SEMANTIC(JSRuntimeOptions);
|
||||
|
@ -270,7 +270,7 @@ private:
|
||||
|
||||
class Deserializer {
|
||||
public:
|
||||
explicit Deserializer(JSThread *thread, SerializationData *data, void *hint)
|
||||
Deserializer(JSThread *thread, SerializationData *data, void *hint)
|
||||
: valueDeserializer_(thread, data->GetData(), data->GetSize(), hint) {}
|
||||
~Deserializer() = default;
|
||||
|
||||
|
@ -27,7 +27,7 @@ enum class FieldTag : uint8_t { OBJECTLITERAL = 0, ARRAYLITERAL };
|
||||
|
||||
class LiteralDataExtractor {
|
||||
public:
|
||||
explicit LiteralDataExtractor() = default;
|
||||
LiteralDataExtractor() = default;
|
||||
virtual ~LiteralDataExtractor() = default;
|
||||
|
||||
DEFAULT_NOEXCEPT_MOVE_SEMANTIC(LiteralDataExtractor);
|
||||
|
@ -25,7 +25,7 @@ using EntityId = panda_file::File::EntityId;
|
||||
|
||||
class ModuleDataExtractor {
|
||||
public:
|
||||
explicit ModuleDataExtractor() = default;
|
||||
ModuleDataExtractor() = default;
|
||||
virtual ~ModuleDataExtractor() = default;
|
||||
|
||||
DEFAULT_NOEXCEPT_MOVE_SEMANTIC(ModuleDataExtractor);
|
||||
|
@ -25,7 +25,7 @@ struct ScopeDebugInfo {
|
||||
|
||||
class ScopeInfoExtractor {
|
||||
public:
|
||||
explicit ScopeInfoExtractor() = default;
|
||||
ScopeInfoExtractor() = default;
|
||||
virtual ~ScopeInfoExtractor() = default;
|
||||
|
||||
DEFAULT_NOEXCEPT_MOVE_SEMANTIC(ScopeInfoExtractor);
|
||||
|
@ -25,7 +25,7 @@ using Clock = std::chrono::high_resolution_clock;
|
||||
using Duration = std::chrono::duration<uint64_t, std::nano>;
|
||||
|
||||
public:
|
||||
explicit ClockScope()
|
||||
ClockScope()
|
||||
{
|
||||
start_ = Clock::now();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ enum class EnableConcurrentMarkType : uint8_t {
|
||||
|
||||
class ConcurrentMarker {
|
||||
public:
|
||||
explicit ConcurrentMarker(Heap *heap, EnableConcurrentMarkType type);
|
||||
ConcurrentMarker(Heap *heap, EnableConcurrentMarkType type);
|
||||
~ConcurrentMarker() = default;
|
||||
|
||||
static bool TryIncreaseTaskCounts()
|
||||
@ -120,7 +120,7 @@ private:
|
||||
|
||||
class MarkerTask : public Task {
|
||||
public:
|
||||
explicit MarkerTask(int32_t id, Heap *heap) : Task(id), heap_(heap) {}
|
||||
MarkerTask(int32_t id, Heap *heap) : Task(id), heap_(heap) {}
|
||||
~MarkerTask() override = default;
|
||||
bool Run(uint32_t threadId) override;
|
||||
|
||||
|
@ -30,7 +30,7 @@ class GCStats {
|
||||
|
||||
public:
|
||||
explicit GCStats(const Heap *heap) : heap_(heap) {}
|
||||
explicit GCStats(const Heap *heap, size_t longPuaseTime) : heap_(heap),
|
||||
GCStats(const Heap *heap, size_t longPuaseTime) : heap_(heap),
|
||||
longPauseTime_(longPuaseTime) {}
|
||||
~GCStats() = default;
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
namespace panda::ecmascript {
|
||||
class LinearSpace : public Space {
|
||||
public:
|
||||
explicit LinearSpace(Heap *heap, MemSpaceType type, size_t initialCapacity, size_t maximumCapacity);
|
||||
LinearSpace(Heap *heap, MemSpaceType type, size_t initialCapacity, size_t maximumCapacity);
|
||||
NO_COPY_SEMANTIC(LinearSpace);
|
||||
NO_MOVE_SEMANTIC(LinearSpace);
|
||||
uintptr_t Allocate(size_t size, bool isPromoted = false);
|
||||
@ -72,7 +72,7 @@ protected:
|
||||
|
||||
class SemiSpace : public LinearSpace {
|
||||
public:
|
||||
explicit SemiSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
SemiSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
~SemiSpace() override = default;
|
||||
NO_COPY_SEMANTIC(SemiSpace);
|
||||
NO_MOVE_SEMANTIC(SemiSpace);
|
||||
@ -109,7 +109,7 @@ private:
|
||||
|
||||
class SnapshotSpace : public LinearSpace {
|
||||
public:
|
||||
explicit SnapshotSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
SnapshotSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
~SnapshotSpace() override = default;
|
||||
NO_COPY_SEMANTIC(SnapshotSpace);
|
||||
NO_MOVE_SEMANTIC(SnapshotSpace);
|
||||
@ -130,7 +130,7 @@ private:
|
||||
|
||||
class ReadOnlySpace : public LinearSpace {
|
||||
public:
|
||||
explicit ReadOnlySpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
ReadOnlySpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
~ReadOnlySpace() override = default;
|
||||
void SetReadOnly()
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ namespace panda::ecmascript {
|
||||
// Regular region with length of DEFAULT_REGION_SIZE(256kb)
|
||||
class MemMapPool {
|
||||
public:
|
||||
explicit MemMapPool() = default;
|
||||
MemMapPool() = default;
|
||||
~MemMapPool() = default;
|
||||
|
||||
void Finalize()
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
private:
|
||||
class EvacuationTask : public Task {
|
||||
public:
|
||||
explicit EvacuationTask(int32_t id, ParallelEvacuator *evacuator);
|
||||
EvacuationTask(int32_t id, ParallelEvacuator *evacuator);
|
||||
~EvacuationTask() override;
|
||||
bool Run(uint32_t threadIndex) override;
|
||||
|
||||
@ -61,7 +61,7 @@ private:
|
||||
|
||||
class UpdateReferenceTask : public Task {
|
||||
public:
|
||||
explicit UpdateReferenceTask(int32_t id, ParallelEvacuator *evacuator) : Task(id), evacuator_(evacuator) {};
|
||||
UpdateReferenceTask(int32_t id, ParallelEvacuator *evacuator) : Task(id), evacuator_(evacuator) {};
|
||||
~UpdateReferenceTask() override = default;
|
||||
|
||||
bool Run(uint32_t threadIndex) override;
|
||||
|
@ -213,8 +213,8 @@ protected:
|
||||
|
||||
class HugeObjectSpace : public Space {
|
||||
public:
|
||||
explicit HugeObjectSpace(Heap* heap, HeapRegionAllocator *regionAllocator, size_t initialCapacity,
|
||||
size_t maximumCapacity);
|
||||
HugeObjectSpace(Heap* heap, HeapRegionAllocator *regionAllocator, size_t initialCapacity,
|
||||
size_t maximumCapacity);
|
||||
~HugeObjectSpace() override = default;
|
||||
NO_COPY_SEMANTIC(HugeObjectSpace);
|
||||
NO_MOVE_SEMANTIC(HugeObjectSpace);
|
||||
|
@ -39,7 +39,7 @@ class LocalSpace;
|
||||
|
||||
class SparseSpace : public Space {
|
||||
public:
|
||||
explicit SparseSpace(Heap *heap, MemSpaceType type, size_t initialCapacity, size_t maximumCapacity);
|
||||
SparseSpace(Heap *heap, MemSpaceType type, size_t initialCapacity, size_t maximumCapacity);
|
||||
~SparseSpace() override
|
||||
{
|
||||
delete allocator_;
|
||||
@ -112,7 +112,7 @@ private:
|
||||
|
||||
class OldSpace : public SparseSpace {
|
||||
public:
|
||||
explicit OldSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
OldSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
~OldSpace() override = default;
|
||||
NO_COPY_SEMANTIC(OldSpace);
|
||||
NO_MOVE_SEMANTIC(OldSpace);
|
||||
@ -170,7 +170,7 @@ private:
|
||||
|
||||
class NonMovableSpace : public SparseSpace {
|
||||
public:
|
||||
explicit NonMovableSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
NonMovableSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
~NonMovableSpace() override = default;
|
||||
NO_COPY_SEMANTIC(NonMovableSpace);
|
||||
NO_MOVE_SEMANTIC(NonMovableSpace);
|
||||
@ -178,7 +178,7 @@ public:
|
||||
|
||||
class AppSpawnSpace : public SparseSpace {
|
||||
public:
|
||||
explicit AppSpawnSpace(Heap *heap, size_t initialCapacity);
|
||||
AppSpawnSpace(Heap *heap, size_t initialCapacity);
|
||||
~AppSpawnSpace() override = default;
|
||||
NO_COPY_SEMANTIC(AppSpawnSpace);
|
||||
NO_MOVE_SEMANTIC(AppSpawnSpace);
|
||||
@ -189,7 +189,7 @@ public:
|
||||
class LocalSpace : public SparseSpace {
|
||||
public:
|
||||
LocalSpace() = delete;
|
||||
explicit LocalSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
LocalSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
~LocalSpace() override = default;
|
||||
NO_COPY_SEMANTIC(LocalSpace);
|
||||
NO_MOVE_SEMANTIC(LocalSpace);
|
||||
@ -202,7 +202,7 @@ public:
|
||||
|
||||
class MachineCodeSpace : public SparseSpace {
|
||||
public:
|
||||
explicit MachineCodeSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
MachineCodeSpace(Heap *heap, size_t initialCapacity, size_t maximumCapacity);
|
||||
~MachineCodeSpace() override = default;
|
||||
NO_COPY_SEMANTIC(MachineCodeSpace);
|
||||
NO_MOVE_SEMANTIC(MachineCodeSpace); // Note: Expand() left for define
|
||||
|
@ -34,7 +34,7 @@ namespace panda {
|
||||
namespace ecmascript {
|
||||
class STWYoungGC : public GarbageCollector {
|
||||
public:
|
||||
explicit STWYoungGC(Heap *heap, bool parallelGC);
|
||||
STWYoungGC(Heap *heap, bool parallelGC);
|
||||
~STWYoungGC() override = default;
|
||||
NO_COPY_SEMANTIC(STWYoungGC);
|
||||
NO_MOVE_SEMANTIC(STWYoungGC);
|
||||
|
@ -142,7 +142,7 @@ struct WorkNodeHolder {
|
||||
class WorkManager final {
|
||||
public:
|
||||
WorkManager() = delete;
|
||||
explicit WorkManager(Heap *heap, uint32_t threadNum);
|
||||
WorkManager(Heap *heap, uint32_t threadNum);
|
||||
~WorkManager();
|
||||
|
||||
void Initialize(TriggerGCType gcType, ParallelGCTaskPhase taskPhase);
|
||||
|
@ -32,29 +32,29 @@ enum class OperatorType : uint8_t {
|
||||
|
||||
class ObjectOperator final {
|
||||
public:
|
||||
explicit ObjectOperator() = default;
|
||||
ObjectOperator() = default;
|
||||
|
||||
explicit ObjectOperator(JSThread *thread, const JSHandle<JSTaggedValue> &key,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
ObjectOperator(JSThread *thread, const JSHandle<JSTaggedValue> &key,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
|
||||
explicit ObjectOperator(JSThread *thread, const JSHandle<JSObject> &holder, const JSHandle<JSTaggedValue> &key,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
ObjectOperator(JSThread *thread, const JSHandle<JSObject> &holder, const JSHandle<JSTaggedValue> &key,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
|
||||
explicit ObjectOperator(JSThread *thread, const JSHandle<JSTaggedValue> &holder, const JSHandle<JSTaggedValue> &key,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
ObjectOperator(JSThread *thread, const JSHandle<JSTaggedValue> &holder, const JSHandle<JSTaggedValue> &key,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
|
||||
explicit ObjectOperator(JSThread *thread, const JSHandle<JSTaggedValue> &holder,
|
||||
const JSHandle<JSTaggedValue> &receiver, const JSHandle<JSTaggedValue> &key,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
ObjectOperator(JSThread *thread, const JSHandle<JSTaggedValue> &holder,
|
||||
const JSHandle<JSTaggedValue> &receiver, const JSHandle<JSTaggedValue> &key,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
|
||||
explicit ObjectOperator(JSThread *thread, const JSHandle<JSTaggedValue> &holder, uint32_t index,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
ObjectOperator(JSThread *thread, const JSHandle<JSTaggedValue> &holder, uint32_t index,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
// op for fast path, name can only string and symbol, and can't be number.
|
||||
explicit ObjectOperator(JSThread *thread, const JSTaggedValue &receiver, const JSTaggedValue &name,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
ObjectOperator(JSThread *thread, const JSTaggedValue &receiver, const JSTaggedValue &name,
|
||||
OperatorType type = OperatorType::PROTOTYPE_CHAIN);
|
||||
// op for fast add
|
||||
explicit ObjectOperator(JSThread *thread, const JSTaggedValue &receiver, const JSTaggedValue &name,
|
||||
const PropertyAttributes &attr);
|
||||
ObjectOperator(JSThread *thread, const JSTaggedValue &receiver, const JSTaggedValue &name,
|
||||
const PropertyAttributes &attr);
|
||||
|
||||
static void FastAdd(JSThread *thread, const JSTaggedValue &receiver, const JSTaggedValue &name,
|
||||
const JSHandle<JSTaggedValue> &value, const PropertyAttributes &attr);
|
||||
|
@ -46,7 +46,7 @@ enum class PropertyBoxType {
|
||||
|
||||
class PropertyAttributes {
|
||||
public:
|
||||
explicit PropertyAttributes() = default;
|
||||
PropertyAttributes() = default;
|
||||
~PropertyAttributes() = default;
|
||||
|
||||
DEFAULT_NOEXCEPT_MOVE_SEMANTIC(PropertyAttributes);
|
||||
|
@ -311,7 +311,7 @@ public:
|
||||
{
|
||||
Insert(value, value);
|
||||
}
|
||||
explicit RangeSet(uint32_t start, uint32_t end)
|
||||
RangeSet(uint32_t start, uint32_t end)
|
||||
{
|
||||
Insert(start, end);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
namespace panda::ecmascript {
|
||||
class Constants final {
|
||||
public:
|
||||
explicit Constants() = default;
|
||||
Constants() = default;
|
||||
~Constants() = default;
|
||||
NO_COPY_SEMANTIC(Constants);
|
||||
NO_MOVE_SEMANTIC(Constants);
|
||||
|
@ -34,7 +34,7 @@ namespace panda::ecmascript {
|
||||
class EncodeBit final {
|
||||
public:
|
||||
~EncodeBit() = default;
|
||||
explicit EncodeBit() = delete;
|
||||
EncodeBit() = delete;
|
||||
|
||||
DEFAULT_COPY_SEMANTIC(EncodeBit);
|
||||
DEFAULT_MOVE_SEMANTIC(EncodeBit);
|
||||
|
@ -66,7 +66,7 @@ enum class TSRuntimeType : int {
|
||||
class GlobalTSTypeRef {
|
||||
public:
|
||||
explicit GlobalTSTypeRef(uint32_t type = 0) : type_(type) {}
|
||||
explicit GlobalTSTypeRef(int moduleId, int localId) : type_(0)
|
||||
GlobalTSTypeRef(int moduleId, int localId) : type_(0)
|
||||
{
|
||||
SetLocalId(static_cast<uint16_t>(localId));
|
||||
SetModuleId(static_cast<uint16_t>(moduleId));
|
||||
|
Loading…
Reference in New Issue
Block a user