| 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 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1547 return isolate->heap()->ToBoolean(table->Contains(key)); | 1547 return isolate->heap()->ToBoolean(table->Contains(key)); |
| 1548 } | 1548 } |
| 1549 | 1549 |
| 1550 | 1550 |
| 1551 RUNTIME_FUNCTION(Runtime_SetDelete) { | 1551 RUNTIME_FUNCTION(Runtime_SetDelete) { |
| 1552 HandleScope scope(isolate); | 1552 HandleScope scope(isolate); |
| 1553 ASSERT(args.length() == 2); | 1553 ASSERT(args.length() == 2); |
| 1554 CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0); | 1554 CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0); |
| 1555 CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); | 1555 CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
| 1556 Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table())); | 1556 Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table())); |
| 1557 table = OrderedHashSet::Remove(table, key); | 1557 bool was_present = false; |
| 1558 table = OrderedHashSet::Remove(table, key, &was_present); |
| 1558 holder->set_table(*table); | 1559 holder->set_table(*table); |
| 1559 return isolate->heap()->undefined_value(); | 1560 return isolate->heap()->ToBoolean(was_present); |
| 1560 } | 1561 } |
| 1561 | 1562 |
| 1562 | 1563 |
| 1563 RUNTIME_FUNCTION(Runtime_SetClear) { | 1564 RUNTIME_FUNCTION(Runtime_SetClear) { |
| 1564 HandleScope scope(isolate); | 1565 HandleScope scope(isolate); |
| 1565 ASSERT(args.length() == 1); | 1566 ASSERT(args.length() == 1); |
| 1566 CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0); | 1567 CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0); |
| 1567 Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table())); | 1568 Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table())); |
| 1568 table = OrderedHashSet::Clear(table); | 1569 table = OrderedHashSet::Clear(table); |
| 1569 holder->set_table(*table); | 1570 holder->set_table(*table); |
| (...skipping 13631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15201 } | 15202 } |
| 15202 return NULL; | 15203 return NULL; |
| 15203 } | 15204 } |
| 15204 | 15205 |
| 15205 | 15206 |
| 15206 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15207 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15207 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15208 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15208 } | 15209 } |
| 15209 | 15210 |
| 15210 } } // namespace v8::internal | 15211 } } // namespace v8::internal |
| OLD | NEW |