| 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 5695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5706 HBasicBlock* join = NULL; | 5706 HBasicBlock* join = NULL; |
| 5707 FunctionSorter order[kMaxCallPolymorphism]; | 5707 FunctionSorter order[kMaxCallPolymorphism]; |
| 5708 int ordered_functions = 0; | 5708 int ordered_functions = 0; |
| 5709 for (int i = 0; | 5709 for (int i = 0; |
| 5710 i < types->length() && ordered_functions < kMaxCallPolymorphism; | 5710 i < types->length() && ordered_functions < kMaxCallPolymorphism; |
| 5711 ++i) { | 5711 ++i) { |
| 5712 Handle<Map> map = types->at(i); | 5712 Handle<Map> map = types->at(i); |
| 5713 if (expr->ComputeTarget(map, name)) { | 5713 if (expr->ComputeTarget(map, name)) { |
| 5714 order[ordered_functions++] = | 5714 order[ordered_functions++] = |
| 5715 FunctionSorter(i, | 5715 FunctionSorter(i, |
| 5716 expr->target()->shared()->code()->profiler_ticks(), | 5716 expr->target()->shared()->profiler_ticks(), |
| 5717 InliningAstSize(expr->target()), | 5717 InliningAstSize(expr->target()), |
| 5718 expr->target()->shared()->SourceSize()); | 5718 expr->target()->shared()->SourceSize()); |
| 5719 } | 5719 } |
| 5720 } | 5720 } |
| 5721 | 5721 |
| 5722 qsort(reinterpret_cast<void*>(&order[0]), | 5722 qsort(reinterpret_cast<void*>(&order[0]), |
| 5723 ordered_functions, | 5723 ordered_functions, |
| 5724 sizeof(order[0]), | 5724 sizeof(order[0]), |
| 5725 &CompareHotness); | 5725 &CompareHotness); |
| 5726 | 5726 |
| (...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8860 } | 8860 } |
| 8861 } | 8861 } |
| 8862 | 8862 |
| 8863 #ifdef DEBUG | 8863 #ifdef DEBUG |
| 8864 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 8864 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 8865 if (allocator_ != NULL) allocator_->Verify(); | 8865 if (allocator_ != NULL) allocator_->Verify(); |
| 8866 #endif | 8866 #endif |
| 8867 } | 8867 } |
| 8868 | 8868 |
| 8869 } } // namespace v8::internal | 8869 } } // namespace v8::internal |
| OLD | NEW |