Hydrogenized KeyedLoadGeneric stub: Fix BuildDecodeField

R=yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2014-07-03 08:58:03 +00:00
parent aca5038b3d
commit 34eb0262a9

View File

@ -1311,10 +1311,11 @@ class HGraphBuilder {
template <class BitFieldClass>
HValue* BuildDecodeField(HValue* encoded_field) {
HValue* shifted_field = AddUncasted<HShr>(encoded_field,
Add<HConstant>(static_cast<int>(BitFieldClass::kShift)));
HValue* mask_value = Add<HConstant>(static_cast<int>(BitFieldClass::kMask));
return AddUncasted<HBitwise>(Token::BIT_AND, shifted_field, mask_value);
HValue* masked_field =
AddUncasted<HBitwise>(Token::BIT_AND, encoded_field, mask_value);
return AddUncasted<HShr>(masked_field,
Add<HConstant>(static_cast<int>(BitFieldClass::kShift)));
}
HValue* BuildGetElementsKind(HValue* object);