OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1503 | 1503 |
1504 | 1504 |
1505 Object* Heap::AllocateSharedFunctionInfo(Object* name) { | 1505 Object* Heap::AllocateSharedFunctionInfo(Object* name) { |
1506 Object* result = Allocate(shared_function_info_map(), NEW_SPACE); | 1506 Object* result = Allocate(shared_function_info_map(), NEW_SPACE); |
1507 if (result->IsFailure()) return result; | 1507 if (result->IsFailure()) return result; |
1508 | 1508 |
1509 SharedFunctionInfo* share = SharedFunctionInfo::cast(result); | 1509 SharedFunctionInfo* share = SharedFunctionInfo::cast(result); |
1510 share->set_name(name); | 1510 share->set_name(name); |
1511 Code* illegal = Builtins::builtin(Builtins::Illegal); | 1511 Code* illegal = Builtins::builtin(Builtins::Illegal); |
1512 share->set_code(illegal); | 1512 share->set_code(illegal); |
| 1513 Code* construct_stub = Builtins::builtin(Builtins::JSConstructStubGeneric); |
| 1514 share->set_construct_stub(construct_stub); |
1513 share->set_expected_nof_properties(0); | 1515 share->set_expected_nof_properties(0); |
1514 share->set_length(0); | 1516 share->set_length(0); |
1515 share->set_formal_parameter_count(0); | 1517 share->set_formal_parameter_count(0); |
1516 share->set_instance_class_name(Object_symbol()); | 1518 share->set_instance_class_name(Object_symbol()); |
1517 share->set_function_data(undefined_value()); | 1519 share->set_function_data(undefined_value()); |
1518 share->set_script(undefined_value()); | 1520 share->set_script(undefined_value()); |
1519 share->set_start_position_and_type(0); | 1521 share->set_start_position_and_type(0); |
1520 share->set_debug_info(undefined_value()); | 1522 share->set_debug_info(undefined_value()); |
1521 share->set_inferred_name(empty_string()); | 1523 share->set_inferred_name(empty_string()); |
1522 return result; | 1524 return result; |
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3554 #ifdef DEBUG | 3556 #ifdef DEBUG |
3555 bool Heap::GarbageCollectionGreedyCheck() { | 3557 bool Heap::GarbageCollectionGreedyCheck() { |
3556 ASSERT(FLAG_gc_greedy); | 3558 ASSERT(FLAG_gc_greedy); |
3557 if (Bootstrapper::IsActive()) return true; | 3559 if (Bootstrapper::IsActive()) return true; |
3558 if (disallow_allocation_failure()) return true; | 3560 if (disallow_allocation_failure()) return true; |
3559 return CollectGarbage(0, NEW_SPACE); | 3561 return CollectGarbage(0, NEW_SPACE); |
3560 } | 3562 } |
3561 #endif | 3563 #endif |
3562 | 3564 |
3563 } } // namespace v8::internal | 3565 } } // namespace v8::internal |
OLD | NEW |