mirror of
https://github.com/dart-lang/sdk
synced 2024-10-05 05:17:31 +00:00
02a8dd90e1
Also create a subclass of AllocationInstr, AllocateClosureInstr, which is used when allocating closures. Followup CLs add inputs to this instruction and to the AllocateClosure stub, starting with the closure function. Adding these inputs allows the related field to be set within the stub, instead of using StoreInstanceField manually at each closure allocation point. Since this CL only adds the initial stub/instruction implementation, the overhead on snapshots is minimal: just the addition of the new stub to each isolate. ----- This CL also adds virtual and non-virtual methods to assembler_base.h revolving around field loads and stores and attempted inline object allocation, to ensure all architectures have these methods. It also adds LoadFromSlot/StoreToSlot/StoreToSlotNoBarrier, which appropriately calls one of the other methods based on whether the slot is compressed or not and whether it is a boxed or unboxed field. With these additions, the AllocateClosure stub generator can be defined in an architecture-independent way. TEST=Basically a refactoring, so check using current test suites. Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-debug-x64c-try Change-Id: I71f5691307679f8d5e3604007699de4706f86eb8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198284 Commit-Queue: Tess Strickland <sstrickl@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
145 lines
10 KiB
C++
145 lines
10 KiB
C++
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef RUNTIME_VM_STUB_CODE_LIST_H_
|
|
#define RUNTIME_VM_STUB_CODE_LIST_H_
|
|
|
|
namespace dart {
|
|
|
|
#define VM_TYPE_TESTING_STUB_CODE_LIST(V) \
|
|
V(DefaultTypeTest) \
|
|
V(DefaultNullableTypeTest) \
|
|
V(TopTypeTypeTest) \
|
|
V(UnreachableTypeTest) \
|
|
V(TypeParameterTypeTest) \
|
|
V(NullableTypeParameterTypeTest) \
|
|
V(SlowTypeTest) \
|
|
V(LazySpecializeTypeTest) \
|
|
V(LazySpecializeNullableTypeTest)
|
|
|
|
// List of stubs created in the VM isolate, these stubs are shared by different
|
|
// isolates running in this dart process.
|
|
#define VM_STUB_CODE_LIST(V) \
|
|
V(GetCStackPointer) \
|
|
V(JumpToFrame) \
|
|
V(RunExceptionHandler) \
|
|
V(DeoptForRewind) \
|
|
V(WriteBarrier) \
|
|
V(WriteBarrierWrappers) \
|
|
V(ArrayWriteBarrier) \
|
|
V(AllocateArray) \
|
|
V(AllocateMint) \
|
|
V(AllocateDouble) \
|
|
V(AllocateFloat32x4) \
|
|
V(AllocateFloat64x2) \
|
|
V(AllocateInt32x4) \
|
|
V(AllocateInt8Array) \
|
|
V(AllocateUint8Array) \
|
|
V(AllocateUint8ClampedArray) \
|
|
V(AllocateInt16Array) \
|
|
V(AllocateUint16Array) \
|
|
V(AllocateInt32Array) \
|
|
V(AllocateUint32Array) \
|
|
V(AllocateInt64Array) \
|
|
V(AllocateUint64Array) \
|
|
V(AllocateFloat32Array) \
|
|
V(AllocateFloat64Array) \
|
|
V(AllocateFloat32x4Array) \
|
|
V(AllocateInt32x4Array) \
|
|
V(AllocateFloat64x2Array) \
|
|
V(AllocateMintSharedWithFPURegs) \
|
|
V(AllocateMintSharedWithoutFPURegs) \
|
|
V(AllocateClosure) \
|
|
V(AllocateContext) \
|
|
V(AllocateObject) \
|
|
V(AllocateObjectParameterized) \
|
|
V(AllocateObjectSlow) \
|
|
V(AllocateUnhandledException) \
|
|
V(CloneContext) \
|
|
V(CallToRuntime) \
|
|
V(LazyCompile) \
|
|
V(CallBootstrapNative) \
|
|
V(CallNoScopeNative) \
|
|
V(CallAutoScopeNative) \
|
|
V(FixCallersTarget) \
|
|
V(CallStaticFunction) \
|
|
V(OptimizeFunction) \
|
|
V(InvokeDartCode) \
|
|
V(DebugStepCheck) \
|
|
V(SwitchableCallMiss) \
|
|
V(MonomorphicSmiableCheck) \
|
|
V(SingleTargetCall) \
|
|
V(ICCallThroughCode) \
|
|
V(MegamorphicCall) \
|
|
V(FixAllocationStubTarget) \
|
|
V(Deoptimize) \
|
|
V(DeoptimizeLazyFromReturn) \
|
|
V(DeoptimizeLazyFromThrow) \
|
|
V(UnoptimizedIdenticalWithNumberCheck) \
|
|
V(OptimizedIdenticalWithNumberCheck) \
|
|
V(ICCallBreakpoint) \
|
|
V(UnoptStaticCallBreakpoint) \
|
|
V(RuntimeCallBreakpoint) \
|
|
V(OneArgCheckInlineCache) \
|
|
V(TwoArgsCheckInlineCache) \
|
|
V(SmiAddInlineCache) \
|
|
V(SmiLessInlineCache) \
|
|
V(SmiEqualInlineCache) \
|
|
V(OneArgOptimizedCheckInlineCache) \
|
|
V(TwoArgsOptimizedCheckInlineCache) \
|
|
V(ZeroArgsUnoptimizedStaticCall) \
|
|
V(OneArgUnoptimizedStaticCall) \
|
|
V(TwoArgsUnoptimizedStaticCall) \
|
|
V(AssertSubtype) \
|
|
V(AssertAssignable) \
|
|
V(TypeIsTopTypeForSubtyping) \
|
|
V(TypeIsTopTypeForSubtypingNullSafe) \
|
|
V(NullIsAssignableToType) \
|
|
V(NullIsAssignableToTypeNullSafe) \
|
|
V(Subtype1TestCache) \
|
|
V(Subtype3TestCache) \
|
|
V(Subtype5TestCache) \
|
|
V(Subtype7TestCache) \
|
|
VM_TYPE_TESTING_STUB_CODE_LIST(V) \
|
|
V(CallClosureNoSuchMethod) \
|
|
V(FrameAwaitingMaterialization) \
|
|
V(AsynchronousGapMarker) \
|
|
V(NotLoaded) \
|
|
V(DispatchTableNullError) \
|
|
V(LateInitializationErrorSharedWithFPURegs) \
|
|
V(LateInitializationErrorSharedWithoutFPURegs) \
|
|
V(NullErrorSharedWithFPURegs) \
|
|
V(NullErrorSharedWithoutFPURegs) \
|
|
V(NullArgErrorSharedWithFPURegs) \
|
|
V(NullArgErrorSharedWithoutFPURegs) \
|
|
V(NullCastErrorSharedWithFPURegs) \
|
|
V(NullCastErrorSharedWithoutFPURegs) \
|
|
V(RangeErrorSharedWithFPURegs) \
|
|
V(RangeErrorSharedWithoutFPURegs) \
|
|
V(StackOverflowSharedWithFPURegs) \
|
|
V(StackOverflowSharedWithoutFPURegs) \
|
|
V(OneArgCheckInlineCacheWithExactnessCheck) \
|
|
V(OneArgOptimizedCheckInlineCacheWithExactnessCheck) \
|
|
V(EnterSafepoint) \
|
|
V(ExitSafepoint) \
|
|
V(CallNativeThroughSafepoint) \
|
|
V(InitStaticField) \
|
|
V(InitInstanceField) \
|
|
V(InitLateInstanceField) \
|
|
V(InitLateFinalInstanceField) \
|
|
V(Throw) \
|
|
V(ReThrow) \
|
|
V(AssertBoolean) \
|
|
V(InstanceOf) \
|
|
V(InstantiateType) \
|
|
V(InstantiateTypeArguments) \
|
|
V(InstantiateTypeArgumentsMayShareInstantiatorTA) \
|
|
V(InstantiateTypeArgumentsMayShareFunctionTA) \
|
|
V(NoSuchMethodDispatcher) \
|
|
V(UnknownDartCode)
|
|
|
|
} // namespace dart
|
|
|
|
#endif // RUNTIME_VM_STUB_CODE_LIST_H_
|