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

Unified Diff: src/ia32/lithium-ia32.h

Issue 6243008: Support StringCharCodeAt in hydrogen/lithium. (Closed)
Patch Set: Addressed Florian's comments. Created 9 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 side-by-side diff with in-line comments
Download patch
Index: src/ia32/lithium-ia32.h
diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h
index 67f87518a9e7d5cedb5d1f74781f16b53130cff6..50db3672093f9efccd8f863d5791c3c66f47bc61 100644
--- a/src/ia32/lithium-ia32.h
+++ b/src/ia32/lithium-ia32.h
@@ -114,6 +114,7 @@ class LCodeGen;
// LStoreNamed
// LStoreNamedField
// LStoreNamedGeneric
+// LStringCharCodeAt
// LBitNotI
// LCallNew
// LCheckFunction
@@ -141,6 +142,7 @@ class LCodeGen;
// LReturn
// LSmiTag
// LStoreGlobal
+// LStringLength
// LTaggedToI
// LThrow
// LTypeof
@@ -253,6 +255,8 @@ class LCodeGen;
V(StoreKeyedGeneric) \
V(StoreNamedField) \
V(StoreNamedGeneric) \
+ V(StringCharCodeAt) \
+ V(StringLength) \
V(SubI) \
V(TaggedToI) \
V(Throw) \
@@ -1590,6 +1594,34 @@ class LStoreKeyedGeneric: public LStoreKeyed {
};
+class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> {
+ public:
+ LStringCharCodeAt(LOperand* string, LOperand* index) {
+ inputs_[0] = string;
+ inputs_[1] = index;
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
+ DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
+
+ LOperand* string() { return inputs_[0]; }
+ LOperand* index() { return inputs_[1]; }
+};
+
+
+class LStringLength: public LTemplateInstruction<1, 1> {
fschneider 2011/01/19 16:23:44 For consistency I'd write public LTemplateInstru
Vitaly Repeshko 2011/01/19 20:08:41 Done.
+ public:
+ explicit LStringLength(LOperand* string) {
+ inputs_[0] = string;
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length")
+ DECLARE_HYDROGEN_ACCESSOR(StringLength)
+
+ LOperand* string() { return inputs_[0]; }
+};
+
+
class LCheckFunction: public LTemplateInstruction<0, 1> {
public:
explicit LCheckFunction(LOperand* value) {

Powered by Google App Engine
This is Rietveld 408576698