Chromium Code Reviews| 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 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1777 return isolate->heap()->ToBoolean(!lookup->IsTheHole()); | 1777 return isolate->heap()->ToBoolean(!lookup->IsTheHole()); |
| 1778 } | 1778 } |
| 1779 | 1779 |
| 1780 | 1780 |
| 1781 RUNTIME_FUNCTION(Runtime_WeakCollectionSet) { | 1781 RUNTIME_FUNCTION(Runtime_WeakCollectionSet) { |
| 1782 HandleScope scope(isolate); | 1782 HandleScope scope(isolate); |
| 1783 ASSERT(args.length() == 3); | 1783 ASSERT(args.length() == 3); |
| 1784 CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0); | 1784 CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0); |
| 1785 CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); | 1785 CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
| 1786 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); | 1786 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
| 1787 RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol()); | |
|
Michael Starzinger
2014/05/12 08:23:14
This applies to all four flavors of operations on
| |
| 1787 Handle<ObjectHashTable> table( | 1788 Handle<ObjectHashTable> table( |
| 1788 ObjectHashTable::cast(weak_collection->table())); | 1789 ObjectHashTable::cast(weak_collection->table())); |
| 1789 RUNTIME_ASSERT(table->IsKey(*key)); | 1790 RUNTIME_ASSERT(table->IsKey(*key)); |
| 1790 Handle<ObjectHashTable> new_table = ObjectHashTable::Put(table, key, value); | 1791 Handle<ObjectHashTable> new_table = ObjectHashTable::Put(table, key, value); |
| 1791 weak_collection->set_table(*new_table); | 1792 weak_collection->set_table(*new_table); |
| 1792 return isolate->heap()->undefined_value(); | 1793 return isolate->heap()->undefined_value(); |
| 1793 } | 1794 } |
| 1794 | 1795 |
| 1795 | 1796 |
| 1796 RUNTIME_FUNCTION(Runtime_ClassOf) { | 1797 RUNTIME_FUNCTION(Runtime_ClassOf) { |
| (...skipping 13467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 15264 } | 15265 } |
| 15265 return NULL; | 15266 return NULL; |
| 15266 } | 15267 } |
| 15267 | 15268 |
| 15268 | 15269 |
| 15269 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15270 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15270 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15271 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15271 } | 15272 } |
| 15272 | 15273 |
| 15273 } } // namespace v8::internal | 15274 } } // namespace v8::internal |
| OLD | NEW |