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/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 Handle<PrototypeInfo> Factory::NewPrototypeInfo() { | 95 Handle<PrototypeInfo> Factory::NewPrototypeInfo() { |
96 Handle<PrototypeInfo> result = | 96 Handle<PrototypeInfo> result = |
97 Handle<PrototypeInfo>::cast(NewStruct(PROTOTYPE_INFO_TYPE)); | 97 Handle<PrototypeInfo>::cast(NewStruct(PROTOTYPE_INFO_TYPE)); |
98 result->set_prototype_users(WeakFixedArray::Empty()); | 98 result->set_prototype_users(WeakFixedArray::Empty()); |
99 result->set_registry_slot(PrototypeInfo::UNREGISTERED); | 99 result->set_registry_slot(PrototypeInfo::UNREGISTERED); |
100 result->set_validity_cell(Smi::kZero); | 100 result->set_validity_cell(Smi::kZero); |
101 result->set_bit_field(0); | 101 result->set_bit_field(0); |
102 return result; | 102 return result; |
103 } | 103 } |
104 | 104 |
105 Handle<Tuple2> Factory::NewTuple2(Handle<Object> value1, | |
106 Handle<Object> value2) { | |
107 Handle<Tuple2> result = Handle<Tuple2>::cast(NewStruct(TUPLE2_TYPE)); | |
108 result->set_value1(*value1); | |
109 result->set_value2(*value2); | |
110 return result; | |
111 } | |
112 | |
113 Handle<Tuple3> Factory::NewTuple3(Handle<Object> value1, Handle<Object> value2, | 105 Handle<Tuple3> Factory::NewTuple3(Handle<Object> value1, Handle<Object> value2, |
114 Handle<Object> value3) { | 106 Handle<Object> value3) { |
115 Handle<Tuple3> result = Handle<Tuple3>::cast(NewStruct(TUPLE3_TYPE)); | 107 Handle<Tuple3> result = Handle<Tuple3>::cast(NewStruct(TUPLE3_TYPE)); |
116 result->set_value1(*value1); | 108 result->set_value1(*value1); |
117 result->set_value2(*value2); | 109 result->set_value2(*value2); |
118 result->set_value3(*value3); | 110 result->set_value3(*value3); |
119 return result; | 111 return result; |
120 } | 112 } |
121 | 113 |
122 Handle<ContextExtension> Factory::NewContextExtension( | 114 Handle<ContextExtension> Factory::NewContextExtension( |
(...skipping 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2730 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); | 2722 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); |
2731 iterator->set_initial_next(*next); | 2723 iterator->set_initial_next(*next); |
2732 iterator->set_array(*array); | 2724 iterator->set_array(*array); |
2733 iterator->set_index(0); | 2725 iterator->set_index(0); |
2734 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); | 2726 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); |
2735 return iterator; | 2727 return iterator; |
2736 } | 2728 } |
2737 | 2729 |
2738 } // namespace internal | 2730 } // namespace internal |
2739 } // namespace v8 | 2731 } // namespace v8 |
OLD | NEW |