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

Side by Side Diff: src/hydrogen-instructions.h

Issue 15743006: Improve SeqStringSetChar implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: small fix Created 7 years, 7 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/hydrogen.cc ('k') | src/ia32/codegen-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 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 6248 matching lines...) Expand 10 before | Expand all | Expand 10 after
6259 6259
6260 class HSeqStringSetChar: public HTemplateInstruction<3> { 6260 class HSeqStringSetChar: public HTemplateInstruction<3> {
6261 public: 6261 public:
6262 HSeqStringSetChar(String::Encoding encoding, 6262 HSeqStringSetChar(String::Encoding encoding,
6263 HValue* string, 6263 HValue* string,
6264 HValue* index, 6264 HValue* index,
6265 HValue* value) : encoding_(encoding) { 6265 HValue* value) : encoding_(encoding) {
6266 SetOperandAt(0, string); 6266 SetOperandAt(0, string);
6267 SetOperandAt(1, index); 6267 SetOperandAt(1, index);
6268 SetOperandAt(2, value); 6268 SetOperandAt(2, value);
6269 set_representation(Representation::Tagged());
6269 } 6270 }
6270 6271
6271 String::Encoding encoding() { return encoding_; } 6272 String::Encoding encoding() { return encoding_; }
6272 HValue* string() { return OperandAt(0); } 6273 HValue* string() { return OperandAt(0); }
6273 HValue* index() { return OperandAt(1); } 6274 HValue* index() { return OperandAt(1); }
6274 HValue* value() { return OperandAt(2); } 6275 HValue* value() { return OperandAt(2); }
6275 6276
6276 virtual Representation RequiredInputRepresentation(int index) { 6277 virtual Representation RequiredInputRepresentation(int index) {
6277 return Representation::Tagged(); 6278 return (index == 0) ? Representation::Tagged()
6279 : Representation::Integer32();
6278 } 6280 }
6279 6281
6280 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar) 6282 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar)
6281 6283
6282 private: 6284 private:
6283 String::Encoding encoding_; 6285 String::Encoding encoding_;
6284 }; 6286 };
6285 6287
6286 6288
6287 class HDeleteProperty: public HBinaryOperation { 6289 class HDeleteProperty: public HBinaryOperation {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
6462 virtual bool IsDeletable() const { return true; } 6464 virtual bool IsDeletable() const { return true; }
6463 }; 6465 };
6464 6466
6465 6467
6466 #undef DECLARE_INSTRUCTION 6468 #undef DECLARE_INSTRUCTION
6467 #undef DECLARE_CONCRETE_INSTRUCTION 6469 #undef DECLARE_CONCRETE_INSTRUCTION
6468 6470
6469 } } // namespace v8::internal 6471 } } // namespace v8::internal
6470 6472
6471 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6473 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698