Chromium Code Reviews| 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 14762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 type_info->IsAllocationSite()) { |
|
Benedikt Meurer
2014/01/21 06:32:39
Maybe I'm missing something, but if the type_info
mvstanton
2014/01/21 15:58:18
I agree. I can just remove the line because Handle
| |
| 14784 site = Handle<AllocationSite>( | 14784 site = Handle<AllocationSite>::cast(type_info); |
| 14785 AllocationSite::cast(Cell::cast(*type_info)->value()), isolate); | |
| 14786 ASSERT(!site->SitePointsToLiteral()); | 14785 ASSERT(!site->SitePointsToLiteral()); |
| 14787 } | 14786 } |
| 14788 | 14787 |
| 14789 return ArrayConstructorCommon(isolate, | 14788 return ArrayConstructorCommon(isolate, |
| 14790 constructor, | 14789 constructor, |
| 14791 site, | 14790 site, |
| 14792 caller_args); | 14791 caller_args); |
| 14793 } | 14792 } |
| 14794 | 14793 |
| 14795 | 14794 |
| (...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 | 14897 // Handle last resort GC and make sure to allow future allocations |
| 14899 // to grow the heap without causing GCs (if possible). | 14898 // to grow the heap without causing GCs (if possible). |
| 14900 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14899 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 14901 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14900 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 14902 "Runtime::PerformGC"); | 14901 "Runtime::PerformGC"); |
| 14903 } | 14902 } |
| 14904 } | 14903 } |
| 14905 | 14904 |
| 14906 | 14905 |
| 14907 } } // namespace v8::internal | 14906 } } // namespace v8::internal |
| OLD | NEW |