OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #ifndef RUNTIME_VM_UNIT_TEST_H_ | 5 #ifndef RUNTIME_VM_UNIT_TEST_H_ |
6 #define RUNTIME_VM_UNIT_TEST_H_ | 6 #define RUNTIME_VM_UNIT_TEST_H_ |
7 | 7 |
8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
9 | 9 |
10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 0, 0, false, true)) | 222 0, 0, false, true)) |
223 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ | 223 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ |
224 static_cast<int32_t>(Simulator::Current()->Call( \ | 224 static_cast<int32_t>(Simulator::Current()->Call( \ |
225 bit_cast<int32_t, uword>(entry), \ | 225 bit_cast<int32_t, uword>(entry), \ |
226 Utils::Low32Bits(bit_cast<int64_t, double>(double_arg)), \ | 226 Utils::Low32Bits(bit_cast<int64_t, double>(double_arg)), \ |
227 Utils::High32Bits(bit_cast<int64_t, double>(double_arg)), 0, 0, false, \ | 227 Utils::High32Bits(bit_cast<int64_t, double>(double_arg)), 0, 0, false, \ |
228 true)) | 228 true)) |
229 #endif // defined(HOST_ARCH_ARM) | 229 #endif // defined(HOST_ARCH_ARM) |
230 #endif // defined(TARGET_ARCH_{ARM, ARM64}) | 230 #endif // defined(TARGET_ARCH_{ARM, ARM64}) |
231 | 231 |
| 232 #define ZONE_STR(FMT, ...) \ |
| 233 OS::SCreate(Thread::Current()->zone(), FMT, __VA_ARGS__) |
| 234 |
232 inline Dart_Handle NewString(const char* str) { | 235 inline Dart_Handle NewString(const char* str) { |
233 return Dart_NewStringFromCString(str); | 236 return Dart_NewStringFromCString(str); |
234 } | 237 } |
235 | 238 |
236 namespace dart { | 239 namespace dart { |
237 | 240 |
238 // Forward declarations. | 241 // Forward declarations. |
239 class Assembler; | 242 class Assembler; |
240 class CodeGenerator; | 243 class CodeGenerator; |
241 class VirtualMemory; | 244 class VirtualMemory; |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 ~SetFlagScope() { *flag_ = original_value_; } | 629 ~SetFlagScope() { *flag_ = original_value_; } |
627 | 630 |
628 private: | 631 private: |
629 T* flag_; | 632 T* flag_; |
630 T original_value_; | 633 T original_value_; |
631 }; | 634 }; |
632 | 635 |
633 } // namespace dart | 636 } // namespace dart |
634 | 637 |
635 #endif // RUNTIME_VM_UNIT_TEST_H_ | 638 #endif // RUNTIME_VM_UNIT_TEST_H_ |
OLD | NEW |