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

Unified Diff: src/handles.cc

Issue 6991007: Don't flatten every time we call CharCodeAt Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Handle flat cons string. Flatten entire string. Created 9 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 | « src/handles.h ('k') | src/isolate.h » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/handles.cc
diff --git a/src/handles.cc b/src/handles.cc
index 326de8637ad8fa085dff02cfa8eb350ef7a365f4..db7c716cb9d41fb5ed301d72dcd0a09d1f83280c 100644
--- a/src/handles.cc
+++ b/src/handles.cc
@@ -1,4 +1,4 @@
-// Copyright 2009 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -247,6 +247,14 @@ Handle<String> FlattenGetString(Handle<String> string) {
}
+uint16_t StringGetMayFlatten(Handle<String> string, int index) {
+ CALL_AND_RETRY(string->GetIsolate(),
+ string->GetMayFlatten(index),
+ return static_cast<uint16_t>(Smi::cast(__object__)->value()),
+ return 0u);
+}
+
+
Handle<Object> SetPrototype(Handle<JSFunction> function,
Handle<Object> prototype) {
ASSERT(function->should_have_prototype());
« no previous file with comments | « src/handles.h ('k') | src/isolate.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698