Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/precompiler.h" | 5 #include "vm/precompiler.h" |
| 6 | 6 |
| 7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/branch_optimizer.h" | 10 #include "vm/branch_optimizer.h" |
| (...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1925 } | 1925 } |
| 1926 | 1926 |
| 1927 code_ = function.CurrentCode(); | 1927 code_ = function.CurrentCode(); |
| 1928 pool_ = code_.object_pool(); | 1928 pool_ = code_.object_pool(); |
| 1929 for (intptr_t i = 0; i < pool_.Length(); i++) { | 1929 for (intptr_t i = 0; i < pool_.Length(); i++) { |
| 1930 if (pool_.InfoAt(i) != ObjectPool::kTaggedObject) continue; | 1930 if (pool_.InfoAt(i) != ObjectPool::kTaggedObject) continue; |
| 1931 entry_ = pool_.ObjectAt(i); | 1931 entry_ = pool_.ObjectAt(i); |
| 1932 if (entry_.IsICData()) { | 1932 if (entry_.IsICData()) { |
| 1933 ic_ ^= entry_.raw(); | 1933 ic_ ^= entry_.raw(); |
| 1934 | 1934 |
| 1935 // SwitchableCalls use single-check ICs. No other kind of IC call is | 1935 if (ic_.NumArgsTested() != 1) continue; |
|
Florian Schneider
2016/08/12 17:56:29
So we do still use ICs with >1 argument checks?
| |
| 1936 // generated in precompilation mode. | |
| 1937 ASSERT(ic_.NumArgsTested() == 1); | |
| 1938 | 1936 |
| 1939 for (intptr_t j = 0; j < ic_.NumberOfChecks(); j++) { | 1937 for (intptr_t j = 0; j < ic_.NumberOfChecks(); j++) { |
| 1940 entry_ = ic_.GetTargetOrCodeAt(j); | 1938 entry_ = ic_.GetTargetOrCodeAt(j); |
| 1941 if (entry_.IsFunction()) { | 1939 if (entry_.IsFunction()) { |
| 1942 target_ ^= entry_.raw(); | 1940 target_ ^= entry_.raw(); |
| 1943 ASSERT(target_.HasCode()); | 1941 ASSERT(target_.HasCode()); |
| 1944 target_code_ = target_.CurrentCode(); | 1942 target_code_ = target_.CurrentCode(); |
| 1945 entry_point_ = Smi::FromAlignedAddress(target_code_.EntryPoint()); | 1943 entry_point_ = Smi::FromAlignedAddress(target_code_.EntryPoint()); |
| 1946 ic_.SetCodeAt(j, target_code_); | 1944 ic_.SetCodeAt(j, target_code_); |
| 1947 ic_.SetEntryPointAt(j, entry_point_); | 1945 ic_.SetEntryPointAt(j, entry_point_); |
| (...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2948 CompilationPipeline::New(thread->zone(), function); | 2946 CompilationPipeline::New(thread->zone(), function); |
| 2949 | 2947 |
| 2950 ASSERT(FLAG_precompiled_mode); | 2948 ASSERT(FLAG_precompiled_mode); |
| 2951 const bool optimized = function.IsOptimizable(); // False for natives. | 2949 const bool optimized = function.IsOptimizable(); // False for natives. |
| 2952 return PrecompileFunctionHelper(pipeline, function, optimized); | 2950 return PrecompileFunctionHelper(pipeline, function, optimized); |
| 2953 } | 2951 } |
| 2954 | 2952 |
| 2955 #endif // DART_PRECOMPILER | 2953 #endif // DART_PRECOMPILER |
| 2956 | 2954 |
| 2957 } // namespace dart | 2955 } // namespace dart |
| OLD | NEW |