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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 } | 1050 } |
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"; } |
| 1061 |
1060 static bool IsMatch(const Object& a, const Object& b) { | 1062 static bool IsMatch(const Object& a, const Object& b) { |
1061 return a.IsString() && b.IsString() && | 1063 return a.IsString() && b.IsString() && |
1062 String::Cast(a).Equals(String::Cast(b)); | 1064 String::Cast(a).Equals(String::Cast(b)); |
1063 } | 1065 } |
1064 static uword Hash(const Object& obj) { | 1066 static uword Hash(const Object& obj) { |
1065 return String::Cast(obj).Hash(); | 1067 return String::Cast(obj).Hash(); |
1066 } | 1068 } |
1067 static RawObject* NewKey(const String& str) { | 1069 static RawObject* NewKey(const String& str) { |
1068 return str.raw(); | 1070 return str.raw(); |
1069 } | 1071 } |
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2682 CompilationPipeline::New(thread->zone(), function); | 2684 CompilationPipeline::New(thread->zone(), function); |
2683 | 2685 |
2684 ASSERT(FLAG_precompiled_mode); | 2686 ASSERT(FLAG_precompiled_mode); |
2685 const bool optimized = function.IsOptimizable(); // False for natives. | 2687 const bool optimized = function.IsOptimizable(); // False for natives. |
2686 return PrecompileFunctionHelper(pipeline, function, optimized); | 2688 return PrecompileFunctionHelper(pipeline, function, optimized); |
2687 } | 2689 } |
2688 | 2690 |
2689 #endif // DART_PRECOMPILER | 2691 #endif // DART_PRECOMPILER |
2690 | 2692 |
2691 } // namespace dart | 2693 } // namespace dart |
OLD | NEW |