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

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

Issue 116073004: Fix MIPS switch statement breakage. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | Annotate | Revision Log
« 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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 1032
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;
1043 __ b(&skip);
1044 PrepareForBailout(clause, TOS_REG);
1045 __ LoadRoot(at, Heap::kTrueValueRootIndex);
1046 __ Branch(&next_test, ne, v0, Operand(at));
1047 __ Drop(1);
1048 __ jmp(clause->body_target());
1049 __ bind(&skip);
1050
1042 __ Branch(&next_test, ne, v0, Operand(zero_reg)); 1051 __ Branch(&next_test, ne, v0, Operand(zero_reg));
1043 __ Drop(1); // Switch value is no longer needed. 1052 __ Drop(1); // Switch value is no longer needed.
1044 __ Branch(clause->body_target()); 1053 __ Branch(clause->body_target());
1045 } 1054 }
1046 1055
1047 // 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
1048 // the end of the statement. 1057 // the end of the statement.
1049 __ bind(&next_test); 1058 __ bind(&next_test);
1050 __ Drop(1); // Switch value is no longer needed. 1059 __ Drop(1); // Switch value is no longer needed.
1051 if (default_clause == NULL) { 1060 if (default_clause == NULL) {
(...skipping 3907 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 Assembler::target_address_at(pc_immediate_load_address)) == 4968 Assembler::target_address_at(pc_immediate_load_address)) ==
4960 reinterpret_cast<uint32_t>( 4969 reinterpret_cast<uint32_t>(
4961 isolate->builtins()->OsrAfterStackCheck()->entry())); 4970 isolate->builtins()->OsrAfterStackCheck()->entry()));
4962 return OSR_AFTER_STACK_CHECK; 4971 return OSR_AFTER_STACK_CHECK;
4963 } 4972 }
4964 4973
4965 4974
4966 } } // namespace v8::internal 4975 } } // namespace v8::internal
4967 4976
4968 #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