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

Side by Side Diff: src/stub-cache.cc

Issue 10878047: Revert to code state of 3.13.1 plus r12350 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 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 | « src/stub-cache.h ('k') | src/type-info.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 for (int j = 0; j < kSecondaryTableSize; j++) { 929 for (int j = 0; j < kSecondaryTableSize; j++) {
930 secondary_[j].key = heap()->empty_string(); 930 secondary_[j].key = heap()->empty_string();
931 secondary_[j].value = empty; 931 secondary_[j].value = empty;
932 } 932 }
933 } 933 }
934 934
935 935
936 void StubCache::CollectMatchingMaps(SmallMapList* types, 936 void StubCache::CollectMatchingMaps(SmallMapList* types,
937 String* name, 937 String* name,
938 Code::Flags flags, 938 Code::Flags flags,
939 Handle<Context> native_context, 939 Handle<Context> global_context,
940 Zone* zone) { 940 Zone* zone) {
941 for (int i = 0; i < kPrimaryTableSize; i++) { 941 for (int i = 0; i < kPrimaryTableSize; i++) {
942 if (primary_[i].key == name) { 942 if (primary_[i].key == name) {
943 Map* map = primary_[i].value->FindFirstMap(); 943 Map* map = primary_[i].value->FindFirstMap();
944 // Map can be NULL, if the stub is constant function call 944 // Map can be NULL, if the stub is constant function call
945 // with a primitive receiver. 945 // with a primitive receiver.
946 if (map == NULL) continue; 946 if (map == NULL) continue;
947 947
948 int offset = PrimaryOffset(name, flags, map); 948 int offset = PrimaryOffset(name, flags, map);
949 if (entry(primary_, offset) == &primary_[i] && 949 if (entry(primary_, offset) == &primary_[i] &&
950 !TypeFeedbackOracle::CanRetainOtherContext(map, *native_context)) { 950 !TypeFeedbackOracle::CanRetainOtherContext(map, *global_context)) {
951 types->Add(Handle<Map>(map), zone); 951 types->Add(Handle<Map>(map), zone);
952 } 952 }
953 } 953 }
954 } 954 }
955 955
956 for (int i = 0; i < kSecondaryTableSize; i++) { 956 for (int i = 0; i < kSecondaryTableSize; i++) {
957 if (secondary_[i].key == name) { 957 if (secondary_[i].key == name) {
958 Map* map = secondary_[i].value->FindFirstMap(); 958 Map* map = secondary_[i].value->FindFirstMap();
959 // Map can be NULL, if the stub is constant function call 959 // Map can be NULL, if the stub is constant function call
960 // with a primitive receiver. 960 // with a primitive receiver.
961 if (map == NULL) continue; 961 if (map == NULL) continue;
962 962
963 // Lookup in primary table and skip duplicates. 963 // Lookup in primary table and skip duplicates.
964 int primary_offset = PrimaryOffset(name, flags, map); 964 int primary_offset = PrimaryOffset(name, flags, map);
965 Entry* primary_entry = entry(primary_, primary_offset); 965 Entry* primary_entry = entry(primary_, primary_offset);
966 if (primary_entry->key == name) { 966 if (primary_entry->key == name) {
967 Map* primary_map = primary_entry->value->FindFirstMap(); 967 Map* primary_map = primary_entry->value->FindFirstMap();
968 if (map == primary_map) continue; 968 if (map == primary_map) continue;
969 } 969 }
970 970
971 // Lookup in secondary table and add matches. 971 // Lookup in secondary table and add matches.
972 int offset = SecondaryOffset(name, flags, primary_offset); 972 int offset = SecondaryOffset(name, flags, primary_offset);
973 if (entry(secondary_, offset) == &secondary_[i] && 973 if (entry(secondary_, offset) == &secondary_[i] &&
974 !TypeFeedbackOracle::CanRetainOtherContext(map, *native_context)) { 974 !TypeFeedbackOracle::CanRetainOtherContext(map, *global_context)) {
975 types->Add(Handle<Map>(map), zone); 975 types->Add(Handle<Map>(map), zone);
976 } 976 }
977 } 977 }
978 } 978 }
979 } 979 }
980 980
981 981
982 // ------------------------------------------------------------------------ 982 // ------------------------------------------------------------------------
983 // StubCompiler implementation. 983 // StubCompiler implementation.
984 984
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 Handle<FunctionTemplateInfo>( 1573 Handle<FunctionTemplateInfo>(
1574 FunctionTemplateInfo::cast(signature->receiver())); 1574 FunctionTemplateInfo::cast(signature->receiver()));
1575 } 1575 }
1576 } 1576 }
1577 1577
1578 is_simple_api_call_ = true; 1578 is_simple_api_call_ = true;
1579 } 1579 }
1580 1580
1581 1581
1582 } } // namespace v8::internal 1582 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698