| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3542 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { | 3542 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { |
| 3543 ZoneList<Expression*>* args = expr->arguments(); | 3543 ZoneList<Expression*>* args = expr->arguments(); |
| 3544 ASSERT_EQ(3, args->length()); | 3544 ASSERT_EQ(3, args->length()); |
| 3545 | 3545 |
| 3546 Register string = v0; | 3546 Register string = v0; |
| 3547 Register index = a1; | 3547 Register index = a1; |
| 3548 Register value = a2; | 3548 Register value = a2; |
| 3549 | 3549 |
| 3550 VisitForStackValue(args->at(1)); // index | 3550 VisitForStackValue(args->at(1)); // index |
| 3551 VisitForStackValue(args->at(2)); // value | 3551 VisitForStackValue(args->at(2)); // value |
| 3552 VisitForAccumulatorValue(args->at(0)); // string |
| 3552 __ Pop(index, value); | 3553 __ Pop(index, value); |
| 3553 VisitForAccumulatorValue(args->at(0)); // string | |
| 3554 | 3554 |
| 3555 if (FLAG_debug_code) { | 3555 if (FLAG_debug_code) { |
| 3556 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; | 3556 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; |
| 3557 EmitSeqStringSetCharCheck(string, index, value, one_byte_seq_type); | 3557 EmitSeqStringSetCharCheck(string, index, value, one_byte_seq_type); |
| 3558 } | 3558 } |
| 3559 | 3559 |
| 3560 __ SmiUntag(value, value); | 3560 __ SmiUntag(value, value); |
| 3561 __ Addu(at, | 3561 __ Addu(at, |
| 3562 string, | 3562 string, |
| 3563 Operand(SeqOneByteString::kHeaderSize - kHeapObjectTag)); | 3563 Operand(SeqOneByteString::kHeaderSize - kHeapObjectTag)); |
| 3564 __ SmiUntag(index); | 3564 __ SmiUntag(index); |
| 3565 __ Addu(at, at, index); | 3565 __ Addu(at, at, index); |
| 3566 __ sb(value, MemOperand(at)); | 3566 __ sb(value, MemOperand(at)); |
| 3567 context()->Plug(string); | 3567 context()->Plug(string); |
| 3568 } | 3568 } |
| 3569 | 3569 |
| 3570 | 3570 |
| 3571 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { | 3571 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { |
| 3572 ZoneList<Expression*>* args = expr->arguments(); | 3572 ZoneList<Expression*>* args = expr->arguments(); |
| 3573 ASSERT_EQ(3, args->length()); | 3573 ASSERT_EQ(3, args->length()); |
| 3574 | 3574 |
| 3575 Register string = v0; | 3575 Register string = v0; |
| 3576 Register index = a1; | 3576 Register index = a1; |
| 3577 Register value = a2; | 3577 Register value = a2; |
| 3578 | 3578 |
| 3579 VisitForStackValue(args->at(1)); // index | 3579 VisitForStackValue(args->at(1)); // index |
| 3580 VisitForStackValue(args->at(2)); // value | 3580 VisitForStackValue(args->at(2)); // value |
| 3581 VisitForAccumulatorValue(args->at(0)); // string |
| 3581 __ Pop(index, value); | 3582 __ Pop(index, value); |
| 3582 VisitForAccumulatorValue(args->at(0)); // string | |
| 3583 | 3583 |
| 3584 if (FLAG_debug_code) { | 3584 if (FLAG_debug_code) { |
| 3585 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; | 3585 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; |
| 3586 EmitSeqStringSetCharCheck(string, index, value, two_byte_seq_type); | 3586 EmitSeqStringSetCharCheck(string, index, value, two_byte_seq_type); |
| 3587 } | 3587 } |
| 3588 | 3588 |
| 3589 __ SmiUntag(value, value); | 3589 __ SmiUntag(value, value); |
| 3590 __ Addu(at, | 3590 __ Addu(at, |
| 3591 string, | 3591 string, |
| 3592 Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag)); | 3592 Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag)); |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5016 Assembler::target_address_at(pc_immediate_load_address)) == | 5016 Assembler::target_address_at(pc_immediate_load_address)) == |
| 5017 reinterpret_cast<uint32_t>( | 5017 reinterpret_cast<uint32_t>( |
| 5018 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5018 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5019 return OSR_AFTER_STACK_CHECK; | 5019 return OSR_AFTER_STACK_CHECK; |
| 5020 } | 5020 } |
| 5021 | 5021 |
| 5022 | 5022 |
| 5023 } } // namespace v8::internal | 5023 } } // namespace v8::internal |
| 5024 | 5024 |
| 5025 #endif // V8_TARGET_ARCH_MIPS | 5025 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |