| 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 14761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14772 CONVERT_ARG_HANDLE_CHECKED(Object, type_info, parameters_start + 1); | 14772 CONVERT_ARG_HANDLE_CHECKED(Object, type_info, parameters_start + 1); |
| 14773 #ifdef DEBUG | 14773 #ifdef DEBUG |
| 14774 if (!no_caller_args) { | 14774 if (!no_caller_args) { |
| 14775 CONVERT_SMI_ARG_CHECKED(arg_count, parameters_start + 2); | 14775 CONVERT_SMI_ARG_CHECKED(arg_count, parameters_start + 2); |
| 14776 ASSERT(arg_count == caller_args->length()); | 14776 ASSERT(arg_count == caller_args->length()); |
| 14777 } | 14777 } |
| 14778 #endif | 14778 #endif |
| 14779 | 14779 |
| 14780 Handle<AllocationSite> site; | 14780 Handle<AllocationSite> site; |
| 14781 if (!type_info.is_null() && | 14781 if (!type_info.is_null() && |
| 14782 *type_info != isolate->heap()->undefined_value() && | 14782 *type_info != isolate->heap()->undefined_value()) { |
| 14783 Cell::cast(*type_info)->value()->IsAllocationSite()) { | 14783 site = Handle<AllocationSite>::cast(type_info); |
| 14784 site = Handle<AllocationSite>( | |
| 14785 AllocationSite::cast(Cell::cast(*type_info)->value()), isolate); | |
| 14786 ASSERT(!site->SitePointsToLiteral()); | 14784 ASSERT(!site->SitePointsToLiteral()); |
| 14787 } | 14785 } |
| 14788 | 14786 |
| 14789 return ArrayConstructorCommon(isolate, | 14787 return ArrayConstructorCommon(isolate, |
| 14790 constructor, | 14788 constructor, |
| 14791 site, | 14789 site, |
| 14792 caller_args); | 14790 caller_args); |
| 14793 } | 14791 } |
| 14794 | 14792 |
| 14795 | 14793 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14898 // Handle last resort GC and make sure to allow future allocations | 14896 // Handle last resort GC and make sure to allow future allocations |
| 14899 // to grow the heap without causing GCs (if possible). | 14897 // to grow the heap without causing GCs (if possible). |
| 14900 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14898 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 14901 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14899 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 14902 "Runtime::PerformGC"); | 14900 "Runtime::PerformGC"); |
| 14903 } | 14901 } |
| 14904 } | 14902 } |
| 14905 | 14903 |
| 14906 | 14904 |
| 14907 } } // namespace v8::internal | 14905 } } // namespace v8::internal |
| OLD | NEW |