Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 61893009: Add initial hydrogenized NewStringAddStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 4564 matching lines...) Expand 10 before | Expand all | Expand 10 after
4575 Register temp = ToRegister(instr->temp()); 4575 Register temp = ToRegister(instr->temp());
4576 Label no_memento_found; 4576 Label no_memento_found;
4577 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); 4577 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found);
4578 DeoptimizeIf(eq, instr->environment()); 4578 DeoptimizeIf(eq, instr->environment());
4579 __ bind(&no_memento_found); 4579 __ bind(&no_memento_found);
4580 } 4580 }
4581 4581
4582 4582
4583 void LCodeGen::DoStringAdd(LStringAdd* instr) { 4583 void LCodeGen::DoStringAdd(LStringAdd* instr) {
4584 ASSERT(ToRegister(instr->context()).is(cp)); 4584 ASSERT(ToRegister(instr->context()).is(cp));
4585 __ push(ToRegister(instr->left())); 4585 if (FLAG_new_string_add) {
4586 __ push(ToRegister(instr->right())); 4586 ASSERT(ToRegister(instr->left()).is(r1));
4587 StringAddStub stub(instr->hydrogen()->flags()); 4587 ASSERT(ToRegister(instr->right()).is(r0));
4588 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 4588 NewStringAddStub stub(instr->hydrogen()->flags(),
4589 isolate()->heap()->GetPretenureMode());
4590 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
4591 } else {
4592 __ push(ToRegister(instr->left()));
4593 __ push(ToRegister(instr->right()));
4594 StringAddStub stub(instr->hydrogen()->flags());
4595 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
4596 }
4589 } 4597 }
4590 4598
4591 4599
4592 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 4600 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
4593 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { 4601 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode {
4594 public: 4602 public:
4595 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 4603 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
4596 : LDeferredCode(codegen), instr_(instr) { } 4604 : LDeferredCode(codegen), instr_(instr) { }
4597 virtual void Generate() V8_OVERRIDE { 4605 virtual void Generate() V8_OVERRIDE {
4598 codegen()->DoDeferredStringCharCodeAt(instr_); 4606 codegen()->DoDeferredStringCharCodeAt(instr_);
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
5890 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5898 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5891 __ ldr(result, FieldMemOperand(scratch, 5899 __ ldr(result, FieldMemOperand(scratch,
5892 FixedArray::kHeaderSize - kPointerSize)); 5900 FixedArray::kHeaderSize - kPointerSize));
5893 __ bind(&done); 5901 __ bind(&done);
5894 } 5902 }
5895 5903
5896 5904
5897 #undef __ 5905 #undef __
5898 5906
5899 } } // namespace v8::internal 5907 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/code-stubs.h » ('j') | src/code-stubs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698