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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.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_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 3444 matching lines...) Expand 10 before | Expand all | Expand 10 after
3455 __ Addu(t0, t0, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag)); 3455 __ Addu(t0, t0, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag));
3456 // Calculate the end of the descriptor array. 3456 // Calculate the end of the descriptor array.
3457 __ mov(a2, t0); 3457 __ mov(a2, t0);
3458 __ sll(t1, a3, kPointerSizeLog2); 3458 __ sll(t1, a3, kPointerSizeLog2);
3459 __ Addu(a2, a2, t1); 3459 __ Addu(a2, a2, t1);
3460 3460
3461 // Loop through all the keys in the descriptor array. If one of these is the 3461 // Loop through all the keys in the descriptor array. If one of these is the
3462 // string "valueOf" the result is false. 3462 // string "valueOf" the result is false.
3463 // The use of t2 to store the valueOf string assumes that it is not otherwise 3463 // The use of t2 to store the valueOf string assumes that it is not otherwise
3464 // used in the loop below. 3464 // used in the loop below.
3465 __ li(t2, Operand(isolate()->factory()->value_of_string())); 3465 __ LoadRoot(t2, Heap::kvalueOf_stringRootIndex);
3466 __ jmp(&entry); 3466 __ jmp(&entry);
3467 __ bind(&loop); 3467 __ bind(&loop);
3468 __ lw(a3, MemOperand(t0, 0)); 3468 __ lw(a3, MemOperand(t0, 0));
3469 __ Branch(if_false, eq, a3, Operand(t2)); 3469 __ Branch(if_false, eq, a3, Operand(t2));
3470 __ Addu(t0, t0, Operand(DescriptorArray::kDescriptorSize * kPointerSize)); 3470 __ Addu(t0, t0, Operand(DescriptorArray::kDescriptorSize * kPointerSize));
3471 __ bind(&entry); 3471 __ bind(&entry);
3472 __ Branch(&loop, ne, t0, Operand(a2)); 3472 __ Branch(&loop, ne, t0, Operand(a2));
3473 3473
3474 __ bind(&done); 3474 __ bind(&done);
3475 3475
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after
5343 reinterpret_cast<uint32_t>( 5343 reinterpret_cast<uint32_t>(
5344 isolate->builtins()->OsrAfterStackCheck()->entry())); 5344 isolate->builtins()->OsrAfterStackCheck()->entry()));
5345 return OSR_AFTER_STACK_CHECK; 5345 return OSR_AFTER_STACK_CHECK;
5346 } 5346 }
5347 5347
5348 5348
5349 } // namespace internal 5349 } // namespace internal
5350 } // namespace v8 5350 } // namespace v8
5351 5351
5352 #endif // V8_TARGET_ARCH_MIPS 5352 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698