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

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

Issue 1144183004: [strong] Refactor ObjectStrength into a replacement for strong boolean args (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback and rebase Created 5 years, 6 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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 __ cmp(r1, r0); 1073 __ cmp(r1, r0);
1074 __ b(ne, &next_test); 1074 __ b(ne, &next_test);
1075 __ Drop(1); // Switch value is no longer needed. 1075 __ Drop(1); // Switch value is no longer needed.
1076 __ b(clause->body_target()); 1076 __ b(clause->body_target());
1077 __ bind(&slow_case); 1077 __ bind(&slow_case);
1078 } 1078 }
1079 1079
1080 // Record position before stub call for type feedback. 1080 // Record position before stub call for type feedback.
1081 SetSourcePosition(clause->position()); 1081 SetSourcePosition(clause->position());
1082 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT, 1082 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT,
1083 language_mode()).code(); 1083 strength(language_mode())).code();
1084 CallIC(ic, clause->CompareId()); 1084 CallIC(ic, clause->CompareId());
1085 patch_site.EmitPatchInfo(); 1085 patch_site.EmitPatchInfo();
1086 1086
1087 Label skip; 1087 Label skip;
1088 __ b(&skip); 1088 __ b(&skip);
1089 PrepareForBailout(clause, TOS_REG); 1089 PrepareForBailout(clause, TOS_REG);
1090 __ LoadRoot(ip, Heap::kTrueValueRootIndex); 1090 __ LoadRoot(ip, Heap::kTrueValueRootIndex);
1091 __ cmp(r0, ip); 1091 __ cmp(r0, ip);
1092 __ b(ne, &next_test); 1092 __ b(ne, &next_test);
1093 __ Drop(1); 1093 __ Drop(1);
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after
2473 Register right = r0; 2473 Register right = r0;
2474 __ pop(left); 2474 __ pop(left);
2475 2475
2476 // Perform combined smi check on both operands. 2476 // Perform combined smi check on both operands.
2477 __ orr(scratch1, left, Operand(right)); 2477 __ orr(scratch1, left, Operand(right));
2478 STATIC_ASSERT(kSmiTag == 0); 2478 STATIC_ASSERT(kSmiTag == 0);
2479 JumpPatchSite patch_site(masm_); 2479 JumpPatchSite patch_site(masm_);
2480 patch_site.EmitJumpIfSmi(scratch1, &smi_case); 2480 patch_site.EmitJumpIfSmi(scratch1, &smi_case);
2481 2481
2482 __ bind(&stub_call); 2482 __ bind(&stub_call);
2483 Handle<Code> code = CodeFactory::BinaryOpIC( 2483 Handle<Code> code =
2484 isolate(), op, language_mode()).code(); 2484 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code();
2485 CallIC(code, expr->BinaryOperationFeedbackId()); 2485 CallIC(code, expr->BinaryOperationFeedbackId());
2486 patch_site.EmitPatchInfo(); 2486 patch_site.EmitPatchInfo();
2487 __ jmp(&done); 2487 __ jmp(&done);
2488 2488
2489 __ bind(&smi_case); 2489 __ bind(&smi_case);
2490 // Smi case. This code works the same way as the smi-smi case in the type 2490 // Smi case. This code works the same way as the smi-smi case in the type
2491 // recording binary operation stub, see 2491 // recording binary operation stub, see
2492 switch (op) { 2492 switch (op) {
2493 case Token::SAR: 2493 case Token::SAR:
2494 __ GetLeastBitsFromSmi(scratch1, right, 5); 2494 __ GetLeastBitsFromSmi(scratch1, right, 5);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
2627 __ CallRuntime(Runtime::kToFastProperties, 1); 2627 __ CallRuntime(Runtime::kToFastProperties, 1);
2628 2628
2629 // Verify that compilation exactly consumed the number of store ic slots that 2629 // Verify that compilation exactly consumed the number of store ic slots that
2630 // the ClassLiteral node had to offer. 2630 // the ClassLiteral node had to offer.
2631 DCHECK(!FLAG_vector_stores || store_slot_index == lit->slot_count()); 2631 DCHECK(!FLAG_vector_stores || store_slot_index == lit->slot_count());
2632 } 2632 }
2633 2633
2634 2634
2635 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { 2635 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
2636 __ pop(r1); 2636 __ pop(r1);
2637 Handle<Code> code = CodeFactory::BinaryOpIC( 2637 Handle<Code> code =
2638 isolate(), op, language_mode()).code(); 2638 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code();
2639 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2639 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2640 CallIC(code, expr->BinaryOperationFeedbackId()); 2640 CallIC(code, expr->BinaryOperationFeedbackId());
2641 patch_site.EmitPatchInfo(); 2641 patch_site.EmitPatchInfo();
2642 context()->Plug(r0); 2642 context()->Plug(r0);
2643 } 2643 }
2644 2644
2645 2645
2646 void FullCodeGenerator::EmitAssignment(Expression* expr, 2646 void FullCodeGenerator::EmitAssignment(Expression* expr,
2647 FeedbackVectorICSlot slot) { 2647 FeedbackVectorICSlot slot) {
2648 DCHECK(expr->IsValidReferenceExpression()); 2648 DCHECK(expr->IsValidReferenceExpression());
(...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after
5037 } 5037 }
5038 5038
5039 5039
5040 __ bind(&stub_call); 5040 __ bind(&stub_call);
5041 __ mov(r1, r0); 5041 __ mov(r1, r0);
5042 __ mov(r0, Operand(Smi::FromInt(count_value))); 5042 __ mov(r0, Operand(Smi::FromInt(count_value)));
5043 5043
5044 // Record position before stub call. 5044 // Record position before stub call.
5045 SetSourcePosition(expr->position()); 5045 SetSourcePosition(expr->position());
5046 5046
5047 Handle<Code> code = CodeFactory::BinaryOpIC( 5047 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD,
5048 isolate(), Token::ADD, language_mode()).code(); 5048 strength(language_mode())).code();
5049 CallIC(code, expr->CountBinOpFeedbackId()); 5049 CallIC(code, expr->CountBinOpFeedbackId());
5050 patch_site.EmitPatchInfo(); 5050 patch_site.EmitPatchInfo();
5051 __ bind(&done); 5051 __ bind(&done);
5052 5052
5053 // Store the value returned in r0. 5053 // Store the value returned in r0.
5054 switch (assign_type) { 5054 switch (assign_type) {
5055 case VARIABLE: 5055 case VARIABLE:
5056 if (expr->is_postfix()) { 5056 if (expr->is_postfix()) {
5057 { EffectContext context(this); 5057 { EffectContext context(this);
5058 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), 5058 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(),
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
5304 Label slow_case; 5304 Label slow_case;
5305 __ orr(r2, r0, Operand(r1)); 5305 __ orr(r2, r0, Operand(r1));
5306 patch_site.EmitJumpIfNotSmi(r2, &slow_case); 5306 patch_site.EmitJumpIfNotSmi(r2, &slow_case);
5307 __ cmp(r1, r0); 5307 __ cmp(r1, r0);
5308 Split(cond, if_true, if_false, NULL); 5308 Split(cond, if_true, if_false, NULL);
5309 __ bind(&slow_case); 5309 __ bind(&slow_case);
5310 } 5310 }
5311 5311
5312 // Record position and call the compare IC. 5312 // Record position and call the compare IC.
5313 SetSourcePosition(expr->position()); 5313 SetSourcePosition(expr->position());
5314 Handle<Code> ic = 5314 Handle<Code> ic = CodeFactory::CompareIC(
5315 CodeFactory::CompareIC(isolate(), op, language_mode()).code(); 5315 isolate(), op, strength(language_mode())).code();
5316 CallIC(ic, expr->CompareOperationFeedbackId()); 5316 CallIC(ic, expr->CompareOperationFeedbackId());
5317 patch_site.EmitPatchInfo(); 5317 patch_site.EmitPatchInfo();
5318 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 5318 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
5319 __ cmp(r0, Operand::Zero()); 5319 __ cmp(r0, Operand::Zero());
5320 Split(cond, if_true, if_false, fall_through); 5320 Split(cond, if_true, if_false, fall_through);
5321 } 5321 }
5322 } 5322 }
5323 5323
5324 // Convert the result of the comparison into one expected for this 5324 // Convert the result of the comparison into one expected for this
5325 // expression's context. 5325 // expression's context.
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
5605 DCHECK(interrupt_address == 5605 DCHECK(interrupt_address ==
5606 isolate->builtins()->OsrAfterStackCheck()->entry()); 5606 isolate->builtins()->OsrAfterStackCheck()->entry());
5607 return OSR_AFTER_STACK_CHECK; 5607 return OSR_AFTER_STACK_CHECK;
5608 } 5608 }
5609 5609
5610 5610
5611 } // namespace internal 5611 } // namespace internal
5612 } // namespace v8 5612 } // namespace v8
5613 5613
5614 #endif // V8_TARGET_ARCH_ARM 5614 #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