Review URL: http://codereview.chromium.org/7925
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@575
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
}
int instance_size = kPointerSize * internal_field_count;
- InstanceType type = JS_OBJECT_TYPE; // initialize to a valid value
+ InstanceType type = INVALID_TYPE;
switch (instance_type) {
case JavaScriptObject:
type = JS_OBJECT_TYPE;
instance_size += JSGlobalProxy::kSize;
break;
default:
- ASSERT(false);
break;
}
+ ASSERT(type != INVALID_TYPE);
Handle<JSFunction> result =
Factory::NewFunction(Factory::empty_symbol(), type, instance_size,
// Pseudo-types
FIRST_NONSTRING_TYPE = MAP_TYPE,
FIRST_TYPE = 0x0,
+ INVALID_TYPE = FIRST_TYPE - 1,
LAST_TYPE = JS_FUNCTION_TYPE,
// Boundaries for testing the type is a JavaScript "object". Note that
// function objects are not counted as objects, even though they are