OLD | NEW |
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 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1875 BUILTIN(HandleApiCallConstruct) { | 1875 BUILTIN(HandleApiCallConstruct) { |
1876 HandleScope scope(isolate); | 1876 HandleScope scope(isolate); |
1877 DCHECK(CalledAsConstructor(isolate)); | 1877 DCHECK(CalledAsConstructor(isolate)); |
1878 Handle<Object> result; | 1878 Handle<Object> result; |
1879 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 1879 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
1880 HandleApiCallHelper<true>(isolate, args)); | 1880 HandleApiCallHelper<true>(isolate, args)); |
1881 return *result; | 1881 return *result; |
1882 } | 1882 } |
1883 | 1883 |
1884 | 1884 |
| 1885 Handle<Code> Builtins::CallFunction(ConvertReceiverMode mode) { |
| 1886 switch (mode) { |
| 1887 case ConvertReceiverMode::kNullOrUndefined: |
| 1888 return CallFunction_ReceiverIsNullOrUndefined(); |
| 1889 case ConvertReceiverMode::kNotNullOrUndefined: |
| 1890 return CallFunction_ReceiverIsNotNullOrUndefined(); |
| 1891 case ConvertReceiverMode::kAny: |
| 1892 return CallFunction_ReceiverIsAny(); |
| 1893 } |
| 1894 UNREACHABLE(); |
| 1895 return Handle<Code>::null(); |
| 1896 } |
| 1897 |
| 1898 |
| 1899 Handle<Code> Builtins::Call(ConvertReceiverMode mode) { |
| 1900 switch (mode) { |
| 1901 case ConvertReceiverMode::kNullOrUndefined: |
| 1902 return Call_ReceiverIsNullOrUndefined(); |
| 1903 case ConvertReceiverMode::kNotNullOrUndefined: |
| 1904 return Call_ReceiverIsNotNullOrUndefined(); |
| 1905 case ConvertReceiverMode::kAny: |
| 1906 return Call_ReceiverIsAny(); |
| 1907 } |
| 1908 UNREACHABLE(); |
| 1909 return Handle<Code>::null(); |
| 1910 } |
| 1911 |
| 1912 |
1885 namespace { | 1913 namespace { |
1886 | 1914 |
1887 class RelocatableArguments : public BuiltinArguments<NEEDS_CALLED_FUNCTION>, | 1915 class RelocatableArguments : public BuiltinArguments<NEEDS_CALLED_FUNCTION>, |
1888 public Relocatable { | 1916 public Relocatable { |
1889 public: | 1917 public: |
1890 RelocatableArguments(Isolate* isolate, int length, Object** arguments) | 1918 RelocatableArguments(Isolate* isolate, int length, Object** arguments) |
1891 : BuiltinArguments<NEEDS_CALLED_FUNCTION>(length, arguments), | 1919 : BuiltinArguments<NEEDS_CALLED_FUNCTION>(length, arguments), |
1892 Relocatable(isolate) {} | 1920 Relocatable(isolate) {} |
1893 | 1921 |
1894 virtual inline void IterateInstance(ObjectVisitor* v) { | 1922 virtual inline void IterateInstance(ObjectVisitor* v) { |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2363 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 2391 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
2364 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 2392 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
2365 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 2393 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
2366 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 2394 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
2367 #undef DEFINE_BUILTIN_ACCESSOR_C | 2395 #undef DEFINE_BUILTIN_ACCESSOR_C |
2368 #undef DEFINE_BUILTIN_ACCESSOR_A | 2396 #undef DEFINE_BUILTIN_ACCESSOR_A |
2369 | 2397 |
2370 | 2398 |
2371 } // namespace internal | 2399 } // namespace internal |
2372 } // namespace v8 | 2400 } // namespace v8 |
OLD | NEW |