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

Side by Side Diff: src/builtins.cc

Issue 1695743003: [builtins] Support SameValue and SameValueZero via runtime functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address bug in SameValue and SameValueZero for SIMD types. Created 4 years, 10 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/builtins.h ('k') | src/js/array.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 #include "src/builtins.h" 5 #include "src/builtins.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 return GetOwnPropertyKeys(isolate, args, SKIP_SYMBOLS); 1807 return GetOwnPropertyKeys(isolate, args, SKIP_SYMBOLS);
1808 } 1808 }
1809 1809
1810 1810
1811 // ES6 section 19.1.2.8 Object.getOwnPropertySymbols ( O ) 1811 // ES6 section 19.1.2.8 Object.getOwnPropertySymbols ( O )
1812 BUILTIN(ObjectGetOwnPropertySymbols) { 1812 BUILTIN(ObjectGetOwnPropertySymbols) {
1813 return GetOwnPropertyKeys(isolate, args, SKIP_STRINGS); 1813 return GetOwnPropertyKeys(isolate, args, SKIP_STRINGS);
1814 } 1814 }
1815 1815
1816 1816
1817 // ES#sec-object.is Object.is ( value1, value2 )
1818 BUILTIN(ObjectIs) {
1819 SealHandleScope shs(isolate);
1820 DCHECK_EQ(3, args.length());
1821 Handle<Object> value1 = args.at<Object>(1);
1822 Handle<Object> value2 = args.at<Object>(2);
1823 return isolate->heap()->ToBoolean(value1->SameValue(*value2));
1824 }
1825
1826
1817 // ES6 section 19.1.2.11 Object.isExtensible ( O ) 1827 // ES6 section 19.1.2.11 Object.isExtensible ( O )
1818 BUILTIN(ObjectIsExtensible) { 1828 BUILTIN(ObjectIsExtensible) {
1819 HandleScope scope(isolate); 1829 HandleScope scope(isolate);
1820 Handle<Object> object = args.atOrUndefined(isolate, 1); 1830 Handle<Object> object = args.atOrUndefined(isolate, 1);
1821 Maybe<bool> result = 1831 Maybe<bool> result =
1822 object->IsJSReceiver() 1832 object->IsJSReceiver()
1823 ? JSReceiver::IsExtensible(Handle<JSReceiver>::cast(object)) 1833 ? JSReceiver::IsExtensible(Handle<JSReceiver>::cast(object))
1824 : Just(false); 1834 : Just(false);
1825 MAYBE_RETURN(result, isolate->heap()->exception()); 1835 MAYBE_RETURN(result, isolate->heap()->exception());
1826 return isolate->heap()->ToBoolean(result.FromJust()); 1836 return isolate->heap()->ToBoolean(result.FromJust());
(...skipping 2591 matching lines...) Expand 10 before | Expand all | Expand 10 after
4418 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 4428 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
4419 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 4429 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
4420 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 4430 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
4421 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 4431 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
4422 #undef DEFINE_BUILTIN_ACCESSOR_C 4432 #undef DEFINE_BUILTIN_ACCESSOR_C
4423 #undef DEFINE_BUILTIN_ACCESSOR_A 4433 #undef DEFINE_BUILTIN_ACCESSOR_A
4424 4434
4425 4435
4426 } // namespace internal 4436 } // namespace internal
4427 } // namespace v8 4437 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/js/array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698