| Index: runtime/vm/flow_graph_compiler_x64.cc
|
| diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
|
| index 6100ba386ae6ef9de85523a9f487d7988f6acf06..7d407f061e5c5783e858cb6ebeedb458864fa0f5 100644
|
| --- a/runtime/vm/flow_graph_compiler_x64.cc
|
| +++ b/runtime/vm/flow_graph_compiler_x64.cc
|
| @@ -266,7 +266,8 @@ FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest(
|
| const Register kInstanceReg = RAX;
|
| Error& malformed_error = Error::Handle(zone());
|
| const Type& int_type = Type::Handle(zone(), Type::IntType());
|
| - const bool smi_is_ok = int_type.IsSubtypeOf(type, &malformed_error);
|
| + const bool smi_is_ok =
|
| + int_type.IsSubtypeOf(type, &malformed_error, Heap::kOld);
|
| // Malformed type should have been handled at graph construction time.
|
| ASSERT(smi_is_ok || malformed_error.IsNull());
|
| __ testq(kInstanceReg, Immediate(kSmiTagMask));
|
| @@ -306,7 +307,7 @@ FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest(
|
| ASSERT(tp_argument.HasResolvedTypeClass());
|
| // Check if type argument is dynamic or Object.
|
| const Type& object_type = Type::Handle(zone(), Type::ObjectType());
|
| - if (object_type.IsSubtypeOf(tp_argument, NULL)) {
|
| + if (object_type.IsSubtypeOf(tp_argument, NULL, Heap::kOld)) {
|
| // Instance class test only necessary.
|
| return GenerateSubtype1TestCacheLookup(
|
| token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
|
| @@ -360,7 +361,8 @@ bool FlowGraphCompiler::GenerateInstantiatedTypeNoArgumentsTest(
|
| if (smi_class.IsSubtypeOf(TypeArguments::Handle(zone()),
|
| type_class,
|
| TypeArguments::Handle(zone()),
|
| - NULL)) {
|
| + NULL,
|
| + Heap::kOld)) {
|
| __ j(ZERO, is_instance_lbl);
|
| } else {
|
| __ j(ZERO, is_not_instance_lbl);
|
| @@ -388,7 +390,8 @@ bool FlowGraphCompiler::GenerateInstantiatedTypeNoArgumentsTest(
|
| }
|
| // Custom checking for numbers (Smi, Mint, Bigint and Double).
|
| // Note that instance is not Smi (checked above).
|
| - if (type.IsSubtypeOf(Type::Handle(zone(), Type::Number()), NULL)) {
|
| + if (type.IsSubtypeOf(
|
| + Type::Handle(zone(), Type::Number()), NULL, Heap::kOld)) {
|
| GenerateNumberTypeCheck(
|
| kClassIdReg, type, is_instance_lbl, is_not_instance_lbl);
|
| return false;
|
|
|