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

Side by Side Diff: src/x87/full-codegen-x87.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/x87/code-stubs-x87.cc ('k') | src/x87/lithium-codegen-x87.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_X87 7 #if V8_TARGET_ARCH_X87
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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 982
983 __ cmp(edx, eax); 983 __ cmp(edx, eax);
984 __ j(not_equal, &next_test); 984 __ j(not_equal, &next_test);
985 __ Drop(1); // Switch value is no longer needed. 985 __ Drop(1); // Switch value is no longer needed.
986 __ jmp(clause->body_target()); 986 __ jmp(clause->body_target());
987 __ bind(&slow_case); 987 __ bind(&slow_case);
988 } 988 }
989 989
990 // Record position before stub call for type feedback. 990 // Record position before stub call for type feedback.
991 SetSourcePosition(clause->position()); 991 SetSourcePosition(clause->position());
992 Handle<Code> ic = 992 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT,
993 CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); 993 language_mode()).code();
994 CallIC(ic, clause->CompareId()); 994 CallIC(ic, clause->CompareId());
995 patch_site.EmitPatchInfo(); 995 patch_site.EmitPatchInfo();
996 996
997 Label skip; 997 Label skip;
998 __ jmp(&skip, Label::kNear); 998 __ jmp(&skip, Label::kNear);
999 PrepareForBailout(clause, TOS_REG); 999 PrepareForBailout(clause, TOS_REG);
1000 __ cmp(eax, isolate()->factory()->true_value()); 1000 __ cmp(eax, isolate()->factory()->true_value());
1001 __ j(not_equal, &next_test); 1001 __ j(not_equal, &next_test);
1002 __ Drop(1); 1002 __ Drop(1);
1003 __ jmp(clause->body_target()); 1003 __ jmp(clause->body_target());
(...skipping 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after
5146 __ mov(ecx, edx); 5146 __ mov(ecx, edx);
5147 __ or_(ecx, eax); 5147 __ or_(ecx, eax);
5148 patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); 5148 patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear);
5149 __ cmp(edx, eax); 5149 __ cmp(edx, eax);
5150 Split(cc, if_true, if_false, NULL); 5150 Split(cc, if_true, if_false, NULL);
5151 __ bind(&slow_case); 5151 __ bind(&slow_case);
5152 } 5152 }
5153 5153
5154 // Record position and call the compare IC. 5154 // Record position and call the compare IC.
5155 SetSourcePosition(expr->position()); 5155 SetSourcePosition(expr->position());
5156 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 5156 Handle<Code> ic =
5157 CodeFactory::CompareIC(isolate(), op, language_mode()).code();
5157 CallIC(ic, expr->CompareOperationFeedbackId()); 5158 CallIC(ic, expr->CompareOperationFeedbackId());
5158 patch_site.EmitPatchInfo(); 5159 patch_site.EmitPatchInfo();
5159 5160
5160 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 5161 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
5161 __ test(eax, eax); 5162 __ test(eax, eax);
5162 Split(cc, if_true, if_false, fall_through); 5163 Split(cc, if_true, if_false, fall_through);
5163 } 5164 }
5164 } 5165 }
5165 5166
5166 // Convert the result of the comparison into one expected for this 5167 // Convert the result of the comparison into one expected for this
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
5365 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5366 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5366 Assembler::target_address_at(call_target_address, 5367 Assembler::target_address_at(call_target_address,
5367 unoptimized_code)); 5368 unoptimized_code));
5368 return OSR_AFTER_STACK_CHECK; 5369 return OSR_AFTER_STACK_CHECK;
5369 } 5370 }
5370 5371
5371 5372
5372 } } // namespace v8::internal 5373 } } // namespace v8::internal
5373 5374
5374 #endif // V8_TARGET_ARCH_X87 5375 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/code-stubs-x87.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698