| Index: runtime/vm/cpu_dbc.cc
|
| diff --git a/runtime/vm/cpu_dbc.cc b/runtime/vm/cpu_dbc.cc
|
| index 8fcff5bb58f98d560cf4fbf70b095d7e8847a761..0e61fbd49769cc305662611b172624cf5a452efa 100644
|
| --- a/runtime/vm/cpu_dbc.cc
|
| +++ b/runtime/vm/cpu_dbc.cc
|
| @@ -6,11 +6,12 @@
|
| #if defined(TARGET_ARCH_DBC)
|
|
|
| #include "vm/cpu.h"
|
| +#include "vm/cpu_dbc.h"
|
|
|
| +#include "vm/cpuinfo.h"
|
|
|
| namespace dart {
|
|
|
| -
|
| void CPU::FlushICache(uword start, uword size) {
|
| // Nothing to do.
|
| }
|
| @@ -21,6 +22,31 @@ const char* CPU::Id() {
|
| }
|
|
|
|
|
| +const char* HostCPUFeatures::hardware_ = NULL;
|
| +#if defined(DEBUG)
|
| +bool HostCPUFeatures::initialized_ = false;
|
| +#endif
|
| +
|
| +void HostCPUFeatures::InitOnce() {
|
| + CpuInfo::InitOnce();
|
| + hardware_ = CpuInfo::GetCpuModel();
|
| +#if defined(DEBUG)
|
| + initialized_ = true;
|
| +#endif
|
| +}
|
| +
|
| +
|
| +void HostCPUFeatures::Cleanup() {
|
| + DEBUG_ASSERT(initialized_);
|
| +#if defined(DEBUG)
|
| + initialized_ = false;
|
| +#endif
|
| + ASSERT(hardware_ != NULL);
|
| + free(const_cast<char*>(hardware_));
|
| + hardware_ = NULL;
|
| + CpuInfo::Cleanup();
|
| +}
|
| +
|
| } // namespace dart
|
|
|
| #endif // defined TARGET_ARCH_DBC
|
|
|