| OLD | NEW | 
|---|
| 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 2902 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2913   } | 2913   } | 
| 2914 | 2914 | 
| 2915   __ Add(scratch, string, SeqTwoByteString::kHeaderSize - kHeapObjectTag); | 2915   __ Add(scratch, string, SeqTwoByteString::kHeaderSize - kHeapObjectTag); | 
| 2916   __ SmiUntag(value); | 2916   __ SmiUntag(value); | 
| 2917   __ SmiUntag(index); | 2917   __ SmiUntag(index); | 
| 2918   __ Strh(value, MemOperand(scratch, index, LSL, 1)); | 2918   __ Strh(value, MemOperand(scratch, index, LSL, 1)); | 
| 2919   context()->Plug(string); | 2919   context()->Plug(string); | 
| 2920 } | 2920 } | 
| 2921 | 2921 | 
| 2922 | 2922 | 
| 2923 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { |  | 
| 2924   ZoneList<Expression*>* args = expr->arguments(); |  | 
| 2925   DCHECK_EQ(1, args->length()); |  | 
| 2926 |  | 
| 2927   // Load the argument into x0 and convert it. |  | 
| 2928   VisitForAccumulatorValue(args->at(0)); |  | 
| 2929 |  | 
| 2930   // Convert the object to an integer. |  | 
| 2931   Label done_convert; |  | 
| 2932   __ JumpIfSmi(x0, &done_convert); |  | 
| 2933   __ Push(x0); |  | 
| 2934   __ CallRuntime(Runtime::kToInteger); |  | 
| 2935   __ bind(&done_convert); |  | 
| 2936   context()->Plug(x0); |  | 
| 2937 } |  | 
| 2938 |  | 
| 2939 |  | 
| 2940 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 2923 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 
| 2941   ZoneList<Expression*>* args = expr->arguments(); | 2924   ZoneList<Expression*>* args = expr->arguments(); | 
| 2942   DCHECK(args->length() == 1); | 2925   DCHECK(args->length() == 1); | 
| 2943 | 2926 | 
| 2944   VisitForAccumulatorValue(args->at(0)); | 2927   VisitForAccumulatorValue(args->at(0)); | 
| 2945 | 2928 | 
| 2946   Label done; | 2929   Label done; | 
| 2947   Register code = x0; | 2930   Register code = x0; | 
| 2948   Register result = x1; | 2931   Register result = x1; | 
| 2949 | 2932 | 
| (...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4170   } | 4153   } | 
| 4171 | 4154 | 
| 4172   return INTERRUPT; | 4155   return INTERRUPT; | 
| 4173 } | 4156 } | 
| 4174 | 4157 | 
| 4175 | 4158 | 
| 4176 }  // namespace internal | 4159 }  // namespace internal | 
| 4177 }  // namespace v8 | 4160 }  // namespace v8 | 
| 4178 | 4161 | 
| 4179 #endif  // V8_TARGET_ARCH_ARM64 | 4162 #endif  // V8_TARGET_ARCH_ARM64 | 
| OLD | NEW | 
|---|