Bug 952777 - part 1 - reorder JSJitInfo slots to pack better; r=efaust,bz

This commit is contained in:
Nathan Froyd 2013-12-21 15:33:12 -05:00
parent 74638c74c5
commit ac464fc3bf
3 changed files with 17 additions and 17 deletions

View File

@ -6367,15 +6367,15 @@ class CGMemberJITInfo(CGThing):
" JSJitInfo::%s,\n"
" %s, /* isInfallible. False in setters. */\n"
" %s, /* isMovable. Not relevant for setters. */\n"
" JSJitInfo::%s, /* aliasSet. Not relevant for setters. */\n"
" %s, /* hasSlot. Only relevant for getters. */\n"
" %s, /* Reserved slot index, if we're stored in a slot, else 0. */\n"
" %s, /* isInSlot. Only relevant for getters. */\n"
" %s, /* returnType. Not relevant for setters. */\n"
" JSJitInfo::%s, /* aliasSet. Not relevant for setters. */\n"
" %s, /* Reserved slot index, if we're stored in a slot, else 0. */\n"
" %s, /* argTypes. Only relevant for methods */\n"
" nullptr /* parallelNative */\n"
"};\n" % (argTypesDecl, infoName, opName, protoID, depth,
opType, failstr, movablestr, aliasSet, slotStr,
slotIndex, returnType, argTypes))
opType, failstr, movablestr, slotStr, returnType,
aliasSet, slotIndex, argTypes))
def define(self):
if self.member.isAttr():

View File

@ -1514,6 +1514,10 @@ struct JSJitInfo {
bool isMovable; /* Is op movable? To be movable the op must not
AliasEverything, but even that might not be
enough (e.g. in cases when it can throw). */
bool isInSlot; /* True if this is a getter that can get a member
from a slot of the "this" object directly. */
JSValueType returnType; /* The return type tag. Might be JSVAL_TYPE_UNKNOWN */
AliasSet aliasSet; /* The alias set for this op. This is a _minimal_
alias set; in particular for a method it does not
include whatever argument conversions might do.
@ -1521,12 +1525,8 @@ struct JSJitInfo {
of the actual argument types being passed in. */
// XXXbz should we have a JSGetterJitInfo subclass or something?
// XXXbz should we have a JSValueType for the type of the member?
bool isInSlot; /* True if this is a getter that can get a member
from a slot of the "this" object directly. */
size_t slotIndex; /* If isMember is true, the index of the slot to get
size_t slotIndex; /* If isInSlot is true, the index of the slot to get
the value from. Otherwise 0. */
JSValueType returnType; /* The return type tag. Might be JSVAL_TYPE_UNKNOWN */
const ArgType* const argTypes; /* For a method, a list of sets of types that
the function expects. This can be used,
for example, to figure out when argument
@ -1550,7 +1550,7 @@ private:
};
#define JS_JITINFO_NATIVE_PARALLEL(op) \
{{nullptr},0,0,JSJitInfo::OpType_None,false,false,JSJitInfo::AliasEverything,false,0,JSVAL_TYPE_MISSING,nullptr,op}
{{nullptr},0,0,JSJitInfo::OpType_None,false,false,false,JSVAL_TYPE_MISSING,JSJitInfo::AliasEverything,0,nullptr,op}
static JS_ALWAYS_INLINE const JSJitInfo *
FUNCTION_VALUE_TO_JITINFO(const JS::Value& v)

View File

@ -4836,10 +4836,10 @@ static const JSJitInfo dom_x_getterinfo = {
JSJitInfo::Getter,
true, /* isInfallible. False in setters. */
true, /* isMovable */
JSJitInfo::AliasNone, /* aliasSet */
false, /* isInSlot */
0, /* slotIndex */
JSVAL_TYPE_UNKNOWN, /* returnType */
JSJitInfo::AliasNone, /* aliasSet */
0, /* slotIndex */
nullptr, /* argTypes */
nullptr /* parallelNative */
};
@ -4851,10 +4851,10 @@ static const JSJitInfo dom_x_setterinfo = {
JSJitInfo::Setter,
false, /* isInfallible. False in setters. */
false, /* isMovable. */
JSJitInfo::AliasEverything, /* aliasSet */
false, /* isInSlot */
0, /* slotIndex */
JSVAL_TYPE_UNKNOWN, /* returnType */
JSJitInfo::AliasEverything, /* aliasSet */
0, /* slotIndex */
nullptr, /* argTypes */
nullptr /* parallelNative */
};
@ -4866,10 +4866,10 @@ static const JSJitInfo doFoo_methodinfo = {
JSJitInfo::Method,
false, /* isInfallible. False in setters. */
false, /* isMovable */
JSJitInfo::AliasEverything, /* aliasSet */
false, /* isInSlot */
0, /* slotIndex */
JSVAL_TYPE_UNKNOWN, /* returnType */
JSJitInfo::AliasEverything, /* aliasSet */
0, /* slotIndex */
nullptr, /* argTypes */
nullptr /* parallelNative */
};