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 <stdlib.h> | 5 #include <stdlib.h> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "v8.h" | 8 #include "v8.h" |
9 | 9 |
10 #include "accessors.h" | 10 #include "accessors.h" |
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1703 return *JSMapIterator::Next(holder); | 1703 return *JSMapIterator::Next(holder); |
1704 } | 1704 } |
1705 | 1705 |
1706 | 1706 |
1707 static Handle<JSWeakCollection> WeakCollectionInitialize( | 1707 static Handle<JSWeakCollection> WeakCollectionInitialize( |
1708 Isolate* isolate, | 1708 Isolate* isolate, |
1709 Handle<JSWeakCollection> weak_collection) { | 1709 Handle<JSWeakCollection> weak_collection) { |
1710 ASSERT(weak_collection->map()->inobject_properties() == 0); | 1710 ASSERT(weak_collection->map()->inobject_properties() == 0); |
1711 Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 0); | 1711 Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 0); |
1712 weak_collection->set_table(*table); | 1712 weak_collection->set_table(*table); |
1713 weak_collection->set_next(Smi::FromInt(0)); | |
1714 return weak_collection; | 1713 return weak_collection; |
1715 } | 1714 } |
1716 | 1715 |
1717 | 1716 |
1718 RUNTIME_FUNCTION(Runtime_WeakCollectionInitialize) { | 1717 RUNTIME_FUNCTION(Runtime_WeakCollectionInitialize) { |
1719 HandleScope scope(isolate); | 1718 HandleScope scope(isolate); |
1720 ASSERT(args.length() == 1); | 1719 ASSERT(args.length() == 1); |
1721 CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0); | 1720 CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0); |
1722 return *WeakCollectionInitialize(isolate, weak_collection); | 1721 return *WeakCollectionInitialize(isolate, weak_collection); |
1723 } | 1722 } |
(...skipping 13447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15171 } | 15170 } |
15172 return NULL; | 15171 return NULL; |
15173 } | 15172 } |
15174 | 15173 |
15175 | 15174 |
15176 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15175 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15177 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15176 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15178 } | 15177 } |
15179 | 15178 |
15180 } } // namespace v8::internal | 15179 } } // namespace v8::internal |
OLD | NEW |