Version 1.3.0.
Allowed RegExp objects to be called as functions (issue 132).
Fixed issue where global property cells would escape after detaching the global object; see http://crbug.com/16276.
Added support for stepping into setters and getters in the debugger.
Changed the debugger to avoid stopping in its own JavaScript code and in the code of built-in functions.
Fixed issue 345 by avoiding duplicate escaping labels.
Fixed ARM code generator crash in short-circuited boolean expressions and added regression tests.
Added an external allocation limit to avoid issues where small V8 objects would hold on to large amounts of external memory without causing garbage collections.
Finished more of the inline caching stubs for x64 targets.
git-svn-id: http://v8.googlecode.com/svn/trunk@2537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 37c9b8b..7abc7c3 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1075,7 +1075,12 @@
int JSObject::GetHeaderSize() {
- switch (map()->instance_type()) {
+ InstanceType type = map()->instance_type();
+ // Check for the most common kind of JavaScript object before
+ // falling into the generic switch. This speeds up the internal
+ // field operations considerably on average.
+ if (type == JS_OBJECT_TYPE) return JSObject::kHeaderSize;
+ switch (type) {
case JS_GLOBAL_PROXY_TYPE:
return JSGlobalProxy::kSize;
case JS_GLOBAL_OBJECT_TYPE:
@@ -1090,7 +1095,6 @@
return JSValue::kSize;
case JS_REGEXP_TYPE:
return JSValue::kSize;
- case JS_OBJECT_TYPE:
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
return JSObject::kHeaderSize;
default: