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 "factory.h" | 5 #include "factory.h" |
6 | 6 |
7 #include "isolate-inl.h" | 7 #include "isolate-inl.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 int inobject_properties = | 838 int inobject_properties = |
839 copy->inobject_properties() + extra_inobject_properties; | 839 copy->inobject_properties() + extra_inobject_properties; |
840 copy->set_inobject_properties(inobject_properties); | 840 copy->set_inobject_properties(inobject_properties); |
841 copy->set_unused_property_fields(inobject_properties); | 841 copy->set_unused_property_fields(inobject_properties); |
842 copy->set_instance_size(copy->instance_size() + instance_size_delta); | 842 copy->set_instance_size(copy->instance_size() + instance_size_delta); |
843 copy->set_visitor_id(StaticVisitorBase::GetVisitorId(*copy)); | 843 copy->set_visitor_id(StaticVisitorBase::GetVisitorId(*copy)); |
844 return copy; | 844 return copy; |
845 } | 845 } |
846 | 846 |
847 | 847 |
848 Handle<Map> Factory::CopyMap(Handle<Map> src) { | |
849 CALL_HEAP_FUNCTION(isolate(), src->Copy(), Map); | |
850 } | |
851 | |
852 | |
853 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { | 848 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { |
854 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray); | 849 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray); |
855 } | 850 } |
856 | 851 |
857 | 852 |
858 Handle<FixedArray> Factory::CopyAndTenureFixedCOWArray( | 853 Handle<FixedArray> Factory::CopyAndTenureFixedCOWArray( |
859 Handle<FixedArray> array) { | 854 Handle<FixedArray> array) { |
860 ASSERT(isolate()->heap()->InNewSpace(*array)); | 855 ASSERT(isolate()->heap()->InNewSpace(*array)); |
861 CALL_HEAP_FUNCTION(isolate(), | 856 CALL_HEAP_FUNCTION(isolate(), |
862 isolate()->heap()->CopyAndTenureFixedCOWArray(*array), | 857 isolate()->heap()->CopyAndTenureFixedCOWArray(*array), |
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 if (name->Equals(h->infinity_string())) return infinity_value(); | 1979 if (name->Equals(h->infinity_string())) return infinity_value(); |
1985 return Handle<Object>::null(); | 1980 return Handle<Object>::null(); |
1986 } | 1981 } |
1987 | 1982 |
1988 | 1983 |
1989 Handle<Object> Factory::ToBoolean(bool value) { | 1984 Handle<Object> Factory::ToBoolean(bool value) { |
1990 return value ? true_value() : false_value(); | 1985 return value ? true_value() : false_value(); |
1991 } | 1986 } |
1992 | 1987 |
1993 } } // namespace v8::internal | 1988 } } // namespace v8::internal |
OLD | NEW |