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

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

Issue 2131583002: Optimized megamorphic stubs (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Addressed Florians comments. Created 4 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 CMPRES1, Immediate(kOneByteStringCid), &megamorphic_call); 1343 CMPRES1, Immediate(kOneByteStringCid), &megamorphic_call);
1344 1344
1345 __ lw(V0, FieldAddress(T0, String::hash_offset())); 1345 __ lw(V0, FieldAddress(T0, String::hash_offset()));
1346 __ bne(V0, ZR, &done); 1346 __ bne(V0, ZR, &done);
1347 1347
1348 __ Bind(&megamorphic_call); 1348 __ Bind(&megamorphic_call);
1349 __ Comment("Slow case: megamorphic call"); 1349 __ Comment("Slow case: megamorphic call");
1350 } 1350 }
1351 __ LoadObject(S5, cache); 1351 __ LoadObject(S5, cache);
1352 if (FLAG_use_megamorphic_stub) { 1352 if (FLAG_use_megamorphic_stub) {
1353 __ BranchLink(*StubCode::MegamorphicLookup_entry()); 1353 __ lw(T9, Address(THR, Thread::megamorphic_lookup_entry_point_offset()));
1354 __ jalr(T9);
1354 } else { 1355 } else {
1355 StubCode::EmitMegamorphicLookup(assembler()); 1356 StubCode::EmitMegamorphicLookup(assembler());
1356 } 1357 }
1357 __ jalr(T1); 1358 __ jalr(T1);
1358 1359
1359 __ Bind(&done); 1360 __ Bind(&done);
1360 RecordSafepoint(locs, slow_path_argument_count); 1361 RecordSafepoint(locs, slow_path_argument_count);
1361 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1362 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1362 if (FLAG_precompiled_mode) { 1363 if (FLAG_precompiled_mode) {
1363 // Megamorphic calls may occur in slow path stubs. 1364 // Megamorphic calls may occur in slow path stubs.
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 __ AddImmediate(SP, kDoubleSize); 1962 __ AddImmediate(SP, kDoubleSize);
1962 } 1963 }
1963 1964
1964 1965
1965 #undef __ 1966 #undef __
1966 1967
1967 1968
1968 } // namespace dart 1969 } // namespace dart
1969 1970
1970 #endif // defined TARGET_ARCH_MIPS 1971 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698