mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
![Liam Appelbe](/assets/img/avatar_default.png)
Patchset 1 contains just the usings I deleted (<100 lines). All the other diffs in the rest of the CL are just fixing all the places that were broken by this. Bug: https://github.com/dart-lang/sdk/issues/36839 Change-Id: I3bb4fa62ab4363ded81fd7c2815b857f91886dd6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108502 Commit-Queue: Liam Appelbe <liama@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
71 lines
2.3 KiB
C++
71 lines
2.3 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.
|
|
|
|
#include "vm/globals.h"
|
|
|
|
#if defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
|
|
|
|
#include "vm/type_testing_stubs.h"
|
|
|
|
#define __ assembler->
|
|
|
|
namespace dart {
|
|
|
|
void TypeTestingStubGenerator::BuildOptimizedTypeTestStub(
|
|
compiler::Assembler* assembler,
|
|
HierarchyInfo* hi,
|
|
const Type& type,
|
|
const Class& type_class) {
|
|
const Register kInstanceReg = R0;
|
|
const Register kClassIdReg = R9;
|
|
|
|
BuildOptimizedTypeTestStubFastCases(assembler, hi, type, type_class,
|
|
kInstanceReg, kClassIdReg);
|
|
|
|
__ ldr(CODE_REG,
|
|
compiler::Address(
|
|
THR, compiler::target::Thread::slow_type_test_stub_offset()));
|
|
__ Branch(compiler::FieldAddress(
|
|
CODE_REG, compiler::target::Code::entry_point_offset()));
|
|
}
|
|
|
|
void TypeTestingStubGenerator::
|
|
BuildOptimizedSubclassRangeCheckWithTypeArguments(
|
|
compiler::Assembler* assembler,
|
|
HierarchyInfo* hi,
|
|
const Class& type_class,
|
|
const TypeArguments& tp,
|
|
const TypeArguments& ta) {
|
|
const Register kInstanceReg = R0;
|
|
const Register kInstanceTypeArguments = NOTFP;
|
|
const Register kClassIdReg = R9;
|
|
|
|
BuildOptimizedSubclassRangeCheckWithTypeArguments(
|
|
assembler, hi, type_class, tp, ta, kClassIdReg, kInstanceReg,
|
|
kInstanceTypeArguments);
|
|
}
|
|
|
|
void TypeTestingStubGenerator::BuildOptimizedTypeArgumentValueCheck(
|
|
compiler::Assembler* assembler,
|
|
HierarchyInfo* hi,
|
|
const AbstractType& type_arg,
|
|
intptr_t type_param_value_offset_i,
|
|
compiler::Label* check_failed) {
|
|
const Register kInstantiatorTypeArgumentsReg = R2;
|
|
const Register kFunctionTypeArgumentsReg = R1;
|
|
const Register kInstanceTypeArguments = NOTFP;
|
|
|
|
const Register kClassIdReg = R9;
|
|
const Register kOwnTypeArgumentValue = TMP;
|
|
|
|
BuildOptimizedTypeArgumentValueCheck(
|
|
assembler, hi, type_arg, type_param_value_offset_i, kClassIdReg,
|
|
kInstanceTypeArguments, kInstantiatorTypeArgumentsReg,
|
|
kFunctionTypeArgumentsReg, kOwnTypeArgumentValue, check_failed);
|
|
}
|
|
|
|
} // namespace dart
|
|
|
|
#endif // defined(TARGET_ARCH_ARM) && !defined(DART_PRECOMPILED_RUNTIME)
|