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

Unified Diff: src/arm/codegen-arm.h

Issue 2087009: Custom call IC-s for String.prototype.{charAt,charCodeAt}. (Closed)
Patch Set: ARM port. Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm/codegen-arm.cc » ('j') | src/codegen.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/codegen-arm.h
diff --git a/src/arm/codegen-arm.h b/src/arm/codegen-arm.h
index 361ea131ded68468e36ff8c5dfa80cea4be91a8a..194bd878bf6bf7ec039715cd6eababebfa4d37d6 100644
--- a/src/arm/codegen-arm.h
+++ b/src/arm/codegen-arm.h
@@ -445,10 +445,13 @@ class CodeGenerator: public AstVisitor {
void GenerateSetValueOf(ZoneList<Expression*>* args);
// Fast support for charCodeAt(n).
- void GenerateFastCharCodeAt(ZoneList<Expression*>* args);
+ void GenerateStringCharCodeAt(ZoneList<Expression*>* args);
// Fast support for string.charAt(n) and string[n].
- void GenerateCharFromCode(ZoneList<Expression*>* args);
+ void GenerateStringCharFromCode(ZoneList<Expression*>* args);
+
+ // Fast support for string.charAt(n) and string[n].
+ void GenerateStringCharAt(ZoneList<Expression*>* args);
// Fast support for object equality testing.
void GenerateObjectEquals(ZoneList<Expression*>* args);
@@ -693,38 +696,6 @@ class GenericBinaryOpStub : public CodeStub {
class StringHelper : public AllStatic {
public:
- // Generates fast code for getting a char code out of a string
- // object at the given index. May bail out for four reasons (in the
- // listed order):
- // * Receiver is not a string (receiver_not_string label).
- // * Index is not a smi (index_not_smi label).
- // * Index is out of range (index_out_of_range).
- // * Some other reason (slow_case label). In this case it's
- // guaranteed that the above conditions are not violated,
- // e.g. it's safe to assume the receiver is a string and the
- // index is a non-negative smi < length.
- // When successful, object, index, and scratch are clobbered.
- // Otherwise, scratch and result are clobbered.
- static void GenerateFastCharCodeAt(MacroAssembler* masm,
- Register object,
- Register index,
- Register scratch,
- Register result,
- Label* receiver_not_string,
- Label* index_not_smi,
- Label* index_out_of_range,
- Label* slow_case);
-
- // Generates code for creating a one-char string from the given char
- // code. May do a runtime call, so any register can be clobbered
- // and, if the given invoke flag specifies a call, an internal frame
- // is required. In tail call mode the result must be r0 register.
- static void GenerateCharFromCode(MacroAssembler* masm,
- Register code,
- Register scratch,
- Register result,
- InvokeFlag flag);
-
// Generate code for copying characters using a simple loop. This should only
// be used in places where the number of characters is small and the
// additional setup and checking in GenerateCopyCharactersLong adds too much
« no previous file with comments | « no previous file | src/arm/codegen-arm.cc » ('j') | src/codegen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698