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 4544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4555 Register temp = ToRegister(instr->temp()); | 4555 Register temp = ToRegister(instr->temp()); |
4556 Label no_memento_found; | 4556 Label no_memento_found; |
4557 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); | 4557 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); |
4558 DeoptimizeIf(eq, instr->environment()); | 4558 DeoptimizeIf(eq, instr->environment()); |
4559 __ bind(&no_memento_found); | 4559 __ bind(&no_memento_found); |
4560 } | 4560 } |
4561 | 4561 |
4562 | 4562 |
4563 void LCodeGen::DoStringAdd(LStringAdd* instr) { | 4563 void LCodeGen::DoStringAdd(LStringAdd* instr) { |
4564 ASSERT(ToRegister(instr->context()).is(cp)); | 4564 ASSERT(ToRegister(instr->context()).is(cp)); |
4565 __ push(ToRegister(instr->left())); | 4565 if (FLAG_new_string_add) { |
4566 __ push(ToRegister(instr->right())); | 4566 ASSERT(ToRegister(instr->left()).is(r1)); |
4567 StringAddStub stub(instr->hydrogen()->flags()); | 4567 ASSERT(ToRegister(instr->right()).is(r0)); |
4568 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4568 NewStringAddStub stub(instr->hydrogen()->flags(), |
| 4569 isolate()->heap()->GetPretenureMode()); |
| 4570 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4571 } else { |
| 4572 __ push(ToRegister(instr->left())); |
| 4573 __ push(ToRegister(instr->right())); |
| 4574 StringAddStub stub(instr->hydrogen()->flags()); |
| 4575 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4576 } |
4569 } | 4577 } |
4570 | 4578 |
4571 | 4579 |
4572 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { | 4580 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { |
4573 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { | 4581 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { |
4574 public: | 4582 public: |
4575 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) | 4583 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) |
4576 : LDeferredCode(codegen), instr_(instr) { } | 4584 : LDeferredCode(codegen), instr_(instr) { } |
4577 virtual void Generate() V8_OVERRIDE { | 4585 virtual void Generate() V8_OVERRIDE { |
4578 codegen()->DoDeferredStringCharCodeAt(instr_); | 4586 codegen()->DoDeferredStringCharCodeAt(instr_); |
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5875 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5883 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5876 __ ldr(result, FieldMemOperand(scratch, | 5884 __ ldr(result, FieldMemOperand(scratch, |
5877 FixedArray::kHeaderSize - kPointerSize)); | 5885 FixedArray::kHeaderSize - kPointerSize)); |
5878 __ bind(&done); | 5886 __ bind(&done); |
5879 } | 5887 } |
5880 | 5888 |
5881 | 5889 |
5882 #undef __ | 5890 #undef __ |
5883 | 5891 |
5884 } } // namespace v8::internal | 5892 } } // namespace v8::internal |
OLD | NEW |