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

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 94103007: MIPS: Enable optimization of functions with generic switches. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 __ bind(&slow_case); 1033 __ bind(&slow_case);
1034 } 1034 }
1035 1035
1036 // Record position before stub call for type feedback. 1036 // Record position before stub call for type feedback.
1037 SetSourcePosition(clause->position()); 1037 SetSourcePosition(clause->position());
1038 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), Token::EQ_STRICT); 1038 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), Token::EQ_STRICT);
1039 CallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId()); 1039 CallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId());
1040 patch_site.EmitPatchInfo(); 1040 patch_site.EmitPatchInfo();
1041 1041
1042 Label skip; 1042 Label skip;
1043 __ b(&skip); 1043 __ Branch(&skip);
1044 PrepareForBailout(clause, TOS_REG); 1044 PrepareForBailout(clause, TOS_REG);
1045 __ LoadRoot(at, Heap::kTrueValueRootIndex); 1045 __ LoadRoot(at, Heap::kTrueValueRootIndex);
1046 __ Branch(&next_test, ne, v0, Operand(at)); 1046 __ Branch(&next_test, ne, v0, Operand(at));
1047 __ Drop(1); 1047 __ Drop(1);
1048 __ jmp(clause->body_target()); 1048 __ Branch(clause->body_target());
1049 __ bind(&skip); 1049 __ bind(&skip);
1050 1050
1051 __ Branch(&next_test, ne, v0, Operand(zero_reg)); 1051 __ Branch(&next_test, ne, v0, Operand(zero_reg));
1052 __ Drop(1); // Switch value is no longer needed. 1052 __ Drop(1); // Switch value is no longer needed.
1053 __ Branch(clause->body_target()); 1053 __ Branch(clause->body_target());
1054 } 1054 }
1055 1055
1056 // Discard the test value and jump to the default if present, otherwise to 1056 // Discard the test value and jump to the default if present, otherwise to
1057 // the end of the statement. 1057 // the end of the statement.
1058 __ bind(&next_test); 1058 __ bind(&next_test);
(...skipping 3909 matching lines...) Expand 10 before | Expand all | Expand 10 after
4968 Assembler::target_address_at(pc_immediate_load_address)) == 4968 Assembler::target_address_at(pc_immediate_load_address)) ==
4969 reinterpret_cast<uint32_t>( 4969 reinterpret_cast<uint32_t>(
4970 isolate->builtins()->OsrAfterStackCheck()->entry())); 4970 isolate->builtins()->OsrAfterStackCheck()->entry()));
4971 return OSR_AFTER_STACK_CHECK; 4971 return OSR_AFTER_STACK_CHECK;
4972 } 4972 }
4973 4973
4974 4974
4975 } } // namespace v8::internal 4975 } } // namespace v8::internal
4976 4976
4977 #endif // V8_TARGET_ARCH_MIPS 4977 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698