| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 7806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7817 } | 7817 } |
| 7818 | 7818 |
| 7819 if (CallStubCompiler::HasCustomCallGenerator(expr->target())) { | 7819 if (CallStubCompiler::HasCustomCallGenerator(expr->target())) { |
| 7820 // We're about to install a contextual IC, which expects the global | 7820 // We're about to install a contextual IC, which expects the global |
| 7821 // object as receiver rather than the global proxy. | 7821 // object as receiver rather than the global proxy. |
| 7822 HGlobalObject* global_object = Add<HGlobalObject>(); | 7822 HGlobalObject* global_object = Add<HGlobalObject>(); |
| 7823 const int receiver_index = argument_count - 1; | 7823 const int receiver_index = argument_count - 1; |
| 7824 environment()->SetExpressionStackAt(receiver_index, global_object); | 7824 environment()->SetExpressionStackAt(receiver_index, global_object); |
| 7825 // When the target has a custom call IC generator, use the IC, | 7825 // When the target has a custom call IC generator, use the IC, |
| 7826 // because it is likely to generate better code. | 7826 // because it is likely to generate better code. |
| 7827 call = PreProcessCall(New<HCallGlobal>(var->name(), argument_count)); | 7827 call = PreProcessCall(New<HCallNamed>(var->name(), argument_count)); |
| 7828 } else { | 7828 } else { |
| 7829 call = PreProcessCall(New<HCallKnownGlobal>( | 7829 call = PreProcessCall(New<HCallKnownGlobal>( |
| 7830 expr->target(), argument_count)); | 7830 expr->target(), argument_count)); |
| 7831 } | 7831 } |
| 7832 } else { | 7832 } else { |
| 7833 HGlobalObject* receiver = Add<HGlobalObject>(); | 7833 HGlobalObject* receiver = Add<HGlobalObject>(); |
| 7834 Push(Add<HPushArgument>(receiver)); | 7834 Push(Add<HPushArgument>(receiver)); |
| 7835 CHECK_ALIVE(VisitArgumentList(expr->arguments())); | 7835 CHECK_ALIVE(VisitArgumentList(expr->arguments())); |
| 7836 | 7836 |
| 7837 call = New<HCallGlobal>(var->name(), argument_count); | 7837 call = New<HCallNamed>(var->name(), argument_count); |
| 7838 Drop(argument_count); | 7838 Drop(argument_count); |
| 7839 } | 7839 } |
| 7840 | 7840 |
| 7841 } else if (expr->IsMonomorphic()) { | 7841 } else if (expr->IsMonomorphic()) { |
| 7842 // The function is on the stack in the unoptimized code during | 7842 // The function is on the stack in the unoptimized code during |
| 7843 // evaluation of the arguments. | 7843 // evaluation of the arguments. |
| 7844 CHECK_ALIVE(VisitForValue(expr->expression())); | 7844 CHECK_ALIVE(VisitForValue(expr->expression())); |
| 7845 HValue* function = Top(); | 7845 HValue* function = Top(); |
| 7846 | 7846 |
| 7847 Add<HCheckValue>(function, expr->target()); | 7847 Add<HCheckValue>(function, expr->target()); |
| (...skipping 3106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10954 if (ShouldProduceTraceOutput()) { | 10954 if (ShouldProduceTraceOutput()) { |
| 10955 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 10955 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 10956 } | 10956 } |
| 10957 | 10957 |
| 10958 #ifdef DEBUG | 10958 #ifdef DEBUG |
| 10959 graph_->Verify(false); // No full verify. | 10959 graph_->Verify(false); // No full verify. |
| 10960 #endif | 10960 #endif |
| 10961 } | 10961 } |
| 10962 | 10962 |
| 10963 } } // namespace v8::internal | 10963 } } // namespace v8::internal |
| OLD | NEW |