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

Side by Side Diff: src/objects-inl.h

Issue 1221303019: Fix keyed access of primitive objects in the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 1166
1167 1167
1168 MaybeHandle<Object> Object::GetElement(Isolate* isolate, Handle<Object> object, 1168 MaybeHandle<Object> Object::GetElement(Isolate* isolate, Handle<Object> object,
1169 uint32_t index, 1169 uint32_t index,
1170 LanguageMode language_mode) { 1170 LanguageMode language_mode) {
1171 LookupIterator it(isolate, object, index); 1171 LookupIterator it(isolate, object, index);
1172 return GetProperty(&it, language_mode); 1172 return GetProperty(&it, language_mode);
1173 } 1173 }
1174 1174
1175 1175
1176 MaybeHandle<Object> Object::SetElement(Isolate* isolate, Handle<Object> object,
1177 uint32_t index, Handle<Object> value,
1178 LanguageMode language_mode) {
1179 LookupIterator it(isolate, object, index);
1180 return SetProperty(&it, value, language_mode, MAY_BE_STORE_FROM_KEYED);
1181 }
1182
1183
1176 Handle<Object> Object::GetPrototypeSkipHiddenPrototypes( 1184 Handle<Object> Object::GetPrototypeSkipHiddenPrototypes(
1177 Isolate* isolate, Handle<Object> receiver) { 1185 Isolate* isolate, Handle<Object> receiver) {
1178 PrototypeIterator iter(isolate, receiver); 1186 PrototypeIterator iter(isolate, receiver);
1179 while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) { 1187 while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) {
1180 if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) { 1188 if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) {
1181 return PrototypeIterator::GetCurrent(iter); 1189 return PrototypeIterator::GetCurrent(iter);
1182 } 1190 }
1183 iter.Advance(); 1191 iter.Advance();
1184 } 1192 }
1185 return PrototypeIterator::GetCurrent(iter); 1193 return PrototypeIterator::GetCurrent(iter);
(...skipping 6129 matching lines...) Expand 10 before | Expand all | Expand 10 after
7315 #undef READ_SHORT_FIELD 7323 #undef READ_SHORT_FIELD
7316 #undef WRITE_SHORT_FIELD 7324 #undef WRITE_SHORT_FIELD
7317 #undef READ_BYTE_FIELD 7325 #undef READ_BYTE_FIELD
7318 #undef WRITE_BYTE_FIELD 7326 #undef WRITE_BYTE_FIELD
7319 #undef NOBARRIER_READ_BYTE_FIELD 7327 #undef NOBARRIER_READ_BYTE_FIELD
7320 #undef NOBARRIER_WRITE_BYTE_FIELD 7328 #undef NOBARRIER_WRITE_BYTE_FIELD
7321 7329
7322 } } // namespace v8::internal 7330 } } // namespace v8::internal
7323 7331
7324 #endif // V8_OBJECTS_INL_H_ 7332 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698