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

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

Issue 2227763003: [turbofan] Rewrite ToObject as TurboFan stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comment with ES6 section Created 4 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
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 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 Label convert, done_convert; 992 Label convert, done_convert;
993 __ JumpIfSmi(a0, &convert); 993 __ JumpIfSmi(a0, &convert);
994 __ GetObjectType(a0, a1, a1); 994 __ GetObjectType(a0, a1, a1);
995 __ Branch(USE_DELAY_SLOT, &done_convert, ge, a1, 995 __ Branch(USE_DELAY_SLOT, &done_convert, ge, a1,
996 Operand(FIRST_JS_RECEIVER_TYPE)); 996 Operand(FIRST_JS_RECEIVER_TYPE));
997 __ LoadRoot(at, Heap::kNullValueRootIndex); // In delay slot. 997 __ LoadRoot(at, Heap::kNullValueRootIndex); // In delay slot.
998 __ Branch(USE_DELAY_SLOT, &exit, eq, a0, Operand(at)); 998 __ Branch(USE_DELAY_SLOT, &exit, eq, a0, Operand(at));
999 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); // In delay slot. 999 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); // In delay slot.
1000 __ Branch(&exit, eq, a0, Operand(at)); 1000 __ Branch(&exit, eq, a0, Operand(at));
1001 __ bind(&convert); 1001 __ bind(&convert);
1002 __ Push(cp);
1002 ToObjectStub stub(isolate()); 1003 ToObjectStub stub(isolate());
1003 __ CallStub(&stub); 1004 __ CallStub(&stub);
1005 __ Pop(cp);
1004 __ mov(a0, v0); 1006 __ mov(a0, v0);
1005 __ bind(&done_convert); 1007 __ bind(&done_convert);
1006 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER); 1008 PrepareForBailoutForId(stmt->ToObjectId(), BailoutState::TOS_REGISTER);
1007 __ push(a0); 1009 __ push(a0);
1008 1010
1009 // Check cache validity in generated code. If we cannot guarantee cache 1011 // Check cache validity in generated code. If we cannot guarantee cache
1010 // validity, call the runtime system to check cache validity or get the 1012 // validity, call the runtime system to check cache validity or get the
1011 // property names in a fixed array. Note: Proxies never have an enum cache, 1013 // property names in a fixed array. Note: Proxies never have an enum cache,
1012 // so will always take the slow path. 1014 // so will always take the slow path.
1013 Label call_runtime; 1015 Label call_runtime;
(...skipping 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after
3778 reinterpret_cast<uint32_t>( 3780 reinterpret_cast<uint32_t>(
3779 isolate->builtins()->OnStackReplacement()->entry())); 3781 isolate->builtins()->OnStackReplacement()->entry()));
3780 return ON_STACK_REPLACEMENT; 3782 return ON_STACK_REPLACEMENT;
3781 } 3783 }
3782 3784
3783 3785
3784 } // namespace internal 3786 } // namespace internal
3785 } // namespace v8 3787 } // namespace v8
3786 3788
3787 #endif // V8_TARGET_ARCH_MIPS 3789 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698