| 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 "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/objects.h" | 9 #include "src/objects.h" |
| 10 #include "src/unicode.h" | 10 #include "src/unicode.h" |
| (...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 unibrow::Mapping<unibrow::ToUppercase, 128> to_upper_mapping_; | 1076 unibrow::Mapping<unibrow::ToUppercase, 128> to_upper_mapping_; |
| 1077 unibrow::Mapping<unibrow::ToLowercase, 128> to_lower_mapping_; | 1077 unibrow::Mapping<unibrow::ToLowercase, 128> to_lower_mapping_; |
| 1078 | 1078 |
| 1079 friend class Isolate; | 1079 friend class Isolate; |
| 1080 friend class Runtime; | 1080 friend class Runtime; |
| 1081 | 1081 |
| 1082 DISALLOW_COPY_AND_ASSIGN(RuntimeState); | 1082 DISALLOW_COPY_AND_ASSIGN(RuntimeState); |
| 1083 }; | 1083 }; |
| 1084 | 1084 |
| 1085 | 1085 |
| 1086 class JavaScriptFrameIterator; // Forward declaration. | |
| 1087 | |
| 1088 | |
| 1089 class Runtime : public AllStatic { | 1086 class Runtime : public AllStatic { |
| 1090 public: | 1087 public: |
| 1091 enum FunctionId { | 1088 enum FunctionId { |
| 1092 #define F(name, nargs, ressize) k##name, | 1089 #define F(name, nargs, ressize) k##name, |
| 1093 #define I(name, nargs, ressize) kInline##name, | 1090 #define I(name, nargs, ressize) kInline##name, |
| 1094 FOR_EACH_INTRINSIC(F) | 1091 FOR_EACH_INTRINSIC(F) |
| 1095 FOR_EACH_INTRINSIC(I) | 1092 FOR_EACH_INTRINSIC(I) |
| 1096 #undef I | 1093 #undef I |
| 1097 #undef F | 1094 #undef F |
| 1098 kNumFunctions, | 1095 kNumFunctions, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 MUST_USE_RESULT static MaybeHandle<Object> KeyedGetObjectProperty( | 1146 MUST_USE_RESULT static MaybeHandle<Object> KeyedGetObjectProperty( |
| 1150 Isolate* isolate, Handle<Object> receiver_obj, Handle<Object> key_obj, | 1147 Isolate* isolate, Handle<Object> receiver_obj, Handle<Object> key_obj, |
| 1151 LanguageMode language_mode); | 1148 LanguageMode language_mode); |
| 1152 | 1149 |
| 1153 MUST_USE_RESULT static MaybeHandle<Object> GetPrototype( | 1150 MUST_USE_RESULT static MaybeHandle<Object> GetPrototype( |
| 1154 Isolate* isolate, Handle<Object> object); | 1151 Isolate* isolate, Handle<Object> object); |
| 1155 | 1152 |
| 1156 MUST_USE_RESULT static MaybeHandle<Name> ToName(Isolate* isolate, | 1153 MUST_USE_RESULT static MaybeHandle<Name> ToName(Isolate* isolate, |
| 1157 Handle<Object> key); | 1154 Handle<Object> key); |
| 1158 | 1155 |
| 1159 static void SetupArrayBuffer(Isolate* isolate, | |
| 1160 Handle<JSArrayBuffer> array_buffer, | |
| 1161 bool is_external, void* data, | |
| 1162 size_t allocated_length, | |
| 1163 SharedFlag shared = SharedFlag::kNotShared); | |
| 1164 | |
| 1165 static bool SetupArrayBufferAllocatingData( | |
| 1166 Isolate* isolate, Handle<JSArrayBuffer> array_buffer, | |
| 1167 size_t allocated_length, bool initialize = true, | |
| 1168 SharedFlag shared = SharedFlag::kNotShared); | |
| 1169 | |
| 1170 enum TypedArrayId { | 1156 enum TypedArrayId { |
| 1171 // arrayIds below should be synchronized with typedarray.js natives. | 1157 // arrayIds below should be synchronized with typedarray.js natives. |
| 1172 ARRAY_ID_UINT8 = 1, | 1158 ARRAY_ID_UINT8 = 1, |
| 1173 ARRAY_ID_INT8 = 2, | 1159 ARRAY_ID_INT8 = 2, |
| 1174 ARRAY_ID_UINT16 = 3, | 1160 ARRAY_ID_UINT16 = 3, |
| 1175 ARRAY_ID_INT16 = 4, | 1161 ARRAY_ID_INT16 = 4, |
| 1176 ARRAY_ID_UINT32 = 5, | 1162 ARRAY_ID_UINT32 = 5, |
| 1177 ARRAY_ID_INT32 = 6, | 1163 ARRAY_ID_INT32 = 6, |
| 1178 ARRAY_ID_FLOAT32 = 7, | 1164 ARRAY_ID_FLOAT32 = 7, |
| 1179 ARRAY_ID_FLOAT64 = 8, | 1165 ARRAY_ID_FLOAT64 = 8, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 inline bool Runtime::AtomicIsLockFree(uint32_t size) { | 1217 inline bool Runtime::AtomicIsLockFree(uint32_t size) { |
| 1232 return size == 1 || size == 2 || size == 4; | 1218 return size == 1 || size == 2 || size == 4; |
| 1233 } | 1219 } |
| 1234 | 1220 |
| 1235 #endif | 1221 #endif |
| 1236 | 1222 |
| 1237 } // namespace internal | 1223 } // namespace internal |
| 1238 } // namespace v8 | 1224 } // namespace v8 |
| 1239 | 1225 |
| 1240 #endif // V8_RUNTIME_RUNTIME_H_ | 1226 #endif // V8_RUNTIME_RUNTIME_H_ |
| OLD | NEW |