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

Side by Side Diff: src/x64/stub-cache-x64.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/ic-x64.cc ('k') | test/mjsunit/harmony/object-observe.js » ('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 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 Handle<String> name, 1654 Handle<String> name,
1655 Code::StubType type) { 1655 Code::StubType type) {
1656 // ----------- S t a t e ------------- 1656 // ----------- S t a t e -------------
1657 // -- rcx : name 1657 // -- rcx : name
1658 // -- rsp[0] : return address 1658 // -- rsp[0] : return address
1659 // -- rsp[(argc - n) * 8] : arg[n] (zero-based) 1659 // -- rsp[(argc - n) * 8] : arg[n] (zero-based)
1660 // -- ... 1660 // -- ...
1661 // -- rsp[(argc + 1) * 8] : receiver 1661 // -- rsp[(argc + 1) * 8] : receiver
1662 // ----------------------------------- 1662 // -----------------------------------
1663 1663
1664 // If object is not an array, bail out to regular call. 1664 // If object is not an array or is observed, bail out to regular call.
1665 if (!object->IsJSArray() || !cell.is_null()) return Handle<Code>::null(); 1665 if (!object->IsJSArray() ||
1666 !cell.is_null() ||
1667 Handle<JSArray>::cast(object)->map()->is_observed()) {
1668 return Handle<Code>::null();
1669 }
1666 1670
1667 Label miss; 1671 Label miss;
1668 GenerateNameCheck(name, &miss); 1672 GenerateNameCheck(name, &miss);
1669 1673
1670 const int argc = arguments().immediate(); 1674 const int argc = arguments().immediate();
1671 StackArgumentsAccessor args(rsp, argc); 1675 StackArgumentsAccessor args(rsp, argc);
1672 __ movq(rdx, args.GetReceiverOperand()); 1676 __ movq(rdx, args.GetReceiverOperand());
1673 1677
1674 // Check that the receiver isn't a smi. 1678 // Check that the receiver isn't a smi.
1675 __ JumpIfSmi(rdx, &miss); 1679 __ JumpIfSmi(rdx, &miss);
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 Handle<String> name, 1909 Handle<String> name,
1906 Code::StubType type) { 1910 Code::StubType type) {
1907 // ----------- S t a t e ------------- 1911 // ----------- S t a t e -------------
1908 // -- rcx : name 1912 // -- rcx : name
1909 // -- rsp[0] : return address 1913 // -- rsp[0] : return address
1910 // -- rsp[(argc - n) * 8] : arg[n] (zero-based) 1914 // -- rsp[(argc - n) * 8] : arg[n] (zero-based)
1911 // -- ... 1915 // -- ...
1912 // -- rsp[(argc + 1) * 8] : receiver 1916 // -- rsp[(argc + 1) * 8] : receiver
1913 // ----------------------------------- 1917 // -----------------------------------
1914 1918
1915 // If object is not an array, bail out to regular call. 1919 // If object is not an array or is observed, bail out to regular call.
1916 if (!object->IsJSArray() || !cell.is_null()) return Handle<Code>::null(); 1920 if (!object->IsJSArray() ||
1921 !cell.is_null() ||
1922 Handle<JSArray>::cast(object)->map()->is_observed()) {
1923 return Handle<Code>::null();
1924 }
1917 1925
1918 Label miss, return_undefined, call_builtin; 1926 Label miss, return_undefined, call_builtin;
1919 GenerateNameCheck(name, &miss); 1927 GenerateNameCheck(name, &miss);
1920 1928
1921 const int argc = arguments().immediate(); 1929 const int argc = arguments().immediate();
1922 StackArgumentsAccessor args(rsp, argc); 1930 StackArgumentsAccessor args(rsp, argc);
1923 __ movq(rdx, args.GetReceiverOperand()); 1931 __ movq(rdx, args.GetReceiverOperand());
1924 1932
1925 // Check that the receiver isn't a smi. 1933 // Check that the receiver isn't a smi.
1926 __ JumpIfSmi(rdx, &miss); 1934 __ JumpIfSmi(rdx, &miss);
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
3146 // ----------------------------------- 3154 // -----------------------------------
3147 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3155 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3148 } 3156 }
3149 3157
3150 3158
3151 #undef __ 3159 #undef __
3152 3160
3153 } } // namespace v8::internal 3161 } } // namespace v8::internal
3154 3162
3155 #endif // V8_TARGET_ARCH_X64 3163 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/ic-x64.cc ('k') | test/mjsunit/harmony/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698