Version 1.3.0-dev.0.1
svn merge -c 33110 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 33111 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 33112 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
Add missing file:
dart/tests/lib/mirrors/null2_test.dart
git-svn-id: http://dart.googlecode.com/svn/trunk@33115 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/runtime/vm/cpu_arm.cc b/runtime/vm/cpu_arm.cc
index 1100c26..73f2ec0 100644
--- a/runtime/vm/cpu_arm.cc
+++ b/runtime/vm/cpu_arm.cc
@@ -89,7 +89,7 @@
initialized_ = false;
#endif
ASSERT(hardware_ != NULL);
- delete[] hardware_;
+ free(const_cast<char*>(hardware_));
hardware_ = NULL;
CpuInfo::Cleanup();
}
@@ -113,7 +113,7 @@
initialized_ = false;
#endif
ASSERT(hardware_ != NULL);
- delete[] hardware_;
+ free(const_cast<char*>(hardware_));
hardware_ = NULL;
CpuInfo::Cleanup();
}
diff --git a/runtime/vm/cpu_ia32.cc b/runtime/vm/cpu_ia32.cc
index 8158e3a..9601849 100644
--- a/runtime/vm/cpu_ia32.cc
+++ b/runtime/vm/cpu_ia32.cc
@@ -57,7 +57,7 @@
initialized_ = false;
#endif
ASSERT(hardware_ != NULL);
- delete[] hardware_;
+ free(const_cast<char*>(hardware_));
hardware_ = NULL;
CpuInfo::Cleanup();
}
diff --git a/runtime/vm/cpu_mips.cc b/runtime/vm/cpu_mips.cc
index 3d26cd6..6655f5b 100644
--- a/runtime/vm/cpu_mips.cc
+++ b/runtime/vm/cpu_mips.cc
@@ -64,7 +64,7 @@
initialized_ = false;
#endif
ASSERT(hardware_ != NULL);
- delete[] hardware_;
+ free(const_cast<char*>(hardware_));
hardware_ = NULL;
CpuInfo::Cleanup();
}
@@ -86,7 +86,7 @@
initialized_ = false;
#endif
ASSERT(hardware_ != NULL);
- delete[] hardware_;
+ free(const_cast<char*>(hardware_));
hardware_ = NULL;
CpuInfo::Cleanup();
}
diff --git a/runtime/vm/cpu_x64.cc b/runtime/vm/cpu_x64.cc
index 31c4ec7..073ce84 100644
--- a/runtime/vm/cpu_x64.cc
+++ b/runtime/vm/cpu_x64.cc
@@ -56,7 +56,7 @@
initialized_ = false;
#endif
ASSERT(hardware_ != NULL);
- delete[] hardware_;
+ free(const_cast<char*>(hardware_));
hardware_ = NULL;
CpuInfo::Cleanup();
}
diff --git a/runtime/vm/cpuid.cc b/runtime/vm/cpuid.cc
index 45499b4..576687e 100644
--- a/runtime/vm/cpuid.cc
+++ b/runtime/vm/cpuid.cc
@@ -36,10 +36,10 @@
void CpuId::InitOnce() {
- uint32_t info[4] = {-1};
+ uint32_t info[4] = {static_cast<uint32_t>(-1)};
GetCpuId(0, info);
- char* id_string = new char[3 * sizeof(int32_t)];
+ char* id_string = reinterpret_cast<char*>(malloc(3 * sizeof(int32_t)));
// Yes, these are supposed to be out of order.
*reinterpret_cast<uint32_t*>(id_string) = info[1];
*reinterpret_cast<uint32_t*>(id_string + 4) = info[3];
@@ -50,7 +50,8 @@
CpuId::sse41_ = (info[2] & (1 << 19)) != 0;
CpuId::sse2_ = (info[3] & (1 << 26)) != 0;
- char* brand_string = new char[3 * 4 * sizeof(uint32_t)];
+ char* brand_string =
+ reinterpret_cast<char*>(malloc(3 * 4 * sizeof(uint32_t)));
for (uint32_t i = 0x80000002; i <= 0x80000004; i++) {
uint32_t off = (i - 0x80000002U) * 4 * sizeof(uint32_t);
GetCpuId(i, info);
@@ -65,11 +66,11 @@
void CpuId::Cleanup() {
ASSERT(id_string_ != NULL);
- delete[] id_string_;
+ free(const_cast<char*>(id_string_));
id_string_ = NULL;
ASSERT(brand_string_ != NULL);
- delete[] brand_string_;
+ free(const_cast<char*>(brand_string_));
brand_string_ = NULL;
}
diff --git a/runtime/vm/proccpuinfo.cc b/runtime/vm/proccpuinfo.cc
index 17dc170..94e8db6 100644
--- a/runtime/vm/proccpuinfo.cc
+++ b/runtime/vm/proccpuinfo.cc
@@ -38,7 +38,7 @@
}
// Read the contents of the cpuinfo file.
- data_ = new char[datalen_ + 1];
+ data_ = reinterpret_cast<char*>(malloc(datalen_ + 1));
fp = fopen(PATHNAME, "r");
if (fp != NULL) {
for (intptr_t offset = 0; offset < datalen_; ) {
@@ -58,7 +58,7 @@
void ProcCpuInfo::Cleanup() {
ASSERT(data_);
- delete[] data_;
+ free(data_);
data_ = NULL;
}
@@ -115,7 +115,7 @@
// Extract the content of a the first occurrence of a given field in
// the content of the cpuinfo file and return it as a heap-allocated
-// string that must be freed by the caller using delete[].
+// string that must be freed by the caller using free.
// Return NULL if not found.
const char* ProcCpuInfo::ExtractField(const char* field) {
ASSERT(field != NULL);
@@ -133,7 +133,7 @@
}
intptr_t len = q - p;
- char* result = new char[len + 1]; // plus one for null-terminator.
+ char* result = reinterpret_cast<char*>(malloc(len + 1));
// Copy the line into result, leaving enough room for a null-terminator.
char saved_end = *q;
*q = '\0';
diff --git a/tools/VERSION b/tools/VERSION
index 059f58b..2f6cf60 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -28,4 +28,4 @@
MINOR 3
PATCH 0
PRERELEASE 0
-PRERELEASE_PATCH 0
+PRERELEASE_PATCH 1