Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Unified Diff: src/code-stubs-hydrogen.cc

Issue 1250733005: SIMD.js Add the other SIMD Phase 1 types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't run downloaded SIMD value type tests. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ }
+ }
+ }
+ }
+ }
+ }
}
}
}
« no previous file with comments | « src/code-stubs.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698