OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |