mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
added NEW_CLASS instruction.
This commit is contained in:
parent
a8bd9b0fd9
commit
35b239cd47
@ -84,6 +84,7 @@ namespace VM {
|
||||
NAME_XCR, /* dest, name, value */
|
||||
NEGATE, /* dest, source */
|
||||
NEW_ARRAY, /* dest */
|
||||
NEW_CLASS, /* dest, class name */
|
||||
NEW_FUNCTION, /* dest, ICodeModule */
|
||||
NEW_OBJECT, /* dest */
|
||||
NOP, /* do nothing and like it */
|
||||
@ -151,6 +152,7 @@ namespace VM {
|
||||
"NAME_XCR ",
|
||||
"NEGATE ",
|
||||
"NEW_ARRAY ",
|
||||
"NEW_CLASS ",
|
||||
"NEW_FUNCTION ",
|
||||
"NEW_OBJECT ",
|
||||
"NOP ",
|
||||
@ -809,6 +811,22 @@ namespace VM {
|
||||
}
|
||||
};
|
||||
|
||||
class NewClass : public Instruction_2<TypedRegister, const StringAtom*> {
|
||||
public:
|
||||
/* dest, class name */
|
||||
NewClass (TypedRegister aOp1, const StringAtom* aOp2) :
|
||||
Instruction_2<TypedRegister, const StringAtom*>
|
||||
(NEW_CLASS, aOp1, aOp2) {};
|
||||
virtual Formatter& print(Formatter& f) {
|
||||
f << opcodeNames[NEW_CLASS] << "\t" << "R" << mOp1.first << ", " << "'" << *mOp2 << "'";
|
||||
return f;
|
||||
}
|
||||
virtual Formatter& printOperands(Formatter& f, const JSValues& registers) {
|
||||
f << "R" << mOp1.first << '=' << registers[mOp1.first];
|
||||
return f;
|
||||
}
|
||||
};
|
||||
|
||||
class NewFunction : public Instruction_2<TypedRegister, ICodeModule *> {
|
||||
public:
|
||||
/* dest, ICodeModule */
|
||||
|
@ -84,6 +84,7 @@ namespace VM {
|
||||
NAME_XCR, /* dest, name, value */
|
||||
NEGATE, /* dest, source */
|
||||
NEW_ARRAY, /* dest */
|
||||
NEW_CLASS, /* dest, class name */
|
||||
NEW_FUNCTION, /* dest, ICodeModule */
|
||||
NEW_OBJECT, /* dest */
|
||||
NOP, /* do nothing and like it */
|
||||
@ -151,6 +152,7 @@ namespace VM {
|
||||
"NAME_XCR ",
|
||||
"NEGATE ",
|
||||
"NEW_ARRAY ",
|
||||
"NEW_CLASS ",
|
||||
"NEW_FUNCTION ",
|
||||
"NEW_OBJECT ",
|
||||
"NOP ",
|
||||
@ -809,6 +811,22 @@ namespace VM {
|
||||
}
|
||||
};
|
||||
|
||||
class NewClass : public Instruction_2<TypedRegister, const StringAtom*> {
|
||||
public:
|
||||
/* dest, class name */
|
||||
NewClass (TypedRegister aOp1, const StringAtom* aOp2) :
|
||||
Instruction_2<TypedRegister, const StringAtom*>
|
||||
(NEW_CLASS, aOp1, aOp2) {};
|
||||
virtual Formatter& print(Formatter& f) {
|
||||
f << opcodeNames[NEW_CLASS] << "\t" << "R" << mOp1.first << ", " << "'" << *mOp2 << "'";
|
||||
return f;
|
||||
}
|
||||
virtual Formatter& printOperands(Formatter& f, const JSValues& registers) {
|
||||
f << "R" << mOp1.first << '=' << registers[mOp1.first];
|
||||
return f;
|
||||
}
|
||||
};
|
||||
|
||||
class NewFunction : public Instruction_2<TypedRegister, ICodeModule *> {
|
||||
public:
|
||||
/* dest, ICodeModule */
|
||||
|
Loading…
Reference in New Issue
Block a user