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

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

Issue 9600009: Fix input and output to handle UTF16 surrogate pairs. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 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
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 4265 matching lines...) Expand 10 before | Expand all | Expand 10 after
4276 HValue* context() { return OperandAt(0); } 4276 HValue* context() { return OperandAt(0); }
4277 HValue* string() { return OperandAt(1); } 4277 HValue* string() { return OperandAt(1); }
4278 HValue* index() { return OperandAt(2); } 4278 HValue* index() { return OperandAt(2); }
4279 4279
4280 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt) 4280 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt)
4281 4281
4282 protected: 4282 protected:
4283 virtual bool DataEquals(HValue* other) { return true; } 4283 virtual bool DataEquals(HValue* other) { return true; }
4284 4284
4285 virtual Range* InferRange(Zone* zone) { 4285 virtual Range* InferRange(Zone* zone) {
4286 return new(zone) Range(0, String::kMaxUC16CharCode); 4286 return new(zone) Range(0, String::kMaxUtf16CodeUnit);
4287 } 4287 }
4288 }; 4288 };
4289 4289
4290 4290
4291 class HStringCharFromCode: public HTemplateInstruction<2> { 4291 class HStringCharFromCode: public HTemplateInstruction<2> {
4292 public: 4292 public:
4293 HStringCharFromCode(HValue* context, HValue* char_code) { 4293 HStringCharFromCode(HValue* context, HValue* char_code) {
4294 SetOperandAt(0, context); 4294 SetOperandAt(0, context);
4295 SetOperandAt(1, char_code); 4295 SetOperandAt(1, char_code);
4296 set_representation(Representation::Tagged()); 4296 set_representation(Representation::Tagged());
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
4777 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 4777 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
4778 }; 4778 };
4779 4779
4780 4780
4781 #undef DECLARE_INSTRUCTION 4781 #undef DECLARE_INSTRUCTION
4782 #undef DECLARE_CONCRETE_INSTRUCTION 4782 #undef DECLARE_CONCRETE_INSTRUCTION
4783 4783
4784 } } // namespace v8::internal 4784 } } // namespace v8::internal
4785 4785
4786 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 4786 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698