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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3058 matching lines...) Expand 10 before | Expand all | Expand 10 after
3069 } 3069 }
3070 3070
3071 __ Add(scratch, string, SeqTwoByteString::kHeaderSize - kHeapObjectTag); 3071 __ Add(scratch, string, SeqTwoByteString::kHeaderSize - kHeapObjectTag);
3072 __ SmiUntag(value); 3072 __ SmiUntag(value);
3073 __ SmiUntag(index); 3073 __ SmiUntag(index);
3074 __ Strh(value, MemOperand(scratch, index, LSL, 1)); 3074 __ Strh(value, MemOperand(scratch, index, LSL, 1));
3075 context()->Plug(string); 3075 context()->Plug(string);
3076 } 3076 }
3077 3077
3078 3078
3079 void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) {
3080 ZoneList<Expression*>* args = expr->arguments();
3081 DCHECK(args->length() == 2);
3082 VisitForStackValue(args->at(0)); // Load the object.
3083 VisitForAccumulatorValue(args->at(1)); // Load the value.
3084 __ Pop(x1);
3085 // x0 = value.
3086 // x1 = object.
3087
3088 Label done;
3089 // If the object is a smi, return the value.
3090 __ JumpIfSmi(x1, &done);
3091
3092 // If the object is not a value type, return the value.
3093 __ JumpIfNotObjectType(x1, x10, x11, JS_VALUE_TYPE, &done);
3094
3095 // Store the value.
3096 __ Str(x0, FieldMemOperand(x1, JSValue::kValueOffset));
3097 // Update the write barrier. Save the value as it will be
3098 // overwritten by the write barrier code and is needed afterward.
3099 __ Mov(x10, x0);
3100 __ RecordWriteField(
3101 x1, JSValue::kValueOffset, x10, x11, kLRHasBeenSaved, kDontSaveFPRegs);
3102
3103 __ Bind(&done);
3104 context()->Plug(x0);
3105 }
3106
3107
3108 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { 3079 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
3109 ZoneList<Expression*>* args = expr->arguments(); 3080 ZoneList<Expression*>* args = expr->arguments();
3110 DCHECK_EQ(1, args->length()); 3081 DCHECK_EQ(1, args->length());
3111 3082
3112 // Load the argument into x0 and convert it. 3083 // Load the argument into x0 and convert it.
3113 VisitForAccumulatorValue(args->at(0)); 3084 VisitForAccumulatorValue(args->at(0));
3114 3085
3115 // Convert the object to an integer. 3086 // Convert the object to an integer.
3116 Label done_convert; 3087 Label done_convert;
3117 __ JumpIfSmi(x0, &done_convert); 3088 __ JumpIfSmi(x0, &done_convert);
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after
4623 } 4594 }
4624 4595
4625 return INTERRUPT; 4596 return INTERRUPT;
4626 } 4597 }
4627 4598
4628 4599
4629 } // namespace internal 4600 } // namespace internal
4630 } // namespace v8 4601 } // namespace v8
4631 4602
4632 #endif // V8_TARGET_ARCH_ARM64 4603 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698