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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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
« 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 4033 matching lines...) Expand 10 before | Expand all | Expand 10 after
4044 NilValue nil) { 4044 NilValue nil) {
4045 Label materialize_true, materialize_false; 4045 Label materialize_true, materialize_false;
4046 Label* if_true = NULL; 4046 Label* if_true = NULL;
4047 Label* if_false = NULL; 4047 Label* if_false = NULL;
4048 Label* fall_through = NULL; 4048 Label* fall_through = NULL;
4049 context()->PrepareTest(&materialize_true, &materialize_false, 4049 context()->PrepareTest(&materialize_true, &materialize_false,
4050 &if_true, &if_false, &fall_through); 4050 &if_true, &if_false, &fall_through);
4051 4051
4052 VisitForAccumulatorValue(sub_expr); 4052 VisitForAccumulatorValue(sub_expr);
4053 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 4053 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
4054 __ mov(a0, result_register());
4054 if (expr->op() == Token::EQ_STRICT) { 4055 if (expr->op() == Token::EQ_STRICT) {
4055 Heap::RootListIndex nil_value = nil == kNullValue ? 4056 Heap::RootListIndex nil_value = nil == kNullValue ?
4056 Heap::kNullValueRootIndex : 4057 Heap::kNullValueRootIndex :
4057 Heap::kUndefinedValueRootIndex; 4058 Heap::kUndefinedValueRootIndex;
4058 __ LoadRoot(a1, nil_value); 4059 __ LoadRoot(a1, nil_value);
4060 Split(eq, a0, Operand(a1), if_true, if_false, fall_through);
4061 } else {
4062 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil);
4063 CallIC(ic, expr->CompareOperationFeedbackId());
4064 __ LoadRoot(a1, Heap::kTrueValueRootIndex);
4059 Split(eq, v0, Operand(a1), if_true, if_false, fall_through); 4065 Split(eq, v0, Operand(a1), if_true, if_false, fall_through);
4060 } else {
4061 __ JumpIfSmi(v0, if_false);
4062 __ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset));
4063 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset));
4064 __ And(a1, a1, Operand(1 << Map::kIsUndetectable));
4065 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through);
4066 } 4066 }
4067 context()->Plug(if_true, if_false); 4067 context()->Plug(if_true, if_false);
4068 } 4068 }
4069 4069
4070 4070
4071 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 4071 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
4072 __ ld(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 4072 __ ld(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
4073 context()->Plug(v0); 4073 context()->Plug(v0);
4074 } 4074 }
4075 4075
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
4268 reinterpret_cast<uint64_t>( 4268 reinterpret_cast<uint64_t>(
4269 isolate->builtins()->OsrAfterStackCheck()->entry())); 4269 isolate->builtins()->OsrAfterStackCheck()->entry()));
4270 return OSR_AFTER_STACK_CHECK; 4270 return OSR_AFTER_STACK_CHECK;
4271 } 4271 }
4272 4272
4273 4273
4274 } // namespace internal 4274 } // namespace internal
4275 } // namespace v8 4275 } // namespace v8
4276 4276
4277 #endif // V8_TARGET_ARCH_MIPS64 4277 #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