Split the global object into two parts: The state holding global object and the global object proxy.
Fixed bug that affected the value of an assignment to an element in certain cases (issue 116).
Added GetPropertyNames functionality (issue 33) and extra Date functions (issue 77) to the API.
Changed WeakReferenceCallback to take a Persistent<Value> instead of a Persistent<Object> (issue 101).
Fixed issues with message reporting for exceptions in try-finally blocks (issues 73 and 75).
Optimized flattening of strings and string equality checking.
Improved Boyer-Moore implementation for faster indexOf operations.
Added development shell (d8) which includes counters and completion support.
Fixed problem with the receiver passed to functions called from eval (issue 124).
git-svn-id: http://v8.googlecode.com/svn/trunk@572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 3c56590..dc5cb60 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -127,6 +127,9 @@
case JS_FUNCTION_TYPE:
JSFunction::cast(this)->JSFunctionPrint();
break;
+ case JS_GLOBAL_PROXY_TYPE:
+ JSGlobalProxy::cast(this)->JSGlobalProxyPrint();
+ break;
case JS_GLOBAL_OBJECT_TYPE:
JSGlobalObject::cast(this)->JSGlobalObjectPrint();
break;
@@ -198,6 +201,9 @@
case JS_FUNCTION_TYPE:
JSFunction::cast(this)->JSFunctionVerify();
break;
+ case JS_GLOBAL_PROXY_TYPE:
+ JSGlobalProxy::cast(this)->JSGlobalProxyVerify();
+ break;
case JS_GLOBAL_OBJECT_TYPE:
JSGlobalObject::cast(this)->JSGlobalObjectVerify();
break;
@@ -384,6 +390,7 @@
case JS_VALUE_TYPE: return "JS_VALUE";
case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT";
case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT";
+ case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY";
case PROXY_TYPE: return "PROXY";
case SMI_TYPE: return "SMI";
#define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME;
@@ -551,9 +558,31 @@
}
+void JSGlobalProxy::JSGlobalProxyPrint() {
+ PrintF("global_proxy");
+ JSObjectPrint();
+ PrintF("context : ");
+ context()->ShortPrint();
+ PrintF("\n");
+}
+
+
+void JSGlobalProxy::JSGlobalProxyVerify() {
+ CHECK(IsJSGlobalProxy());
+ JSObjectVerify();
+ VerifyObjectField(JSGlobalProxy::kContextOffset);
+ // Make sure that this object has no properties, elements.
+ CHECK_EQ(0, properties()->length());
+ CHECK_EQ(0, elements()->length());
+}
+
+
void JSGlobalObject::JSGlobalObjectPrint() {
PrintF("global ");
JSObjectPrint();
+ PrintF("global context : ");
+ global_context()->ShortPrint();
+ PrintF("\n");
}