| 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/builtins.h" | 5 #include "src/builtins/builtins.h" |
| 6 | 6 |
| 7 #include "src/api-arguments.h" | 7 #include "src/api-arguments.h" |
| 8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/base/ieee754.h" | 10 #include "src/base/ieee754.h" |
| (...skipping 5827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5838 if (function_type == CallableType::kJSFunction) { | 5838 if (function_type == CallableType::kJSFunction) { |
| 5839 return InterpreterPushArgsAndTailCallFunction(); | 5839 return InterpreterPushArgsAndTailCallFunction(); |
| 5840 } else { | 5840 } else { |
| 5841 return InterpreterPushArgsAndTailCall(); | 5841 return InterpreterPushArgsAndTailCall(); |
| 5842 } | 5842 } |
| 5843 } | 5843 } |
| 5844 UNREACHABLE(); | 5844 UNREACHABLE(); |
| 5845 return Handle<Code>::null(); | 5845 return Handle<Code>::null(); |
| 5846 } | 5846 } |
| 5847 | 5847 |
| 5848 Handle<Code> Builtins::InterpreterPushArgsAndConstruct( |
| 5849 CallableType function_type) { |
| 5850 switch (function_type) { |
| 5851 case CallableType::kJSFunction: |
| 5852 return InterpreterPushArgsAndConstructFunction(); |
| 5853 case CallableType::kAny: |
| 5854 return InterpreterPushArgsAndConstruct(); |
| 5855 } |
| 5856 UNREACHABLE(); |
| 5857 return Handle<Code>::null(); |
| 5858 } |
| 5859 |
| 5848 namespace { | 5860 namespace { |
| 5849 | 5861 |
| 5850 class RelocatableArguments : public BuiltinArguments, public Relocatable { | 5862 class RelocatableArguments : public BuiltinArguments, public Relocatable { |
| 5851 public: | 5863 public: |
| 5852 RelocatableArguments(Isolate* isolate, int length, Object** arguments) | 5864 RelocatableArguments(Isolate* isolate, int length, Object** arguments) |
| 5853 : BuiltinArguments(length, arguments), Relocatable(isolate) {} | 5865 : BuiltinArguments(length, arguments), Relocatable(isolate) {} |
| 5854 | 5866 |
| 5855 virtual inline void IterateInstance(ObjectVisitor* v) { | 5867 virtual inline void IterateInstance(ObjectVisitor* v) { |
| 5856 if (length() == 0) return; | 5868 if (length() == 0) return; |
| 5857 v->VisitPointers(lowest_address(), highest_address() + 1); | 5869 v->VisitPointers(lowest_address(), highest_address() + 1); |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6824 #define DEFINE_BUILTIN_ACCESSOR(Name, ...) \ | 6836 #define DEFINE_BUILTIN_ACCESSOR(Name, ...) \ |
| 6825 Handle<Code> Builtins::Name() { \ | 6837 Handle<Code> Builtins::Name() { \ |
| 6826 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##Name)); \ | 6838 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##Name)); \ |
| 6827 return Handle<Code>(code_address); \ | 6839 return Handle<Code>(code_address); \ |
| 6828 } | 6840 } |
| 6829 BUILTIN_LIST_ALL(DEFINE_BUILTIN_ACCESSOR) | 6841 BUILTIN_LIST_ALL(DEFINE_BUILTIN_ACCESSOR) |
| 6830 #undef DEFINE_BUILTIN_ACCESSOR | 6842 #undef DEFINE_BUILTIN_ACCESSOR |
| 6831 | 6843 |
| 6832 } // namespace internal | 6844 } // namespace internal |
| 6833 } // namespace v8 | 6845 } // namespace v8 |
| OLD | NEW |