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

Side by Side Diff: src/ast.cc

Issue 9064003: Filter transitions while searching for CONSTANT_FUNCTION property in Call::ComputeTarget. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 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 | « 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 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 // below has been already performed. 741 // below has been already performed.
742 // For non-primitive checks we clear it to allow computing targets 742 // For non-primitive checks we clear it to allow computing targets
743 // for polymorphic calls. 743 // for polymorphic calls.
744 holder_ = Handle<JSObject>::null(); 744 holder_ = Handle<JSObject>::null();
745 } 745 }
746 while (true) { 746 while (true) {
747 LookupResult lookup(type->GetIsolate()); 747 LookupResult lookup(type->GetIsolate());
748 type->LookupInDescriptors(NULL, *name, &lookup); 748 type->LookupInDescriptors(NULL, *name, &lookup);
749 // If the function wasn't found directly in the map, we start 749 // If the function wasn't found directly in the map, we start
750 // looking upwards through the prototype chain. 750 // looking upwards through the prototype chain.
751 if (!lookup.IsFound() && type->prototype()->IsJSObject()) { 751 if ((!lookup.IsFound() || IsTransitionType(lookup.type()))
752 && type->prototype()->IsJSObject()) {
752 holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); 753 holder_ = Handle<JSObject>(JSObject::cast(type->prototype()));
753 type = Handle<Map>(holder()->map()); 754 type = Handle<Map>(holder()->map());
754 } else if (lookup.IsProperty() && lookup.type() == CONSTANT_FUNCTION) { 755 } else if (lookup.IsProperty() && lookup.type() == CONSTANT_FUNCTION) {
755 target_ = Handle<JSFunction>(lookup.GetConstantFunctionFromMap(*type)); 756 target_ = Handle<JSFunction>(lookup.GetConstantFunctionFromMap(*type));
756 return CanCallWithoutIC(target_, arguments()->length()); 757 return CanCallWithoutIC(target_, arguments()->length());
757 } else { 758 } else {
758 return false; 759 return false;
759 } 760 }
760 } 761 }
761 } 762 }
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 int pos) 1211 int pos)
1211 : label_(label), 1212 : label_(label),
1212 statements_(statements), 1213 statements_(statements),
1213 position_(pos), 1214 position_(pos),
1214 compare_type_(NONE), 1215 compare_type_(NONE),
1215 compare_id_(AstNode::GetNextId(isolate)), 1216 compare_id_(AstNode::GetNextId(isolate)),
1216 entry_id_(AstNode::GetNextId(isolate)) { 1217 entry_id_(AstNode::GetNextId(isolate)) {
1217 } 1218 }
1218 1219
1219 } } // namespace v8::internal 1220 } } // 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