Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: runtime/vm/intrinsifier.cc

Issue 2965723002: VM: Reland Inline instance object hash code into object header on 64bit. (Closed)
Patch Set: Fix snapshot incompatibility that sank Flutter Gallery Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/assembler.h" 6 #include "vm/assembler.h"
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 const Function& function = parsed_function.function(); 221 const Function& function = parsed_function.function();
222 if (!CanIntrinsify(function)) { 222 if (!CanIntrinsify(function)) {
223 return false; 223 return false;
224 } 224 }
225 225
226 ASSERT(!compiler->flow_graph().IsCompiledForOsr()); 226 ASSERT(!compiler->flow_graph().IsCompiledForOsr());
227 if (GraphIntrinsify(parsed_function, compiler)) { 227 if (GraphIntrinsify(parsed_function, compiler)) {
228 return compiler->intrinsic_slow_path_label()->IsUnused(); 228 return compiler->intrinsic_slow_path_label()->IsUnused();
229 } 229 }
230 230
231 #if !defined(HASH_IN_OBJECT_HEADER)
Vyacheslav Egorov (Google) 2017/06/30 16:47:26 I think it is just okay to have an empty intrinsic
erikcorry 2017/06/30 20:00:09 I assumed it would break things. The implementati
232 // These two are more complicated on 32 bit platforms, where the
233 // identity hash is not stored in the header of the object. We
234 // therefore don't intrinsify them, falling back on the native C++
235 // implementations.
236 if (function.recognized_kind() == MethodRecognizer::kObject_getHash ||
237 function.recognized_kind() == MethodRecognizer::kObject_setHash) {
238 return false;
239 }
240 #endif
241
231 #define EMIT_CASE(class_name, function_name, enum_name, type, fp) \ 242 #define EMIT_CASE(class_name, function_name, enum_name, type, fp) \
232 case MethodRecognizer::k##enum_name: \ 243 case MethodRecognizer::k##enum_name: \
233 compiler->assembler()->Comment("Intrinsic"); \ 244 compiler->assembler()->Comment("Intrinsic"); \
234 enum_name(compiler->assembler()); \ 245 enum_name(compiler->assembler()); \
235 break; 246 break;
236 247
237 switch (function.recognized_kind()) { 248 switch (function.recognized_kind()) {
238 ALL_INTRINSICS_NO_INTEGER_LIB_LIST(EMIT_CASE); 249 ALL_INTRINSICS_NO_INTEGER_LIB_LIST(EMIT_CASE);
239 default: 250 default:
240 break; 251 break;
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 } 1186 }
1176 1187
1177 1188
1178 void Intrinsifier::RegExp_ExecuteMatchSticky(Assembler* assembler) { 1189 void Intrinsifier::RegExp_ExecuteMatchSticky(Assembler* assembler) {
1179 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/true); 1190 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/true);
1180 } 1191 }
1181 #endif // !defined(TARGET_ARCH_DBC) 1192 #endif // !defined(TARGET_ARCH_DBC)
1182 1193
1183 1194
1184 } // namespace dart 1195 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698