| 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 4904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4915 return; | 4915 return; |
| 4916 | 4916 |
| 4917 } else { | 4917 } else { |
| 4918 HValue* context = environment()->LookupContext(); | 4918 HValue* context = environment()->LookupContext(); |
| 4919 call = PreProcessCall( | 4919 call = PreProcessCall( |
| 4920 new(zone()) HCallNamed(context, name, argument_count)); | 4920 new(zone()) HCallNamed(context, name, argument_count)); |
| 4921 } | 4921 } |
| 4922 | 4922 |
| 4923 } else { | 4923 } else { |
| 4924 VariableProxy* proxy = expr->expression()->AsVariableProxy(); | 4924 VariableProxy* proxy = expr->expression()->AsVariableProxy(); |
| 4925 // FIXME. | |
| 4926 bool global_call = proxy != NULL && proxy->var()->IsUnallocated(); | 4925 bool global_call = proxy != NULL && proxy->var()->IsUnallocated(); |
| 4927 | 4926 |
| 4928 if (global_call) { | 4927 if (global_call) { |
| 4929 Variable* var = proxy->var(); | 4928 Variable* var = proxy->var(); |
| 4930 bool known_global_function = false; | 4929 bool known_global_function = false; |
| 4931 // If there is a global property cell for the name at compile time and | 4930 // If there is a global property cell for the name at compile time and |
| 4932 // access check is not enabled we assume that the function will not change | 4931 // access check is not enabled we assume that the function will not change |
| 4933 // and generate optimized code for calling the function. | 4932 // and generate optimized code for calling the function. |
| 4934 LookupResult lookup; | 4933 LookupResult lookup; |
| 4935 GlobalPropertyAccess type = LookupGlobalProperty(var, &lookup, false); | 4934 GlobalPropertyAccess type = LookupGlobalProperty(var, &lookup, false); |
| (...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6812 } | 6811 } |
| 6813 } | 6812 } |
| 6814 | 6813 |
| 6815 #ifdef DEBUG | 6814 #ifdef DEBUG |
| 6816 if (graph_ != NULL) graph_->Verify(); | 6815 if (graph_ != NULL) graph_->Verify(); |
| 6817 if (allocator_ != NULL) allocator_->Verify(); | 6816 if (allocator_ != NULL) allocator_->Verify(); |
| 6818 #endif | 6817 #endif |
| 6819 } | 6818 } |
| 6820 | 6819 |
| 6821 } } // namespace v8::internal | 6820 } } // namespace v8::internal |
| OLD | NEW |