Split LInstruction into multiple variant to make our LIR more compact.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 10 Jan 2011 12:19:15 +0000 (12:19 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 10 Jan 2011 12:19:15 +0000 (12:19 +0000)
commitf89ce8159a36ab6fb491a575fbf0dc9c7d141a6a
treef6fde064a2bab12792237de8ed2d8314a3add5fa
parent16336d5a6846e12abf19fdfe49c13ee379d720db
Split LInstruction into multiple variant to make our LIR more compact.

This change introduces LTemplateInstruction which is a specialized version
of LInstruction and takes one template parameter to indicate whether the
instruction produces a result operand.

All instruction that do not have a result inherit from LTemplateInstruction<0>.
Instructions that have a result operand from LTemplateInstruction<1>

All the Define* function only operate on instructions with a result.

For this to work I also refactored the places where we do

  LInstruction* result = new Lxyy

into

  Lxyz* result = new Lxyz

Review URL: http://codereview.chromium.org/6219001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/ia32/lithium-ia32.cc
src/ia32/lithium-ia32.h
src/lithium-allocator.h