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

Unified Diff: src/ast.h

Issue 1023103003: If CallNew targets a constant global, set its state to monomorphic (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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') | no next file with comments »
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 661b5f962d86723482c0f08b2c574413787b4f21..60ba21d986c29243e7ec0d8dd4b5ad6b5136b120 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1849,11 +1849,14 @@ class Call FINAL : public Expression {
Handle<AllocationSite> allocation_site() { return allocation_site_; }
+ void SetKnownGlobalTarget(Handle<JSFunction> target) {
+ target_ = target;
+ set_is_uninitialized(false);
+ }
void set_target(Handle<JSFunction> target) { target_ = target; }
void set_allocation_site(Handle<AllocationSite> site) {
allocation_site_ = site;
}
- bool ComputeGlobalTarget(Handle<GlobalObject> global, LookupIterator* it);
static int num_ids() { return parent_num_ids() + 2; }
BailoutId ReturnId() const { return BailoutId(local_id(0)); }
@@ -1954,6 +1957,10 @@ class CallNew FINAL : public Expression {
}
void set_is_monomorphic(bool monomorphic) { is_monomorphic_ = monomorphic; }
void set_target(Handle<JSFunction> target) { target_ = target; }
+ void SetKnownGlobalTarget(Handle<JSFunction> target) {
+ target_ = target;
+ is_monomorphic_ = true;
+ }
protected:
CallNew(Zone* zone, Expression* expression, ZoneList<Expression*>* arguments,
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698