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

Unified Diff: src/runtime.cc

Issue 7226: - Inlined JSArray::SetContent.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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
« src/ic-ia32.cc ('K') | « src/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 485)
+++ src/runtime.cc (working copy)
@@ -1453,6 +1453,29 @@
}
+
+// KeyedStringGetProperty is called from KeyedLoadIC::GenerateGeneric
+static Object* Runtime_KeyedGetProperty(Arguments args) {
+ NoHandleAllocation ha;
+ ASSERT(args.length() == 2);
+
+ Object* receiver = args[0];
+ Object* key = args[1];
+ if (receiver->IsJSObject()
+ && key->IsString()
Kasper Lund 2008/10/10 09:32:06 Why not have the && on the previous line?
+ && !JSObject::cast(receiver)->HasFastProperties()) {
Kasper Lund 2008/10/10 09:32:06 Ditto.
+ Dictionary* dictionary = JSObject::cast(receiver)->property_dictionary();
+ int entry = dictionary->FindStringEntry(String::cast(key));
+ if ((entry != DescriptorArray::kNotFound)
+ && (dictionary->DetailsAt(entry).type() == NORMAL)) {
Kasper Lund 2008/10/10 09:32:06 Ditto.
+ return dictionary->ValueAt(entry);
+ }
+ }
+ return Runtime::GetObjectProperty(args.at<Object>(0),
+ args.at<Object>(1));
+}
+
+
Object* Runtime::SetObjectProperty(Handle<Object> object,
Handle<Object> key,
Handle<Object> value,
« src/ic-ia32.cc ('K') | « src/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698