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

Side by Side Diff: src/ia32/code-stubs-ia32.h

Issue 144023009: Get rid of the unused native code StringAddStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove obsolete StringHelper methods. Created 6 years, 11 months 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/flag-definitions.h ('k') | src/ia32/code-stubs-ia32.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 private: 56 private:
57 SaveFPRegsMode save_doubles_; 57 SaveFPRegsMode save_doubles_;
58 58
59 Major MajorKey() { return StoreBufferOverflow; } 59 Major MajorKey() { return StoreBufferOverflow; }
60 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } 60 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
61 }; 61 };
62 62
63 63
64 class StringHelper : public AllStatic { 64 class StringHelper : public AllStatic {
65 public: 65 public:
66 // Generate code for copying characters using a simple loop. This should only
67 // be used in places where the number of characters is small and the
68 // additional setup and checking in GenerateCopyCharactersREP adds too much
69 // overhead. Copying of overlapping regions is not supported.
70 static void GenerateCopyCharacters(MacroAssembler* masm,
71 Register dest,
72 Register src,
73 Register count,
74 Register scratch,
75 bool ascii);
76
77 // Generate code for copying characters using the rep movs instruction. 66 // Generate code for copying characters using the rep movs instruction.
78 // Copies ecx characters from esi to edi. Copying of overlapping regions is 67 // Copies ecx characters from esi to edi. Copying of overlapping regions is
79 // not supported. 68 // not supported.
80 static void GenerateCopyCharactersREP(MacroAssembler* masm, 69 static void GenerateCopyCharactersREP(MacroAssembler* masm,
81 Register dest, // Must be edi. 70 Register dest, // Must be edi.
82 Register src, // Must be esi. 71 Register src, // Must be esi.
83 Register count, // Must be ecx. 72 Register count, // Must be ecx.
84 Register scratch, // Neither of above. 73 Register scratch, // Neither of above.
85 bool ascii); 74 bool ascii);
86 75
87 // Probe the string table for a two character string. If the string
88 // requires non-standard hashing a jump to the label not_probed is
89 // performed and registers c1 and c2 are preserved. In all other
90 // cases they are clobbered. If the string is not found by probing a
91 // jump to the label not_found is performed. This jump does not
92 // guarantee that the string is not in the string table. If the
93 // string is found the code falls through with the string in
94 // register eax.
95 static void GenerateTwoCharacterStringTableProbe(MacroAssembler* masm,
96 Register c1,
97 Register c2,
98 Register scratch1,
99 Register scratch2,
100 Register scratch3,
101 Label* not_probed,
102 Label* not_found);
103
104 // Generate string hash. 76 // Generate string hash.
105 static void GenerateHashInit(MacroAssembler* masm, 77 static void GenerateHashInit(MacroAssembler* masm,
106 Register hash, 78 Register hash,
107 Register character, 79 Register character,
108 Register scratch); 80 Register scratch);
109 static void GenerateHashAddCharacter(MacroAssembler* masm, 81 static void GenerateHashAddCharacter(MacroAssembler* masm,
110 Register hash, 82 Register hash,
111 Register character, 83 Register character,
112 Register scratch); 84 Register scratch);
113 static void GenerateHashGetHash(MacroAssembler* masm, 85 static void GenerateHashGetHash(MacroAssembler* masm,
114 Register hash, 86 Register hash,
115 Register scratch); 87 Register scratch);
116 88
117 private: 89 private:
118 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); 90 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper);
119 }; 91 };
120 92
121 93
122 class StringAddStub: public PlatformCodeStub {
123 public:
124 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {}
125
126 private:
127 Major MajorKey() { return StringAdd; }
128 int MinorKey() { return flags_; }
129
130 void Generate(MacroAssembler* masm);
131
132 void GenerateConvertArgument(MacroAssembler* masm,
133 int stack_offset,
134 Register arg,
135 Register scratch1,
136 Register scratch2,
137 Register scratch3,
138 Label* slow);
139
140 void GenerateRegisterArgsPush(MacroAssembler* masm);
141 void GenerateRegisterArgsPop(MacroAssembler* masm, Register temp);
142
143 const StringAddFlags flags_;
144 };
145
146
147 class SubStringStub: public PlatformCodeStub { 94 class SubStringStub: public PlatformCodeStub {
148 public: 95 public:
149 SubStringStub() {} 96 SubStringStub() {}
150 97
151 private: 98 private:
152 Major MajorKey() { return SubString; } 99 Major MajorKey() { return SubString; }
153 int MinorKey() { return 0; } 100 int MinorKey() { return 0; }
154 101
155 void Generate(MacroAssembler* masm); 102 void Generate(MacroAssembler* masm);
156 }; 103 };
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 Register address_; 455 Register address_;
509 RememberedSetAction remembered_set_action_; 456 RememberedSetAction remembered_set_action_;
510 SaveFPRegsMode save_fp_regs_mode_; 457 SaveFPRegsMode save_fp_regs_mode_;
511 RegisterAllocation regs_; 458 RegisterAllocation regs_;
512 }; 459 };
513 460
514 461
515 } } // namespace v8::internal 462 } } // namespace v8::internal
516 463
517 #endif // V8_IA32_CODE_STUBS_IA32_H_ 464 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698