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

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

Issue 1698343002: [builtins] Move the Boolean constructor to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Also remove it from ia32 of course. Created 4 years, 10 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/ppc/full-codegen-ppc.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 3257 matching lines...) Expand 10 before | Expand all | Expand 10 after
3268 string, 3268 string,
3269 Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag)); 3269 Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag));
3270 __ dsra(index, index, 32 - 1); 3270 __ dsra(index, index, 32 - 1);
3271 __ Daddu(at, at, index); 3271 __ Daddu(at, at, index);
3272 STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); 3272 STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0);
3273 __ sh(value, MemOperand(at)); 3273 __ sh(value, MemOperand(at));
3274 context()->Plug(string); 3274 context()->Plug(string);
3275 } 3275 }
3276 3276
3277 3277
3278 void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) {
3279 ZoneList<Expression*>* args = expr->arguments();
3280 DCHECK(args->length() == 2);
3281
3282 VisitForStackValue(args->at(0)); // Load the object.
3283 VisitForAccumulatorValue(args->at(1)); // Load the value.
3284 __ pop(a1); // v0 = value. a1 = object.
3285
3286 Label done;
3287 // If the object is a smi, return the value.
3288 __ JumpIfSmi(a1, &done);
3289
3290 // If the object is not a value type, return the value.
3291 __ GetObjectType(a1, a2, a2);
3292 __ Branch(&done, ne, a2, Operand(JS_VALUE_TYPE));
3293
3294 // Store the value.
3295 __ sd(v0, FieldMemOperand(a1, JSValue::kValueOffset));
3296 // Update the write barrier. Save the value as it will be
3297 // overwritten by the write barrier code and is needed afterward.
3298 __ mov(a2, v0);
3299 __ RecordWriteField(
3300 a1, JSValue::kValueOffset, a2, a3, kRAHasBeenSaved, kDontSaveFPRegs);
3301
3302 __ bind(&done);
3303 context()->Plug(v0);
3304 }
3305
3306
3307 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { 3278 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
3308 ZoneList<Expression*>* args = expr->arguments(); 3279 ZoneList<Expression*>* args = expr->arguments();
3309 DCHECK_EQ(1, args->length()); 3280 DCHECK_EQ(1, args->length());
3310 3281
3311 // Load the argument into v0 and convert it. 3282 // Load the argument into v0 and convert it.
3312 VisitForAccumulatorValue(args->at(0)); 3283 VisitForAccumulatorValue(args->at(0));
3313 3284
3314 // Convert the object to an integer. 3285 // Convert the object to an integer.
3315 Label done_convert; 3286 Label done_convert;
3316 __ JumpIfSmi(v0, &done_convert); 3287 __ JumpIfSmi(v0, &done_convert);
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
4597 reinterpret_cast<uint64_t>( 4568 reinterpret_cast<uint64_t>(
4598 isolate->builtins()->OsrAfterStackCheck()->entry())); 4569 isolate->builtins()->OsrAfterStackCheck()->entry()));
4599 return OSR_AFTER_STACK_CHECK; 4570 return OSR_AFTER_STACK_CHECK;
4600 } 4571 }
4601 4572
4602 4573
4603 } // namespace internal 4574 } // namespace internal
4604 } // namespace v8 4575 } // namespace v8
4605 4576
4606 #endif // V8_TARGET_ARCH_MIPS64 4577 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698