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

Side by Side Diff: src/hydrogen.cc

Issue 6034004: Fix for issue 1007. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 4157 matching lines...) Expand 10 before | Expand all | Expand 10 after
4168 4168
4169 if (graph()->info()->scope()->arguments() == NULL) return false; 4169 if (graph()->info()->scope()->arguments() == NULL) return false;
4170 4170
4171 Handle<String> name = prop->key()->AsLiteral()->AsPropertyName(); 4171 Handle<String> name = prop->key()->AsLiteral()->AsPropertyName();
4172 if (!name->IsEqualTo(CStrVector("apply"))) return false; 4172 if (!name->IsEqualTo(CStrVector("apply"))) return false;
4173 4173
4174 ZoneList<Expression*>* args = expr->arguments(); 4174 ZoneList<Expression*>* args = expr->arguments();
4175 if (args->length() != 2) return false; 4175 if (args->length() != 2) return false;
4176 4176
4177 VariableProxy* arg_two = args->at(1)->AsVariableProxy(); 4177 VariableProxy* arg_two = args->at(1)->AsVariableProxy();
4178 if (arg_two == NULL) return false; 4178 if (arg_two == NULL || !arg_two->var()->IsStackAllocated()) return false;
4179 HValue* arg_two_value = environment()->Lookup(arg_two->var()); 4179 HValue* arg_two_value = environment()->Lookup(arg_two->var());
4180 if (!arg_two_value->CheckFlag(HValue::kIsArguments)) return false; 4180 if (!arg_two_value->CheckFlag(HValue::kIsArguments)) return false;
4181 4181
4182 if (!expr->IsMonomorphic()) return false; 4182 if (!expr->IsMonomorphic()) return false;
4183 4183
4184 // Found pattern f.apply(receiver, arguments). 4184 // Found pattern f.apply(receiver, arguments).
4185 VisitForValue(prop->obj()); 4185 VisitForValue(prop->obj());
4186 if (HasStackOverflow()) return false; 4186 if (HasStackOverflow()) return false;
4187 HValue* function = Pop(); 4187 HValue* function = Pop();
4188 VisitForValue(args->at(0)); 4188 VisitForValue(args->at(0));
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
5677 } 5677 }
5678 5678
5679 #ifdef DEBUG 5679 #ifdef DEBUG
5680 if (graph_ != NULL) graph_->Verify(); 5680 if (graph_ != NULL) graph_->Verify();
5681 if (chunk_ != NULL) chunk_->Verify(); 5681 if (chunk_ != NULL) chunk_->Verify();
5682 if (allocator_ != NULL) allocator_->Verify(); 5682 if (allocator_ != NULL) allocator_->Verify();
5683 #endif 5683 #endif
5684 } 5684 }
5685 5685
5686 } } // namespace v8::internal 5686 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698