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
parent aca5038b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment