Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: src/hydrogen.cc

Issue 7782030: Clean up Context::Lookup and its uses. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/contexts.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4910 matching lines...) Expand 10 before | Expand all | Expand 10 after
4921 return; 4921 return;
4922 4922
4923 } else { 4923 } else {
4924 HValue* context = environment()->LookupContext(); 4924 HValue* context = environment()->LookupContext();
4925 call = PreProcessCall( 4925 call = PreProcessCall(
4926 new(zone()) HCallNamed(context, name, argument_count)); 4926 new(zone()) HCallNamed(context, name, argument_count));
4927 } 4927 }
4928 4928
4929 } else { 4929 } else {
4930 VariableProxy* proxy = expr->expression()->AsVariableProxy(); 4930 VariableProxy* proxy = expr->expression()->AsVariableProxy();
4931 // FIXME.
4932 bool global_call = proxy != NULL && proxy->var()->IsUnallocated(); 4931 bool global_call = proxy != NULL && proxy->var()->IsUnallocated();
4933 4932
4934 if (global_call) { 4933 if (global_call) {
4935 Variable* var = proxy->var(); 4934 Variable* var = proxy->var();
4936 bool known_global_function = false; 4935 bool known_global_function = false;
4937 // If there is a global property cell for the name at compile time and 4936 // If there is a global property cell for the name at compile time and
4938 // access check is not enabled we assume that the function will not change 4937 // access check is not enabled we assume that the function will not change
4939 // and generate optimized code for calling the function. 4938 // and generate optimized code for calling the function.
4940 LookupResult lookup; 4939 LookupResult lookup;
4941 GlobalPropertyAccess type = LookupGlobalProperty(var, &lookup, false); 4940 GlobalPropertyAccess type = LookupGlobalProperty(var, &lookup, false);
(...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after
6816 } 6815 }
6817 } 6816 }
6818 6817
6819 #ifdef DEBUG 6818 #ifdef DEBUG
6820 if (graph_ != NULL) graph_->Verify(); 6819 if (graph_ != NULL) graph_->Verify();
6821 if (allocator_ != NULL) allocator_->Verify(); 6820 if (allocator_ != NULL) allocator_->Verify();
6822 #endif 6821 #endif
6823 } 6822 }
6824 6823
6825 } } // namespace v8::internal 6824 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698