| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 3206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3217 VisitForStackValue(args->at(2)); // value | 3217 VisitForStackValue(args->at(2)); // value |
| 3218 VisitForAccumulatorValue(args->at(0)); // string | 3218 VisitForAccumulatorValue(args->at(0)); // string |
| 3219 __ Pop(value, index); | 3219 __ Pop(value, index); |
| 3220 | 3220 |
| 3221 if (FLAG_debug_code) { | 3221 if (FLAG_debug_code) { |
| 3222 Label both_smis; | 3222 Label both_smis; |
| 3223 __ JumpIfBothSmi(value, index, &both_smis); | 3223 __ JumpIfBothSmi(value, index, &both_smis); |
| 3224 __ Throw(kNonSmiValue); | 3224 __ Throw(kNonSmiValue); |
| 3225 __ Throw(kNonSmiIndex); | 3225 __ Throw(kNonSmiIndex); |
| 3226 __ Bind(&both_smis); | 3226 __ Bind(&both_smis); |
| 3227 | |
| 3228 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; | 3227 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; |
| 3229 __ EmitSeqStringSetCharCheck(string, index, one_byte_seq_type); | 3228 __ EmitSeqStringSetCharCheck(string, index, kIndexIsSmi, scratch, |
| 3229 one_byte_seq_type); |
| 3230 } | 3230 } |
| 3231 | 3231 |
| 3232 __ Add(scratch, string, SeqOneByteString::kHeaderSize - kHeapObjectTag); | 3232 __ Add(scratch, string, SeqOneByteString::kHeaderSize - kHeapObjectTag); |
| 3233 __ SmiUntag(value); | 3233 __ SmiUntag(value); |
| 3234 __ SmiUntag(index); | 3234 __ SmiUntag(index); |
| 3235 __ Strb(value, MemOperand(scratch, index)); | 3235 __ Strb(value, MemOperand(scratch, index)); |
| 3236 context()->Plug(string); | 3236 context()->Plug(string); |
| 3237 } | 3237 } |
| 3238 | 3238 |
| 3239 | 3239 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3250 VisitForStackValue(args->at(2)); // value | 3250 VisitForStackValue(args->at(2)); // value |
| 3251 VisitForAccumulatorValue(args->at(0)); // string | 3251 VisitForAccumulatorValue(args->at(0)); // string |
| 3252 __ Pop(value, index); | 3252 __ Pop(value, index); |
| 3253 | 3253 |
| 3254 if (FLAG_debug_code) { | 3254 if (FLAG_debug_code) { |
| 3255 Label both_smis; | 3255 Label both_smis; |
| 3256 __ JumpIfBothSmi(value, index, &both_smis); | 3256 __ JumpIfBothSmi(value, index, &both_smis); |
| 3257 __ Throw(kNonSmiValue); | 3257 __ Throw(kNonSmiValue); |
| 3258 __ Throw(kNonSmiIndex); | 3258 __ Throw(kNonSmiIndex); |
| 3259 __ Bind(&both_smis); | 3259 __ Bind(&both_smis); |
| 3260 | |
| 3261 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; | 3260 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; |
| 3262 __ EmitSeqStringSetCharCheck(string, index, two_byte_seq_type); | 3261 __ EmitSeqStringSetCharCheck(string, index, kIndexIsSmi, scratch, |
| 3262 two_byte_seq_type); |
| 3263 } | 3263 } |
| 3264 | 3264 |
| 3265 __ Add(scratch, string, SeqTwoByteString::kHeaderSize - kHeapObjectTag); | 3265 __ Add(scratch, string, SeqTwoByteString::kHeaderSize - kHeapObjectTag); |
| 3266 __ SmiUntag(value); | 3266 __ SmiUntag(value); |
| 3267 __ SmiUntag(index); | 3267 __ SmiUntag(index); |
| 3268 __ Strh(value, MemOperand(scratch, index, LSL, 1)); | 3268 __ Strh(value, MemOperand(scratch, index, LSL, 1)); |
| 3269 context()->Plug(string); | 3269 context()->Plug(string); |
| 3270 } | 3270 } |
| 3271 | 3271 |
| 3272 | 3272 |
| (...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5026 return previous_; | 5026 return previous_; |
| 5027 } | 5027 } |
| 5028 | 5028 |
| 5029 | 5029 |
| 5030 #undef __ | 5030 #undef __ |
| 5031 | 5031 |
| 5032 | 5032 |
| 5033 } } // namespace v8::internal | 5033 } } // namespace v8::internal |
| 5034 | 5034 |
| 5035 #endif // V8_TARGET_ARCH_A64 | 5035 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |