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 7264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7275 SetFlag(kUseGVN); | 7275 SetFlag(kUseGVN); |
7276 SetGVNFlag(kDependsOnStringChars); | 7276 SetGVNFlag(kDependsOnStringChars); |
7277 } | 7277 } |
7278 | 7278 |
7279 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7279 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7280 | 7280 |
7281 String::Encoding encoding_; | 7281 String::Encoding encoding_; |
7282 }; | 7282 }; |
7283 | 7283 |
7284 | 7284 |
7285 class HSeqStringSetChar V8_FINAL : public HTemplateInstruction<3> { | 7285 class HSeqStringSetChar V8_FINAL : public HTemplateInstruction<4> { |
7286 public: | 7286 public: |
7287 DECLARE_INSTRUCTION_FACTORY_P4(HSeqStringSetChar, String::Encoding, | 7287 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4( |
7288 HValue*, HValue*, HValue*); | 7288 HSeqStringSetChar, String::Encoding, |
| 7289 HValue*, HValue*, HValue*); |
7289 | 7290 |
7290 String::Encoding encoding() { return encoding_; } | 7291 String::Encoding encoding() { return encoding_; } |
7291 HValue* string() { return OperandAt(0); } | 7292 HValue* context() { return OperandAt(0); } |
7292 HValue* index() { return OperandAt(1); } | 7293 HValue* string() { return OperandAt(1); } |
7293 HValue* value() { return OperandAt(2); } | 7294 HValue* index() { return OperandAt(2); } |
| 7295 HValue* value() { return OperandAt(3); } |
7294 | 7296 |
7295 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 7297 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
7296 return (index == 0) ? Representation::Tagged() | 7298 return (index <= 1) ? Representation::Tagged() |
7297 : Representation::Integer32(); | 7299 : Representation::Integer32(); |
7298 } | 7300 } |
7299 | 7301 |
7300 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar) | 7302 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar) |
7301 | 7303 |
7302 private: | 7304 private: |
7303 HSeqStringSetChar(String::Encoding encoding, | 7305 HSeqStringSetChar(HValue* context, |
| 7306 String::Encoding encoding, |
7304 HValue* string, | 7307 HValue* string, |
7305 HValue* index, | 7308 HValue* index, |
7306 HValue* value) : encoding_(encoding) { | 7309 HValue* value) : encoding_(encoding) { |
7307 SetOperandAt(0, string); | 7310 SetOperandAt(0, context); |
7308 SetOperandAt(1, index); | 7311 SetOperandAt(1, string); |
7309 SetOperandAt(2, value); | 7312 SetOperandAt(2, index); |
| 7313 SetOperandAt(3, value); |
7310 set_representation(Representation::Tagged()); | 7314 set_representation(Representation::Tagged()); |
7311 SetGVNFlag(kChangesStringChars); | 7315 SetGVNFlag(kChangesStringChars); |
7312 } | 7316 } |
7313 | 7317 |
7314 String::Encoding encoding_; | 7318 String::Encoding encoding_; |
7315 }; | 7319 }; |
7316 | 7320 |
7317 | 7321 |
7318 class HCheckMapValue V8_FINAL : public HTemplateInstruction<2> { | 7322 class HCheckMapValue V8_FINAL : public HTemplateInstruction<2> { |
7319 public: | 7323 public: |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7454 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7458 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7455 }; | 7459 }; |
7456 | 7460 |
7457 | 7461 |
7458 #undef DECLARE_INSTRUCTION | 7462 #undef DECLARE_INSTRUCTION |
7459 #undef DECLARE_CONCRETE_INSTRUCTION | 7463 #undef DECLARE_CONCRETE_INSTRUCTION |
7460 | 7464 |
7461 } } // namespace v8::internal | 7465 } } // namespace v8::internal |
7462 | 7466 |
7463 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7467 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |