OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 ASSERT(0 <= at_least_space_for); | 108 ASSERT(0 <= at_least_space_for); |
109 CALL_HEAP_FUNCTION(isolate(), | 109 CALL_HEAP_FUNCTION(isolate(), |
110 ObjectHashTable::Allocate(at_least_space_for), | 110 ObjectHashTable::Allocate(at_least_space_for), |
111 ObjectHashTable); | 111 ObjectHashTable); |
112 } | 112 } |
113 | 113 |
114 | 114 |
115 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors) { | 115 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors) { |
116 ASSERT(0 <= number_of_descriptors); | 116 ASSERT(0 <= number_of_descriptors); |
117 CALL_HEAP_FUNCTION(isolate(), | 117 CALL_HEAP_FUNCTION(isolate(), |
118 DescriptorArray::Allocate(number_of_descriptors, | 118 DescriptorArray::Allocate(number_of_descriptors), |
119 DescriptorArray::MAY_BE_SHARED), | |
120 DescriptorArray); | 119 DescriptorArray); |
121 } | 120 } |
122 | 121 |
123 | 122 |
124 Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData( | 123 Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData( |
125 int deopt_entry_count, | 124 int deopt_entry_count, |
126 PretenureFlag pretenure) { | 125 PretenureFlag pretenure) { |
127 ASSERT(deopt_entry_count > 0); | 126 ASSERT(deopt_entry_count > 0); |
128 CALL_HEAP_FUNCTION(isolate(), | 127 CALL_HEAP_FUNCTION(isolate(), |
129 DeoptimizationInputData::Allocate(deopt_entry_count, | 128 DeoptimizationInputData::Allocate(deopt_entry_count, |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 copy->inobject_properties() + extra_inobject_properties; | 489 copy->inobject_properties() + extra_inobject_properties; |
491 copy->set_inobject_properties(inobject_properties); | 490 copy->set_inobject_properties(inobject_properties); |
492 copy->set_unused_property_fields(inobject_properties); | 491 copy->set_unused_property_fields(inobject_properties); |
493 copy->set_instance_size(copy->instance_size() + instance_size_delta); | 492 copy->set_instance_size(copy->instance_size() + instance_size_delta); |
494 copy->set_visitor_id(StaticVisitorBase::GetVisitorId(*copy)); | 493 copy->set_visitor_id(StaticVisitorBase::GetVisitorId(*copy)); |
495 return copy; | 494 return copy; |
496 } | 495 } |
497 | 496 |
498 | 497 |
499 Handle<Map> Factory::CopyMap(Handle<Map> src) { | 498 Handle<Map> Factory::CopyMap(Handle<Map> src) { |
500 CALL_HEAP_FUNCTION(isolate(), src->Copy(DescriptorArray::MAY_BE_SHARED), Map); | 499 CALL_HEAP_FUNCTION(isolate(), src->Copy(), Map); |
501 } | 500 } |
502 | 501 |
503 | 502 |
504 Handle<Map> Factory::GetElementsTransitionMap( | 503 Handle<Map> Factory::GetElementsTransitionMap( |
505 Handle<JSObject> src, | 504 Handle<JSObject> src, |
506 ElementsKind elements_kind) { | 505 ElementsKind elements_kind) { |
507 Isolate* i = isolate(); | 506 Isolate* i = isolate(); |
508 CALL_HEAP_FUNCTION(i, | 507 CALL_HEAP_FUNCTION(i, |
509 src->GetElementsTransitionMap(i, elements_kind), | 508 src->GetElementsTransitionMap(i, elements_kind), |
510 Map); | 509 Map); |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 | 1400 |
1402 | 1401 |
1403 Handle<Object> Factory::ToBoolean(bool value) { | 1402 Handle<Object> Factory::ToBoolean(bool value) { |
1404 return Handle<Object>(value | 1403 return Handle<Object>(value |
1405 ? isolate()->heap()->true_value() | 1404 ? isolate()->heap()->true_value() |
1406 : isolate()->heap()->false_value()); | 1405 : isolate()->heap()->false_value()); |
1407 } | 1406 } |
1408 | 1407 |
1409 | 1408 |
1410 } } // namespace v8::internal | 1409 } } // namespace v8::internal |
OLD | NEW |