OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // Class for intrinsifying functions. | 4 // Class for intrinsifying functions. |
5 | 5 |
6 #include "vm/intrinsifier.h" | 6 #include "vm/intrinsifier.h" |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 OS::PrintErr("%s\n", error.ToErrorCString()); \ | 81 OS::PrintErr("%s\n", error.ToErrorCString()); \ |
82 } \ | 82 } \ |
83 ASSERT(error.IsNull()); \ | 83 ASSERT(error.IsNull()); \ |
84 if (#function_name[0] == '.') { \ | 84 if (#function_name[0] == '.') { \ |
85 str = String::New(#class_name #function_name); \ | 85 str = String::New(#class_name #function_name); \ |
86 } else { \ | 86 } else { \ |
87 str = String::New(#function_name); \ | 87 str = String::New(#function_name); \ |
88 } \ | 88 } \ |
89 func = cls.LookupFunctionAllowPrivate(str); \ | 89 func = cls.LookupFunctionAllowPrivate(str); \ |
90 } \ | 90 } \ |
91 if (func.IsNull()) \ | |
92 OS::PrintErr("Failed to find %s->%s\n", #class_name, #function_name); \ | |
rmacnak
2017/08/23 01:16:50
FATAL2?
Vyacheslav Egorov (Google)
2017/08/23 15:54:52
Done.
| |
91 ASSERT(!func.IsNull()); \ | 93 ASSERT(!func.IsNull()); \ |
92 func.set_is_intrinsic(true); | 94 func.set_is_intrinsic(true); |
93 | 95 |
94 // Set up all core lib functions that can be intrinsified. | 96 // Set up all core lib functions that can be intrinsified. |
95 lib = Library::CoreLibrary(); | 97 lib = Library::CoreLibrary(); |
96 ASSERT(!lib.IsNull()); | 98 ASSERT(!lib.IsNull()); |
97 CORE_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | 99 CORE_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
98 CORE_INTEGER_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | 100 CORE_INTEGER_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
99 GRAPH_CORE_INTRINSICS_LIST(SETUP_FUNCTION); | 101 GRAPH_CORE_INTRINSICS_LIST(SETUP_FUNCTION); |
100 | 102 |
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1128 void Intrinsifier::RegExp_ExecuteMatch(Assembler* assembler) { | 1130 void Intrinsifier::RegExp_ExecuteMatch(Assembler* assembler) { |
1129 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/false); | 1131 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/false); |
1130 } | 1132 } |
1131 | 1133 |
1132 void Intrinsifier::RegExp_ExecuteMatchSticky(Assembler* assembler) { | 1134 void Intrinsifier::RegExp_ExecuteMatchSticky(Assembler* assembler) { |
1133 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/true); | 1135 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/true); |
1134 } | 1136 } |
1135 #endif // !defined(TARGET_ARCH_DBC) | 1137 #endif // !defined(TARGET_ARCH_DBC) |
1136 | 1138 |
1137 } // namespace dart | 1139 } // namespace dart |
OLD | NEW |