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 4462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4473 Label no_memento_found; | 4473 Label no_memento_found; |
4474 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found, | 4474 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found, |
4475 ne, &no_memento_found); | 4475 ne, &no_memento_found); |
4476 DeoptimizeIf(al, instr->environment()); | 4476 DeoptimizeIf(al, instr->environment()); |
4477 __ bind(&no_memento_found); | 4477 __ bind(&no_memento_found); |
4478 } | 4478 } |
4479 | 4479 |
4480 | 4480 |
4481 void LCodeGen::DoStringAdd(LStringAdd* instr) { | 4481 void LCodeGen::DoStringAdd(LStringAdd* instr) { |
4482 ASSERT(ToRegister(instr->context()).is(cp)); | 4482 ASSERT(ToRegister(instr->context()).is(cp)); |
4483 __ push(ToRegister(instr->left())); | 4483 if (FLAG_new_string_add) { |
4484 __ push(ToRegister(instr->right())); | 4484 ASSERT(ToRegister(instr->left()).is(a1)); |
4485 StringAddStub stub(instr->hydrogen()->flags()); | 4485 ASSERT(ToRegister(instr->right()).is(a0)); |
4486 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4486 NewStringAddStub stub(instr->hydrogen()->flags(), |
| 4487 isolate()->heap()->GetPretenureMode()); |
| 4488 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4489 } else { |
| 4490 __ push(ToRegister(instr->left())); |
| 4491 __ push(ToRegister(instr->right())); |
| 4492 StringAddStub stub(instr->hydrogen()->flags()); |
| 4493 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4494 } |
4487 } | 4495 } |
4488 | 4496 |
4489 | 4497 |
4490 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { | 4498 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { |
4491 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { | 4499 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { |
4492 public: | 4500 public: |
4493 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) | 4501 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) |
4494 : LDeferredCode(codegen), instr_(instr) { } | 4502 : LDeferredCode(codegen), instr_(instr) { } |
4495 virtual void Generate() V8_OVERRIDE { | 4503 virtual void Generate() V8_OVERRIDE { |
4496 codegen()->DoDeferredStringCharCodeAt(instr_); | 4504 codegen()->DoDeferredStringCharCodeAt(instr_); |
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5846 __ Subu(scratch, result, scratch); | 5854 __ Subu(scratch, result, scratch); |
5847 __ lw(result, FieldMemOperand(scratch, | 5855 __ lw(result, FieldMemOperand(scratch, |
5848 FixedArray::kHeaderSize - kPointerSize)); | 5856 FixedArray::kHeaderSize - kPointerSize)); |
5849 __ bind(&done); | 5857 __ bind(&done); |
5850 } | 5858 } |
5851 | 5859 |
5852 | 5860 |
5853 #undef __ | 5861 #undef __ |
5854 | 5862 |
5855 } } // namespace v8::internal | 5863 } } // namespace v8::internal |
OLD | NEW |