| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_DBC) | 6 #if defined(TARGET_ARCH_DBC) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/stack_frame.h" | 9 #include "vm/stack_frame.h" |
| 10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 dummy_instance_function.AttachCode(code); | 81 dummy_instance_function.AttachCode(code); |
| 82 | 82 |
| 83 // Make a dummy ICData. | 83 // Make a dummy ICData. |
| 84 const Array& dummy_arguments_descriptor = | 84 const Array& dummy_arguments_descriptor = |
| 85 Array::Handle(ArgumentsDescriptor::New(2)); | 85 Array::Handle(ArgumentsDescriptor::New(2)); |
| 86 const ICData& ic_data = ICData::Handle(ICData::New( | 86 const ICData& ic_data = ICData::Handle(ICData::New( |
| 87 dummy_instance_function, | 87 dummy_instance_function, |
| 88 String::Handle(dummy_instance_function.name()), | 88 String::Handle(dummy_instance_function.name()), |
| 89 dummy_arguments_descriptor, | 89 dummy_arguments_descriptor, |
| 90 Thread::kNoDeoptId, | 90 Thread::kNoDeoptId, |
| 91 2)); | 91 2, |
| 92 /* is_static_call= */ false)); |
| 92 | 93 |
| 93 // Wire up the Function in the ICData. | 94 // Wire up the Function in the ICData. |
| 94 GrowableArray<intptr_t> cids(2); | 95 GrowableArray<intptr_t> cids(2); |
| 95 cids.Add(kSmiCid); | 96 cids.Add(kSmiCid); |
| 96 cids.Add(kSmiCid); | 97 cids.Add(kSmiCid); |
| 97 ic_data.AddCheck(cids, dummy_instance_function); | 98 ic_data.AddCheck(cids, dummy_instance_function); |
| 98 | 99 |
| 99 // For the non-Smi tests. | 100 // For the non-Smi tests. |
| 100 cids[0] = kBigintCid; | 101 cids[0] = kBigintCid; |
| 101 ic_data.AddCheck(cids, dummy_instance_function); | 102 ic_data.AddCheck(cids, dummy_instance_function); |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 } | 1162 } |
| 1162 | 1163 |
| 1163 | 1164 |
| 1164 ASSEMBLER_TEST_RUN(CheckSmiFail, test) { | 1165 ASSEMBLER_TEST_RUN(CheckSmiFail, test) { |
| 1165 EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code())); | 1166 EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code())); |
| 1166 } | 1167 } |
| 1167 | 1168 |
| 1168 } // namespace dart | 1169 } // namespace dart |
| 1169 | 1170 |
| 1170 #endif // defined(TARGET_ARCH_DBC) | 1171 #endif // defined(TARGET_ARCH_DBC) |
| OLD | NEW |