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

Unified Diff: src/ic.cc

Issue 6670115: Improve property access with keys that can always be converted into a symbol string. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
===================================================================
--- src/ic.cc (revision 7451)
+++ src/ic.cc (working copy)
@@ -1143,6 +1143,15 @@
MaybeObject* KeyedLoadIC::Load(State state,
Handle<Object> object,
Handle<Object> key) {
+ // Check for values that can be converted into a symbol.
Mads Ager (chromium) 2011/03/31 09:41:49 Could you file a bug report stating that this is p
+ HandleScope scope(isolate());
+ if (key->IsHeapNumber() &&
+ isnan(HeapNumber::cast(*key)->value())) {
+ key = isolate()->factory()->nan_symbol();
+ } else if (key->IsUndefined()) {
+ key = isolate()->factory()->undefined_symbol();
+ }
+
if (key->IsSymbol()) {
Handle<String> name = Handle<String>::cast(key);
« no previous file with comments | « src/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698