| 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 4784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4795 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); | 4795 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); |
| 4796 if (instr->index()->IsConstantOperand()) { | 4796 if (instr->index()->IsConstantOperand()) { |
| 4797 Immediate immediate = ToImmediate(LConstantOperand::cast(instr->index()), | 4797 Immediate immediate = ToImmediate(LConstantOperand::cast(instr->index()), |
| 4798 Representation::Smi()); | 4798 Representation::Smi()); |
| 4799 __ push(immediate); | 4799 __ push(immediate); |
| 4800 } else { | 4800 } else { |
| 4801 Register index = ToRegister(instr->index()); | 4801 Register index = ToRegister(instr->index()); |
| 4802 __ SmiTag(index); | 4802 __ SmiTag(index); |
| 4803 __ push(index); | 4803 __ push(index); |
| 4804 } | 4804 } |
| 4805 CallRuntimeFromDeferred(Runtime::kStringCharCodeAt, 2, | 4805 CallRuntimeFromDeferred(Runtime::kHiddenStringCharCodeAt, 2, |
| 4806 instr, instr->context()); | 4806 instr, instr->context()); |
| 4807 __ AssertSmi(eax); | 4807 __ AssertSmi(eax); |
| 4808 __ SmiUntag(eax); | 4808 __ SmiUntag(eax); |
| 4809 __ StoreToSafepointRegisterSlot(result, eax); | 4809 __ StoreToSafepointRegisterSlot(result, eax); |
| 4810 } | 4810 } |
| 4811 | 4811 |
| 4812 | 4812 |
| 4813 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { | 4813 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { |
| 4814 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { | 4814 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { |
| 4815 public: | 4815 public: |
| (...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6348 FixedArray::kHeaderSize - kPointerSize)); | 6348 FixedArray::kHeaderSize - kPointerSize)); |
| 6349 __ bind(&done); | 6349 __ bind(&done); |
| 6350 } | 6350 } |
| 6351 | 6351 |
| 6352 | 6352 |
| 6353 #undef __ | 6353 #undef __ |
| 6354 | 6354 |
| 6355 } } // namespace v8::internal | 6355 } } // namespace v8::internal |
| 6356 | 6356 |
| 6357 #endif // V8_TARGET_ARCH_IA32 | 6357 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |