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

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

Issue 2403613002: Reduce size of monomorphic checked entry. (Closed)
Patch Set: . Created 4 years, 2 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" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 void Assembler::LeaveStubFrameAndReturn(Register ra) { 858 void Assembler::LeaveStubFrameAndReturn(Register ra) {
859 LeaveDartFrameAndReturn(ra); 859 LeaveDartFrameAndReturn(ra);
860 } 860 }
861 861
862 862
863 void Assembler::NoMonomorphicCheckedEntry() { 863 void Assembler::NoMonomorphicCheckedEntry() {
864 buffer_.Reset(); 864 buffer_.Reset();
865 break_(0); 865 break_(0);
866 break_(0); 866 break_(0);
867 break_(0); 867 break_(0);
868 break_(0);
869 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset); 868 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset);
870 } 869 }
871 870
872 871
873 // T0 receiver, S5 guarded cid as Smi 872 // T0 receiver, S5 guarded cid as Smi
874 void Assembler::MonomorphicCheckedEntry() { 873 void Assembler::MonomorphicCheckedEntry() {
875 bool saved_use_far_branches = use_far_branches(); 874 bool saved_use_far_branches = use_far_branches();
876 set_use_far_branches(false); 875 set_use_far_branches(false);
877 876
878 Label have_cid, miss; 877 Label have_cid, miss;
879 Bind(&miss); 878 Bind(&miss);
880 lw(CODE_REG, Address(THR, Thread::monomorphic_miss_stub_offset())); 879 lw(T9, Address(THR, Thread::monomorphic_miss_entry_offset()));
881 lw(T9, FieldAddress(CODE_REG, Code::entry_point_offset()));
882 jr(T9); 880 jr(T9);
883 881
884 Comment("MonomorphicCheckedEntry"); 882 Comment("MonomorphicCheckedEntry");
885 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset); 883 ASSERT(CodeSize() == Instructions::kCheckedEntryOffset);
886 SmiUntag(S5); 884 SmiUntag(S5);
887 LoadClassIdMayBeSmi(S4, T0); 885 LoadClassIdMayBeSmi(S4, T0);
888 bne(S4, S5, &miss); 886 bne(S4, S5, &miss);
889 887
890 // Fall through to unchecked entry. 888 // Fall through to unchecked entry.
891 ASSERT(CodeSize() == Instructions::kUncheckedEntryOffset); 889 ASSERT(CodeSize() == Instructions::kUncheckedEntryOffset);
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 Label stop; 1297 Label stop;
1300 b(&stop); 1298 b(&stop);
1301 Emit(reinterpret_cast<int32_t>(message)); 1299 Emit(reinterpret_cast<int32_t>(message));
1302 Bind(&stop); 1300 Bind(&stop);
1303 break_(Instr::kStopMessageCode); 1301 break_(Instr::kStopMessageCode);
1304 } 1302 }
1305 1303
1306 } // namespace dart 1304 } // namespace dart
1307 1305
1308 #endif // defined TARGET_ARCH_MIPS 1306 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698