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

Side by Side Diff: src/ast.cc

Issue 6794050: Revert "[Arguments] Merge (7442,7496] from bleeding_edge." (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/arguments
Patch Set: Created 9 years, 8 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/ast.h ('k') | src/builtins.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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 CountOperation* ExpressionStatement::StatementAsCountOperation() { 70 CountOperation* ExpressionStatement::StatementAsCountOperation() {
71 return expression()->AsCountOperation(); 71 return expression()->AsCountOperation();
72 } 72 }
73 73
74 74
75 VariableProxy::VariableProxy(Variable* var) 75 VariableProxy::VariableProxy(Variable* var)
76 : name_(var->name()), 76 : name_(var->name()),
77 var_(NULL), // Will be set by the call to BindTo. 77 var_(NULL), // Will be set by the call to BindTo.
78 is_this_(var->is_this()), 78 is_this_(var->is_this()),
79 inside_with_(false), 79 inside_with_(false),
80 is_trivial_(false), 80 is_trivial_(false) {
81 position_(RelocInfo::kNoPosition) {
82 BindTo(var); 81 BindTo(var);
83 } 82 }
84 83
85 84
86 VariableProxy::VariableProxy(Handle<String> name, 85 VariableProxy::VariableProxy(Handle<String> name,
87 bool is_this, 86 bool is_this,
88 bool inside_with, 87 bool inside_with)
89 int position)
90 : name_(name), 88 : name_(name),
91 var_(NULL), 89 var_(NULL),
92 is_this_(is_this), 90 is_this_(is_this),
93 inside_with_(inside_with), 91 inside_with_(inside_with),
94 is_trivial_(false), 92 is_trivial_(false) {
95 position_(position) { 93 // names must be canonicalized for fast equality checks
96 // Names must be canonicalized for fast equality checks.
97 ASSERT(name->IsSymbol()); 94 ASSERT(name->IsSymbol());
98 } 95 }
99 96
100 97
101 VariableProxy::VariableProxy(bool is_this) 98 VariableProxy::VariableProxy(bool is_this)
102 : var_(NULL), 99 : var_(NULL),
103 is_this_(is_this), 100 is_this_(is_this),
104 inside_with_(false), 101 inside_with_(false),
105 is_trivial_(false) { 102 is_trivial_(false) {
106 } 103 }
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 target_ = Handle<JSFunction>(lookup.GetConstantFunctionFromMap(*type)); 615 target_ = Handle<JSFunction>(lookup.GetConstantFunctionFromMap(*type));
619 return CanCallWithoutIC(target_, arguments()->length()); 616 return CanCallWithoutIC(target_, arguments()->length());
620 } else { 617 } else {
621 return false; 618 return false;
622 } 619 }
623 } 620 }
624 } 621 }
625 622
626 623
627 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global, 624 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global,
628 LookupResult* lookup) { 625 Handle<String> name) {
629 target_ = Handle<JSFunction>::null(); 626 target_ = Handle<JSFunction>::null();
630 cell_ = Handle<JSGlobalPropertyCell>::null(); 627 cell_ = Handle<JSGlobalPropertyCell>::null();
631 ASSERT(lookup->IsProperty() && 628 LookupResult lookup;
632 lookup->type() == NORMAL && 629 global->Lookup(*name, &lookup);
633 lookup->holder() == *global); 630 if (lookup.IsProperty() &&
634 cell_ = Handle<JSGlobalPropertyCell>(global->GetPropertyCell(lookup)); 631 lookup.type() == NORMAL &&
635 if (cell_->value()->IsJSFunction()) { 632 lookup.holder() == *global) {
636 Handle<JSFunction> candidate(JSFunction::cast(cell_->value())); 633 cell_ = Handle<JSGlobalPropertyCell>(global->GetPropertyCell(&lookup));
637 // If the function is in new space we assume it's more likely to 634 if (cell_->value()->IsJSFunction()) {
638 // change and thus prefer the general IC code. 635 Handle<JSFunction> candidate(JSFunction::cast(cell_->value()));
639 if (!HEAP->InNewSpace(*candidate) && 636 // If the function is in new space we assume it's more likely to
640 CanCallWithoutIC(candidate, arguments()->length())) { 637 // change and thus prefer the general IC code.
641 target_ = candidate; 638 if (!HEAP->InNewSpace(*candidate) &&
642 return true; 639 CanCallWithoutIC(candidate, arguments()->length())) {
640 target_ = candidate;
641 return true;
642 }
643 } 643 }
644 } 644 }
645 return false; 645 return false;
646 } 646 }
647 647
648 648
649 void Call::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 649 void Call::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
650 Property* property = expression()->AsProperty(); 650 Property* property = expression()->AsProperty();
651 ASSERT(property != NULL); 651 ASSERT(property != NULL);
652 // Specialize for the receiver types seen at runtime. 652 // Specialize for the receiver types seen at runtime.
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 ZoneList<Statement*>* statements, 1069 ZoneList<Statement*>* statements,
1070 int pos) 1070 int pos)
1071 : label_(label), 1071 : label_(label),
1072 statements_(statements), 1072 statements_(statements),
1073 position_(pos), 1073 position_(pos),
1074 compare_type_(NONE), 1074 compare_type_(NONE),
1075 entry_id_(AstNode::GetNextId()) { 1075 entry_id_(AstNode::GetNextId()) {
1076 } 1076 }
1077 1077
1078 } } // namespace v8::internal 1078 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698