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

Unified Diff: src/arm/stub-cache-arm.cc

Issue 68343016: [Object.observe] Don't force normalization of elements for observed objects (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/builtins.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/stub-cache-arm.cc
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc
index a7ddc8e5326c57aec534ee51d64b8d26d60fd111..23fe0930a34c745e7ee4e042f96bb6cc40b69786 100644
--- a/src/arm/stub-cache-arm.cc
+++ b/src/arm/stub-cache-arm.cc
@@ -1718,8 +1718,12 @@ Handle<Code> CallStubCompiler::CompileArrayPushCall(
// -- sp[argc * 4] : receiver
// -----------------------------------
- // If object is not an array, bail out to regular call.
- if (!object->IsJSArray() || !cell.is_null()) return Handle<Code>::null();
+ // If object is not an array or is observed, bail out to regular call.
+ if (!object->IsJSArray() ||
+ !cell.is_null() ||
+ Handle<JSArray>::cast(object)->map()->is_observed()) {
+ return Handle<Code>::null();
+ }
Label miss;
GenerateNameCheck(name, &miss);
@@ -1972,8 +1976,12 @@ Handle<Code> CallStubCompiler::CompileArrayPopCall(
// -- sp[argc * 4] : receiver
// -----------------------------------
- // If object is not an array, bail out to regular call.
- if (!object->IsJSArray() || !cell.is_null()) return Handle<Code>::null();
+ // If object is not an array or is observed, bail out to regular call.
+ if (!object->IsJSArray() ||
+ !cell.is_null() ||
+ Handle<JSArray>::cast(object)->map()->is_observed()) {
+ return Handle<Code>::null();
+ }
Label miss, return_undefined, call_builtin;
Register receiver = r1;
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698