| Index: src/hydrogen.h
|
| diff --git a/src/hydrogen.h b/src/hydrogen.h
|
| index 42a63fd57e7e84e31142e0246d8d5a81412a98d0..9016df463c3f75457d8c17245c4aa32434692a88 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 <= kElementLoopUnrollThreshold.
|
| + static const int kElementLoopUnrollThreshold = 8;
|
| +
|
| 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:
|
|
|