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

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

Issue 1920103004: Added flag --inline_smi_string_hashcode and --inline_smi_string_hashcode_ratio to decide when/if sh… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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/globals.h" // Needed here to get TARGET_ARCH_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 const Array& arguments_descriptor = 1296 const Array& arguments_descriptor =
1297 Array::ZoneHandle(zone(), ic_data.arguments_descriptor()); 1297 Array::ZoneHandle(zone(), ic_data.arguments_descriptor());
1298 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0)); 1298 ASSERT(!arguments_descriptor.IsNull() && (arguments_descriptor.Length() > 0));
1299 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(), 1299 const MegamorphicCache& cache = MegamorphicCache::ZoneHandle(zone(),
1300 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor)); 1300 MegamorphicCacheTable::Lookup(isolate(), name, arguments_descriptor));
1301 1301
1302 __ Comment("MegamorphicCall"); 1302 __ Comment("MegamorphicCall");
1303 // Load receiver into R0. 1303 // Load receiver into R0.
1304 __ LoadFromOffset(R0, SP, (argument_count - 1) * kWordSize); 1304 __ LoadFromOffset(R0, SP, (argument_count - 1) * kWordSize);
1305 Label done; 1305 Label done;
1306 if (name.raw() == Symbols::hashCode().raw()) { 1306 if (ShouldInlineSmiStringHashCode(ic_data)) {
1307 Label megamorphic_call; 1307 Label megamorphic_call;
1308 __ Comment("Inlined get:hashCode for Smi and OneByteString"); 1308 __ Comment("Inlined get:hashCode for Smi and OneByteString");
1309 __ tsti(R0, Immediate(kSmiTagMask)); 1309 __ tsti(R0, Immediate(kSmiTagMask));
1310 __ b(&done, EQ); // Is Smi (result is receiver). 1310 __ b(&done, EQ); // Is Smi (result is receiver).
1311 1311
1312 __ CompareClassId(R0, kOneByteStringCid); 1312 __ CompareClassId(R0, kOneByteStringCid);
1313 __ b(&megamorphic_call, NE); 1313 __ b(&megamorphic_call, NE);
1314 1314
1315 // Use R5 (cache for megamorphic call) as scratch. 1315 // Use R5 (cache for megamorphic call) as scratch.
1316 __ mov(R5, R0); // Preserve receiver in R5, result in R0. 1316 __ mov(R5, R0); // Preserve receiver in R5, result in R0.
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1936 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1936 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1937 __ PopDouble(reg); 1937 __ PopDouble(reg);
1938 } 1938 }
1939 1939
1940 1940
1941 #undef __ 1941 #undef __
1942 1942
1943 } // namespace dart 1943 } // namespace dart
1944 1944
1945 #endif // defined TARGET_ARCH_ARM64 1945 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698