Make use of templatized convienience functions for adding Hydrogen instructions.

Building on the previous changes from https://codereview.chromium.org/18050004/
this patch makes even more use of the templatized functions for adding
Hydrogen instructions.

R=danno@chromium.org
BUG=

Review URL: https://codereview.chromium.org/18051010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
bmeurer@chromium.org 2013-06-28 11:44:16 +00:00
parent 85d7a36ee0
commit 382ec92f2a
2 changed files with 258 additions and 390 deletions

File diff suppressed because it is too large Load Diff

View File

@ -997,6 +997,36 @@ class HGraphBuilder {
return static_cast<I*>(AddInstruction(new(zone()) I(p1, p2, p3)));
}
template<class I, class P1, class P2, class P3, class P4>
I* Add(P1 p1, P2 p2, P3 p3, P4 p4) {
return static_cast<I*>(AddInstruction(new(zone()) I(p1, p2, p3, p4)));
}
template<class I, class P1, class P2, class P3, class P4, class P5>
I* Add(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {
return static_cast<I*>(AddInstruction(new(zone()) I(p1, p2, p3, p4, p5)));
}
template<class I, class P1, class P2, class P3, class P4, class P5, class P6>
I* Add(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) {
return static_cast<I*>(AddInstruction(
new(zone()) I(p1, p2, p3, p4, p5, p6)));
}
template<class I, class P1, class P2, class P3,
class P4, class P5, class P6, class P7>
I* Add(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) {
return static_cast<I*>(AddInstruction(
new(zone()) I(p1, p2, p3, p4, p5, p6, p7)));
}
template<class I, class P1, class P2, class P3, class P4,
class P5, class P6, class P7, class P8>
I* Add(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) {
return static_cast<I*>(AddInstruction(
new(zone()) I(p1, p2, p3, p4, p5, p6, p7, p8)));
}
void AddSimulate(BailoutId id,
RemovableSimulate removable = FIXED_SIMULATE);
@ -1291,9 +1321,6 @@ class HGraphBuilder {
int elements_size() const {
return IsFastDoubleElementsKind(kind_) ? kDoubleSize : kPointerSize;
}
HInstruction* AddInstruction(HInstruction* instr) {
return builder_->AddInstruction(instr);
}
HGraphBuilder* builder() { return builder_; }
HGraph* graph() { return builder_->graph(); }
int initial_capacity() {