fixed subroutinized CFF2 flattening
and some code cleanup
This commit is contained in:
parent
321e592333
commit
76e54d2bd8
|
@ -494,7 +494,7 @@ struct Stack
|
|||
inline const ELEM& peek (void)
|
||||
{
|
||||
if (likely (count > 0))
|
||||
return elements[count];
|
||||
return elements[count-1];
|
||||
else
|
||||
return Null(ELEM);
|
||||
}
|
||||
|
|
|
@ -372,19 +372,6 @@ struct CSOpSet : OpSet<ARG>
|
|||
OPSET::flush_args_and_op (op, env, param);
|
||||
}
|
||||
|
||||
static inline bool is_subr_op (OpCode op)
|
||||
{
|
||||
switch (op)
|
||||
{
|
||||
case OpCode_callsubr:
|
||||
case OpCode_callgsubr:
|
||||
case OpCode_return:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
typedef OpSet<ARG> SUPER;
|
||||
};
|
||||
|
|
|
@ -90,7 +90,7 @@ struct CFF2CSInterpEnv : CSInterpEnv<BlendArg, CFF2Subrs>
|
|||
|
||||
inline bool fetch_op (OpCode &op)
|
||||
{
|
||||
if (unlikely (this->substr.avail ()))
|
||||
if (this->substr.avail ())
|
||||
return SUPER::fetch_op (op);
|
||||
|
||||
/* make up return or endchar op */
|
||||
|
@ -129,8 +129,9 @@ struct CFF2CSOpSet : CSOpSet<BlendArg, OPSET, CFF2CSInterpEnv, PARAM, PATH>
|
|||
case OpCode_callsubr:
|
||||
case OpCode_callgsubr:
|
||||
/* a subroutine number shoudln't be a blended value */
|
||||
return (!env.argStack.peek ().blended () &&
|
||||
SUPER::process_op (op, env, param));
|
||||
if (unlikely (env.argStack.peek ().blended ()))
|
||||
return false;
|
||||
return SUPER::process_op (op, env, param);
|
||||
|
||||
case OpCode_blendcs:
|
||||
return OPSET::process_blend (env, param);
|
||||
|
|
Loading…
Reference in New Issue