OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 14 matching lines...) Expand all Loading... |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #include "api.h" | 30 #include "api.h" |
31 #include "debug.h" | 31 #include "debug.h" |
32 #include "execution.h" | 32 #include "execution.h" |
33 #include "factory.h" | 33 #include "factory.h" |
34 #include "macro-assembler.h" | 34 #include "macro-assembler.h" |
| 35 #include "objects-visiting.h" |
35 | 36 |
36 namespace v8 { | 37 namespace v8 { |
37 namespace internal { | 38 namespace internal { |
38 | 39 |
39 | 40 |
40 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) { | 41 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) { |
41 ASSERT(0 <= size); | 42 ASSERT(0 <= size); |
42 CALL_HEAP_FUNCTION(Heap::AllocateFixedArray(size, pretenure), FixedArray); | 43 CALL_HEAP_FUNCTION(Heap::AllocateFixedArray(size, pretenure), FixedArray); |
43 } | 44 } |
44 | 45 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // as we can as inobject properties. | 271 // as we can as inobject properties. |
271 instance_size_delta = max_instance_size_delta; | 272 instance_size_delta = max_instance_size_delta; |
272 extra_inobject_properties = max_instance_size_delta >> kPointerSizeLog2; | 273 extra_inobject_properties = max_instance_size_delta >> kPointerSizeLog2; |
273 } | 274 } |
274 // Adjust the map with the extra inobject properties. | 275 // Adjust the map with the extra inobject properties. |
275 int inobject_properties = | 276 int inobject_properties = |
276 copy->inobject_properties() + extra_inobject_properties; | 277 copy->inobject_properties() + extra_inobject_properties; |
277 copy->set_inobject_properties(inobject_properties); | 278 copy->set_inobject_properties(inobject_properties); |
278 copy->set_unused_property_fields(inobject_properties); | 279 copy->set_unused_property_fields(inobject_properties); |
279 copy->set_instance_size(copy->instance_size() + instance_size_delta); | 280 copy->set_instance_size(copy->instance_size() + instance_size_delta); |
280 copy->set_scavenger(Heap::GetScavenger(copy->instance_type(), | 281 copy->set_visitor_id(StaticVisitorBase::GetVisitorId(*copy)); |
281 copy->instance_size())); | |
282 return copy; | 282 return copy; |
283 } | 283 } |
284 | 284 |
285 | 285 |
286 Handle<Map> Factory::CopyMapDropTransitions(Handle<Map> src) { | 286 Handle<Map> Factory::CopyMapDropTransitions(Handle<Map> src) { |
287 CALL_HEAP_FUNCTION(src->CopyDropTransitions(), Map); | 287 CALL_HEAP_FUNCTION(src->CopyDropTransitions(), Map); |
288 } | 288 } |
289 | 289 |
290 | 290 |
291 Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) { | 291 Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) { |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 Execution::ConfigureInstance(instance, | 994 Execution::ConfigureInstance(instance, |
995 instance_template, | 995 instance_template, |
996 pending_exception); | 996 pending_exception); |
997 } else { | 997 } else { |
998 *pending_exception = false; | 998 *pending_exception = false; |
999 } | 999 } |
1000 } | 1000 } |
1001 | 1001 |
1002 | 1002 |
1003 } } // namespace v8::internal | 1003 } } // namespace v8::internal |
OLD | NEW |