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

Side by Side Diff: src/arm/full-codegen-arm.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/arm/code-stubs-arm.cc ('k') | src/arm/lithium-arm.h » ('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_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 1051
1052 __ cmp(r1, r0); 1052 __ cmp(r1, r0);
1053 __ b(ne, &next_test); 1053 __ b(ne, &next_test);
1054 __ Drop(1); // Switch value is no longer needed. 1054 __ Drop(1); // Switch value is no longer needed.
1055 __ b(clause->body_target()); 1055 __ b(clause->body_target());
1056 __ bind(&slow_case); 1056 __ bind(&slow_case);
1057 } 1057 }
1058 1058
1059 // Record position before stub call for type feedback. 1059 // Record position before stub call for type feedback.
1060 SetSourcePosition(clause->position()); 1060 SetSourcePosition(clause->position());
1061 Handle<Code> ic = 1061 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT,
1062 CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); 1062 language_mode()).code();
1063 CallIC(ic, clause->CompareId()); 1063 CallIC(ic, clause->CompareId());
1064 patch_site.EmitPatchInfo(); 1064 patch_site.EmitPatchInfo();
1065 1065
1066 Label skip; 1066 Label skip;
1067 __ b(&skip); 1067 __ b(&skip);
1068 PrepareForBailout(clause, TOS_REG); 1068 PrepareForBailout(clause, TOS_REG);
1069 __ LoadRoot(ip, Heap::kTrueValueRootIndex); 1069 __ LoadRoot(ip, Heap::kTrueValueRootIndex);
1070 __ cmp(r0, ip); 1070 __ cmp(r0, ip);
1071 __ b(ne, &next_test); 1071 __ b(ne, &next_test);
1072 __ Drop(1); 1072 __ Drop(1);
(...skipping 4155 matching lines...) Expand 10 before | Expand all | Expand 10 after
5228 Label slow_case; 5228 Label slow_case;
5229 __ orr(r2, r0, Operand(r1)); 5229 __ orr(r2, r0, Operand(r1));
5230 patch_site.EmitJumpIfNotSmi(r2, &slow_case); 5230 patch_site.EmitJumpIfNotSmi(r2, &slow_case);
5231 __ cmp(r1, r0); 5231 __ cmp(r1, r0);
5232 Split(cond, if_true, if_false, NULL); 5232 Split(cond, if_true, if_false, NULL);
5233 __ bind(&slow_case); 5233 __ bind(&slow_case);
5234 } 5234 }
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 __ cmp(r0, Operand::Zero()); 5243 __ cmp(r0, Operand::Zero());
5243 Split(cond, if_true, if_false, fall_through); 5244 Split(cond, if_true, if_false, fall_through);
5244 } 5245 }
5245 } 5246 }
5246 5247
5247 // Convert the result of the comparison into one expected for this 5248 // Convert the result of the comparison into one expected for this
5248 // expression's context. 5249 // expression's context.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
5508 5509
5509 DCHECK(interrupt_address == 5510 DCHECK(interrupt_address ==
5510 isolate->builtins()->OsrAfterStackCheck()->entry()); 5511 isolate->builtins()->OsrAfterStackCheck()->entry());
5511 return OSR_AFTER_STACK_CHECK; 5512 return OSR_AFTER_STACK_CHECK;
5512 } 5513 }
5513 5514
5514 5515
5515 } } // namespace v8::internal 5516 } } // namespace v8::internal
5516 5517
5517 #endif // V8_TARGET_ARCH_ARM 5518 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698