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

Side by Side Diff: src/runtime/runtime-collections.cc

Issue 1276533003: [runtime] Store constructor function index on primitive maps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm failures Created 5 years, 4 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/ppc/builtins-ppc.cc ('k') | src/runtime/runtime-object.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/runtime/runtime-utils.h" 8 #include "src/runtime/runtime-utils.h"
9 9
10 10
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 SealHandleScope shs(isolate); 292 SealHandleScope shs(isolate);
293 DCHECK(args.length() == 2); 293 DCHECK(args.length() == 2);
294 CONVERT_ARG_CHECKED(JSMapIterator, holder, 0); 294 CONVERT_ARG_CHECKED(JSMapIterator, holder, 0);
295 CONVERT_ARG_CHECKED(JSArray, value_array, 1); 295 CONVERT_ARG_CHECKED(JSArray, value_array, 1);
296 return holder->Next(value_array); 296 return holder->Next(value_array);
297 } 297 }
298 298
299 299
300 void Runtime::WeakCollectionInitialize( 300 void Runtime::WeakCollectionInitialize(
301 Isolate* isolate, Handle<JSWeakCollection> weak_collection) { 301 Isolate* isolate, Handle<JSWeakCollection> weak_collection) {
302 DCHECK(weak_collection->map()->inobject_properties() == 0); 302 DCHECK_EQ(0, weak_collection->map()->GetInObjectProperties());
303 Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 0); 303 Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 0);
304 weak_collection->set_table(*table); 304 weak_collection->set_table(*table);
305 } 305 }
306 306
307 307
308 RUNTIME_FUNCTION(Runtime_WeakCollectionInitialize) { 308 RUNTIME_FUNCTION(Runtime_WeakCollectionInitialize) {
309 HandleScope scope(isolate); 309 HandleScope scope(isolate);
310 DCHECK(args.length() == 1); 310 DCHECK(args.length() == 1);
311 CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0); 311 CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0);
312 Runtime::WeakCollectionInitialize(isolate, weak_collection); 312 Runtime::WeakCollectionInitialize(isolate, weak_collection);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 449
450 RUNTIME_FUNCTION(Runtime_ObservationWeakMapCreate) { 450 RUNTIME_FUNCTION(Runtime_ObservationWeakMapCreate) {
451 HandleScope scope(isolate); 451 HandleScope scope(isolate);
452 DCHECK(args.length() == 0); 452 DCHECK(args.length() == 0);
453 Handle<JSWeakMap> weakmap = isolate->factory()->NewJSWeakMap(); 453 Handle<JSWeakMap> weakmap = isolate->factory()->NewJSWeakMap();
454 Runtime::WeakCollectionInitialize(isolate, weakmap); 454 Runtime::WeakCollectionInitialize(isolate, weakmap);
455 return *weakmap; 455 return *weakmap;
456 } 456 }
457 } // namespace internal 457 } // namespace internal
458 } // namespace v8 458 } // namespace v8
OLDNEW
« no previous file with comments | « src/ppc/builtins-ppc.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698