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

Side by Side Diff: src/runtime/runtime.h

Issue 1312413002: Move runtime helper for JSSet and JSMap onto objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/objects.cc ('k') | src/runtime/runtime-collections.cc » ('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 #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 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 Handle<JSArrayBuffer> array_buffer, 1160 Handle<JSArrayBuffer> array_buffer,
1161 bool is_external, void* data, 1161 bool is_external, void* data,
1162 size_t allocated_length, 1162 size_t allocated_length,
1163 SharedFlag shared = SharedFlag::kNotShared); 1163 SharedFlag shared = SharedFlag::kNotShared);
1164 1164
1165 static bool SetupArrayBufferAllocatingData( 1165 static bool SetupArrayBufferAllocatingData(
1166 Isolate* isolate, Handle<JSArrayBuffer> array_buffer, 1166 Isolate* isolate, Handle<JSArrayBuffer> array_buffer,
1167 size_t allocated_length, bool initialize = true, 1167 size_t allocated_length, bool initialize = true,
1168 SharedFlag shared = SharedFlag::kNotShared); 1168 SharedFlag shared = SharedFlag::kNotShared);
1169 1169
1170 static void NeuterArrayBuffer(Handle<JSArrayBuffer> array_buffer);
1171
1172 enum TypedArrayId { 1170 enum TypedArrayId {
1173 // arrayIds below should be synchromized with typedarray.js natives. 1171 // arrayIds below should be synchromized with typedarray.js natives.
1174 ARRAY_ID_UINT8 = 1, 1172 ARRAY_ID_UINT8 = 1,
1175 ARRAY_ID_INT8 = 2, 1173 ARRAY_ID_INT8 = 2,
1176 ARRAY_ID_UINT16 = 3, 1174 ARRAY_ID_UINT16 = 3,
1177 ARRAY_ID_INT16 = 4, 1175 ARRAY_ID_INT16 = 4,
1178 ARRAY_ID_UINT32 = 5, 1176 ARRAY_ID_UINT32 = 5,
1179 ARRAY_ID_INT32 = 6, 1177 ARRAY_ID_INT32 = 6,
1180 ARRAY_ID_FLOAT32 = 7, 1178 ARRAY_ID_FLOAT32 = 7,
1181 ARRAY_ID_FLOAT64 = 8, 1179 ARRAY_ID_FLOAT64 = 8,
1182 ARRAY_ID_UINT8_CLAMPED = 9, 1180 ARRAY_ID_UINT8_CLAMPED = 9,
1183 ARRAY_ID_FIRST = ARRAY_ID_UINT8, 1181 ARRAY_ID_FIRST = ARRAY_ID_UINT8,
1184 ARRAY_ID_LAST = ARRAY_ID_UINT8_CLAMPED 1182 ARRAY_ID_LAST = ARRAY_ID_UINT8_CLAMPED
1185 }; 1183 };
1186 1184
1187 static void ArrayIdToTypeAndSize(int array_id, ExternalArrayType* type, 1185 static void ArrayIdToTypeAndSize(int array_id, ExternalArrayType* type,
1188 ElementsKind* fixed_elements_kind, 1186 ElementsKind* fixed_elements_kind,
1189 size_t* element_size); 1187 size_t* element_size);
1190 1188
1191 // Used in runtime.cc and hydrogen's VisitArrayLiteral. 1189 // Used in runtime.cc and hydrogen's VisitArrayLiteral.
1192 MUST_USE_RESULT static MaybeHandle<Object> CreateArrayLiteralBoilerplate( 1190 MUST_USE_RESULT static MaybeHandle<Object> CreateArrayLiteralBoilerplate(
1193 Isolate* isolate, Handle<FixedArray> literals, 1191 Isolate* isolate, Handle<FixedArray> literals,
1194 Handle<FixedArray> elements, bool is_strong); 1192 Handle<FixedArray> elements, bool is_strong);
1195 1193
1196
1197 static void JSMapInitialize(Isolate* isolate, Handle<JSMap> map);
1198 static void JSMapClear(Isolate* isolate, Handle<JSMap> map);
1199 static void JSSetInitialize(Isolate* isolate, Handle<JSSet> set);
1200 static void JSSetClear(Isolate* isolate, Handle<JSSet> set);
1201
1202 static void WeakCollectionInitialize( 1194 static void WeakCollectionInitialize(
1203 Isolate* isolate, Handle<JSWeakCollection> weak_collection); 1195 Isolate* isolate, Handle<JSWeakCollection> weak_collection);
1204 static void WeakCollectionSet(Handle<JSWeakCollection> weak_collection, 1196 static void WeakCollectionSet(Handle<JSWeakCollection> weak_collection,
1205 Handle<Object> key, Handle<Object> value, 1197 Handle<Object> key, Handle<Object> value,
1206 int32_t hash); 1198 int32_t hash);
1207 static bool WeakCollectionDelete(Handle<JSWeakCollection> weak_collection, 1199 static bool WeakCollectionDelete(Handle<JSWeakCollection> weak_collection,
1208 Handle<Object> key); 1200 Handle<Object> key);
1209 static bool WeakCollectionDelete(Handle<JSWeakCollection> weak_collection, 1201 static bool WeakCollectionDelete(Handle<JSWeakCollection> weak_collection,
1210 Handle<Object> key, int32_t hash); 1202 Handle<Object> key, int32_t hash);
1211 1203
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 inline bool Runtime::AtomicIsLockFree(uint32_t size) { 1241 inline bool Runtime::AtomicIsLockFree(uint32_t size) {
1250 return size == 1 || size == 2 || size == 4; 1242 return size == 1 || size == 2 || size == 4;
1251 } 1243 }
1252 1244
1253 #endif 1245 #endif
1254 1246
1255 } // namespace internal 1247 } // namespace internal
1256 } // namespace v8 1248 } // namespace v8
1257 1249
1258 #endif // V8_RUNTIME_RUNTIME_H_ 1250 #endif // V8_RUNTIME_RUNTIME_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-collections.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698