OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 5015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5026 Handle<Map> receiver_map = (types == NULL || types->is_empty()) | 5026 Handle<Map> receiver_map = (types == NULL || types->is_empty()) |
5027 ? Handle<Map>::null() | 5027 ? Handle<Map>::null() |
5028 : types->first(); | 5028 : types->first(); |
5029 if (TryInlineBuiltinFunction(expr, | 5029 if (TryInlineBuiltinFunction(expr, |
5030 receiver, | 5030 receiver, |
5031 receiver_map, | 5031 receiver_map, |
5032 expr->check_type())) { | 5032 expr->check_type())) { |
5033 return; | 5033 return; |
5034 } | 5034 } |
5035 | 5035 |
5036 if (CallStubCompiler::HasCustomCallGenerator(*expr->target()) || | 5036 if (CallStubCompiler::HasCustomCallGenerator(expr->target()) || |
5037 expr->check_type() != RECEIVER_MAP_CHECK) { | 5037 expr->check_type() != RECEIVER_MAP_CHECK) { |
5038 // When the target has a custom call IC generator, use the IC, | 5038 // When the target has a custom call IC generator, use the IC, |
5039 // because it is likely to generate better code. Also use the IC | 5039 // because it is likely to generate better code. Also use the IC |
5040 // when a primitive receiver check is required. | 5040 // when a primitive receiver check is required. |
5041 HValue* context = environment()->LookupContext(); | 5041 HValue* context = environment()->LookupContext(); |
5042 call = PreProcessCall( | 5042 call = PreProcessCall( |
5043 new(zone()) HCallNamed(context, name, argument_count)); | 5043 new(zone()) HCallNamed(context, name, argument_count)); |
5044 } else { | 5044 } else { |
5045 AddCheckConstantFunction(expr, receiver, receiver_map, true); | 5045 AddCheckConstantFunction(expr, receiver, receiver_map, true); |
5046 | 5046 |
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7019 } | 7019 } |
7020 } | 7020 } |
7021 | 7021 |
7022 #ifdef DEBUG | 7022 #ifdef DEBUG |
7023 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 7023 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
7024 if (allocator_ != NULL) allocator_->Verify(); | 7024 if (allocator_ != NULL) allocator_->Verify(); |
7025 #endif | 7025 #endif |
7026 } | 7026 } |
7027 | 7027 |
7028 } } // namespace v8::internal | 7028 } } // namespace v8::internal |
OLD | NEW |