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

Unified Diff: src/hydrogen.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
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 42a63fd57e7e84e31142e0246d8d5a81412a98d0..fd20053fad68777f23547dbd25981e7bbbe746bb 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -1291,6 +1291,10 @@ class HGraphBuilder {
void AddSimulate(BailoutId id, RemovableSimulate removable = FIXED_SIMULATE);
+ // When initializing arrays, we'll unfold the loop if the number of elements
+ // is known at compile time and is <= kLoopUnfoldLimit.
+ static const int kLoopUnfoldLimit = 8;
danno 2014/05/16 16:34:11 I've always been suspicious of this name. You shou
mvstanton 2014/05/19 13:45:24 Done.
+
protected:
virtual bool BuildGraph() = 0;
@@ -2247,6 +2251,11 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
// Try to optimize fun.apply(receiver, arguments) pattern.
bool TryCallApply(Call* expr);
+ bool TryHandleArrayCall(Call* expr, HValue* function);
+ bool TryHandleArrayCallNew(CallNew* expr, HValue* function);
+ void BuildArrayCall(Expression* expr, int arguments_count, HValue* function,
+ Handle<AllocationSite> cell);
+
HValue* ImplicitReceiverFor(HValue* function,
Handle<JSFunction> target);
@@ -2330,8 +2339,13 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
ElementsKind fixed_elements_kind,
HValue* byte_length, HValue* length);
- bool IsCallNewArrayInlineable(CallNew* expr);
- void BuildInlinedCallNewArray(CallNew* expr);
+ Handle<JSFunction> array_function() {
+ return handle(isolate()->native_context()->array_function());
+ }
+
+ bool IsCallArrayInlineable(int argument_count, Handle<AllocationSite> site);
+ void BuildInlinedCallArray(Expression* expression, int argument_count,
+ Handle<AllocationSite> site);
class PropertyAccessInfo {
public:

Powered by Google App Engine
This is Rietveld 408576698