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

Side by Side Diff: src/ic.cc

Issue 6728022: Merge r7454 from bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.1/
Patch Set: Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.h ('k') | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 1106
1107 #ifdef DEBUG 1107 #ifdef DEBUG
1108 TraceIC("LoadIC", name, state, target()); 1108 TraceIC("LoadIC", name, state, target());
1109 #endif 1109 #endif
1110 } 1110 }
1111 1111
1112 1112
1113 MaybeObject* KeyedLoadIC::Load(State state, 1113 MaybeObject* KeyedLoadIC::Load(State state,
1114 Handle<Object> object, 1114 Handle<Object> object,
1115 Handle<Object> key) { 1115 Handle<Object> key) {
1116 // Check for values that can be converted into a symbol.
1117 // TODO(1295): Remove this code.
1118 HandleScope scope;
1119 if (key->IsHeapNumber() &&
1120 isnan(HeapNumber::cast(*key)->value())) {
1121 key = Factory::nan_symbol();
1122 } else if (key->IsUndefined()) {
1123 key = Factory::undefined_symbol();
1124 }
1125
1116 if (key->IsSymbol()) { 1126 if (key->IsSymbol()) {
1117 Handle<String> name = Handle<String>::cast(key); 1127 Handle<String> name = Handle<String>::cast(key);
1118 1128
1119 // If the object is undefined or null it's illegal to try to get any 1129 // If the object is undefined or null it's illegal to try to get any
1120 // of its properties; throw a TypeError in that case. 1130 // of its properties; throw a TypeError in that case.
1121 if (object->IsUndefined() || object->IsNull()) { 1131 if (object->IsUndefined() || object->IsNull()) {
1122 return TypeError("non_object_property_load", object, name); 1132 return TypeError("non_object_property_load", object, name);
1123 } 1133 }
1124 1134
1125 if (FLAG_use_ic) { 1135 if (FLAG_use_ic) {
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 #undef ADDR 2334 #undef ADDR
2325 }; 2335 };
2326 2336
2327 2337
2328 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2338 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2329 return IC_utilities[id]; 2339 return IC_utilities[id];
2330 } 2340 }
2331 2341
2332 2342
2333 } } // namespace v8::internal 2343 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698