Improved performance of unary addition by avoiding runtime calls.
Fixed the handling of '>' and '<=' to use right-to-left conversion and left-to-right evaluation as specified by ECMA-262.
Fixed a branch elimination bug on the ARM platform where incorrect code was generated because of overly aggressive branch elimination.
Improved performance of code that repeatedly assigns the same function to the same property of different objects with the same map.
Untangled DEBUG and ENABLE_DISASSEMBLER defines. The disassembler no longer expects DEBUG to be defined.
Added platform-nullos.cc to serve as the basis for new platform implementations.
git-svn-id: http://v8.googlecode.com/svn/trunk@9 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 5d7357e..c70ab16 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -592,22 +592,6 @@
}
-const char* Code::Kind2String(Kind kind) {
- switch (kind) {
- case FUNCTION: return "FUNCTION";
- case STUB: return "STUB";
- case BUILTIN: return "BUILTIN";
- case LOAD_IC: return "LOAD_IC";
- case KEYED_LOAD_IC: return "KEYED_LOAD_IC";
- case STORE_IC: return "STORE_IC";
- case KEYED_STORE_IC: return "KEYED_STORE_IC";
- case CALL_IC: return "CALL_IC";
- }
- UNREACHABLE();
- return NULL;
-}
-
-
void Code::CodePrint() {
HeapObject::PrintHeader("Code");
PrintF("kind = %s", Kind2String(kind()));
@@ -995,6 +979,27 @@
}
+bool DescriptorArray::IsSortedNoDuplicates() {
+ String* current_key = NULL;
+ uint32_t current = 0;
+ for (DescriptorReader r(this); !r.eos(); r.advance()) {
+ String* key = r.GetKey();
+ if (key == current_key) {
+ PrintDescriptors();
+ return false;
+ }
+ current_key = key;
+ uint32_t hash = r.GetKey()->Hash();
+ if (hash < current) {
+ PrintDescriptors();
+ return false;
+ }
+ current = hash;
+ }
+ return true;
+}
+
+
#endif // DEBUG
} } // namespace v8::internal