Added caching of RegExp data in compilation cache.
Added Visual Studio project file for d8 shell.
Fixed function call performance regression introduced in version 0.4.0 when splitting the global object in two parts (issue 120).
Fixed issue 131 by checking for empty handles before throwing and reporting exceptions.
git-svn-id: http://v8.googlecode.com/svn/trunk@618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index dc5cb60..d67544e 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -327,6 +327,7 @@
static const char* TypeToString(InstanceType type) {
switch (type) {
+ case INVALID_TYPE: return "INVALID";
case MAP_TYPE: return "MAP";
case HEAP_NUMBER_TYPE: return "HEAP_NUMBER";
case SHORT_SYMBOL_TYPE:
@@ -659,19 +660,22 @@
void JSRegExp::JSRegExpVerify() {
JSObjectVerify();
- ASSERT(type()->IsSmi() || type()->IsUndefined());
- if (type()->IsSmi()) {
- switch (type_tag()) {
- case JSRegExp::JSCRE:
- ASSERT(data()->IsFixedArray());
- break;
- default:
- ASSERT_EQ(JSRegExp::ATOM, type_tag());
- ASSERT(data()->IsString());
- break;
+ ASSERT(data()->IsUndefined() || data()->IsFixedArray());
+ switch (TypeTag()) {
+ case JSRegExp::ATOM: {
+ FixedArray* arr = FixedArray::cast(data());
+ ASSERT(arr->get(JSRegExp::kAtomPatternIndex)->IsString());
+ break;
}
- } else {
- ASSERT(data()->IsUndefined());
+ case JSRegExp::JSCRE: {
+ FixedArray* arr = FixedArray::cast(data());
+ ASSERT(arr->get(JSRegExp::kJscreDataIndex)->IsFixedArray());
+ break;
+ }
+ default:
+ ASSERT_EQ(JSRegExp::NOT_COMPILED, TypeTag());
+ ASSERT(data()->IsUndefined());
+ break;
}
}