OLD | NEW |
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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2535 __ JumpIfSmi(eax, if_false); | 2535 __ JumpIfSmi(eax, if_false); |
2536 __ cmp(eax, isolate()->factory()->null_value()); | 2536 __ cmp(eax, isolate()->factory()->null_value()); |
2537 __ j(equal, if_true); | 2537 __ j(equal, if_true); |
2538 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 2538 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
2539 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, edx); | 2539 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, edx); |
2540 __ j(below, if_false); | 2540 __ j(below, if_false); |
2541 // Check for callable or undetectable objects => false. | 2541 // Check for callable or undetectable objects => false. |
2542 __ test_b(FieldOperand(edx, Map::kBitFieldOffset), | 2542 __ test_b(FieldOperand(edx, Map::kBitFieldOffset), |
2543 Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); | 2543 Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); |
2544 Split(zero, if_true, if_false, fall_through); | 2544 Split(zero, if_true, if_false, fall_through); |
2545 // clang-format off | |
2546 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ | |
2547 } else if (String::Equals(check, factory->type##_string())) { \ | |
2548 __ JumpIfSmi(eax, if_false); \ | |
2549 __ cmp(FieldOperand(eax, HeapObject::kMapOffset), \ | |
2550 isolate()->factory()->type##_map()); \ | |
2551 Split(equal, if_true, if_false, fall_through); | |
2552 SIMD128_TYPES(SIMD128_TYPE) | |
2553 #undef SIMD128_TYPE | |
2554 // clang-format on | |
2555 } else { | 2545 } else { |
2556 if (if_false != fall_through) __ jmp(if_false); | 2546 if (if_false != fall_through) __ jmp(if_false); |
2557 } | 2547 } |
2558 context()->Plug(if_true, if_false); | 2548 context()->Plug(if_true, if_false); |
2559 } | 2549 } |
2560 | 2550 |
2561 | 2551 |
2562 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { | 2552 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
2563 Comment cmnt(masm_, "[ CompareOperation"); | 2553 Comment cmnt(masm_, "[ CompareOperation"); |
2564 | 2554 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2779 isolate->builtins()->OnStackReplacement()->entry(), | 2769 isolate->builtins()->OnStackReplacement()->entry(), |
2780 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2770 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2781 return ON_STACK_REPLACEMENT; | 2771 return ON_STACK_REPLACEMENT; |
2782 } | 2772 } |
2783 | 2773 |
2784 | 2774 |
2785 } // namespace internal | 2775 } // namespace internal |
2786 } // namespace v8 | 2776 } // namespace v8 |
2787 | 2777 |
2788 #endif // V8_TARGET_ARCH_IA32 | 2778 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |