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

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

Issue 1392203002: [es6] Support optional "receiver" argument in Reflect.get. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Be strict again. Created 5 years, 2 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.h ('k') | test/mjsunit/harmony/reflect.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 // 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 7241 matching lines...) Expand 10 before | Expand all | Expand 10 after
7252 7252
7253 MaybeHandle<Object> Object::GetPropertyOrElement(Handle<Object> object, 7253 MaybeHandle<Object> Object::GetPropertyOrElement(Handle<Object> object,
7254 Handle<Name> name, 7254 Handle<Name> name,
7255 LanguageMode language_mode) { 7255 LanguageMode language_mode) {
7256 LookupIterator it = 7256 LookupIterator it =
7257 LookupIterator::PropertyOrElement(name->GetIsolate(), object, name); 7257 LookupIterator::PropertyOrElement(name->GetIsolate(), object, name);
7258 return GetProperty(&it, language_mode); 7258 return GetProperty(&it, language_mode);
7259 } 7259 }
7260 7260
7261 7261
7262 MaybeHandle<Object> Object::GetPropertyOrElement(Handle<JSReceiver> holder,
7263 Handle<Name> name,
7264 Handle<Object> receiver,
7265 LanguageMode language_mode) {
7266 LookupIterator it = LookupIterator::PropertyOrElement(
7267 name->GetIsolate(), receiver, name, holder);
7268 return GetProperty(&it, language_mode);
7269 }
7270
7271
7262 Maybe<bool> JSReceiver::HasProperty(Handle<JSReceiver> object, 7272 Maybe<bool> JSReceiver::HasProperty(Handle<JSReceiver> object,
7263 Handle<Name> name) { 7273 Handle<Name> name) {
7264 // Call the "has" trap on proxies. 7274 // Call the "has" trap on proxies.
7265 if (object->IsJSProxy()) { 7275 if (object->IsJSProxy()) {
7266 Handle<JSProxy> proxy = Handle<JSProxy>::cast(object); 7276 Handle<JSProxy> proxy = Handle<JSProxy>::cast(object);
7267 return JSProxy::HasPropertyWithHandler(proxy, name); 7277 return JSProxy::HasPropertyWithHandler(proxy, name);
7268 } 7278 }
7269 7279
7270 Maybe<PropertyAttributes> result = GetPropertyAttributes(object, name); 7280 Maybe<PropertyAttributes> result = GetPropertyAttributes(object, name);
7271 return result.IsJust() ? Just(result.FromJust() != ABSENT) : Nothing<bool>(); 7281 return result.IsJust() ? Just(result.FromJust() != ABSENT) : Nothing<bool>();
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
8117 #undef WRITE_INT64_FIELD 8127 #undef WRITE_INT64_FIELD
8118 #undef READ_BYTE_FIELD 8128 #undef READ_BYTE_FIELD
8119 #undef WRITE_BYTE_FIELD 8129 #undef WRITE_BYTE_FIELD
8120 #undef NOBARRIER_READ_BYTE_FIELD 8130 #undef NOBARRIER_READ_BYTE_FIELD
8121 #undef NOBARRIER_WRITE_BYTE_FIELD 8131 #undef NOBARRIER_WRITE_BYTE_FIELD
8122 8132
8123 } // namespace internal 8133 } // namespace internal
8124 } // namespace v8 8134 } // namespace v8
8125 8135
8126 #endif // V8_OBJECTS_INL_H_ 8136 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/harmony/reflect.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698