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

Side by Side Diff: src/mips64/full-codegen-mips64.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/mips64/code-stubs-mips64.cc ('k') | src/mips64/lithium-codegen-mips64.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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 1042
1043 __ Branch(&next_test, ne, a1, Operand(a0)); 1043 __ Branch(&next_test, ne, a1, Operand(a0));
1044 __ Drop(1); // Switch value is no longer needed. 1044 __ Drop(1); // Switch value is no longer needed.
1045 __ Branch(clause->body_target()); 1045 __ Branch(clause->body_target());
1046 1046
1047 __ bind(&slow_case); 1047 __ bind(&slow_case);
1048 } 1048 }
1049 1049
1050 // Record position before stub call for type feedback. 1050 // Record position before stub call for type feedback.
1051 SetSourcePosition(clause->position()); 1051 SetSourcePosition(clause->position());
1052 Handle<Code> ic = 1052 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT,
1053 CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); 1053 language_mode()).code();
1054 CallIC(ic, clause->CompareId()); 1054 CallIC(ic, clause->CompareId());
1055 patch_site.EmitPatchInfo(); 1055 patch_site.EmitPatchInfo();
1056 1056
1057 Label skip; 1057 Label skip;
1058 __ Branch(&skip); 1058 __ Branch(&skip);
1059 PrepareForBailout(clause, TOS_REG); 1059 PrepareForBailout(clause, TOS_REG);
1060 __ LoadRoot(at, Heap::kTrueValueRootIndex); 1060 __ LoadRoot(at, Heap::kTrueValueRootIndex);
1061 __ Branch(&next_test, ne, v0, Operand(at)); 1061 __ Branch(&next_test, ne, v0, Operand(at));
1062 __ Drop(1); 1062 __ Drop(1);
1063 __ Branch(clause->body_target()); 1063 __ Branch(clause->body_target());
(...skipping 4167 matching lines...) Expand 10 before | Expand all | Expand 10 after
5231 JumpPatchSite patch_site(masm_); 5231 JumpPatchSite patch_site(masm_);
5232 if (inline_smi_code) { 5232 if (inline_smi_code) {
5233 Label slow_case; 5233 Label slow_case;
5234 __ Or(a2, a0, Operand(a1)); 5234 __ Or(a2, a0, Operand(a1));
5235 patch_site.EmitJumpIfNotSmi(a2, &slow_case); 5235 patch_site.EmitJumpIfNotSmi(a2, &slow_case);
5236 Split(cc, a1, Operand(a0), if_true, if_false, NULL); 5236 Split(cc, a1, Operand(a0), if_true, if_false, NULL);
5237 __ bind(&slow_case); 5237 __ bind(&slow_case);
5238 } 5238 }
5239 // Record position and call the compare IC. 5239 // Record position and call the compare IC.
5240 SetSourcePosition(expr->position()); 5240 SetSourcePosition(expr->position());
5241 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 5241 Handle<Code> ic =
5242 CodeFactory::CompareIC(isolate(), op, language_mode()).code();
5242 CallIC(ic, expr->CompareOperationFeedbackId()); 5243 CallIC(ic, expr->CompareOperationFeedbackId());
5243 patch_site.EmitPatchInfo(); 5244 patch_site.EmitPatchInfo();
5244 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 5245 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
5245 Split(cc, v0, Operand(zero_reg), if_true, if_false, fall_through); 5246 Split(cc, v0, Operand(zero_reg), if_true, if_false, fall_through);
5246 } 5247 }
5247 } 5248 }
5248 5249
5249 // Convert the result of the comparison into one expected for this 5250 // Convert the result of the comparison into one expected for this
5250 // expression's context. 5251 // expression's context.
5251 context()->Plug(if_true, if_false); 5252 context()->Plug(if_true, if_false);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
5454 Assembler::target_address_at(pc_immediate_load_address)) == 5455 Assembler::target_address_at(pc_immediate_load_address)) ==
5455 reinterpret_cast<uint64_t>( 5456 reinterpret_cast<uint64_t>(
5456 isolate->builtins()->OsrAfterStackCheck()->entry())); 5457 isolate->builtins()->OsrAfterStackCheck()->entry()));
5457 return OSR_AFTER_STACK_CHECK; 5458 return OSR_AFTER_STACK_CHECK;
5458 } 5459 }
5459 5460
5460 5461
5461 } } // namespace v8::internal 5462 } } // namespace v8::internal
5462 5463
5463 #endif // V8_TARGET_ARCH_MIPS64 5464 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698