[INFER] Move inference methods out of JSContext, bug 657412.
This commit is contained in:
@@ -382,7 +382,7 @@ GetCustomIterator(JSContext *cx, JSObject *obj, uintN flags, Value *vp)
|
||||
* that loop are unknown, whether there is a custom __iterator__ or not.
|
||||
*/
|
||||
if (!(flags & JSITER_OWNONLY))
|
||||
cx->markTypeCallerUnexpected(types::TYPE_UNKNOWN);
|
||||
types::MarkTypeCallerUnexpected(cx, types::TYPE_UNKNOWN);
|
||||
|
||||
/* Otherwise call it and return that object. */
|
||||
LeaveTrace(cx);
|
||||
@@ -442,7 +442,7 @@ NewIteratorObject(JSContext *cx, uintN flags)
|
||||
EmptyShape *emptyEnumeratorShape = EmptyShape::getEmptyEnumeratorShape(cx);
|
||||
if (!emptyEnumeratorShape)
|
||||
return NULL;
|
||||
obj->init(cx, &js_IteratorClass, cx->getTypeEmpty(), NULL, NULL, false);
|
||||
obj->init(cx, &js_IteratorClass, types::GetTypeEmpty(cx), NULL, NULL, false);
|
||||
obj->setMap(emptyEnumeratorShape);
|
||||
return obj;
|
||||
}
|
||||
@@ -495,7 +495,7 @@ VectorToKeyIterator(JSContext *cx, JSObject *obj, uintN flags, AutoIdVector &key
|
||||
JS_ASSERT(!(flags & JSITER_FOREACH));
|
||||
|
||||
if (obj)
|
||||
cx->markTypeObjectFlags(obj->getType(), types::OBJECT_FLAG_ITERATED);
|
||||
types::MarkTypeObjectFlags(cx, obj->getType(), types::OBJECT_FLAG_ITERATED);
|
||||
|
||||
JSObject *iterobj = NewIteratorObject(cx, flags);
|
||||
if (!iterobj)
|
||||
@@ -545,7 +545,7 @@ VectorToValueIterator(JSContext *cx, JSObject *obj, uintN flags, AutoIdVector &k
|
||||
JS_ASSERT(flags & JSITER_FOREACH);
|
||||
|
||||
if (obj)
|
||||
cx->markTypeObjectFlags(obj->getType(), types::OBJECT_FLAG_ITERATED);
|
||||
types::MarkTypeObjectFlags(cx, obj->getType(), types::OBJECT_FLAG_ITERATED);
|
||||
|
||||
JSObject *iterobj = NewIteratorObject(cx, flags);
|
||||
if (!iterobj)
|
||||
@@ -1498,6 +1498,6 @@ js_InitIteratorClasses(JSContext *cx, JSObject *obj)
|
||||
proto = js_InitClass(cx, obj, NULL, &js_StopIterationClass, NULL, 0, NULL,
|
||||
NULL, NULL, NULL, NULL);
|
||||
if (proto)
|
||||
cx->addTypeProperty(obj->getType(), js_StopIteration_str, ObjectValue(*proto));
|
||||
types::AddTypeProperty(cx, obj->getType(), js_StopIteration_str, ObjectValue(*proto));
|
||||
return proto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user