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

Side by Side Diff: src/ic/ic.cc

Issue 1307743011: Adding GetMoreGeneralElementsKind in elements-kind.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix? Created 5 years, 3 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
« no previous file with comments | « src/elements-kind.h ('k') | src/lookup.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ic/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // *unless* we're moving from a deprecated map to its replacement, or 268 // *unless* we're moving from a deprecated map to its replacement, or
269 // to a more general elements kind. 269 // to a more general elements kind.
270 // TODO(verwaest): Check if the current map is actually what the old map 270 // TODO(verwaest): Check if the current map is actually what the old map
271 // would transition to. 271 // would transition to.
272 if (maybe_handler_.is_null()) { 272 if (maybe_handler_.is_null()) {
273 if (!receiver_map()->IsJSObjectMap()) return false; 273 if (!receiver_map()->IsJSObjectMap()) return false;
274 Map* first_map = FirstTargetMap(); 274 Map* first_map = FirstTargetMap();
275 if (first_map == NULL) return false; 275 if (first_map == NULL) return false;
276 Handle<Map> old_map(first_map); 276 Handle<Map> old_map(first_map);
277 if (old_map->is_deprecated()) return true; 277 if (old_map->is_deprecated()) return true;
278 if (IsMoreGeneralElementsKindTransition(old_map->elements_kind(), 278 return IsMoreGeneralElementsKindTransition(old_map->elements_kind(),
279 receiver_map()->elements_kind())) { 279 receiver_map()->elements_kind());
280 return true;
281 }
282 return false;
283 } 280 }
284 281
285 CacheHolderFlag flag; 282 CacheHolderFlag flag;
286 Handle<Map> ic_holder_map(GetICCacheHolder(receiver_map(), isolate(), &flag)); 283 Handle<Map> ic_holder_map(GetICCacheHolder(receiver_map(), isolate(), &flag));
287 284
288 DCHECK(flag != kCacheOnReceiver || receiver->IsJSObject()); 285 DCHECK(flag != kCacheOnReceiver || receiver->IsJSObject());
289 DCHECK(flag != kCacheOnPrototype || !receiver->IsJSReceiver()); 286 DCHECK(flag != kCacheOnPrototype || !receiver->IsJSReceiver());
290 DCHECK(flag != kCacheOnPrototypeReceiverIsDictionary); 287 DCHECK(flag != kCacheOnPrototypeReceiverIsDictionary);
291 288
292 if (state() == MONOMORPHIC) { 289 if (state() == MONOMORPHIC) {
(...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after
3211 KeyedLoadICNexus nexus(vector, vector_slot); 3208 KeyedLoadICNexus nexus(vector, vector_slot);
3212 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 3209 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
3213 ic.UpdateState(receiver, key); 3210 ic.UpdateState(receiver, key);
3214 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); 3211 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
3215 } 3212 }
3216 3213
3217 return *result; 3214 return *result;
3218 } 3215 }
3219 } // namespace internal 3216 } // namespace internal
3220 } // namespace v8 3217 } // namespace v8
OLDNEW
« no previous file with comments | « src/elements-kind.h ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698