Reduce the number of virtual function in hydrogen-instruction.h classes
Instead of using virtual type-tester functions we can just generate non-virtual ones for all concrete IR classes. This is changes reduces the V8 binary size by ~2%. I also simplified the macros to declare new hydrogen instructions slightly. The name used for debug output is no longer passed as a separate string. Instead we just use the class name. Review URL: http://codereview.chromium.org/6880014 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
b06ce8dd2c
commit
6b7a4f154d
@ -317,6 +317,17 @@ intptr_t HValue::Hashcode() {
|
||||
}
|
||||
|
||||
|
||||
const char* HValue::Mnemonic() const {
|
||||
switch (opcode()) {
|
||||
#define MAKE_CASE(type) case k##type: return #type;
|
||||
HYDROGEN_CONCRETE_INSTRUCTION_LIST(MAKE_CASE)
|
||||
#undef MAKE_CASE
|
||||
case kPhi: return "Phi";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HValue::SetOperandAt(int index, HValue* value) {
|
||||
ASSERT(value == NULL || !value->representation().IsNone());
|
||||
RegisterUse(index, value);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user