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

Side by Side Diff: src/ast.cc

Issue 6484001: Merge r6727 to 3.0 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.0/
Patch Set: Created 9 years, 10 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 | src/version.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 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 } 604 }
605 } 605 }
606 606
607 607
608 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global, 608 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global,
609 Handle<String> name) { 609 Handle<String> name) {
610 target_ = Handle<JSFunction>::null(); 610 target_ = Handle<JSFunction>::null();
611 cell_ = Handle<JSGlobalPropertyCell>::null(); 611 cell_ = Handle<JSGlobalPropertyCell>::null();
612 LookupResult lookup; 612 LookupResult lookup;
613 global->Lookup(*name, &lookup); 613 global->Lookup(*name, &lookup);
614 if (lookup.IsProperty() && lookup.type() == NORMAL) { 614 if (lookup.IsProperty() &&
615 lookup.type() == NORMAL &&
616 lookup.holder() == *global) {
615 cell_ = Handle<JSGlobalPropertyCell>(global->GetPropertyCell(&lookup)); 617 cell_ = Handle<JSGlobalPropertyCell>(global->GetPropertyCell(&lookup));
616 if (cell_->value()->IsJSFunction()) { 618 if (cell_->value()->IsJSFunction()) {
617 Handle<JSFunction> candidate(JSFunction::cast(cell_->value())); 619 Handle<JSFunction> candidate(JSFunction::cast(cell_->value()));
618 // If the function is in new space we assume it's more likely to 620 // If the function is in new space we assume it's more likely to
619 // change and thus prefer the general IC code. 621 // change and thus prefer the general IC code.
620 if (!Heap::InNewSpace(*candidate) && 622 if (!Heap::InNewSpace(*candidate) &&
621 CanCallWithoutIC(candidate, arguments()->length())) { 623 CanCallWithoutIC(candidate, arguments()->length())) {
622 target_ = candidate; 624 target_ = candidate;
623 return true; 625 return true;
624 } 626 }
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 1051
1050 CaseClause::CaseClause(Expression* label, 1052 CaseClause::CaseClause(Expression* label,
1051 ZoneList<Statement*>* statements, 1053 ZoneList<Statement*>* statements,
1052 int pos) 1054 int pos)
1053 : label_(label), 1055 : label_(label),
1054 statements_(statements), 1056 statements_(statements),
1055 position_(pos), 1057 position_(pos),
1056 compare_type_(NONE) {} 1058 compare_type_(NONE) {}
1057 1059
1058 } } // namespace v8::internal 1060 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698