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

Unified Diff: src/hydrogen.h

Issue 282093009: Emit mementos in crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 6 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 | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index acf1d15d8fb06e824c9521db01e83007b9587623..7858f068f59524e9bd421d50e510995aae26fc8a 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -1005,37 +1005,6 @@ class HIfContinuation V8_FINAL {
};
-class HAllocationMode V8_FINAL BASE_EMBEDDED {
- public:
- explicit HAllocationMode(Handle<AllocationSite> feedback_site)
- : current_site_(NULL), feedback_site_(feedback_site),
- pretenure_flag_(NOT_TENURED) {}
- explicit HAllocationMode(HValue* current_site)
- : current_site_(current_site), pretenure_flag_(NOT_TENURED) {}
- explicit HAllocationMode(PretenureFlag pretenure_flag)
- : current_site_(NULL), pretenure_flag_(pretenure_flag) {}
- HAllocationMode()
- : current_site_(NULL), pretenure_flag_(NOT_TENURED) {}
-
- HValue* current_site() const { return current_site_; }
- Handle<AllocationSite> feedback_site() const { return feedback_site_; }
-
- bool CreateAllocationMementos() const V8_WARN_UNUSED_RESULT {
- return current_site() != NULL;
- }
-
- PretenureFlag GetPretenureMode() const V8_WARN_UNUSED_RESULT {
- if (!feedback_site().is_null()) return feedback_site()->GetPretenureMode();
- return pretenure_flag_;
- }
-
- private:
- HValue* current_site_;
- Handle<AllocationSite> feedback_site_;
- PretenureFlag pretenure_flag_;
-};
-
-
class HGraphBuilder {
public:
explicit HGraphBuilder(CompilationInfo* info)
@@ -2074,6 +2043,8 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
void operator delete(void* pointer, Zone* zone) { }
void operator delete(void* pointer) { }
+ void InitializeAllocationModeForCallNew(CallNew* expr, HAllocationMode* mode);
+
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
protected:
@@ -2261,9 +2232,10 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
bool TryCallApply(Call* expr);
bool TryHandleArrayCall(Call* expr, HValue* function);
- bool TryHandleArrayCallNew(CallNew* expr, HValue* function);
+ bool TryHandleArrayCallNew(CallNew* expr, HValue* function,
+ HAllocationMode mode);
void BuildArrayCall(Expression* expr, int arguments_count, HValue* function,
- Handle<AllocationSite> cell);
+ Handle<AllocationSite> cell, HAllocationMode mode);
enum ArrayIndexOfMode { kFirstIndexOf, kLastIndexOf };
HValue* BuildArrayIndexOf(HValue* receiver,
@@ -2360,7 +2332,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
bool IsCallArrayInlineable(int argument_count, Handle<AllocationSite> site);
void BuildInlinedCallArray(Expression* expression, int argument_count,
- Handle<AllocationSite> site);
+ HAllocationMode mode, Handle<AllocationSite> site);
class PropertyAccessInfo {
public:
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698