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

Side by Side Diff: src/x64/codegen-x64.h

Issue 460109: Perform string add in generated code on X64 platform... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 } 738 }
739 739
740 void SetArgsInRegisters() { args_in_registers_ = true; } 740 void SetArgsInRegisters() { args_in_registers_ = true; }
741 void SetArgsReversed() { args_reversed_ = true; } 741 void SetArgsReversed() { args_reversed_ = true; }
742 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } 742 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; }
743 bool HasArgumentsInRegisters() { return args_in_registers_; } 743 bool HasArgumentsInRegisters() { return args_in_registers_; }
744 bool HasArgumentsReversed() { return args_reversed_; } 744 bool HasArgumentsReversed() { return args_reversed_; }
745 }; 745 };
746 746
747 747
748 // Flag that indicates how to generate code for the stub StringAddStub.
749 enum StringAddFlags {
750 NO_STRING_ADD_FLAGS = 0,
751 NO_STRING_CHECK_IN_STUB = 1 << 0 // Omit string check in stub.
752 };
753
754
755 class StringAddStub: public CodeStub {
756 public:
757 explicit StringAddStub(StringAddFlags flags) {
758 string_check_ = ((flags & NO_STRING_CHECK_IN_STUB) == 0);
759 }
760
761 private:
762 Major MajorKey() { return StringAdd; }
763 int MinorKey() { return string_check_ ? 0 : 1; }
764
765 void Generate(MacroAssembler* masm);
766
767 void GenerateCopyCharacters(MacroAssembler* masm,
768 Register desc,
769 Register src,
770 Register count,
771 bool ascii);
772
773 // Should the stub check whether arguments are strings?
774 bool string_check_;
775 };
776
777
748 } } // namespace v8::internal 778 } } // namespace v8::internal
749 779
750 #endif // V8_X64_CODEGEN_X64_H_ 780 #endif // V8_X64_CODEGEN_X64_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698