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

Unified Diff: src/ast.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/hydrogen.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 0115d988272c44e64f326d6f7377619824f2ea41..80071ebf2ad0d78da4d51ae3906561aec8642139 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1730,6 +1730,23 @@ class Property V8_FINAL : public Expression {
};
+class AllocationSiteInfo: public ZoneObject {
danno 2014/05/16 16:34:11 CallInfo? Don't wrap this puppy until we actually
mvstanton 2014/05/19 13:45:24 Sounds good.
+ public:
+ explicit AllocationSiteInfo(Handle<AllocationSite> allocation_site)
+ : allocation_site_(allocation_site) {}
+
+ ElementsKind elements_kind() const {
+ return allocation_site_->GetElementsKind();
+ }
+ Handle<AllocationSite> allocation_site() const {
+ return allocation_site_;
+ }
+
+ private:
+ Handle<AllocationSite> allocation_site_;
+};
+
+
class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
public:
DECLARE_NODE_TYPE(Call)
@@ -1762,15 +1779,27 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
return !target_.is_null();
}
+ bool global_call() const {
+ VariableProxy* proxy = expression_->AsVariableProxy();
+ return proxy != NULL && proxy->var()->IsUnallocated();
+ }
+
+ bool known_global_function() const {
+ return global_call() && !target_.is_null();
+ }
+
Handle<JSFunction> target() { return target_; }
Handle<Cell> cell() { return cell_; }
void set_target(Handle<JSFunction> target) { target_ = target; }
+ void set_extra_info(Zone* zone, Handle<AllocationSite> site);
bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupResult* lookup);
BailoutId ReturnId() const { return return_id_; }
+ ZoneObject* extra_info() { return extra_info_; }
+
enum CallType {
POSSIBLY_EVAL_CALL,
GLOBAL_CALL,
@@ -1796,6 +1825,7 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
: Expression(zone, pos),
expression_(expression),
arguments_(arguments),
+ extra_info_(NULL),
call_feedback_slot_(kInvalidFeedbackSlot),
return_id_(GetNextId(zone)) {
if (expression->IsProperty()) {
@@ -1809,6 +1839,7 @@ class Call V8_FINAL : public Expression, public FeedbackSlotInterface {
Handle<JSFunction> target_;
Handle<Cell> cell_;
+ ZoneObject* extra_info_;
int call_feedback_slot_;
const BailoutId return_id_;
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/hydrogen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698