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

Unified Diff: src/ic.cc

Issue 6725030: [Arguments] Introduce a new backing store for non-strict arguments objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/arguments
Patch Set: Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 7e87b1b5fb45c315116a10cd16ce7cc6e8180ffa..e64f62ca44c8fc23f2658b20cb73bd835ebc889b 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1253,8 +1253,13 @@ MaybeObject* KeyedLoadIC::Load(State state,
}
// Do not use ICs for objects that require access checks (including
- // the global object).
+ // the global object) nor for non-strict arguments objects.
bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded();
+ if (use_ic && object->IsJSObject()) {
+ Heap* heap = Handle<JSObject>::cast(object)->GetHeap();
+ Map* elements_map = Handle<JSObject>::cast(object)->elements()->map();
+ use_ic = (elements_map != heap->non_strict_arguments_elements_map());
+ }
if (use_ic) {
Code* stub = generic_stub();

Powered by Google App Engine
This is Rietveld 408576698