| 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 14744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14755 CONVERT_ARG_HANDLE_CHECKED(Object, type_info, parameters_start + 1); | 14755 CONVERT_ARG_HANDLE_CHECKED(Object, type_info, parameters_start + 1); |
| 14756 #ifdef DEBUG | 14756 #ifdef DEBUG |
| 14757 if (!no_caller_args) { | 14757 if (!no_caller_args) { |
| 14758 CONVERT_SMI_ARG_CHECKED(arg_count, parameters_start + 2); | 14758 CONVERT_SMI_ARG_CHECKED(arg_count, parameters_start + 2); |
| 14759 ASSERT(arg_count == caller_args->length()); | 14759 ASSERT(arg_count == caller_args->length()); |
| 14760 } | 14760 } |
| 14761 #endif | 14761 #endif |
| 14762 | 14762 |
| 14763 Handle<AllocationSite> site; | 14763 Handle<AllocationSite> site; |
| 14764 if (!type_info.is_null() && | 14764 if (!type_info.is_null() && |
| 14765 *type_info != isolate->heap()->null_value() && |
| 14765 *type_info != isolate->heap()->undefined_value()) { | 14766 *type_info != isolate->heap()->undefined_value()) { |
| 14766 site = Handle<AllocationSite>::cast(type_info); | 14767 site = Handle<AllocationSite>::cast(type_info); |
| 14767 ASSERT(!site->SitePointsToLiteral()); | 14768 ASSERT(!site->SitePointsToLiteral()); |
| 14768 } | 14769 } |
| 14769 | 14770 |
| 14770 return ArrayConstructorCommon(isolate, | 14771 return ArrayConstructorCommon(isolate, |
| 14771 constructor, | 14772 constructor, |
| 14772 site, | 14773 site, |
| 14773 caller_args); | 14774 caller_args); |
| 14774 } | 14775 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14879 // Handle last resort GC and make sure to allow future allocations | 14880 // Handle last resort GC and make sure to allow future allocations |
| 14880 // to grow the heap without causing GCs (if possible). | 14881 // to grow the heap without causing GCs (if possible). |
| 14881 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14882 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 14882 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14883 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 14883 "Runtime::PerformGC"); | 14884 "Runtime::PerformGC"); |
| 14884 } | 14885 } |
| 14885 } | 14886 } |
| 14886 | 14887 |
| 14887 | 14888 |
| 14888 } } // namespace v8::internal | 14889 } } // namespace v8::internal |
| OLD | NEW |