Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index 4afd592ab19a4837451eb41dc6b6302e84cad1b0..b4c74abdd09acfeb38da4567b533491d5573ce52 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -405,19 +405,72 @@ HValue* CodeStubGraphBuilder<TypeofStub>::BuildCodeStub() { |
{ Push(Add<HConstant>(factory->float32x4_string())); } |
is_float32x4.Else(); |
{ |
- // Is it an undetectable object? |
- IfBuilder is_undetectable(this); |
- is_undetectable.If<HIsUndetectableAndBranch>(object); |
- is_undetectable.Then(); |
+ IfBuilder is_int32x4(this); |
+ is_int32x4.If<HCompareNumericAndBranch>( |
+ instance_type, Add<HConstant>(INT32X4_TYPE), Token::EQ); |
+ is_int32x4.Then(); |
+ { Push(Add<HConstant>(factory->int32x4_string())); } |
+ is_int32x4.Else(); |
{ |
- // typeof an undetectable object is 'undefined'. |
- Push(undefined_string); |
- } |
- is_undetectable.Else(); |
- { |
- // For any kind of object not handled above, the spec rule for |
- // host objects gives that it is okay to return "object". |
- Push(object_string); |
+ IfBuilder is_bool32x4(this); |
+ is_bool32x4.If<HCompareNumericAndBranch>( |
+ instance_type, Add<HConstant>(BOOL32X4_TYPE), Token::EQ); |
+ is_bool32x4.Then(); |
+ { Push(Add<HConstant>(factory->bool32x4_string())); } |
+ is_bool32x4.Else(); |
+ { |
+ IfBuilder is_int16x8(this); |
+ is_int16x8.If<HCompareNumericAndBranch>( |
+ instance_type, Add<HConstant>(INT16X8_TYPE), Token::EQ); |
+ is_int16x8.Then(); |
+ { Push(Add<HConstant>(factory->int16x8_string())); } |
+ is_int16x8.Else(); |
+ { |
+ IfBuilder is_bool16x8(this); |
+ is_bool16x8.If<HCompareNumericAndBranch>( |
+ instance_type, Add<HConstant>(BOOL16X8_TYPE), |
+ Token::EQ); |
+ is_bool16x8.Then(); |
+ { Push(Add<HConstant>(factory->bool16x8_string())); } |
+ is_bool16x8.Else(); |
+ { |
+ IfBuilder is_int8x16(this); |
+ is_int8x16.If<HCompareNumericAndBranch>( |
+ instance_type, Add<HConstant>(INT8X16_TYPE), |
+ Token::EQ); |
+ is_int8x16.Then(); |
+ { Push(Add<HConstant>(factory->int8x16_string())); } |
+ is_int8x16.Else(); |
+ { |
+ IfBuilder is_bool8x16(this); |
+ is_bool8x16.If<HCompareNumericAndBranch>( |
+ instance_type, Add<HConstant>(BOOL8X16_TYPE), |
+ Token::EQ); |
+ is_bool8x16.Then(); |
+ { Push(Add<HConstant>(factory->bool8x16_string())); } |
+ is_bool8x16.Else(); |
+ { |
+ // Is it an undetectable object? |
+ IfBuilder is_undetectable(this); |
+ is_undetectable.If<HIsUndetectableAndBranch>( |
+ object); |
+ is_undetectable.Then(); |
+ { |
+ // typeof an undetectable object is 'undefined'. |
+ Push(undefined_string); |
+ } |
+ is_undetectable.Else(); |
+ { |
+ // For any kind of object not handled above, the |
+ // spec rule for host objects gives that it is |
+ // okay to return "object". |
+ Push(object_string); |
+ } |
+ } |
+ } |
+ } |
+ } |
+ } |
} |
} |
} |