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