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

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

Issue 1306303003: [es6] Implement spec compliant ToPrimitive in the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michis comments. Created 5 years, 3 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_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 3446 matching lines...) Expand 10 before | Expand all | Expand 10 after
3457 __ Daddu(a4, a4, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag)); 3457 __ Daddu(a4, a4, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag));
3458 // Calculate the end of the descriptor array. 3458 // Calculate the end of the descriptor array.
3459 __ mov(a2, a4); 3459 __ mov(a2, a4);
3460 __ dsll(a5, a3, kPointerSizeLog2); 3460 __ dsll(a5, a3, kPointerSizeLog2);
3461 __ Daddu(a2, a2, a5); 3461 __ Daddu(a2, a2, a5);
3462 3462
3463 // Loop through all the keys in the descriptor array. If one of these is the 3463 // Loop through all the keys in the descriptor array. If one of these is the
3464 // string "valueOf" the result is false. 3464 // string "valueOf" the result is false.
3465 // The use of a6 to store the valueOf string assumes that it is not otherwise 3465 // The use of a6 to store the valueOf string assumes that it is not otherwise
3466 // used in the loop below. 3466 // used in the loop below.
3467 __ li(a6, Operand(isolate()->factory()->value_of_string())); 3467 __ LoadRoot(a6, Heap::kvalueOf_stringRootIndex);
3468 __ jmp(&entry); 3468 __ jmp(&entry);
3469 __ bind(&loop); 3469 __ bind(&loop);
3470 __ ld(a3, MemOperand(a4, 0)); 3470 __ ld(a3, MemOperand(a4, 0));
3471 __ Branch(if_false, eq, a3, Operand(a6)); 3471 __ Branch(if_false, eq, a3, Operand(a6));
3472 __ Daddu(a4, a4, Operand(DescriptorArray::kDescriptorSize * kPointerSize)); 3472 __ Daddu(a4, a4, Operand(DescriptorArray::kDescriptorSize * kPointerSize));
3473 __ bind(&entry); 3473 __ bind(&entry);
3474 __ Branch(&loop, ne, a4, Operand(a2)); 3474 __ Branch(&loop, ne, a4, Operand(a2));
3475 3475
3476 __ bind(&done); 3476 __ bind(&done);
3477 3477
(...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after
5349 reinterpret_cast<uint64_t>( 5349 reinterpret_cast<uint64_t>(
5350 isolate->builtins()->OsrAfterStackCheck()->entry())); 5350 isolate->builtins()->OsrAfterStackCheck()->entry()));
5351 return OSR_AFTER_STACK_CHECK; 5351 return OSR_AFTER_STACK_CHECK;
5352 } 5352 }
5353 5353
5354 5354
5355 } // namespace internal 5355 } // namespace internal
5356 } // namespace v8 5356 } // namespace v8
5357 5357
5358 #endif // V8_TARGET_ARCH_MIPS64 5358 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698