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

Side by Side 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: Make _IsSimdObject an assembly intrinsic in fullcodegen. 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 unified diff | Download patch
« no previous file with comments | « src/code-stubs.cc ('k') | src/contexts.h » ('j') | src/macros.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bailout-reason.h" 7 #include "src/bailout-reason.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/field-index.h" 9 #include "src/field-index.h"
10 #include "src/hydrogen.h" 10 #include "src/hydrogen.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 { Push(Add<HConstant>(factory->function_string())); } 398 { Push(Add<HConstant>(factory->function_string())); }
399 is_function.Else(); 399 is_function.Else();
400 { 400 {
401 IfBuilder is_float32x4(this); 401 IfBuilder is_float32x4(this);
402 is_float32x4.If<HCompareNumericAndBranch>( 402 is_float32x4.If<HCompareNumericAndBranch>(
403 instance_type, Add<HConstant>(FLOAT32X4_TYPE), Token::EQ); 403 instance_type, Add<HConstant>(FLOAT32X4_TYPE), Token::EQ);
404 is_float32x4.Then(); 404 is_float32x4.Then();
405 { Push(Add<HConstant>(factory->float32x4_string())); } 405 { Push(Add<HConstant>(factory->float32x4_string())); }
406 is_float32x4.Else(); 406 is_float32x4.Else();
407 { 407 {
408 // Is it an undetectable object? 408 IfBuilder is_int32x4(this);
409 IfBuilder is_undetectable(this); 409 is_int32x4.If<HCompareNumericAndBranch>(
410 is_undetectable.If<HIsUndetectableAndBranch>(object); 410 instance_type, Add<HConstant>(INT32X4_TYPE), Token::EQ);
411 is_undetectable.Then(); 411 is_int32x4.Then();
412 { Push(Add<HConstant>(factory->int32x4_string())); }
413 is_int32x4.Else();
412 { 414 {
413 // typeof an undetectable object is 'undefined'. 415 IfBuilder is_bool32x4(this);
414 Push(undefined_string); 416 is_bool32x4.If<HCompareNumericAndBranch>(
415 } 417 instance_type, Add<HConstant>(BOOL32X4_TYPE), Token::EQ);
416 is_undetectable.Else(); 418 is_bool32x4.Then();
417 { 419 { Push(Add<HConstant>(factory->bool32x4_string())); }
418 // For any kind of object not handled above, the spec rule for 420 is_bool32x4.Else();
419 // host objects gives that it is okay to return "object". 421 {
420 Push(object_string); 422 IfBuilder is_int16x8(this);
423 is_int16x8.If<HCompareNumericAndBranch>(
424 instance_type, Add<HConstant>(INT16X8_TYPE), Token::EQ);
425 is_int16x8.Then();
426 { Push(Add<HConstant>(factory->int16x8_string())); }
427 is_int16x8.Else();
428 {
429 IfBuilder is_bool16x8(this);
430 is_bool16x8.If<HCompareNumericAndBranch>(
431 instance_type, Add<HConstant>(BOOL16X8_TYPE),
432 Token::EQ);
433 is_bool16x8.Then();
434 { Push(Add<HConstant>(factory->bool16x8_string())); }
435 is_bool16x8.Else();
436 {
437 IfBuilder is_int8x16(this);
438 is_int8x16.If<HCompareNumericAndBranch>(
439 instance_type, Add<HConstant>(INT8X16_TYPE),
440 Token::EQ);
441 is_int8x16.Then();
442 { Push(Add<HConstant>(factory->int8x16_string())); }
443 is_int8x16.Else();
444 {
445 IfBuilder is_bool8x16(this);
446 is_bool8x16.If<HCompareNumericAndBranch>(
447 instance_type, Add<HConstant>(BOOL8X16_TYPE),
448 Token::EQ);
449 is_bool8x16.Then();
450 { Push(Add<HConstant>(factory->bool8x16_string())); }
451 is_bool8x16.Else();
452 {
453 // Is it an undetectable object?
454 IfBuilder is_undetectable(this);
455 is_undetectable.If<HIsUndetectableAndBranch>(
456 object);
457 is_undetectable.Then();
458 {
459 // typeof an undetectable object is 'undefined'.
460 Push(undefined_string);
461 }
462 is_undetectable.Else();
463 {
464 // For any kind of object not handled above, the
465 // spec rule for host objects gives that it is
466 // okay to return "object".
467 Push(object_string);
468 }
469 }
470 }
471 }
472 }
473 }
421 } 474 }
422 } 475 }
423 } 476 }
424 is_function.End(); 477 is_function.End();
425 } 478 }
426 is_symbol.End(); 479 is_symbol.End();
427 } 480 }
428 is_oddball.End(); 481 is_oddball.End();
429 } 482 }
430 is_string.End(); 483 is_string.End();
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 return Pop(); 2264 return Pop();
2212 } 2265 }
2213 2266
2214 2267
2215 Handle<Code> KeyedLoadGenericStub::GenerateCode() { 2268 Handle<Code> KeyedLoadGenericStub::GenerateCode() {
2216 return DoGenerateCode(this); 2269 return DoGenerateCode(this);
2217 } 2270 }
2218 2271
2219 } // namespace internal 2272 } // namespace internal
2220 } // namespace v8 2273 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/contexts.h » ('j') | src/macros.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698