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

Side by Side Diff: src/ic.cc

Issue 11358122: Object.observe: Fixed missing case for turning off ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | 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 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 LookupResult lookup(isolate()); 1912 LookupResult lookup(isolate());
1913 if (LookupForWrite(receiver, name, &lookup)) { 1913 if (LookupForWrite(receiver, name, &lookup)) {
1914 UpdateCaches(&lookup, state, strict_mode, receiver, name, value); 1914 UpdateCaches(&lookup, state, strict_mode, receiver, name, value);
1915 } 1915 }
1916 } 1916 }
1917 1917
1918 // Set the property. 1918 // Set the property.
1919 return receiver->SetProperty(*name, *value, NONE, strict_mode); 1919 return receiver->SetProperty(*name, *value, NONE, strict_mode);
1920 } 1920 }
1921 1921
1922 // Do not use ICs for objects that require access checks (including 1922 // Do not use ICs for objects that require access checks (including
rafaelw 2012/11/07 09:10:10 Maybe update comment?
Michael Starzinger 2012/11/07 11:08:29 +1
rossberg 2012/11/07 12:23:49 Done.
1923 // the global object). 1923 // the global object).
1924 bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded(); 1924 bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded() &&
1925 !(FLAG_harmony_observation && object->IsJSObject() &&
1926 JSObject::cast(*object)->map()->is_observed());
1925 ASSERT(!(use_ic && object->IsJSGlobalProxy())); 1927 ASSERT(!(use_ic && object->IsJSGlobalProxy()));
1926 1928
1927 if (use_ic) { 1929 if (use_ic) {
1928 Handle<Code> stub = (strict_mode == kStrictMode) 1930 Handle<Code> stub = (strict_mode == kStrictMode)
1929 ? generic_stub_strict() 1931 ? generic_stub_strict()
1930 : generic_stub(); 1932 : generic_stub();
1931 if (object->IsJSObject()) { 1933 if (object->IsJSObject()) {
1932 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 1934 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
1933 if (receiver->elements()->map() == 1935 if (receiver->elements()->map() ==
1934 isolate()->heap()->non_strict_arguments_elements_map()) { 1936 isolate()->heap()->non_strict_arguments_elements_map()) {
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
2700 #undef ADDR 2702 #undef ADDR
2701 }; 2703 };
2702 2704
2703 2705
2704 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2706 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2705 return IC_utilities[id]; 2707 return IC_utilities[id];
2706 } 2708 }
2707 2709
2708 2710
2709 } } // namespace v8::internal 2711 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698