OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 #if !defined(DART_PRECOMPILED_RUNTIME) | 4 #if !defined(DART_PRECOMPILED_RUNTIME) |
5 #include "vm/flow_graph_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
6 | 6 |
7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
8 #include "vm/precompiler.h" | 8 #include "vm/precompiler.h" |
9 #include "vm/block_scheduler.h" | 9 #include "vm/block_scheduler.h" |
10 #include "vm/branch_optimizer.h" | 10 #include "vm/branch_optimizer.h" |
(...skipping 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2303 needs_store_barrier, index_scale, array_cid, kAlignedAccess, | 2303 needs_store_barrier, index_scale, array_cid, kAlignedAccess, |
2304 call->deopt_id(), call->token_pos()); | 2304 call->deopt_id(), call->token_pos()); |
2305 flow_graph->AppendTo(cursor, *last, call->env(), FlowGraph::kEffect); | 2305 flow_graph->AppendTo(cursor, *last, call->env(), FlowGraph::kEffect); |
2306 return true; | 2306 return true; |
2307 } | 2307 } |
2308 | 2308 |
2309 | 2309 |
2310 static bool InlineDoubleOp(FlowGraph* flow_graph, | 2310 static bool InlineDoubleOp(FlowGraph* flow_graph, |
2311 Token::Kind op_kind, | 2311 Token::Kind op_kind, |
2312 Instruction* call, | 2312 Instruction* call, |
| 2313 Definition* receiver, |
2313 TargetEntryInstr** entry, | 2314 TargetEntryInstr** entry, |
2314 Definition** last) { | 2315 Definition** last) { |
2315 if (!CanUnboxDouble()) { | 2316 if (!CanUnboxDouble()) { |
2316 return false; | 2317 return false; |
2317 } | 2318 } |
2318 Definition* left = call->ArgumentAt(0); | 2319 Definition* left = receiver; |
2319 Definition* right = call->ArgumentAt(1); | 2320 Definition* right = call->ArgumentAt(1); |
2320 | 2321 |
2321 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 2322 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
2322 call->GetBlock()->try_index()); | 2323 call->GetBlock()->try_index()); |
2323 (*entry)->InheritDeoptTarget(Z, call); | 2324 (*entry)->InheritDeoptTarget(Z, call); |
2324 // Arguments are checked. No need for class check. | 2325 // Arguments are checked. No need for class check. |
2325 BinaryDoubleOpInstr* double_bin_op = new (Z) | 2326 BinaryDoubleOpInstr* double_bin_op = new (Z) |
2326 BinaryDoubleOpInstr(op_kind, new (Z) Value(left), new (Z) Value(right), | 2327 BinaryDoubleOpInstr(op_kind, new (Z) Value(left), new (Z) Value(right), |
2327 call->deopt_id(), call->token_pos()); | 2328 call->deopt_id(), call->token_pos()); |
2328 flow_graph->AppendTo(*entry, double_bin_op, call->env(), FlowGraph::kValue); | 2329 flow_graph->AppendTo(*entry, double_bin_op, call->env(), FlowGraph::kValue); |
2329 *last = double_bin_op; | 2330 *last = double_bin_op; |
2330 | 2331 |
2331 return true; | 2332 return true; |
2332 } | 2333 } |
2333 | 2334 |
2334 | 2335 |
2335 static bool InlineDoubleTestOp(FlowGraph* flow_graph, | 2336 static bool InlineDoubleTestOp(FlowGraph* flow_graph, |
2336 Instruction* call, | 2337 Instruction* call, |
| 2338 Definition* receiver, |
2337 MethodRecognizer::Kind kind, | 2339 MethodRecognizer::Kind kind, |
2338 TargetEntryInstr** entry, | 2340 TargetEntryInstr** entry, |
2339 Definition** last) { | 2341 Definition** last) { |
2340 if (!CanUnboxDouble()) { | 2342 if (!CanUnboxDouble()) { |
2341 return false; | 2343 return false; |
2342 } | 2344 } |
2343 Definition* d = call->ArgumentAt(0); | |
2344 | 2345 |
2345 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 2346 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
2346 call->GetBlock()->try_index()); | 2347 call->GetBlock()->try_index()); |
2347 (*entry)->InheritDeoptTarget(Z, call); | 2348 (*entry)->InheritDeoptTarget(Z, call); |
2348 // Arguments are checked. No need for class check. | 2349 // Arguments are checked. No need for class check. |
2349 | 2350 |
2350 DoubleTestOpInstr* double_test_op = new (Z) DoubleTestOpInstr( | 2351 DoubleTestOpInstr* double_test_op = new (Z) DoubleTestOpInstr( |
2351 kind, new (Z) Value(d), call->deopt_id(), call->token_pos()); | 2352 kind, new (Z) Value(receiver), call->deopt_id(), call->token_pos()); |
2352 flow_graph->AppendTo(*entry, double_test_op, call->env(), FlowGraph::kValue); | 2353 flow_graph->AppendTo(*entry, double_test_op, call->env(), FlowGraph::kValue); |
2353 *last = double_test_op; | 2354 *last = double_test_op; |
2354 | 2355 |
2355 return true; | 2356 return true; |
2356 } | 2357 } |
2357 | 2358 |
2358 | 2359 |
2359 static bool InlineSmiBitAndFromSmi(FlowGraph* flow_graph, | 2360 static bool InlineSmiBitAndFromSmi(FlowGraph* flow_graph, |
2360 Instruction* call, | 2361 Instruction* call, |
| 2362 Definition* receiver, |
2361 TargetEntryInstr** entry, | 2363 TargetEntryInstr** entry, |
2362 Definition** last) { | 2364 Definition** last) { |
2363 Definition* left = call->ArgumentAt(0); | 2365 Definition* left = receiver; |
2364 Definition* right = call->ArgumentAt(1); | 2366 Definition* right = call->ArgumentAt(1); |
2365 | 2367 |
2366 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 2368 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
2367 call->GetBlock()->try_index()); | 2369 call->GetBlock()->try_index()); |
2368 (*entry)->InheritDeoptTarget(Z, call); | 2370 (*entry)->InheritDeoptTarget(Z, call); |
2369 // Right arguments is known to be smi: other._bitAndFromSmi(this); | 2371 // Right arguments is known to be smi: other._bitAndFromSmi(this); |
2370 BinarySmiOpInstr* smi_op = | 2372 BinarySmiOpInstr* smi_op = |
2371 new (Z) BinarySmiOpInstr(Token::kBIT_AND, new (Z) Value(left), | 2373 new (Z) BinarySmiOpInstr(Token::kBIT_AND, new (Z) Value(left), |
2372 new (Z) Value(right), call->deopt_id()); | 2374 new (Z) Value(right), call->deopt_id()); |
2373 flow_graph->AppendTo(*entry, smi_op, call->env(), FlowGraph::kValue); | 2375 flow_graph->AppendTo(*entry, smi_op, call->env(), FlowGraph::kValue); |
2374 *last = smi_op; | 2376 *last = smi_op; |
2375 | 2377 |
2376 return true; | 2378 return true; |
2377 } | 2379 } |
2378 | 2380 |
2379 | 2381 |
2380 static bool InlineGrowableArraySetter(FlowGraph* flow_graph, | 2382 static bool InlineGrowableArraySetter(FlowGraph* flow_graph, |
2381 intptr_t offset, | 2383 intptr_t offset, |
2382 StoreBarrierType store_barrier_type, | 2384 StoreBarrierType store_barrier_type, |
2383 Instruction* call, | 2385 Instruction* call, |
| 2386 Definition* receiver, |
2384 TargetEntryInstr** entry, | 2387 TargetEntryInstr** entry, |
2385 Definition** last) { | 2388 Definition** last) { |
2386 Definition* array = call->ArgumentAt(0); | 2389 Definition* array = receiver; |
2387 Definition* value = call->ArgumentAt(1); | 2390 Definition* value = call->ArgumentAt(1); |
2388 | 2391 |
2389 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 2392 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
2390 call->GetBlock()->try_index()); | 2393 call->GetBlock()->try_index()); |
2391 (*entry)->InheritDeoptTarget(Z, call); | 2394 (*entry)->InheritDeoptTarget(Z, call); |
2392 | 2395 |
2393 // This is an internal method, no need to check argument types. | 2396 // This is an internal method, no need to check argument types. |
2394 StoreInstanceFieldInstr* store = new (Z) StoreInstanceFieldInstr( | 2397 StoreInstanceFieldInstr* store = new (Z) StoreInstanceFieldInstr( |
2395 offset, new (Z) Value(array), new (Z) Value(value), store_barrier_type, | 2398 offset, new (Z) Value(array), new (Z) Value(value), store_barrier_type, |
2396 call->token_pos()); | 2399 call->token_pos()); |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2680 cid, kAlignedAccess, Thread::kNoDeoptId, call->token_pos()); | 2683 cid, kAlignedAccess, Thread::kNoDeoptId, call->token_pos()); |
2681 | 2684 |
2682 cursor = flow_graph->AppendTo(cursor, load_indexed, NULL, FlowGraph::kValue); | 2685 cursor = flow_graph->AppendTo(cursor, load_indexed, NULL, FlowGraph::kValue); |
2683 ASSERT(cursor == load_indexed); | 2686 ASSERT(cursor == load_indexed); |
2684 return load_indexed; | 2687 return load_indexed; |
2685 } | 2688 } |
2686 | 2689 |
2687 | 2690 |
2688 static bool InlineStringBaseCharAt(FlowGraph* flow_graph, | 2691 static bool InlineStringBaseCharAt(FlowGraph* flow_graph, |
2689 Instruction* call, | 2692 Instruction* call, |
| 2693 Definition* receiver, |
2690 intptr_t cid, | 2694 intptr_t cid, |
2691 TargetEntryInstr** entry, | 2695 TargetEntryInstr** entry, |
2692 Definition** last) { | 2696 Definition** last) { |
2693 if ((cid != kOneByteStringCid) && (cid != kExternalOneByteStringCid)) { | 2697 if ((cid != kOneByteStringCid) && (cid != kExternalOneByteStringCid)) { |
2694 return false; | 2698 return false; |
2695 } | 2699 } |
2696 Definition* str = call->ArgumentAt(0); | 2700 Definition* str = receiver; |
2697 Definition* index = call->ArgumentAt(1); | 2701 Definition* index = call->ArgumentAt(1); |
2698 | 2702 |
2699 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 2703 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
2700 call->GetBlock()->try_index()); | 2704 call->GetBlock()->try_index()); |
2701 (*entry)->InheritDeoptTarget(Z, call); | 2705 (*entry)->InheritDeoptTarget(Z, call); |
2702 | 2706 |
2703 *last = PrepareInlineStringIndexOp(flow_graph, call, cid, str, index, *entry); | 2707 *last = PrepareInlineStringIndexOp(flow_graph, call, cid, str, index, *entry); |
2704 | 2708 |
2705 OneByteStringFromCharCodeInstr* char_at = | 2709 OneByteStringFromCharCodeInstr* char_at = |
2706 new (Z) OneByteStringFromCharCodeInstr(new (Z) Value(*last)); | 2710 new (Z) OneByteStringFromCharCodeInstr(new (Z) Value(*last)); |
2707 | 2711 |
2708 flow_graph->AppendTo(*last, char_at, NULL, FlowGraph::kValue); | 2712 flow_graph->AppendTo(*last, char_at, NULL, FlowGraph::kValue); |
2709 *last = char_at; | 2713 *last = char_at; |
2710 | 2714 |
2711 return true; | 2715 return true; |
2712 } | 2716 } |
2713 | 2717 |
2714 | 2718 |
2715 static bool InlineStringCodeUnitAt(FlowGraph* flow_graph, | 2719 static bool InlineStringCodeUnitAt(FlowGraph* flow_graph, |
2716 Instruction* call, | 2720 Instruction* call, |
| 2721 Definition* receiver, |
2717 intptr_t cid, | 2722 intptr_t cid, |
2718 TargetEntryInstr** entry, | 2723 TargetEntryInstr** entry, |
2719 Definition** last) { | 2724 Definition** last) { |
2720 ASSERT((cid == kOneByteStringCid) || (cid == kTwoByteStringCid) || | 2725 ASSERT((cid == kOneByteStringCid) || (cid == kTwoByteStringCid) || |
2721 (cid == kExternalOneByteStringCid) || | 2726 (cid == kExternalOneByteStringCid) || |
2722 (cid == kExternalTwoByteStringCid)); | 2727 (cid == kExternalTwoByteStringCid)); |
2723 Definition* str = call->ArgumentAt(0); | 2728 Definition* str = receiver; |
2724 Definition* index = call->ArgumentAt(1); | 2729 Definition* index = call->ArgumentAt(1); |
2725 | 2730 |
2726 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 2731 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
2727 call->GetBlock()->try_index()); | 2732 call->GetBlock()->try_index()); |
2728 (*entry)->InheritDeoptTarget(Z, call); | 2733 (*entry)->InheritDeoptTarget(Z, call); |
2729 | 2734 |
2730 *last = PrepareInlineStringIndexOp(flow_graph, call, cid, str, index, *entry); | 2735 *last = PrepareInlineStringIndexOp(flow_graph, call, cid, str, index, *entry); |
2731 | 2736 |
2732 return true; | 2737 return true; |
2733 } | 2738 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2787 } | 2792 } |
2788 | 2793 |
2789 | 2794 |
2790 bool FlowGraphInliner::TryReplaceStaticCallWithInline( | 2795 bool FlowGraphInliner::TryReplaceStaticCallWithInline( |
2791 FlowGraph* flow_graph, | 2796 FlowGraph* flow_graph, |
2792 ForwardInstructionIterator* iterator, | 2797 ForwardInstructionIterator* iterator, |
2793 StaticCallInstr* call) { | 2798 StaticCallInstr* call) { |
2794 TargetEntryInstr* entry; | 2799 TargetEntryInstr* entry; |
2795 Definition* last; | 2800 Definition* last; |
2796 if (FlowGraphInliner::TryInlineRecognizedMethod( | 2801 if (FlowGraphInliner::TryInlineRecognizedMethod( |
2797 flow_graph, kIllegalCid, call->function(), call, call->ArgumentAt(0), | 2802 flow_graph, kIllegalCid, call->function(), call, NULL, |
2798 call->token_pos(), *call->ic_data(), &entry, &last)) { | 2803 call->token_pos(), *call->ic_data(), &entry, &last)) { |
2799 // Remove the original push arguments. | 2804 // Remove the original push arguments. |
2800 for (intptr_t i = 0; i < call->ArgumentCount(); ++i) { | 2805 for (intptr_t i = 0; i < call->ArgumentCount(); ++i) { |
2801 PushArgumentInstr* push = call->PushArgumentAt(i); | 2806 PushArgumentInstr* push = call->PushArgumentAt(i); |
2802 push->ReplaceUsesWith(push->value()->definition()); | 2807 push->ReplaceUsesWith(push->value()->definition()); |
2803 push->RemoveFromGraph(); | 2808 push->RemoveFromGraph(); |
2804 } | 2809 } |
2805 // Replace all uses of this definition with the result. | 2810 // Replace all uses of this definition with the result. |
2806 if (call->HasUses()) { | 2811 if (call->HasUses()) { |
2807 call->ReplaceUsesWith(last); | 2812 call->ReplaceUsesWith(last); |
(...skipping 13 matching lines...) Expand all Loading... |
2821 call->set_previous(NULL); | 2826 call->set_previous(NULL); |
2822 call->set_next(NULL); | 2827 call->set_next(NULL); |
2823 return true; | 2828 return true; |
2824 } | 2829 } |
2825 return false; | 2830 return false; |
2826 } | 2831 } |
2827 | 2832 |
2828 | 2833 |
2829 static bool InlineFloat32x4Method(FlowGraph* flow_graph, | 2834 static bool InlineFloat32x4Method(FlowGraph* flow_graph, |
2830 Instruction* call, | 2835 Instruction* call, |
| 2836 Definition* receiver, |
2831 MethodRecognizer::Kind kind, | 2837 MethodRecognizer::Kind kind, |
2832 TargetEntryInstr** entry, | 2838 TargetEntryInstr** entry, |
2833 Definition** last) { | 2839 Definition** last) { |
2834 if (!ShouldInlineSimd()) { | 2840 if (!ShouldInlineSimd()) { |
2835 return false; | 2841 return false; |
2836 } | 2842 } |
| 2843 |
2837 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 2844 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
2838 call->GetBlock()->try_index()); | 2845 call->GetBlock()->try_index()); |
2839 (*entry)->InheritDeoptTarget(Z, call); | 2846 (*entry)->InheritDeoptTarget(Z, call); |
2840 Instruction* cursor = *entry; | 2847 Instruction* cursor = *entry; |
2841 switch (kind) { | 2848 switch (kind) { |
2842 case MethodRecognizer::kFloat32x4ShuffleX: | 2849 case MethodRecognizer::kFloat32x4ShuffleX: |
2843 case MethodRecognizer::kFloat32x4ShuffleY: | 2850 case MethodRecognizer::kFloat32x4ShuffleY: |
2844 case MethodRecognizer::kFloat32x4ShuffleZ: | 2851 case MethodRecognizer::kFloat32x4ShuffleZ: |
2845 case MethodRecognizer::kFloat32x4ShuffleW: { | 2852 case MethodRecognizer::kFloat32x4ShuffleW: { |
2846 *last = | 2853 *last = new (Z) Simd32x4ShuffleInstr(kind, new (Z) Value(receiver), |
2847 new (Z) Simd32x4ShuffleInstr(kind, new (Z) Value(call->ArgumentAt(0)), | 2854 0, // mask ignored. |
2848 0, // mask ignored. | 2855 call->deopt_id()); |
2849 call->deopt_id()); | |
2850 break; | 2856 break; |
2851 } | 2857 } |
2852 case MethodRecognizer::kFloat32x4GetSignMask: { | 2858 case MethodRecognizer::kFloat32x4GetSignMask: { |
2853 *last = new (Z) Simd32x4GetSignMaskInstr( | 2859 *last = new (Z) Simd32x4GetSignMaskInstr(kind, new (Z) Value(receiver), |
2854 kind, new (Z) Value(call->ArgumentAt(0)), call->deopt_id()); | 2860 call->deopt_id()); |
2855 break; | 2861 break; |
2856 } | 2862 } |
2857 case MethodRecognizer::kFloat32x4Equal: | 2863 case MethodRecognizer::kFloat32x4Equal: |
2858 case MethodRecognizer::kFloat32x4GreaterThan: | 2864 case MethodRecognizer::kFloat32x4GreaterThan: |
2859 case MethodRecognizer::kFloat32x4GreaterThanOrEqual: | 2865 case MethodRecognizer::kFloat32x4GreaterThanOrEqual: |
2860 case MethodRecognizer::kFloat32x4LessThan: | 2866 case MethodRecognizer::kFloat32x4LessThan: |
2861 case MethodRecognizer::kFloat32x4LessThanOrEqual: | 2867 case MethodRecognizer::kFloat32x4LessThanOrEqual: |
2862 case MethodRecognizer::kFloat32x4NotEqual: { | 2868 case MethodRecognizer::kFloat32x4NotEqual: { |
2863 Definition* left = call->ArgumentAt(0); | 2869 Definition* left = receiver; |
2864 Definition* right = call->ArgumentAt(1); | 2870 Definition* right = call->ArgumentAt(1); |
2865 *last = new (Z) Float32x4ComparisonInstr( | 2871 *last = new (Z) Float32x4ComparisonInstr( |
2866 kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id()); | 2872 kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id()); |
2867 break; | 2873 break; |
2868 } | 2874 } |
2869 case MethodRecognizer::kFloat32x4Min: | 2875 case MethodRecognizer::kFloat32x4Min: |
2870 case MethodRecognizer::kFloat32x4Max: { | 2876 case MethodRecognizer::kFloat32x4Max: { |
2871 Definition* left = call->ArgumentAt(0); | 2877 Definition* left = receiver; |
2872 Definition* right = call->ArgumentAt(1); | 2878 Definition* right = call->ArgumentAt(1); |
2873 *last = new (Z) Float32x4MinMaxInstr( | 2879 *last = new (Z) Float32x4MinMaxInstr( |
2874 kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id()); | 2880 kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id()); |
2875 break; | 2881 break; |
2876 } | 2882 } |
2877 case MethodRecognizer::kFloat32x4Scale: { | 2883 case MethodRecognizer::kFloat32x4Scale: { |
2878 Definition* left = call->ArgumentAt(0); | 2884 Definition* left = receiver; |
2879 Definition* right = call->ArgumentAt(1); | 2885 Definition* right = call->ArgumentAt(1); |
2880 // Left and right values are swapped when handed to the instruction, | 2886 // Left and right values are swapped when handed to the instruction, |
2881 // this is done so that the double value is loaded into the output | 2887 // this is done so that the double value is loaded into the output |
2882 // register and can be destroyed. | 2888 // register and can be destroyed. |
2883 *last = new (Z) Float32x4ScaleInstr( | 2889 *last = new (Z) Float32x4ScaleInstr( |
2884 kind, new (Z) Value(right), new (Z) Value(left), call->deopt_id()); | 2890 kind, new (Z) Value(right), new (Z) Value(left), call->deopt_id()); |
2885 break; | 2891 break; |
2886 } | 2892 } |
2887 case MethodRecognizer::kFloat32x4Sqrt: | 2893 case MethodRecognizer::kFloat32x4Sqrt: |
2888 case MethodRecognizer::kFloat32x4ReciprocalSqrt: | 2894 case MethodRecognizer::kFloat32x4ReciprocalSqrt: |
2889 case MethodRecognizer::kFloat32x4Reciprocal: { | 2895 case MethodRecognizer::kFloat32x4Reciprocal: { |
2890 Definition* left = call->ArgumentAt(0); | 2896 Definition* left = receiver; |
2891 *last = new (Z) | 2897 *last = new (Z) |
2892 Float32x4SqrtInstr(kind, new (Z) Value(left), call->deopt_id()); | 2898 Float32x4SqrtInstr(kind, new (Z) Value(left), call->deopt_id()); |
2893 break; | 2899 break; |
2894 } | 2900 } |
2895 case MethodRecognizer::kFloat32x4WithX: | 2901 case MethodRecognizer::kFloat32x4WithX: |
2896 case MethodRecognizer::kFloat32x4WithY: | 2902 case MethodRecognizer::kFloat32x4WithY: |
2897 case MethodRecognizer::kFloat32x4WithZ: | 2903 case MethodRecognizer::kFloat32x4WithZ: |
2898 case MethodRecognizer::kFloat32x4WithW: { | 2904 case MethodRecognizer::kFloat32x4WithW: { |
2899 Definition* left = call->ArgumentAt(0); | 2905 Definition* left = receiver; |
2900 Definition* right = call->ArgumentAt(1); | 2906 Definition* right = call->ArgumentAt(1); |
2901 *last = new (Z) Float32x4WithInstr( | 2907 *last = new (Z) Float32x4WithInstr( |
2902 kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id()); | 2908 kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id()); |
2903 break; | 2909 break; |
2904 } | 2910 } |
2905 case MethodRecognizer::kFloat32x4Absolute: | 2911 case MethodRecognizer::kFloat32x4Absolute: |
2906 case MethodRecognizer::kFloat32x4Negate: { | 2912 case MethodRecognizer::kFloat32x4Negate: { |
2907 Definition* left = call->ArgumentAt(0); | 2913 Definition* left = receiver; |
2908 *last = new (Z) | 2914 *last = new (Z) |
2909 Float32x4ZeroArgInstr(kind, new (Z) Value(left), call->deopt_id()); | 2915 Float32x4ZeroArgInstr(kind, new (Z) Value(left), call->deopt_id()); |
2910 break; | 2916 break; |
2911 } | 2917 } |
2912 case MethodRecognizer::kFloat32x4Clamp: { | 2918 case MethodRecognizer::kFloat32x4Clamp: { |
2913 Definition* left = call->ArgumentAt(0); | 2919 Definition* left = receiver; |
2914 Definition* lower = call->ArgumentAt(1); | 2920 Definition* lower = call->ArgumentAt(1); |
2915 Definition* upper = call->ArgumentAt(2); | 2921 Definition* upper = call->ArgumentAt(2); |
2916 *last = | 2922 *last = |
2917 new (Z) Float32x4ClampInstr(new (Z) Value(left), new (Z) Value(lower), | 2923 new (Z) Float32x4ClampInstr(new (Z) Value(left), new (Z) Value(lower), |
2918 new (Z) Value(upper), call->deopt_id()); | 2924 new (Z) Value(upper), call->deopt_id()); |
2919 break; | 2925 break; |
2920 } | 2926 } |
2921 default: | 2927 default: |
2922 UNREACHABLE(); | 2928 UNREACHABLE(); |
2923 return false; | 2929 return false; |
(...skipping 15 matching lines...) Expand all Loading... |
2939 if ((mask < 0) || (mask > 255)) { | 2945 if ((mask < 0) || (mask > 255)) { |
2940 return false; // Not a valid mask. | 2946 return false; // Not a valid mask. |
2941 } | 2947 } |
2942 *mask_ptr = mask; | 2948 *mask_ptr = mask; |
2943 return true; | 2949 return true; |
2944 } | 2950 } |
2945 | 2951 |
2946 | 2952 |
2947 static bool InlineSimdShuffleMethod(FlowGraph* flow_graph, | 2953 static bool InlineSimdShuffleMethod(FlowGraph* flow_graph, |
2948 Instruction* call, | 2954 Instruction* call, |
| 2955 Definition* receiver, |
2949 MethodRecognizer::Kind kind, | 2956 MethodRecognizer::Kind kind, |
2950 TargetEntryInstr** entry, | 2957 TargetEntryInstr** entry, |
2951 Definition** last) { | 2958 Definition** last) { |
2952 if (!ShouldInlineSimd()) { | 2959 if (!ShouldInlineSimd()) { |
2953 return false; | 2960 return false; |
2954 } | 2961 } |
2955 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 2962 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
2956 call->GetBlock()->try_index()); | 2963 call->GetBlock()->try_index()); |
2957 (*entry)->InheritDeoptTarget(Z, call); | 2964 (*entry)->InheritDeoptTarget(Z, call); |
2958 Instruction* cursor = *entry; | 2965 Instruction* cursor = *entry; |
2959 Definition* mask_definition = call->ArgumentAt(1); | 2966 Definition* mask_definition = call->ArgumentAt(1); |
2960 intptr_t mask = 0; | 2967 intptr_t mask = 0; |
2961 if (!CheckMask(mask_definition, &mask)) { | 2968 if (!CheckMask(mask_definition, &mask)) { |
2962 return false; | 2969 return false; |
2963 } | 2970 } |
2964 *last = new (Z) Simd32x4ShuffleInstr(kind, new (Z) Value(call->ArgumentAt(0)), | 2971 *last = new (Z) Simd32x4ShuffleInstr(kind, new (Z) Value(call->ArgumentAt(0)), |
2965 mask, call->deopt_id()); | 2972 mask, call->deopt_id()); |
2966 flow_graph->AppendTo( | 2973 flow_graph->AppendTo( |
2967 cursor, *last, | 2974 cursor, *last, |
2968 call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL, | 2975 call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL, |
2969 FlowGraph::kValue); | 2976 FlowGraph::kValue); |
2970 return true; | 2977 return true; |
2971 } | 2978 } |
2972 | 2979 |
2973 | 2980 |
2974 static bool InlineSimdShuffleMixMethod(FlowGraph* flow_graph, | 2981 static bool InlineSimdShuffleMixMethod(FlowGraph* flow_graph, |
2975 Instruction* call, | 2982 Instruction* call, |
| 2983 Definition* receiver, |
2976 MethodRecognizer::Kind kind, | 2984 MethodRecognizer::Kind kind, |
2977 TargetEntryInstr** entry, | 2985 TargetEntryInstr** entry, |
2978 Definition** last) { | 2986 Definition** last) { |
2979 if (!ShouldInlineSimd()) { | 2987 if (!ShouldInlineSimd()) { |
2980 return false; | 2988 return false; |
2981 } | 2989 } |
2982 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 2990 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
2983 call->GetBlock()->try_index()); | 2991 call->GetBlock()->try_index()); |
2984 (*entry)->InheritDeoptTarget(Z, call); | 2992 (*entry)->InheritDeoptTarget(Z, call); |
2985 Instruction* cursor = *entry; | 2993 Instruction* cursor = *entry; |
2986 Definition* mask_definition = call->ArgumentAt(2); | 2994 Definition* mask_definition = call->ArgumentAt(2); |
2987 intptr_t mask = 0; | 2995 intptr_t mask = 0; |
2988 if (!CheckMask(mask_definition, &mask)) { | 2996 if (!CheckMask(mask_definition, &mask)) { |
2989 return false; | 2997 return false; |
2990 } | 2998 } |
2991 *last = new (Z) Simd32x4ShuffleMixInstr( | 2999 *last = new (Z) Simd32x4ShuffleMixInstr(kind, new (Z) Value(receiver), |
2992 kind, new (Z) Value(call->ArgumentAt(0)), | 3000 new (Z) Value(call->ArgumentAt(1)), |
2993 new (Z) Value(call->ArgumentAt(1)), mask, call->deopt_id()); | 3001 mask, call->deopt_id()); |
2994 flow_graph->AppendTo( | 3002 flow_graph->AppendTo( |
2995 cursor, *last, | 3003 cursor, *last, |
2996 call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL, | 3004 call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL, |
2997 FlowGraph::kValue); | 3005 FlowGraph::kValue); |
2998 return true; | 3006 return true; |
2999 } | 3007 } |
3000 | 3008 |
3001 | 3009 |
3002 static bool InlineInt32x4Method(FlowGraph* flow_graph, | 3010 static bool InlineInt32x4Method(FlowGraph* flow_graph, |
3003 Instruction* call, | 3011 Instruction* call, |
| 3012 Definition* receiver, |
3004 MethodRecognizer::Kind kind, | 3013 MethodRecognizer::Kind kind, |
3005 TargetEntryInstr** entry, | 3014 TargetEntryInstr** entry, |
3006 Definition** last) { | 3015 Definition** last) { |
3007 if (!ShouldInlineSimd()) { | 3016 if (!ShouldInlineSimd()) { |
3008 return false; | 3017 return false; |
3009 } | 3018 } |
3010 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 3019 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
3011 call->GetBlock()->try_index()); | 3020 call->GetBlock()->try_index()); |
3012 (*entry)->InheritDeoptTarget(Z, call); | 3021 (*entry)->InheritDeoptTarget(Z, call); |
3013 Instruction* cursor = *entry; | 3022 Instruction* cursor = *entry; |
3014 switch (kind) { | 3023 switch (kind) { |
3015 case MethodRecognizer::kInt32x4GetFlagX: | 3024 case MethodRecognizer::kInt32x4GetFlagX: |
3016 case MethodRecognizer::kInt32x4GetFlagY: | 3025 case MethodRecognizer::kInt32x4GetFlagY: |
3017 case MethodRecognizer::kInt32x4GetFlagZ: | 3026 case MethodRecognizer::kInt32x4GetFlagZ: |
3018 case MethodRecognizer::kInt32x4GetFlagW: { | 3027 case MethodRecognizer::kInt32x4GetFlagW: { |
3019 *last = new (Z) Int32x4GetFlagInstr( | 3028 *last = new (Z) |
3020 kind, new (Z) Value(call->ArgumentAt(0)), call->deopt_id()); | 3029 Int32x4GetFlagInstr(kind, new (Z) Value(receiver), call->deopt_id()); |
3021 break; | 3030 break; |
3022 } | 3031 } |
3023 case MethodRecognizer::kInt32x4GetSignMask: { | 3032 case MethodRecognizer::kInt32x4GetSignMask: { |
3024 *last = new (Z) Simd32x4GetSignMaskInstr( | 3033 *last = new (Z) Simd32x4GetSignMaskInstr(kind, new (Z) Value(receiver), |
3025 kind, new (Z) Value(call->ArgumentAt(0)), call->deopt_id()); | 3034 call->deopt_id()); |
3026 break; | 3035 break; |
3027 } | 3036 } |
3028 case MethodRecognizer::kInt32x4Select: { | 3037 case MethodRecognizer::kInt32x4Select: { |
3029 Definition* mask = call->ArgumentAt(0); | 3038 Definition* mask = receiver; |
3030 Definition* trueValue = call->ArgumentAt(1); | 3039 Definition* trueValue = call->ArgumentAt(1); |
3031 Definition* falseValue = call->ArgumentAt(2); | 3040 Definition* falseValue = call->ArgumentAt(2); |
3032 *last = new (Z) | 3041 *last = new (Z) |
3033 Int32x4SelectInstr(new (Z) Value(mask), new (Z) Value(trueValue), | 3042 Int32x4SelectInstr(new (Z) Value(mask), new (Z) Value(trueValue), |
3034 new (Z) Value(falseValue), call->deopt_id()); | 3043 new (Z) Value(falseValue), call->deopt_id()); |
3035 break; | 3044 break; |
3036 } | 3045 } |
3037 case MethodRecognizer::kInt32x4WithFlagX: | 3046 case MethodRecognizer::kInt32x4WithFlagX: |
3038 case MethodRecognizer::kInt32x4WithFlagY: | 3047 case MethodRecognizer::kInt32x4WithFlagY: |
3039 case MethodRecognizer::kInt32x4WithFlagZ: | 3048 case MethodRecognizer::kInt32x4WithFlagZ: |
3040 case MethodRecognizer::kInt32x4WithFlagW: { | 3049 case MethodRecognizer::kInt32x4WithFlagW: { |
3041 *last = new (Z) Int32x4SetFlagInstr( | 3050 *last = new (Z) Int32x4SetFlagInstr(kind, new (Z) Value(receiver), |
3042 kind, new (Z) Value(call->ArgumentAt(0)), | 3051 new (Z) Value(call->ArgumentAt(1)), |
3043 new (Z) Value(call->ArgumentAt(1)), call->deopt_id()); | 3052 call->deopt_id()); |
3044 break; | 3053 break; |
3045 } | 3054 } |
3046 default: | 3055 default: |
3047 return false; | 3056 return false; |
3048 } | 3057 } |
3049 flow_graph->AppendTo( | 3058 flow_graph->AppendTo( |
3050 cursor, *last, | 3059 cursor, *last, |
3051 call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL, | 3060 call->deopt_id() != Thread::kNoDeoptId ? call->env() : NULL, |
3052 FlowGraph::kValue); | 3061 FlowGraph::kValue); |
3053 return true; | 3062 return true; |
3054 } | 3063 } |
3055 | 3064 |
3056 | 3065 |
3057 static bool InlineFloat64x2Method(FlowGraph* flow_graph, | 3066 static bool InlineFloat64x2Method(FlowGraph* flow_graph, |
3058 Instruction* call, | 3067 Instruction* call, |
| 3068 Definition* receiver, |
3059 MethodRecognizer::Kind kind, | 3069 MethodRecognizer::Kind kind, |
3060 TargetEntryInstr** entry, | 3070 TargetEntryInstr** entry, |
3061 Definition** last) { | 3071 Definition** last) { |
3062 if (!ShouldInlineSimd()) { | 3072 if (!ShouldInlineSimd()) { |
3063 return false; | 3073 return false; |
3064 } | 3074 } |
3065 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 3075 *entry = new (Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
3066 call->GetBlock()->try_index()); | 3076 call->GetBlock()->try_index()); |
3067 (*entry)->InheritDeoptTarget(Z, call); | 3077 (*entry)->InheritDeoptTarget(Z, call); |
3068 Instruction* cursor = *entry; | 3078 Instruction* cursor = *entry; |
3069 switch (kind) { | 3079 switch (kind) { |
3070 case MethodRecognizer::kFloat64x2GetX: | 3080 case MethodRecognizer::kFloat64x2GetX: |
3071 case MethodRecognizer::kFloat64x2GetY: { | 3081 case MethodRecognizer::kFloat64x2GetY: { |
3072 *last = | 3082 *last = new (Z) Simd64x2ShuffleInstr(kind, new (Z) Value(receiver), |
3073 new (Z) Simd64x2ShuffleInstr(kind, new (Z) Value(call->ArgumentAt(0)), | 3083 0, // mask is ignored. |
3074 0, // mask is ignored. | 3084 call->deopt_id()); |
3075 call->deopt_id()); | |
3076 break; | 3085 break; |
3077 } | 3086 } |
3078 case MethodRecognizer::kFloat64x2Negate: | 3087 case MethodRecognizer::kFloat64x2Negate: |
3079 case MethodRecognizer::kFloat64x2Abs: | 3088 case MethodRecognizer::kFloat64x2Abs: |
3080 case MethodRecognizer::kFloat64x2Sqrt: | 3089 case MethodRecognizer::kFloat64x2Sqrt: |
3081 case MethodRecognizer::kFloat64x2GetSignMask: { | 3090 case MethodRecognizer::kFloat64x2GetSignMask: { |
3082 *last = new (Z) Float64x2ZeroArgInstr( | 3091 *last = new (Z) Float64x2ZeroArgInstr(kind, new (Z) Value(receiver), |
3083 kind, new (Z) Value(call->ArgumentAt(0)), call->deopt_id()); | 3092 call->deopt_id()); |
3084 break; | 3093 break; |
3085 } | 3094 } |
3086 case MethodRecognizer::kFloat64x2Scale: | 3095 case MethodRecognizer::kFloat64x2Scale: |
3087 case MethodRecognizer::kFloat64x2WithX: | 3096 case MethodRecognizer::kFloat64x2WithX: |
3088 case MethodRecognizer::kFloat64x2WithY: | 3097 case MethodRecognizer::kFloat64x2WithY: |
3089 case MethodRecognizer::kFloat64x2Min: | 3098 case MethodRecognizer::kFloat64x2Min: |
3090 case MethodRecognizer::kFloat64x2Max: { | 3099 case MethodRecognizer::kFloat64x2Max: { |
3091 Definition* left = call->ArgumentAt(0); | 3100 Definition* left = receiver; |
3092 Definition* right = call->ArgumentAt(1); | 3101 Definition* right = call->ArgumentAt(1); |
3093 *last = new (Z) Float64x2OneArgInstr( | 3102 *last = new (Z) Float64x2OneArgInstr( |
3094 kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id()); | 3103 kind, new (Z) Value(left), new (Z) Value(right), call->deopt_id()); |
3095 break; | 3104 break; |
3096 } | 3105 } |
3097 default: | 3106 default: |
3098 UNREACHABLE(); | 3107 UNREACHABLE(); |
3099 return false; | 3108 return false; |
3100 } | 3109 } |
3101 flow_graph->AppendTo( | 3110 flow_graph->AppendTo( |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3426 if (!ShouldInlineSimd()) { | 3435 if (!ShouldInlineSimd()) { |
3427 return false; | 3436 return false; |
3428 } | 3437 } |
3429 return InlineByteArrayBaseStore(flow_graph, target, call, receiver, | 3438 return InlineByteArrayBaseStore(flow_graph, target, call, receiver, |
3430 receiver_cid, kTypedDataInt32x4ArrayCid, | 3439 receiver_cid, kTypedDataInt32x4ArrayCid, |
3431 entry, last); | 3440 entry, last); |
3432 case MethodRecognizer::kOneByteStringCodeUnitAt: | 3441 case MethodRecognizer::kOneByteStringCodeUnitAt: |
3433 case MethodRecognizer::kTwoByteStringCodeUnitAt: | 3442 case MethodRecognizer::kTwoByteStringCodeUnitAt: |
3434 case MethodRecognizer::kExternalOneByteStringCodeUnitAt: | 3443 case MethodRecognizer::kExternalOneByteStringCodeUnitAt: |
3435 case MethodRecognizer::kExternalTwoByteStringCodeUnitAt: | 3444 case MethodRecognizer::kExternalTwoByteStringCodeUnitAt: |
3436 return InlineStringCodeUnitAt(flow_graph, call, receiver_cid, entry, | 3445 return InlineStringCodeUnitAt(flow_graph, call, receiver, receiver_cid, |
3437 last); | 3446 entry, last); |
3438 case MethodRecognizer::kStringBaseCharAt: | 3447 case MethodRecognizer::kStringBaseCharAt: |
3439 return InlineStringBaseCharAt(flow_graph, call, receiver_cid, entry, | 3448 return InlineStringBaseCharAt(flow_graph, call, receiver, receiver_cid, |
3440 last); | 3449 entry, last); |
3441 case MethodRecognizer::kDoubleAdd: | 3450 case MethodRecognizer::kDoubleAdd: |
3442 return InlineDoubleOp(flow_graph, Token::kADD, call, entry, last); | 3451 return InlineDoubleOp(flow_graph, Token::kADD, call, receiver, entry, |
| 3452 last); |
3443 case MethodRecognizer::kDoubleSub: | 3453 case MethodRecognizer::kDoubleSub: |
3444 return InlineDoubleOp(flow_graph, Token::kSUB, call, entry, last); | 3454 return InlineDoubleOp(flow_graph, Token::kSUB, call, receiver, entry, |
| 3455 last); |
3445 case MethodRecognizer::kDoubleMul: | 3456 case MethodRecognizer::kDoubleMul: |
3446 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); | 3457 return InlineDoubleOp(flow_graph, Token::kMUL, call, receiver, entry, |
| 3458 last); |
3447 case MethodRecognizer::kDoubleDiv: | 3459 case MethodRecognizer::kDoubleDiv: |
3448 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); | 3460 return InlineDoubleOp(flow_graph, Token::kDIV, call, receiver, entry, |
| 3461 last); |
3449 case MethodRecognizer::kDouble_getIsNaN: | 3462 case MethodRecognizer::kDouble_getIsNaN: |
3450 case MethodRecognizer::kDouble_getIsInfinite: | 3463 case MethodRecognizer::kDouble_getIsInfinite: |
3451 return InlineDoubleTestOp(flow_graph, call, kind, entry, last); | 3464 return InlineDoubleTestOp(flow_graph, call, receiver, kind, entry, last); |
3452 case MethodRecognizer::kGrowableArraySetData: | 3465 case MethodRecognizer::kGrowableArraySetData: |
3453 ASSERT(receiver_cid == kGrowableObjectArrayCid); | 3466 ASSERT(receiver_cid == kGrowableObjectArrayCid); |
3454 ASSERT(ic_data.NumberOfChecks() == 1); | 3467 ASSERT(ic_data.NumberOfChecks() == 1); |
3455 return InlineGrowableArraySetter(flow_graph, | 3468 return InlineGrowableArraySetter( |
3456 GrowableObjectArray::data_offset(), | 3469 flow_graph, GrowableObjectArray::data_offset(), kEmitStoreBarrier, |
3457 kEmitStoreBarrier, call, entry, last); | 3470 call, receiver, entry, last); |
3458 case MethodRecognizer::kGrowableArraySetLength: | 3471 case MethodRecognizer::kGrowableArraySetLength: |
3459 ASSERT(receiver_cid == kGrowableObjectArrayCid); | 3472 ASSERT(receiver_cid == kGrowableObjectArrayCid); |
3460 ASSERT(ic_data.NumberOfChecks() == 1); | 3473 ASSERT(ic_data.NumberOfChecks() == 1); |
3461 return InlineGrowableArraySetter(flow_graph, | 3474 return InlineGrowableArraySetter( |
3462 GrowableObjectArray::length_offset(), | 3475 flow_graph, GrowableObjectArray::length_offset(), kNoStoreBarrier, |
3463 kNoStoreBarrier, call, entry, last); | 3476 call, receiver, entry, last); |
3464 case MethodRecognizer::kSmi_bitAndFromSmi: | 3477 case MethodRecognizer::kSmi_bitAndFromSmi: |
3465 return InlineSmiBitAndFromSmi(flow_graph, call, entry, last); | 3478 return InlineSmiBitAndFromSmi(flow_graph, call, receiver, entry, last); |
3466 | 3479 |
3467 case MethodRecognizer::kFloat32x4ShuffleX: | 3480 case MethodRecognizer::kFloat32x4ShuffleX: |
3468 case MethodRecognizer::kFloat32x4ShuffleY: | 3481 case MethodRecognizer::kFloat32x4ShuffleY: |
3469 case MethodRecognizer::kFloat32x4ShuffleZ: | 3482 case MethodRecognizer::kFloat32x4ShuffleZ: |
3470 case MethodRecognizer::kFloat32x4ShuffleW: | 3483 case MethodRecognizer::kFloat32x4ShuffleW: |
3471 case MethodRecognizer::kFloat32x4GetSignMask: | 3484 case MethodRecognizer::kFloat32x4GetSignMask: |
3472 case MethodRecognizer::kFloat32x4Equal: | 3485 case MethodRecognizer::kFloat32x4Equal: |
3473 case MethodRecognizer::kFloat32x4GreaterThan: | 3486 case MethodRecognizer::kFloat32x4GreaterThan: |
3474 case MethodRecognizer::kFloat32x4GreaterThanOrEqual: | 3487 case MethodRecognizer::kFloat32x4GreaterThanOrEqual: |
3475 case MethodRecognizer::kFloat32x4LessThan: | 3488 case MethodRecognizer::kFloat32x4LessThan: |
3476 case MethodRecognizer::kFloat32x4LessThanOrEqual: | 3489 case MethodRecognizer::kFloat32x4LessThanOrEqual: |
3477 case MethodRecognizer::kFloat32x4NotEqual: | 3490 case MethodRecognizer::kFloat32x4NotEqual: |
3478 case MethodRecognizer::kFloat32x4Min: | 3491 case MethodRecognizer::kFloat32x4Min: |
3479 case MethodRecognizer::kFloat32x4Max: | 3492 case MethodRecognizer::kFloat32x4Max: |
3480 case MethodRecognizer::kFloat32x4Scale: | 3493 case MethodRecognizer::kFloat32x4Scale: |
3481 case MethodRecognizer::kFloat32x4Sqrt: | 3494 case MethodRecognizer::kFloat32x4Sqrt: |
3482 case MethodRecognizer::kFloat32x4ReciprocalSqrt: | 3495 case MethodRecognizer::kFloat32x4ReciprocalSqrt: |
3483 case MethodRecognizer::kFloat32x4Reciprocal: | 3496 case MethodRecognizer::kFloat32x4Reciprocal: |
3484 case MethodRecognizer::kFloat32x4WithX: | 3497 case MethodRecognizer::kFloat32x4WithX: |
3485 case MethodRecognizer::kFloat32x4WithY: | 3498 case MethodRecognizer::kFloat32x4WithY: |
3486 case MethodRecognizer::kFloat32x4WithZ: | 3499 case MethodRecognizer::kFloat32x4WithZ: |
3487 case MethodRecognizer::kFloat32x4WithW: | 3500 case MethodRecognizer::kFloat32x4WithW: |
3488 case MethodRecognizer::kFloat32x4Absolute: | 3501 case MethodRecognizer::kFloat32x4Absolute: |
3489 case MethodRecognizer::kFloat32x4Negate: | 3502 case MethodRecognizer::kFloat32x4Negate: |
3490 case MethodRecognizer::kFloat32x4Clamp: | 3503 case MethodRecognizer::kFloat32x4Clamp: |
3491 return InlineFloat32x4Method(flow_graph, call, kind, entry, last); | 3504 return InlineFloat32x4Method(flow_graph, call, receiver, kind, entry, |
| 3505 last); |
3492 | 3506 |
3493 case MethodRecognizer::kFloat32x4ShuffleMix: | 3507 case MethodRecognizer::kFloat32x4ShuffleMix: |
3494 case MethodRecognizer::kInt32x4ShuffleMix: | 3508 case MethodRecognizer::kInt32x4ShuffleMix: |
3495 return InlineSimdShuffleMixMethod(flow_graph, call, kind, entry, last); | 3509 return InlineSimdShuffleMixMethod(flow_graph, call, receiver, kind, entry, |
| 3510 last); |
3496 | 3511 |
3497 case MethodRecognizer::kFloat32x4Shuffle: | 3512 case MethodRecognizer::kFloat32x4Shuffle: |
3498 case MethodRecognizer::kInt32x4Shuffle: | 3513 case MethodRecognizer::kInt32x4Shuffle: |
3499 return InlineSimdShuffleMethod(flow_graph, call, kind, entry, last); | 3514 return InlineSimdShuffleMethod(flow_graph, call, receiver, kind, entry, |
| 3515 last); |
3500 | 3516 |
3501 case MethodRecognizer::kInt32x4GetFlagX: | 3517 case MethodRecognizer::kInt32x4GetFlagX: |
3502 case MethodRecognizer::kInt32x4GetFlagY: | 3518 case MethodRecognizer::kInt32x4GetFlagY: |
3503 case MethodRecognizer::kInt32x4GetFlagZ: | 3519 case MethodRecognizer::kInt32x4GetFlagZ: |
3504 case MethodRecognizer::kInt32x4GetFlagW: | 3520 case MethodRecognizer::kInt32x4GetFlagW: |
3505 case MethodRecognizer::kInt32x4GetSignMask: | 3521 case MethodRecognizer::kInt32x4GetSignMask: |
3506 case MethodRecognizer::kInt32x4Select: | 3522 case MethodRecognizer::kInt32x4Select: |
3507 case MethodRecognizer::kInt32x4WithFlagX: | 3523 case MethodRecognizer::kInt32x4WithFlagX: |
3508 case MethodRecognizer::kInt32x4WithFlagY: | 3524 case MethodRecognizer::kInt32x4WithFlagY: |
3509 case MethodRecognizer::kInt32x4WithFlagZ: | 3525 case MethodRecognizer::kInt32x4WithFlagZ: |
3510 case MethodRecognizer::kInt32x4WithFlagW: | 3526 case MethodRecognizer::kInt32x4WithFlagW: |
3511 return InlineInt32x4Method(flow_graph, call, kind, entry, last); | 3527 return InlineInt32x4Method(flow_graph, call, receiver, kind, entry, last); |
3512 | 3528 |
3513 case MethodRecognizer::kFloat64x2GetX: | 3529 case MethodRecognizer::kFloat64x2GetX: |
3514 case MethodRecognizer::kFloat64x2GetY: | 3530 case MethodRecognizer::kFloat64x2GetY: |
3515 case MethodRecognizer::kFloat64x2Negate: | 3531 case MethodRecognizer::kFloat64x2Negate: |
3516 case MethodRecognizer::kFloat64x2Abs: | 3532 case MethodRecognizer::kFloat64x2Abs: |
3517 case MethodRecognizer::kFloat64x2Sqrt: | 3533 case MethodRecognizer::kFloat64x2Sqrt: |
3518 case MethodRecognizer::kFloat64x2GetSignMask: | 3534 case MethodRecognizer::kFloat64x2GetSignMask: |
3519 case MethodRecognizer::kFloat64x2Scale: | 3535 case MethodRecognizer::kFloat64x2Scale: |
3520 case MethodRecognizer::kFloat64x2WithX: | 3536 case MethodRecognizer::kFloat64x2WithX: |
3521 case MethodRecognizer::kFloat64x2WithY: | 3537 case MethodRecognizer::kFloat64x2WithY: |
3522 case MethodRecognizer::kFloat64x2Min: | 3538 case MethodRecognizer::kFloat64x2Min: |
3523 case MethodRecognizer::kFloat64x2Max: | 3539 case MethodRecognizer::kFloat64x2Max: |
3524 return InlineFloat64x2Method(flow_graph, call, kind, entry, last); | 3540 return InlineFloat64x2Method(flow_graph, call, receiver, kind, entry, |
| 3541 last); |
3525 | 3542 |
3526 case MethodRecognizer::kFloat32x4Zero: | 3543 case MethodRecognizer::kFloat32x4Zero: |
3527 case MethodRecognizer::kFloat32x4Splat: | 3544 case MethodRecognizer::kFloat32x4Splat: |
3528 case MethodRecognizer::kFloat32x4Constructor: | 3545 case MethodRecognizer::kFloat32x4Constructor: |
3529 case MethodRecognizer::kFloat32x4FromFloat64x2: | 3546 case MethodRecognizer::kFloat32x4FromFloat64x2: |
3530 case MethodRecognizer::kFloat64x2Constructor: | 3547 case MethodRecognizer::kFloat64x2Constructor: |
3531 case MethodRecognizer::kFloat64x2Zero: | 3548 case MethodRecognizer::kFloat64x2Zero: |
3532 case MethodRecognizer::kFloat64x2Splat: | 3549 case MethodRecognizer::kFloat64x2Splat: |
3533 case MethodRecognizer::kFloat64x2FromFloat32x4: | 3550 case MethodRecognizer::kFloat64x2FromFloat32x4: |
3534 case MethodRecognizer::kInt32x4BoolConstructor: | 3551 case MethodRecognizer::kInt32x4BoolConstructor: |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3631 } | 3648 } |
3632 | 3649 |
3633 default: | 3650 default: |
3634 return false; | 3651 return false; |
3635 } | 3652 } |
3636 } | 3653 } |
3637 | 3654 |
3638 | 3655 |
3639 } // namespace dart | 3656 } // namespace dart |
3640 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 3657 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |