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

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

Issue 1722193002: [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 4 years, 9 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
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 3986 matching lines...) Expand 10 before | Expand all | Expand 10 after
3997 NilValue nil) { 3997 NilValue nil) {
3998 Label materialize_true, materialize_false; 3998 Label materialize_true, materialize_false;
3999 Label* if_true = NULL; 3999 Label* if_true = NULL;
4000 Label* if_false = NULL; 4000 Label* if_false = NULL;
4001 Label* fall_through = NULL; 4001 Label* fall_through = NULL;
4002 context()->PrepareTest(&materialize_true, &materialize_false, 4002 context()->PrepareTest(&materialize_true, &materialize_false,
4003 &if_true, &if_false, &fall_through); 4003 &if_true, &if_false, &fall_through);
4004 4004
4005 VisitForAccumulatorValue(sub_expr); 4005 VisitForAccumulatorValue(sub_expr);
4006 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 4006 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
4007 __ mov(a0, result_register());
4008 if (expr->op() == Token::EQ_STRICT) { 4007 if (expr->op() == Token::EQ_STRICT) {
4009 Heap::RootListIndex nil_value = nil == kNullValue ? 4008 Heap::RootListIndex nil_value = nil == kNullValue ?
4010 Heap::kNullValueRootIndex : 4009 Heap::kNullValueRootIndex :
4011 Heap::kUndefinedValueRootIndex; 4010 Heap::kUndefinedValueRootIndex;
4012 __ LoadRoot(a1, nil_value); 4011 __ LoadRoot(a1, nil_value);
4013 Split(eq, a0, Operand(a1), if_true, if_false, fall_through); 4012 Split(eq, v0, Operand(a1), if_true, if_false, fall_through);
4014 } else { 4013 } else {
4015 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); 4014 __ JumpIfSmi(v0, if_false);
4016 CallIC(ic, expr->CompareOperationFeedbackId()); 4015 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset));
4017 __ LoadRoot(a1, Heap::kTrueValueRootIndex); 4016 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset));
4018 Split(eq, v0, Operand(a1), if_true, if_false, fall_through); 4017 __ And(a1, a1, Operand(1 << Map::kIsUndetectable));
4018 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through);
4019 } 4019 }
4020 context()->Plug(if_true, if_false); 4020 context()->Plug(if_true, if_false);
4021 } 4021 }
4022 4022
4023 4023
4024 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 4024 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
4025 __ lw(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 4025 __ lw(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
4026 context()->Plug(v0); 4026 context()->Plug(v0);
4027 } 4027 }
4028 4028
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
4216 reinterpret_cast<uint32_t>( 4216 reinterpret_cast<uint32_t>(
4217 isolate->builtins()->OsrAfterStackCheck()->entry())); 4217 isolate->builtins()->OsrAfterStackCheck()->entry()));
4218 return OSR_AFTER_STACK_CHECK; 4218 return OSR_AFTER_STACK_CHECK;
4219 } 4219 }
4220 4220
4221 4221
4222 } // namespace internal 4222 } // namespace internal
4223 } // namespace v8 4223 } // namespace v8
4224 4224
4225 #endif // V8_TARGET_ARCH_MIPS 4225 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698