| 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 14756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14767 CONVERT_ARG_HANDLE_CHECKED(Object, type_info, parameters_start + 1); | 14767 CONVERT_ARG_HANDLE_CHECKED(Object, type_info, parameters_start + 1); |
| 14768 #ifdef DEBUG | 14768 #ifdef DEBUG |
| 14769 if (!no_caller_args) { | 14769 if (!no_caller_args) { |
| 14770 CONVERT_SMI_ARG_CHECKED(arg_count, parameters_start + 2); | 14770 CONVERT_SMI_ARG_CHECKED(arg_count, parameters_start + 2); |
| 14771 ASSERT(arg_count == caller_args->length()); | 14771 ASSERT(arg_count == caller_args->length()); |
| 14772 } | 14772 } |
| 14773 #endif | 14773 #endif |
| 14774 | 14774 |
| 14775 Handle<AllocationSite> site; | 14775 Handle<AllocationSite> site; |
| 14776 if (!type_info.is_null() && | 14776 if (!type_info.is_null() && |
| 14777 *type_info != isolate->heap()->null_value() && | |
| 14778 *type_info != isolate->heap()->undefined_value()) { | 14777 *type_info != isolate->heap()->undefined_value()) { |
| 14779 site = Handle<AllocationSite>::cast(type_info); | 14778 site = Handle<AllocationSite>::cast(type_info); |
| 14780 ASSERT(!site->SitePointsToLiteral()); | 14779 ASSERT(!site->SitePointsToLiteral()); |
| 14781 } | 14780 } |
| 14782 | 14781 |
| 14783 return ArrayConstructorCommon(isolate, | 14782 return ArrayConstructorCommon(isolate, |
| 14784 constructor, | 14783 constructor, |
| 14785 site, | 14784 site, |
| 14786 caller_args); | 14785 caller_args); |
| 14787 } | 14786 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14892 // Handle last resort GC and make sure to allow future allocations | 14891 // Handle last resort GC and make sure to allow future allocations |
| 14893 // to grow the heap without causing GCs (if possible). | 14892 // to grow the heap without causing GCs (if possible). |
| 14894 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14893 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 14895 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14894 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 14896 "Runtime::PerformGC"); | 14895 "Runtime::PerformGC"); |
| 14897 } | 14896 } |
| 14898 } | 14897 } |
| 14899 | 14898 |
| 14900 | 14899 |
| 14901 } } // namespace v8::internal | 14900 } } // namespace v8::internal |
| OLD | NEW |