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

Side by Side Diff: src/ast.cc

Issue 279423005: Customized support for feedback on calls to Array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ast.h" 5 #include "ast.h"
6 6
7 #include <cmath> // For isfinite. 7 #include <cmath> // For isfinite.
8 #include "builtins.h" 8 #include "builtins.h"
9 #include "code-stubs.h" 9 #include "code-stubs.h"
10 #include "contexts.h" 10 #include "contexts.h"
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 } else if (proxy->var()->IsLookupSlot()) { 587 } else if (proxy->var()->IsLookupSlot()) {
588 return LOOKUP_SLOT_CALL; 588 return LOOKUP_SLOT_CALL;
589 } 589 }
590 } 590 }
591 591
592 Property* property = expression()->AsProperty(); 592 Property* property = expression()->AsProperty();
593 return property != NULL ? PROPERTY_CALL : OTHER_CALL; 593 return property != NULL ? PROPERTY_CALL : OTHER_CALL;
594 } 594 }
595 595
596 596
597 void Call::set_extra_info(Zone* zone, Handle<AllocationSite> site) {
598 extra_info_ = new(zone) AllocationSiteInfo(site);
599 }
600
601
597 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global, 602 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global,
598 LookupResult* lookup) { 603 LookupResult* lookup) {
599 target_ = Handle<JSFunction>::null(); 604 target_ = Handle<JSFunction>::null();
600 cell_ = Handle<Cell>::null(); 605 cell_ = Handle<Cell>::null();
601 ASSERT(lookup->IsFound() && 606 ASSERT(lookup->IsFound() &&
602 lookup->type() == NORMAL && 607 lookup->type() == NORMAL &&
603 lookup->holder() == *global); 608 lookup->holder() == *global);
604 cell_ = Handle<Cell>(global->GetPropertyCell(lookup)); 609 cell_ = Handle<Cell>(global->GetPropertyCell(lookup));
605 if (cell_->value()->IsJSFunction()) { 610 if (cell_->value()->IsJSFunction()) {
606 Handle<JSFunction> candidate(JSFunction::cast(cell_->value())); 611 Handle<JSFunction> candidate(JSFunction::cast(cell_->value()));
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); 1154 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value());
1150 str = arr; 1155 str = arr;
1151 } else { 1156 } else {
1152 str = DoubleToCString(value_->Number(), buffer); 1157 str = DoubleToCString(value_->Number(), buffer);
1153 } 1158 }
1154 return isolate_->factory()->NewStringFromAsciiChecked(str); 1159 return isolate_->factory()->NewStringFromAsciiChecked(str);
1155 } 1160 }
1156 1161
1157 1162
1158 } } // namespace v8::internal 1163 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698