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

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

Issue 1130283002: [strong] Disallow implicit conversions for comparison (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback Created 5 years, 7 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
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 1045
1046 __ Branch(&next_test, ne, a1, Operand(a0)); 1046 __ Branch(&next_test, ne, a1, Operand(a0));
1047 __ Drop(1); // Switch value is no longer needed. 1047 __ Drop(1); // Switch value is no longer needed.
1048 __ Branch(clause->body_target()); 1048 __ Branch(clause->body_target());
1049 1049
1050 __ bind(&slow_case); 1050 __ bind(&slow_case);
1051 } 1051 }
1052 1052
1053 // Record position before stub call for type feedback. 1053 // Record position before stub call for type feedback.
1054 SetSourcePosition(clause->position()); 1054 SetSourcePosition(clause->position());
1055 Handle<Code> ic = 1055 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT,
1056 CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); 1056 language_mode()).code();
1057 CallIC(ic, clause->CompareId()); 1057 CallIC(ic, clause->CompareId());
1058 patch_site.EmitPatchInfo(); 1058 patch_site.EmitPatchInfo();
1059 1059
1060 Label skip; 1060 Label skip;
1061 __ Branch(&skip); 1061 __ Branch(&skip);
1062 PrepareForBailout(clause, TOS_REG); 1062 PrepareForBailout(clause, TOS_REG);
1063 __ LoadRoot(at, Heap::kTrueValueRootIndex); 1063 __ LoadRoot(at, Heap::kTrueValueRootIndex);
1064 __ Branch(&next_test, ne, v0, Operand(at)); 1064 __ Branch(&next_test, ne, v0, Operand(at));
1065 __ Drop(1); 1065 __ Drop(1);
1066 __ Branch(clause->body_target()); 1066 __ Branch(clause->body_target());
(...skipping 4161 matching lines...) Expand 10 before | Expand all | Expand 10 after
5228 JumpPatchSite patch_site(masm_); 5228 JumpPatchSite patch_site(masm_);
5229 if (inline_smi_code) { 5229 if (inline_smi_code) {
5230 Label slow_case; 5230 Label slow_case;
5231 __ Or(a2, a0, Operand(a1)); 5231 __ Or(a2, a0, Operand(a1));
5232 patch_site.EmitJumpIfNotSmi(a2, &slow_case); 5232 patch_site.EmitJumpIfNotSmi(a2, &slow_case);
5233 Split(cc, a1, Operand(a0), if_true, if_false, NULL); 5233 Split(cc, a1, Operand(a0), if_true, if_false, NULL);
5234 __ bind(&slow_case); 5234 __ bind(&slow_case);
5235 } 5235 }
5236 // Record position and call the compare IC. 5236 // Record position and call the compare IC.
5237 SetSourcePosition(expr->position()); 5237 SetSourcePosition(expr->position());
5238 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 5238 Handle<Code> ic =
5239 CodeFactory::CompareIC(isolate(), op, language_mode()).code();
5239 CallIC(ic, expr->CompareOperationFeedbackId()); 5240 CallIC(ic, expr->CompareOperationFeedbackId());
5240 patch_site.EmitPatchInfo(); 5241 patch_site.EmitPatchInfo();
5241 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 5242 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
5242 Split(cc, v0, Operand(zero_reg), if_true, if_false, fall_through); 5243 Split(cc, v0, Operand(zero_reg), if_true, if_false, fall_through);
5243 } 5244 }
5244 } 5245 }
5245 5246
5246 // Convert the result of the comparison into one expected for this 5247 // Convert the result of the comparison into one expected for this
5247 // expression's context. 5248 // expression's context.
5248 context()->Plug(if_true, if_false); 5249 context()->Plug(if_true, if_false);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
5447 Assembler::target_address_at(pc_immediate_load_address)) == 5448 Assembler::target_address_at(pc_immediate_load_address)) ==
5448 reinterpret_cast<uint32_t>( 5449 reinterpret_cast<uint32_t>(
5449 isolate->builtins()->OsrAfterStackCheck()->entry())); 5450 isolate->builtins()->OsrAfterStackCheck()->entry()));
5450 return OSR_AFTER_STACK_CHECK; 5451 return OSR_AFTER_STACK_CHECK;
5451 } 5452 }
5452 5453
5453 5454
5454 } } // namespace v8::internal 5455 } } // namespace v8::internal
5455 5456
5456 #endif // V8_TARGET_ARCH_MIPS 5457 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698