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

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

Issue 1304633002: Correctify instanceof and make it optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Add MIPS/MIPS64 ports. Created 5 years, 4 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/x64/full-codegen-x64.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 5102 matching lines...) Expand 10 before | Expand all | Expand 10 after
5113 switch (op) { 5113 switch (op) {
5114 case Token::IN: 5114 case Token::IN:
5115 VisitForStackValue(expr->right()); 5115 VisitForStackValue(expr->right());
5116 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); 5116 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION);
5117 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 5117 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
5118 __ LoadRoot(a4, Heap::kTrueValueRootIndex); 5118 __ LoadRoot(a4, Heap::kTrueValueRootIndex);
5119 Split(eq, v0, Operand(a4), if_true, if_false, fall_through); 5119 Split(eq, v0, Operand(a4), if_true, if_false, fall_through);
5120 break; 5120 break;
5121 5121
5122 case Token::INSTANCEOF: { 5122 case Token::INSTANCEOF: {
5123 VisitForStackValue(expr->right()); 5123 VisitForAccumulatorValue(expr->right());
5124 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); 5124 __ mov(a0, result_register());
5125 __ pop(a1);
5126 InstanceOfStub stub(isolate());
5125 __ CallStub(&stub); 5127 __ CallStub(&stub);
5126 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 5128 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
5127 // The stub returns 0 for true. 5129 __ LoadRoot(a4, Heap::kTrueValueRootIndex);
5128 Split(eq, v0, Operand(zero_reg), if_true, if_false, fall_through); 5130 Split(eq, v0, Operand(a4), if_true, if_false, fall_through);
5129 break; 5131 break;
5130 } 5132 }
5131 5133
5132 default: { 5134 default: {
5133 VisitForAccumulatorValue(expr->right()); 5135 VisitForAccumulatorValue(expr->right());
5134 Condition cc = CompareIC::ComputeCondition(op); 5136 Condition cc = CompareIC::ComputeCondition(op);
5135 __ mov(a0, result_register()); 5137 __ mov(a0, result_register());
5136 __ pop(a1); 5138 __ pop(a1);
5137 5139
5138 bool inline_smi_code = ShouldInlineSmiCase(op); 5140 bool inline_smi_code = ShouldInlineSmiCase(op);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
5382 reinterpret_cast<uint64_t>( 5384 reinterpret_cast<uint64_t>(
5383 isolate->builtins()->OsrAfterStackCheck()->entry())); 5385 isolate->builtins()->OsrAfterStackCheck()->entry()));
5384 return OSR_AFTER_STACK_CHECK; 5386 return OSR_AFTER_STACK_CHECK;
5385 } 5387 }
5386 5388
5387 5389
5388 } // namespace internal 5390 } // namespace internal
5389 } // namespace v8 5391 } // namespace v8
5390 5392
5391 #endif // V8_TARGET_ARCH_MIPS64 5393 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698