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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 } | 1051 } |
1052 } | 1052 } |
1053 } | 1053 } |
1054 } | 1054 } |
1055 } | 1055 } |
1056 | 1056 |
1057 | 1057 |
1058 class NameFunctionsTraits { | 1058 class NameFunctionsTraits { |
1059 public: | 1059 public: |
1060 static const char* Name() { return "NameFunctionsTraits"; } | 1060 static const char* Name() { return "NameFunctionsTraits"; } |
| 1061 static bool ReportStats() { return false; } |
1061 | 1062 |
1062 static bool IsMatch(const Object& a, const Object& b) { | 1063 static bool IsMatch(const Object& a, const Object& b) { |
1063 return a.IsString() && b.IsString() && | 1064 return a.IsString() && b.IsString() && |
1064 String::Cast(a).Equals(String::Cast(b)); | 1065 String::Cast(a).Equals(String::Cast(b)); |
1065 } | 1066 } |
1066 static uword Hash(const Object& obj) { | 1067 static uword Hash(const Object& obj) { |
1067 return String::Cast(obj).Hash(); | 1068 return String::Cast(obj).Hash(); |
1068 } | 1069 } |
1069 static RawObject* NewKey(const String& str) { | 1070 static RawObject* NewKey(const String& str) { |
1070 return str.raw(); | 1071 return str.raw(); |
(...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2684 CompilationPipeline::New(thread->zone(), function); | 2685 CompilationPipeline::New(thread->zone(), function); |
2685 | 2686 |
2686 ASSERT(FLAG_precompiled_mode); | 2687 ASSERT(FLAG_precompiled_mode); |
2687 const bool optimized = function.IsOptimizable(); // False for natives. | 2688 const bool optimized = function.IsOptimizable(); // False for natives. |
2688 return PrecompileFunctionHelper(pipeline, function, optimized); | 2689 return PrecompileFunctionHelper(pipeline, function, optimized); |
2689 } | 2690 } |
2690 | 2691 |
2691 #endif // DART_PRECOMPILER | 2692 #endif // DART_PRECOMPILER |
2692 | 2693 |
2693 } // namespace dart | 2694 } // namespace dart |
OLD | NEW |