| OLD | NEW |
| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3344 | 3344 |
| 3345 | 3345 |
| 3346 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { | 3346 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { |
| 3347 ZoneList<Expression*>* args = expr->arguments(); | 3347 ZoneList<Expression*>* args = expr->arguments(); |
| 3348 DCHECK_EQ(3, args->length()); | 3348 DCHECK_EQ(3, args->length()); |
| 3349 | 3349 |
| 3350 Register string = rax; | 3350 Register string = rax; |
| 3351 Register index = rbx; | 3351 Register index = rbx; |
| 3352 Register value = rcx; | 3352 Register value = rcx; |
| 3353 | 3353 |
| 3354 VisitForStackValue(args->at(1)); // index | 3354 VisitForStackValue(args->at(0)); // index |
| 3355 VisitForStackValue(args->at(2)); // value | 3355 VisitForStackValue(args->at(1)); // value |
| 3356 VisitForAccumulatorValue(args->at(0)); // string | 3356 VisitForAccumulatorValue(args->at(2)); // string |
| 3357 __ Pop(value); | 3357 __ Pop(value); |
| 3358 __ Pop(index); | 3358 __ Pop(index); |
| 3359 | 3359 |
| 3360 if (FLAG_debug_code) { | 3360 if (FLAG_debug_code) { |
| 3361 __ Check(__ CheckSmi(value), kNonSmiValue); | 3361 __ Check(__ CheckSmi(value), kNonSmiValue); |
| 3362 __ Check(__ CheckSmi(index), kNonSmiValue); | 3362 __ Check(__ CheckSmi(index), kNonSmiValue); |
| 3363 } | 3363 } |
| 3364 | 3364 |
| 3365 __ SmiToInteger32(value, value); | 3365 __ SmiToInteger32(value, value); |
| 3366 __ SmiToInteger32(index, index); | 3366 __ SmiToInteger32(index, index); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3377 | 3377 |
| 3378 | 3378 |
| 3379 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { | 3379 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { |
| 3380 ZoneList<Expression*>* args = expr->arguments(); | 3380 ZoneList<Expression*>* args = expr->arguments(); |
| 3381 DCHECK_EQ(3, args->length()); | 3381 DCHECK_EQ(3, args->length()); |
| 3382 | 3382 |
| 3383 Register string = rax; | 3383 Register string = rax; |
| 3384 Register index = rbx; | 3384 Register index = rbx; |
| 3385 Register value = rcx; | 3385 Register value = rcx; |
| 3386 | 3386 |
| 3387 VisitForStackValue(args->at(1)); // index | 3387 VisitForStackValue(args->at(0)); // index |
| 3388 VisitForStackValue(args->at(2)); // value | 3388 VisitForStackValue(args->at(1)); // value |
| 3389 VisitForAccumulatorValue(args->at(0)); // string | 3389 VisitForAccumulatorValue(args->at(2)); // string |
| 3390 __ Pop(value); | 3390 __ Pop(value); |
| 3391 __ Pop(index); | 3391 __ Pop(index); |
| 3392 | 3392 |
| 3393 if (FLAG_debug_code) { | 3393 if (FLAG_debug_code) { |
| 3394 __ Check(__ CheckSmi(value), kNonSmiValue); | 3394 __ Check(__ CheckSmi(value), kNonSmiValue); |
| 3395 __ Check(__ CheckSmi(index), kNonSmiValue); | 3395 __ Check(__ CheckSmi(index), kNonSmiValue); |
| 3396 } | 3396 } |
| 3397 | 3397 |
| 3398 __ SmiToInteger32(value, value); | 3398 __ SmiToInteger32(value, value); |
| 3399 __ SmiToInteger32(index, index); | 3399 __ SmiToInteger32(index, index); |
| (...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4833 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4833 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4834 Assembler::target_address_at(call_target_address, | 4834 Assembler::target_address_at(call_target_address, |
| 4835 unoptimized_code)); | 4835 unoptimized_code)); |
| 4836 return OSR_AFTER_STACK_CHECK; | 4836 return OSR_AFTER_STACK_CHECK; |
| 4837 } | 4837 } |
| 4838 | 4838 |
| 4839 | 4839 |
| 4840 } } // namespace v8::internal | 4840 } } // namespace v8::internal |
| 4841 | 4841 |
| 4842 #endif // V8_TARGET_ARCH_X64 | 4842 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |