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

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

Issue 1743433002: Revert of [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 4026 matching lines...) Expand 10 before | Expand all | Expand 10 after
4037 NilValue nil) { 4037 NilValue nil) {
4038 Label materialize_true, materialize_false; 4038 Label materialize_true, materialize_false;
4039 Label* if_true = NULL; 4039 Label* if_true = NULL;
4040 Label* if_false = NULL; 4040 Label* if_false = NULL;
4041 Label* fall_through = NULL; 4041 Label* fall_through = NULL;
4042 context()->PrepareTest(&materialize_true, &materialize_false, 4042 context()->PrepareTest(&materialize_true, &materialize_false,
4043 &if_true, &if_false, &fall_through); 4043 &if_true, &if_false, &fall_through);
4044 4044
4045 VisitForAccumulatorValue(sub_expr); 4045 VisitForAccumulatorValue(sub_expr);
4046 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 4046 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
4047 __ mov(a0, result_register());
4047 if (expr->op() == Token::EQ_STRICT) { 4048 if (expr->op() == Token::EQ_STRICT) {
4048 Heap::RootListIndex nil_value = nil == kNullValue ? 4049 Heap::RootListIndex nil_value = nil == kNullValue ?
4049 Heap::kNullValueRootIndex : 4050 Heap::kNullValueRootIndex :
4050 Heap::kUndefinedValueRootIndex; 4051 Heap::kUndefinedValueRootIndex;
4051 __ LoadRoot(a1, nil_value); 4052 __ LoadRoot(a1, nil_value);
4053 Split(eq, a0, Operand(a1), if_true, if_false, fall_through);
4054 } else {
4055 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil);
4056 CallIC(ic, expr->CompareOperationFeedbackId());
4057 __ LoadRoot(a1, Heap::kTrueValueRootIndex);
4052 Split(eq, v0, Operand(a1), if_true, if_false, fall_through); 4058 Split(eq, v0, Operand(a1), if_true, if_false, fall_through);
4053 } else {
4054 __ JumpIfSmi(v0, if_false);
4055 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset));
4056 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset));
4057 __ And(a1, a1, Operand(1 << Map::kIsUndetectable));
4058 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through);
4059 } 4059 }
4060 context()->Plug(if_true, if_false); 4060 context()->Plug(if_true, if_false);
4061 } 4061 }
4062 4062
4063 4063
4064 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 4064 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
4065 __ lw(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 4065 __ lw(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
4066 context()->Plug(v0); 4066 context()->Plug(v0);
4067 } 4067 }
4068 4068
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
4256 reinterpret_cast<uint32_t>( 4256 reinterpret_cast<uint32_t>(
4257 isolate->builtins()->OsrAfterStackCheck()->entry())); 4257 isolate->builtins()->OsrAfterStackCheck()->entry()));
4258 return OSR_AFTER_STACK_CHECK; 4258 return OSR_AFTER_STACK_CHECK;
4259 } 4259 }
4260 4260
4261 4261
4262 } // namespace internal 4262 } // namespace internal
4263 } // namespace v8 4263 } // namespace v8
4264 4264
4265 #endif // V8_TARGET_ARCH_MIPS 4265 #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