| 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 3393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3404 | 3404 |
| 3405 VisitForStackValue(args->at(1)); // index | 3405 VisitForStackValue(args->at(1)); // index |
| 3406 VisitForStackValue(args->at(2)); // value | 3406 VisitForStackValue(args->at(2)); // value |
| 3407 VisitForAccumulatorValue(args->at(0)); // string | 3407 VisitForAccumulatorValue(args->at(0)); // string |
| 3408 | 3408 |
| 3409 __ pop(value); | 3409 __ pop(value); |
| 3410 __ pop(index); | 3410 __ pop(index); |
| 3411 | 3411 |
| 3412 if (FLAG_debug_code) { | 3412 if (FLAG_debug_code) { |
| 3413 __ test(value, Immediate(kSmiTagMask)); | 3413 __ test(value, Immediate(kSmiTagMask)); |
| 3414 __ ThrowIf(not_zero, kNonSmiValue); | 3414 __ Check(zero, kNonSmiValue); |
| 3415 __ test(index, Immediate(kSmiTagMask)); | 3415 __ test(index, Immediate(kSmiTagMask)); |
| 3416 __ ThrowIf(not_zero, kNonSmiValue); | 3416 __ Check(zero, kNonSmiValue); |
| 3417 } | 3417 } |
| 3418 | 3418 |
| 3419 __ SmiUntag(value); | 3419 __ SmiUntag(value); |
| 3420 __ SmiUntag(index); | 3420 __ SmiUntag(index); |
| 3421 | 3421 |
| 3422 if (FLAG_debug_code) { | 3422 if (FLAG_debug_code) { |
| 3423 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; | 3423 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; |
| 3424 __ EmitSeqStringSetCharCheck(string, index, value, one_byte_seq_type); | 3424 __ EmitSeqStringSetCharCheck(string, index, value, one_byte_seq_type); |
| 3425 } | 3425 } |
| 3426 | 3426 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3439 Register value = ecx; | 3439 Register value = ecx; |
| 3440 | 3440 |
| 3441 VisitForStackValue(args->at(1)); // index | 3441 VisitForStackValue(args->at(1)); // index |
| 3442 VisitForStackValue(args->at(2)); // value | 3442 VisitForStackValue(args->at(2)); // value |
| 3443 VisitForAccumulatorValue(args->at(0)); // string | 3443 VisitForAccumulatorValue(args->at(0)); // string |
| 3444 __ pop(value); | 3444 __ pop(value); |
| 3445 __ pop(index); | 3445 __ pop(index); |
| 3446 | 3446 |
| 3447 if (FLAG_debug_code) { | 3447 if (FLAG_debug_code) { |
| 3448 __ test(value, Immediate(kSmiTagMask)); | 3448 __ test(value, Immediate(kSmiTagMask)); |
| 3449 __ ThrowIf(not_zero, kNonSmiValue); | 3449 __ Check(zero, kNonSmiValue); |
| 3450 __ test(index, Immediate(kSmiTagMask)); | 3450 __ test(index, Immediate(kSmiTagMask)); |
| 3451 __ ThrowIf(not_zero, kNonSmiValue); | 3451 __ Check(zero, kNonSmiValue); |
| 3452 __ SmiUntag(index); | 3452 __ SmiUntag(index); |
| 3453 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; | 3453 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; |
| 3454 __ EmitSeqStringSetCharCheck(string, index, value, two_byte_seq_type); | 3454 __ EmitSeqStringSetCharCheck(string, index, value, two_byte_seq_type); |
| 3455 __ SmiTag(index); | 3455 __ SmiTag(index); |
| 3456 } | 3456 } |
| 3457 | 3457 |
| 3458 __ SmiUntag(value); | 3458 __ SmiUntag(value); |
| 3459 // No need to untag a smi for two-byte addressing. | 3459 // No need to untag a smi for two-byte addressing. |
| 3460 __ mov_w(FieldOperand(string, index, times_1, SeqTwoByteString::kHeaderSize), | 3460 __ mov_w(FieldOperand(string, index, times_1, SeqTwoByteString::kHeaderSize), |
| 3461 value); | 3461 value); |
| (...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4894 | 4894 |
| 4895 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4895 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4896 Assembler::target_address_at(call_target_address)); | 4896 Assembler::target_address_at(call_target_address)); |
| 4897 return OSR_AFTER_STACK_CHECK; | 4897 return OSR_AFTER_STACK_CHECK; |
| 4898 } | 4898 } |
| 4899 | 4899 |
| 4900 | 4900 |
| 4901 } } // namespace v8::internal | 4901 } } // namespace v8::internal |
| 4902 | 4902 |
| 4903 #endif // V8_TARGET_ARCH_IA32 | 4903 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |