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

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

Issue 2372113004: [turbofan] JSGenericLowering mostly uses builtins instead of code stubs now (Closed)
Patch Set: Ross' comments Created 4 years, 2 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/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 Label convert, done_convert; 1005 Label convert, done_convert;
1006 __ JumpIfSmi(a0, &convert); 1006 __ JumpIfSmi(a0, &convert);
1007 __ GetObjectType(a0, a1, a1); 1007 __ GetObjectType(a0, a1, a1);
1008 __ Branch(USE_DELAY_SLOT, &done_convert, ge, a1, 1008 __ Branch(USE_DELAY_SLOT, &done_convert, ge, a1,
1009 Operand(FIRST_JS_RECEIVER_TYPE)); 1009 Operand(FIRST_JS_RECEIVER_TYPE));
1010 __ LoadRoot(at, Heap::kNullValueRootIndex); // In delay slot. 1010 __ LoadRoot(at, Heap::kNullValueRootIndex); // In delay slot.
1011 __ Branch(USE_DELAY_SLOT, &exit, eq, a0, Operand(at)); 1011 __ Branch(USE_DELAY_SLOT, &exit, eq, a0, Operand(at));
1012 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); // In delay slot. 1012 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); // In delay slot.
1013 __ Branch(&exit, eq, a0, Operand(at)); 1013 __ Branch(&exit, eq, a0, Operand(at));
1014 __ bind(&convert); 1014 __ bind(&convert);
1015 ToObjectStub stub(isolate()); 1015 __ Call(isolate()->builtins()->ToObject(), RelocInfo::CODE_TARGET);
1016 __ CallStub(&stub);
1017 RestoreContext(); 1016 RestoreContext();
1018 __ mov(a0, v0); 1017 __ mov(a0, v0);
1019 __ bind(&done_convert); 1018 __ bind(&done_convert);
1020 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); 1019 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER);
1021 __ push(a0); 1020 __ push(a0);
1022 1021
1023 // Check cache validity in generated code. If we cannot guarantee cache 1022 // Check cache validity in generated code. If we cannot guarantee cache
1024 // validity, call the runtime system to check cache validity or get the 1023 // validity, call the runtime system to check cache validity or get the
1025 // property names in a fixed array. Note: Proxies never have an enum cache, 1024 // property names in a fixed array. Note: Proxies never have an enum cache,
1026 // so will always take the slow path. 1025 // so will always take the slow path.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 __ Branch(&update_each, eq, a4, Operand(a2)); 1106 __ Branch(&update_each, eq, a4, Operand(a2));
1108 1107
1109 // We need to filter the key, record slow-path here. 1108 // We need to filter the key, record slow-path here.
1110 int const vector_index = SmiFromSlot(slot)->value(); 1109 int const vector_index = SmiFromSlot(slot)->value();
1111 __ EmitLoadTypeFeedbackVector(a3); 1110 __ EmitLoadTypeFeedbackVector(a3);
1112 __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1111 __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1113 __ sd(a2, FieldMemOperand(a3, FixedArray::OffsetOfElementAt(vector_index))); 1112 __ sd(a2, FieldMemOperand(a3, FixedArray::OffsetOfElementAt(vector_index)));
1114 1113
1115 __ mov(a0, result_register()); 1114 __ mov(a0, result_register());
1116 // a0 contains the key. The receiver in a1 is the second argument to the 1115 // a0 contains the key. The receiver in a1 is the second argument to the
1117 // ForInFilterStub. ForInFilter returns undefined if the receiver doesn't 1116 // ForInFilter. ForInFilter returns undefined if the receiver doesn't
1118 // have the key or returns the name-converted key. 1117 // have the key or returns the name-converted key.
1119 ForInFilterStub filter_stub(isolate()); 1118 __ Call(isolate()->builtins()->ForInFilter(), RelocInfo::CODE_TARGET);
1120 __ CallStub(&filter_stub);
1121 RestoreContext(); 1119 RestoreContext();
1122 PrepareForBailoutForId(stmt->FilterId(), BailoutState::TOS_REGISTER); 1120 PrepareForBailoutForId(stmt->FilterId(), BailoutState::TOS_REGISTER);
1123 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); 1121 __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
1124 __ Branch(loop_statement.continue_label(), eq, result_register(), 1122 __ Branch(loop_statement.continue_label(), eq, result_register(),
1125 Operand(at)); 1123 Operand(at));
1126 1124
1127 // Update the 'each' property or variable from the possibly filtered 1125 // Update the 'each' property or variable from the possibly filtered
1128 // entry in the result_register. 1126 // entry in the result_register.
1129 __ bind(&update_each); 1127 __ bind(&update_each);
1130 // Perform the assignment as if via '='. 1128 // Perform the assignment as if via '='.
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
3050 break; 3048 break;
3051 } 3049 }
3052 3050
3053 case Token::TYPEOF: { 3051 case Token::TYPEOF: {
3054 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 3052 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
3055 { 3053 {
3056 AccumulatorValueContext context(this); 3054 AccumulatorValueContext context(this);
3057 VisitForTypeofValue(expr->expression()); 3055 VisitForTypeofValue(expr->expression());
3058 } 3056 }
3059 __ mov(a3, v0); 3057 __ mov(a3, v0);
3060 TypeofStub typeof_stub(isolate()); 3058 __ Call(isolate()->builtins()->Typeof(), RelocInfo::CODE_TARGET);
3061 __ CallStub(&typeof_stub);
3062 context()->Plug(v0); 3059 context()->Plug(v0);
3063 break; 3060 break;
3064 } 3061 }
3065 3062
3066 default: 3063 default:
3067 UNREACHABLE(); 3064 UNREACHABLE();
3068 } 3065 }
3069 } 3066 }
3070 3067
3071 3068
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
3420 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 3417 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
3421 __ LoadRoot(a4, Heap::kTrueValueRootIndex); 3418 __ LoadRoot(a4, Heap::kTrueValueRootIndex);
3422 Split(eq, v0, Operand(a4), if_true, if_false, fall_through); 3419 Split(eq, v0, Operand(a4), if_true, if_false, fall_through);
3423 break; 3420 break;
3424 3421
3425 case Token::INSTANCEOF: { 3422 case Token::INSTANCEOF: {
3426 VisitForAccumulatorValue(expr->right()); 3423 VisitForAccumulatorValue(expr->right());
3427 SetExpressionPosition(expr); 3424 SetExpressionPosition(expr);
3428 __ mov(a0, result_register()); 3425 __ mov(a0, result_register());
3429 PopOperand(a1); 3426 PopOperand(a1);
3430 InstanceOfStub stub(isolate()); 3427 __ Call(isolate()->builtins()->InstanceOf(), RelocInfo::CODE_TARGET);
3431 __ CallStub(&stub);
3432 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 3428 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
3433 __ LoadRoot(a4, Heap::kTrueValueRootIndex); 3429 __ LoadRoot(a4, Heap::kTrueValueRootIndex);
3434 Split(eq, v0, Operand(a4), if_true, if_false, fall_through); 3430 Split(eq, v0, Operand(a4), if_true, if_false, fall_through);
3435 break; 3431 break;
3436 } 3432 }
3437 3433
3438 default: { 3434 default: {
3439 VisitForAccumulatorValue(expr->right()); 3435 VisitForAccumulatorValue(expr->right());
3440 SetExpressionPosition(expr); 3436 SetExpressionPosition(expr);
3441 Condition cc = CompareIC::ComputeCondition(op); 3437 Condition cc = CompareIC::ComputeCondition(op);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
3683 reinterpret_cast<uint64_t>( 3679 reinterpret_cast<uint64_t>(
3684 isolate->builtins()->OnStackReplacement()->entry())); 3680 isolate->builtins()->OnStackReplacement()->entry()));
3685 return ON_STACK_REPLACEMENT; 3681 return ON_STACK_REPLACEMENT;
3686 } 3682 }
3687 3683
3688 3684
3689 } // namespace internal 3685 } // namespace internal
3690 } // namespace v8 3686 } // namespace v8
3691 3687
3692 #endif // V8_TARGET_ARCH_MIPS64 3688 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698