| 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/code-factory.h" | 7 #include "src/code-factory.h" | 
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" | 
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" | 
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" | 
| (...skipping 3458 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3469   // overwritten by the write barrier code and is needed afterward. | 3469   // overwritten by the write barrier code and is needed afterward. | 
| 3470   __ Mov(x10, x0); | 3470   __ Mov(x10, x0); | 
| 3471   __ RecordWriteField( | 3471   __ RecordWriteField( | 
| 3472       x1, JSValue::kValueOffset, x10, x11, kLRHasBeenSaved, kDontSaveFPRegs); | 3472       x1, JSValue::kValueOffset, x10, x11, kLRHasBeenSaved, kDontSaveFPRegs); | 
| 3473 | 3473 | 
| 3474   __ Bind(&done); | 3474   __ Bind(&done); | 
| 3475   context()->Plug(x0); | 3475   context()->Plug(x0); | 
| 3476 } | 3476 } | 
| 3477 | 3477 | 
| 3478 | 3478 | 
|  | 3479 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { | 
|  | 3480   ZoneList<Expression*>* args = expr->arguments(); | 
|  | 3481   DCHECK_EQ(1, args->length()); | 
|  | 3482 | 
|  | 3483   // Load the argument into x0 and convert it. | 
|  | 3484   VisitForAccumulatorValue(args->at(0)); | 
|  | 3485 | 
|  | 3486   // Convert the object to an integer. | 
|  | 3487   Label done_convert; | 
|  | 3488   __ JumpIfSmi(x0, &done_convert); | 
|  | 3489   __ Push(x0); | 
|  | 3490   __ CallRuntime(Runtime::kToInteger, 1); | 
|  | 3491   __ bind(&done_convert); | 
|  | 3492   context()->Plug(x0); | 
|  | 3493 } | 
|  | 3494 | 
|  | 3495 | 
| 3479 void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { | 3496 void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { | 
| 3480   ZoneList<Expression*>* args = expr->arguments(); | 3497   ZoneList<Expression*>* args = expr->arguments(); | 
| 3481   DCHECK_EQ(args->length(), 1); | 3498   DCHECK_EQ(args->length(), 1); | 
| 3482 | 3499 | 
| 3483   // Load the argument into x0 and call the stub. | 3500   // Load the argument into x0 and call the stub. | 
| 3484   VisitForAccumulatorValue(args->at(0)); | 3501   VisitForAccumulatorValue(args->at(0)); | 
| 3485 | 3502 | 
| 3486   NumberToStringStub stub(isolate()); | 3503   NumberToStringStub stub(isolate()); | 
| 3487   __ CallStub(&stub); | 3504   __ CallStub(&stub); | 
| 3488   context()->Plug(x0); | 3505   context()->Plug(x0); | 
| (...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5241   } | 5258   } | 
| 5242 | 5259 | 
| 5243   return INTERRUPT; | 5260   return INTERRUPT; | 
| 5244 } | 5261 } | 
| 5245 | 5262 | 
| 5246 | 5263 | 
| 5247 }  // namespace internal | 5264 }  // namespace internal | 
| 5248 }  // namespace v8 | 5265 }  // namespace v8 | 
| 5249 | 5266 | 
| 5250 #endif  // V8_TARGET_ARCH_ARM64 | 5267 #endif  // V8_TARGET_ARCH_ARM64 | 
| OLD | NEW | 
|---|