| 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 5155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5166 delete target_state; | 5166 delete target_state; |
| 5167 return true; | 5167 return true; |
| 5168 } | 5168 } |
| 5169 | 5169 |
| 5170 | 5170 |
| 5171 bool HGraphBuilder::TryInlineBuiltinFunctionCall(Call* expr, bool drop_extra) { | 5171 bool HGraphBuilder::TryInlineBuiltinFunctionCall(Call* expr, bool drop_extra) { |
| 5172 if (!expr->target()->shared()->HasBuiltinFunctionId()) return false; | 5172 if (!expr->target()->shared()->HasBuiltinFunctionId()) return false; |
| 5173 BuiltinFunctionId id = expr->target()->shared()->builtin_function_id(); | 5173 BuiltinFunctionId id = expr->target()->shared()->builtin_function_id(); |
| 5174 switch (id) { | 5174 switch (id) { |
| 5175 case kMathRound: | 5175 case kMathRound: |
| 5176 case kMathFloor: | |
| 5177 case kMathAbs: | 5176 case kMathAbs: |
| 5178 case kMathSqrt: | 5177 case kMathSqrt: |
| 5179 case kMathLog: | 5178 case kMathLog: |
| 5180 case kMathSin: | 5179 case kMathSin: |
| 5181 case kMathCos: | 5180 case kMathCos: |
| 5182 if (expr->arguments()->length() == 1) { | 5181 if (expr->arguments()->length() == 1) { |
| 5183 HValue* argument = Pop(); | 5182 HValue* argument = Pop(); |
| 5184 HValue* context = environment()->LookupContext(); | 5183 HValue* context = environment()->LookupContext(); |
| 5185 Drop(1); // Receiver. | 5184 Drop(1); // Receiver. |
| 5186 HUnaryMathOperation* op = | 5185 HUnaryMathOperation* op = |
| (...skipping 2521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7708 } | 7707 } |
| 7709 } | 7708 } |
| 7710 | 7709 |
| 7711 #ifdef DEBUG | 7710 #ifdef DEBUG |
| 7712 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 7711 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 7713 if (allocator_ != NULL) allocator_->Verify(); | 7712 if (allocator_ != NULL) allocator_->Verify(); |
| 7714 #endif | 7713 #endif |
| 7715 } | 7714 } |
| 7716 | 7715 |
| 7717 } } // namespace v8::internal | 7716 } } // namespace v8::internal |
| OLD | NEW |