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 | 4 |
5 #include "vm/jit_optimizer.h" | 5 #include "vm/jit_optimizer.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/branch_optimizer.h" | 8 #include "vm/branch_optimizer.h" |
9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1890 } | 1890 } |
1891 | 1891 |
1892 if ((class_ids[0] == kInt32x4Cid) && (ic_data.NumberOfChecks() == 1)) { | 1892 if ((class_ids[0] == kInt32x4Cid) && (ic_data.NumberOfChecks() == 1)) { |
1893 return TryInlineInt32x4Method(call, recognized_kind); | 1893 return TryInlineInt32x4Method(call, recognized_kind); |
1894 } | 1894 } |
1895 | 1895 |
1896 if ((class_ids[0] == kFloat64x2Cid) && (ic_data.NumberOfChecks() == 1)) { | 1896 if ((class_ids[0] == kFloat64x2Cid) && (ic_data.NumberOfChecks() == 1)) { |
1897 return TryInlineFloat64x2Method(call, recognized_kind); | 1897 return TryInlineFloat64x2Method(call, recognized_kind); |
1898 } | 1898 } |
1899 | 1899 |
| 1900 if (recognized_kind == MethodRecognizer::kSmi_bitAndFromSmi) { |
| 1901 AddReceiverCheck(call); |
| 1902 BinarySmiOpInstr* op = |
| 1903 new(Z) BinarySmiOpInstr( |
| 1904 Token::kBIT_AND, |
| 1905 new(Z) Value(call->ArgumentAt(0)), |
| 1906 new(Z) Value(call->ArgumentAt(1)), |
| 1907 call->deopt_id()); |
| 1908 ReplaceCall(call, op); |
| 1909 return true; |
| 1910 } |
| 1911 |
1900 return false; | 1912 return false; |
1901 } | 1913 } |
1902 | 1914 |
1903 | 1915 |
1904 bool JitOptimizer::TryInlineFloat32x4Constructor( | 1916 bool JitOptimizer::TryInlineFloat32x4Constructor( |
1905 StaticCallInstr* call, | 1917 StaticCallInstr* call, |
1906 MethodRecognizer::Kind recognized_kind) { | 1918 MethodRecognizer::Kind recognized_kind) { |
1907 if (!ShouldInlineSimd()) { | 1919 if (!ShouldInlineSimd()) { |
1908 return false; | 1920 return false; |
1909 } | 1921 } |
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3083 | 3095 |
3084 // Discard the environment from the original instruction because the store | 3096 // Discard the environment from the original instruction because the store |
3085 // can't deoptimize. | 3097 // can't deoptimize. |
3086 instr->RemoveEnvironment(); | 3098 instr->RemoveEnvironment(); |
3087 ReplaceCall(instr, store); | 3099 ReplaceCall(instr, store); |
3088 return true; | 3100 return true; |
3089 } | 3101 } |
3090 | 3102 |
3091 | 3103 |
3092 } // namespace dart | 3104 } // namespace dart |
OLD | NEW |