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

Side by Side Diff: src/type-info.cc

Issue 22745003: Remove platform-specific dead code for KeyedStores (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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.cc ('k') | src/x64/stub-cache-x64.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 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 Handle<Code> code = Handle<Code>::cast(map_or_code); 145 Handle<Code> code = Handle<Code>::cast(map_or_code);
146 return code->ic_state() == UNINITIALIZED; 146 return code->ic_state() == UNINITIALIZED;
147 } 147 }
148 148
149 149
150 bool TypeFeedbackOracle::StoreIsMonomorphicNormal(TypeFeedbackId ast_id) { 150 bool TypeFeedbackOracle::StoreIsMonomorphicNormal(TypeFeedbackId ast_id) {
151 Handle<Object> map_or_code = GetInfo(ast_id); 151 Handle<Object> map_or_code = GetInfo(ast_id);
152 if (map_or_code->IsMap()) return true; 152 if (map_or_code->IsMap()) return true;
153 if (map_or_code->IsCode()) { 153 if (map_or_code->IsCode()) {
154 Handle<Code> code = Handle<Code>::cast(map_or_code); 154 Handle<Code> code = Handle<Code>::cast(map_or_code);
155 bool standard_store = FLAG_compiled_keyed_stores ||
156 (Code::GetKeyedAccessStoreMode(code->extra_ic_state()) ==
157 STANDARD_STORE);
158 bool preliminary_checks = 155 bool preliminary_checks =
159 code->is_keyed_store_stub() && 156 code->is_keyed_store_stub() &&
160 standard_store &&
161 code->ic_state() == MONOMORPHIC && 157 code->ic_state() == MONOMORPHIC &&
162 Code::ExtractTypeFromFlags(code->flags()) == Code::NORMAL; 158 Code::ExtractTypeFromFlags(code->flags()) == Code::NORMAL;
163 if (!preliminary_checks) return false; 159 if (!preliminary_checks) return false;
164 Map* map = code->FindFirstMap(); 160 Map* map = code->FindFirstMap();
165 if (map == NULL) return false; 161 if (map == NULL) return false;
166 map = map->CurrentMapForDeprecated(); 162 map = map->CurrentMapForDeprecated();
167 return map != NULL && !CanRetainOtherContext(map, *native_context_); 163 return map != NULL && !CanRetainOtherContext(map, *native_context_);
168 } 164 }
169 return false; 165 return false;
170 } 166 }
171 167
172 168
173 bool TypeFeedbackOracle::StoreIsKeyedPolymorphic(TypeFeedbackId ast_id) { 169 bool TypeFeedbackOracle::StoreIsKeyedPolymorphic(TypeFeedbackId ast_id) {
174 Handle<Object> map_or_code = GetInfo(ast_id); 170 Handle<Object> map_or_code = GetInfo(ast_id);
175 if (map_or_code->IsCode()) { 171 if (map_or_code->IsCode()) {
176 Handle<Code> code = Handle<Code>::cast(map_or_code); 172 Handle<Code> code = Handle<Code>::cast(map_or_code);
177 bool standard_store = FLAG_compiled_keyed_stores || 173 return code->is_keyed_store_stub() &&
178 (Code::GetKeyedAccessStoreMode(code->extra_ic_state()) ==
179 STANDARD_STORE);
180 return code->is_keyed_store_stub() && standard_store &&
181 code->ic_state() == POLYMORPHIC; 174 code->ic_state() == POLYMORPHIC;
182 } 175 }
183 return false; 176 return false;
184 } 177 }
185 178
186 179
187 bool TypeFeedbackOracle::CallIsMonomorphic(Call* expr) { 180 bool TypeFeedbackOracle::CallIsMonomorphic(Call* expr) {
188 Handle<Object> value = GetInfo(expr->CallFeedbackId()); 181 Handle<Object> value = GetInfo(expr->CallFeedbackId());
189 return value->IsMap() || value->IsAllocationSite() || value->IsJSFunction() || 182 return value->IsMap() || value->IsAllocationSite() || value->IsJSFunction() ||
190 value->IsSmi(); 183 value->IsSmi();
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 if (info.IsUninitialized()) return Representation::None(); 692 if (info.IsUninitialized()) return Representation::None();
700 if (info.IsSmi()) return Representation::Smi(); 693 if (info.IsSmi()) return Representation::Smi();
701 if (info.IsInteger32()) return Representation::Integer32(); 694 if (info.IsInteger32()) return Representation::Integer32();
702 if (info.IsDouble()) return Representation::Double(); 695 if (info.IsDouble()) return Representation::Double();
703 if (info.IsNumber()) return Representation::Double(); 696 if (info.IsNumber()) return Representation::Double();
704 return Representation::Tagged(); 697 return Representation::Tagged();
705 } 698 }
706 699
707 700
708 } } // namespace v8::internal 701 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698