| 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 14830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14841 CONVERT_ARG_HANDLE_CHECKED(Object, type_info, parameters_start + 1); | 14841 CONVERT_ARG_HANDLE_CHECKED(Object, type_info, parameters_start + 1); |
| 14842 #ifdef DEBUG | 14842 #ifdef DEBUG |
| 14843 if (!no_caller_args) { | 14843 if (!no_caller_args) { |
| 14844 CONVERT_SMI_ARG_CHECKED(arg_count, parameters_start + 2); | 14844 CONVERT_SMI_ARG_CHECKED(arg_count, parameters_start + 2); |
| 14845 ASSERT(arg_count == caller_args->length()); | 14845 ASSERT(arg_count == caller_args->length()); |
| 14846 } | 14846 } |
| 14847 #endif | 14847 #endif |
| 14848 | 14848 |
| 14849 Handle<AllocationSite> site; | 14849 Handle<AllocationSite> site; |
| 14850 if (!type_info.is_null() && | 14850 if (!type_info.is_null() && |
| 14851 *type_info != isolate->heap()->undefined_value()) { | 14851 !type_info.is_identical_to( |
| 14852 TypeFeedbackInfo::MegamorphicSentinel(isolate))) { |
| 14852 site = Handle<AllocationSite>::cast(type_info); | 14853 site = Handle<AllocationSite>::cast(type_info); |
| 14853 ASSERT(!site->SitePointsToLiteral()); | 14854 ASSERT(!site->SitePointsToLiteral()); |
| 14854 } | 14855 } |
| 14855 | 14856 |
| 14856 return ArrayConstructorCommon(isolate, | 14857 return ArrayConstructorCommon(isolate, |
| 14857 constructor, | 14858 constructor, |
| 14858 site, | 14859 site, |
| 14859 caller_args); | 14860 caller_args); |
| 14860 } | 14861 } |
| 14861 | 14862 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14965 // Handle last resort GC and make sure to allow future allocations | 14966 // Handle last resort GC and make sure to allow future allocations |
| 14966 // to grow the heap without causing GCs (if possible). | 14967 // to grow the heap without causing GCs (if possible). |
| 14967 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14968 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 14968 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14969 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 14969 "Runtime::PerformGC"); | 14970 "Runtime::PerformGC"); |
| 14970 } | 14971 } |
| 14971 } | 14972 } |
| 14972 | 14973 |
| 14973 | 14974 |
| 14974 } } // namespace v8::internal | 14975 } } // namespace v8::internal |
| OLD | NEW |