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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 3426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3437 | 3437 |
3438 | 3438 |
3439 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { | 3439 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { |
3440 ZoneList<Expression*>* args = expr->arguments(); | 3440 ZoneList<Expression*>* args = expr->arguments(); |
3441 DCHECK_EQ(3, args->length()); | 3441 DCHECK_EQ(3, args->length()); |
3442 | 3442 |
3443 Register string = r0; | 3443 Register string = r0; |
3444 Register index = r1; | 3444 Register index = r1; |
3445 Register value = r2; | 3445 Register value = r2; |
3446 | 3446 |
3447 VisitForStackValue(args->at(0)); // index | 3447 VisitForStackValue(args->at(1)); // index |
3448 VisitForStackValue(args->at(1)); // value | 3448 VisitForStackValue(args->at(2)); // value |
3449 VisitForAccumulatorValue(args->at(2)); // string | 3449 VisitForAccumulatorValue(args->at(0)); // string |
3450 __ Pop(index, value); | 3450 __ Pop(index, value); |
3451 | 3451 |
3452 if (FLAG_debug_code) { | 3452 if (FLAG_debug_code) { |
3453 __ SmiTst(value); | 3453 __ SmiTst(value); |
3454 __ Check(eq, kNonSmiValue); | 3454 __ Check(eq, kNonSmiValue); |
3455 __ SmiTst(index); | 3455 __ SmiTst(index); |
3456 __ Check(eq, kNonSmiIndex); | 3456 __ Check(eq, kNonSmiIndex); |
3457 __ SmiUntag(index, index); | 3457 __ SmiUntag(index, index); |
3458 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; | 3458 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; |
3459 __ EmitSeqStringSetCharCheck(string, index, value, one_byte_seq_type); | 3459 __ EmitSeqStringSetCharCheck(string, index, value, one_byte_seq_type); |
(...skipping 10 matching lines...) Expand all Loading... |
3470 | 3470 |
3471 | 3471 |
3472 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { | 3472 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { |
3473 ZoneList<Expression*>* args = expr->arguments(); | 3473 ZoneList<Expression*>* args = expr->arguments(); |
3474 DCHECK_EQ(3, args->length()); | 3474 DCHECK_EQ(3, args->length()); |
3475 | 3475 |
3476 Register string = r0; | 3476 Register string = r0; |
3477 Register index = r1; | 3477 Register index = r1; |
3478 Register value = r2; | 3478 Register value = r2; |
3479 | 3479 |
3480 VisitForStackValue(args->at(0)); // index | 3480 VisitForStackValue(args->at(1)); // index |
3481 VisitForStackValue(args->at(1)); // value | 3481 VisitForStackValue(args->at(2)); // value |
3482 VisitForAccumulatorValue(args->at(2)); // string | 3482 VisitForAccumulatorValue(args->at(0)); // string |
3483 __ Pop(index, value); | 3483 __ Pop(index, value); |
3484 | 3484 |
3485 if (FLAG_debug_code) { | 3485 if (FLAG_debug_code) { |
3486 __ SmiTst(value); | 3486 __ SmiTst(value); |
3487 __ Check(eq, kNonSmiValue); | 3487 __ Check(eq, kNonSmiValue); |
3488 __ SmiTst(index); | 3488 __ SmiTst(index); |
3489 __ Check(eq, kNonSmiIndex); | 3489 __ Check(eq, kNonSmiIndex); |
3490 __ SmiUntag(index, index); | 3490 __ SmiUntag(index, index); |
3491 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; | 3491 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; |
3492 __ EmitSeqStringSetCharCheck(string, index, value, two_byte_seq_type); | 3492 __ EmitSeqStringSetCharCheck(string, index, value, two_byte_seq_type); |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4922 | 4922 |
4923 DCHECK(interrupt_address == | 4923 DCHECK(interrupt_address == |
4924 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4924 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4925 return OSR_AFTER_STACK_CHECK; | 4925 return OSR_AFTER_STACK_CHECK; |
4926 } | 4926 } |
4927 | 4927 |
4928 | 4928 |
4929 } } // namespace v8::internal | 4929 } } // namespace v8::internal |
4930 | 4930 |
4931 #endif // V8_TARGET_ARCH_ARM | 4931 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |