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 #ifndef V8_RUNTIME_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_RUNTIME_H_ |
6 #define V8_RUNTIME_RUNTIME_H_ | 6 #define V8_RUNTIME_RUNTIME_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 | 1021 |
1022 // The number of arguments expected. nargs is -1 if the function takes | 1022 // The number of arguments expected. nargs is -1 if the function takes |
1023 // a variable number of arguments. | 1023 // a variable number of arguments. |
1024 int8_t nargs; | 1024 int8_t nargs; |
1025 // Size of result. Most functions return a single pointer, size 1. | 1025 // Size of result. Most functions return a single pointer, size 1. |
1026 int8_t result_size; | 1026 int8_t result_size; |
1027 }; | 1027 }; |
1028 | 1028 |
1029 static const int kNotFound = -1; | 1029 static const int kNotFound = -1; |
1030 | 1030 |
1031 // Add internalized strings for all the intrinsic function names to a | 1031 // Get the intrinsic function with the given name. |
1032 // StringDictionary. | 1032 static const Function* FunctionForName(const unsigned char* name, int length); |
1033 static void InitializeIntrinsicFunctionNames(Isolate* isolate, | |
1034 Handle<NameDictionary> dict); | |
1035 | |
1036 // Get the intrinsic function with the given name, which must be internalized. | |
1037 static const Function* FunctionForName(Handle<String> name); | |
1038 | 1033 |
1039 // Get the intrinsic function with the given FunctionId. | 1034 // Get the intrinsic function with the given FunctionId. |
1040 static const Function* FunctionForId(FunctionId id); | 1035 static const Function* FunctionForId(FunctionId id); |
1041 | 1036 |
1042 // Get the intrinsic function with the given function entry address. | 1037 // Get the intrinsic function with the given function entry address. |
1043 static const Function* FunctionForEntry(Address ref); | 1038 static const Function* FunctionForEntry(Address ref); |
1044 | 1039 |
1045 // Get the runtime intrinsic function table. | 1040 // Get the runtime intrinsic function table. |
1046 static const Function* RuntimeFunctionTable(Isolate* isolate); | 1041 static const Function* RuntimeFunctionTable(Isolate* isolate); |
1047 | 1042 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 | 1118 |
1124 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; | 1119 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; |
1125 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; | 1120 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; |
1126 STATIC_ASSERT(LANGUAGE_END == 2); | 1121 STATIC_ASSERT(LANGUAGE_END == 2); |
1127 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 1> {}; | 1122 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 1> {}; |
1128 | 1123 |
1129 } // namespace internal | 1124 } // namespace internal |
1130 } // namespace v8 | 1125 } // namespace v8 |
1131 | 1126 |
1132 #endif // V8_RUNTIME_RUNTIME_H_ | 1127 #endif // V8_RUNTIME_RUNTIME_H_ |
OLD | NEW |