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

Side by Side Diff: src/ic.cc

Issue 160266: Re-enable ICs for keyed loads of length and prototype properties. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 11 years, 4 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 | « no previous file | 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 Handle<String> name = Handle<String>::cast(key); 732 Handle<String> name = Handle<String>::cast(key);
733 733
734 // If the object is undefined or null it's illegal to try to get any 734 // If the object is undefined or null it's illegal to try to get any
735 // of its properties; throw a TypeError in that case. 735 // of its properties; throw a TypeError in that case.
736 if (object->IsUndefined() || object->IsNull()) { 736 if (object->IsUndefined() || object->IsNull()) {
737 return TypeError("non_object_property_load", object, name); 737 return TypeError("non_object_property_load", object, name);
738 } 738 }
739 739
740 // TODO(X64): Enable specialized stubs for length and prototype lookup. 740 // TODO(X64): Enable specialized stubs for length and prototype lookup.
741 #ifndef V8_TARGET_ARCH_X64 741 #ifndef V8_TARGET_ARCH_X64
742 if (false && FLAG_use_ic) { 742 if (FLAG_use_ic) {
743 // Use specialized code for getting the length of strings. 743 // Use specialized code for getting the length of strings.
744 if (object->IsString() && name->Equals(Heap::length_symbol())) { 744 if (object->IsString() && name->Equals(Heap::length_symbol())) {
745 Handle<String> string = Handle<String>::cast(object); 745 Handle<String> string = Handle<String>::cast(object);
746 Object* code = NULL; 746 Object* code = NULL;
747 code = StubCache::ComputeKeyedLoadStringLength(*name, *string); 747 code = StubCache::ComputeKeyedLoadStringLength(*name, *string);
748 if (code->IsFailure()) return code; 748 if (code->IsFailure()) return code;
749 set_target(Code::cast(code)); 749 set_target(Code::cast(code));
750 #ifdef DEBUG 750 #ifdef DEBUG
751 TraceIC("KeyedLoadIC", name, state, target()); 751 TraceIC("KeyedLoadIC", name, state, target());
752 #endif // DEBUG 752 #endif // DEBUG
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 #undef ADDR 1374 #undef ADDR
1375 }; 1375 };
1376 1376
1377 1377
1378 Address IC::AddressFromUtilityId(IC::UtilityId id) { 1378 Address IC::AddressFromUtilityId(IC::UtilityId id) {
1379 return IC_utilities[id]; 1379 return IC_utilities[id];
1380 } 1380 }
1381 1381
1382 1382
1383 } } // namespace v8::internal 1383 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698