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

Unified Diff: src/conversions.cc

Issue 45010: Remove all uses of StringShape variables, since that has proven... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codegen.cc ('k') | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/conversions.cc
===================================================================
--- src/conversions.cc (revision 1519)
+++ src/conversions.cc (working copy)
@@ -55,8 +55,7 @@
static inline int GetChar(String* str, int index) {
- StringShape shape(str);
- return str->Get(shape, index);
+ return str->Get(index);
}
@@ -76,11 +75,10 @@
static inline const char* GetCString(String* str, int index) {
- StringShape shape(str);
- int length = str->length(shape);
+ int length = str->length();
char* result = NewArray<char>(length + 1);
for (int i = index; i < length; i++) {
- uc16 c = str->Get(shape, i);
+ uc16 c = str->Get(i);
if (c <= 127) {
result[i - index] = static_cast<char>(c);
} else {
@@ -108,8 +106,7 @@
static inline bool IsSpace(String* str, int index) {
- StringShape shape(str);
- return Scanner::kIsWhiteSpace.get(str->Get(shape, index));
+ return Scanner::kIsWhiteSpace.get(str->Get(index));
}
« no previous file with comments | « src/codegen.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698