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

Side by Side Diff: src/ast.cc

Issue 8341009: Make the GC aware of JSReceiver pointers in LookupResults. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Inlined LookupResult constructor and destructor. Created 9 years, 2 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/arm/stub-cache-arm.cc ('k') | src/bootstrapper.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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) { 713 bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) {
714 if (check_type_ == RECEIVER_MAP_CHECK) { 714 if (check_type_ == RECEIVER_MAP_CHECK) {
715 // For primitive checks the holder is set up to point to the 715 // For primitive checks the holder is set up to point to the
716 // corresponding prototype object, i.e. one step of the algorithm 716 // corresponding prototype object, i.e. one step of the algorithm
717 // below has been already performed. 717 // below has been already performed.
718 // For non-primitive checks we clear it to allow computing targets 718 // For non-primitive checks we clear it to allow computing targets
719 // for polymorphic calls. 719 // for polymorphic calls.
720 holder_ = Handle<JSObject>::null(); 720 holder_ = Handle<JSObject>::null();
721 } 721 }
722 while (true) { 722 while (true) {
723 LookupResult lookup; 723 LookupResult lookup(type->GetIsolate());
724 type->LookupInDescriptors(NULL, *name, &lookup); 724 type->LookupInDescriptors(NULL, *name, &lookup);
725 // If the function wasn't found directly in the map, we start 725 // If the function wasn't found directly in the map, we start
726 // looking upwards through the prototype chain. 726 // looking upwards through the prototype chain.
727 if (!lookup.IsFound() && type->prototype()->IsJSObject()) { 727 if (!lookup.IsFound() && type->prototype()->IsJSObject()) {
728 holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); 728 holder_ = Handle<JSObject>(JSObject::cast(type->prototype()));
729 type = Handle<Map>(holder()->map()); 729 type = Handle<Map>(holder()->map());
730 } else if (lookup.IsProperty() && lookup.type() == CONSTANT_FUNCTION) { 730 } else if (lookup.IsProperty() && lookup.type() == CONSTANT_FUNCTION) {
731 target_ = Handle<JSFunction>(lookup.GetConstantFunctionFromMap(*type)); 731 target_ = Handle<JSFunction>(lookup.GetConstantFunctionFromMap(*type));
732 return CanCallWithoutIC(target_, arguments()->length()); 732 return CanCallWithoutIC(target_, arguments()->length());
733 } else { 733 } else {
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 int pos) 1188 int pos)
1189 : label_(label), 1189 : label_(label),
1190 statements_(statements), 1190 statements_(statements),
1191 position_(pos), 1191 position_(pos),
1192 compare_type_(NONE), 1192 compare_type_(NONE),
1193 compare_id_(AstNode::GetNextId(isolate)), 1193 compare_id_(AstNode::GetNextId(isolate)),
1194 entry_id_(AstNode::GetNextId(isolate)) { 1194 entry_id_(AstNode::GetNextId(isolate)) {
1195 } 1195 }
1196 1196
1197 } } // namespace v8::internal 1197 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698