| OLD | NEW |
| 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/factory.h" | 5 #include "src/factory.h" |
| 6 | 6 |
| 7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 CALL_HEAP_FUNCTION( | 1626 CALL_HEAP_FUNCTION( |
| 1627 isolate(), | 1627 isolate(), |
| 1628 isolate()->heap()->AllocateJSObject(*data_view_fun), | 1628 isolate()->heap()->AllocateJSObject(*data_view_fun), |
| 1629 JSDataView); | 1629 JSDataView); |
| 1630 } | 1630 } |
| 1631 | 1631 |
| 1632 | 1632 |
| 1633 Handle<JSMap> Factory::NewJSMap() { | 1633 Handle<JSMap> Factory::NewJSMap() { |
| 1634 Handle<Map> map(isolate()->native_context()->js_map_map()); | 1634 Handle<Map> map(isolate()->native_context()->js_map_map()); |
| 1635 Handle<JSMap> js_map = Handle<JSMap>::cast(NewJSObjectFromMap(map)); | 1635 Handle<JSMap> js_map = Handle<JSMap>::cast(NewJSObjectFromMap(map)); |
| 1636 Runtime::JSMapInitialize(isolate(), js_map); | 1636 JSMap::Initialize(js_map, isolate()); |
| 1637 return js_map; | 1637 return js_map; |
| 1638 } | 1638 } |
| 1639 | 1639 |
| 1640 | 1640 |
| 1641 Handle<JSSet> Factory::NewJSSet() { | 1641 Handle<JSSet> Factory::NewJSSet() { |
| 1642 Handle<Map> map(isolate()->native_context()->js_set_map()); | 1642 Handle<Map> map(isolate()->native_context()->js_set_map()); |
| 1643 Handle<JSSet> js_set = Handle<JSSet>::cast(NewJSObjectFromMap(map)); | 1643 Handle<JSSet> js_set = Handle<JSSet>::cast(NewJSObjectFromMap(map)); |
| 1644 Runtime::JSSetInitialize(isolate(), js_set); | 1644 JSSet::Initialize(js_set, isolate()); |
| 1645 return js_set; | 1645 return js_set; |
| 1646 } | 1646 } |
| 1647 | 1647 |
| 1648 | 1648 |
| 1649 Handle<JSMapIterator> Factory::NewJSMapIterator() { | 1649 Handle<JSMapIterator> Factory::NewJSMapIterator() { |
| 1650 Handle<Map> map(isolate()->native_context()->map_iterator_map()); | 1650 Handle<Map> map(isolate()->native_context()->map_iterator_map()); |
| 1651 CALL_HEAP_FUNCTION(isolate(), | 1651 CALL_HEAP_FUNCTION(isolate(), |
| 1652 isolate()->heap()->AllocateJSObjectFromMap(*map), | 1652 isolate()->heap()->AllocateJSObjectFromMap(*map), |
| 1653 JSMapIterator); | 1653 JSMapIterator); |
| 1654 } | 1654 } |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2331 } | 2331 } |
| 2332 | 2332 |
| 2333 | 2333 |
| 2334 Handle<Object> Factory::ToBoolean(bool value) { | 2334 Handle<Object> Factory::ToBoolean(bool value) { |
| 2335 return value ? true_value() : false_value(); | 2335 return value ? true_value() : false_value(); |
| 2336 } | 2336 } |
| 2337 | 2337 |
| 2338 | 2338 |
| 2339 } // namespace internal | 2339 } // namespace internal |
| 2340 } // namespace v8 | 2340 } // namespace v8 |
| OLD | NEW |