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

Unified Diff: src/crankshaft/hydrogen.h

Issue 2117383002: Cleanup array constructor inlining in crankshaft (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 4 years, 5 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/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.h
diff --git a/src/crankshaft/hydrogen.h b/src/crankshaft/hydrogen.h
index 40630980c97a5087261cd11864605f557dbc4c63..1a83ba0c901ad71494068bab4508b36d5c1d675e 100644
--- a/src/crankshaft/hydrogen.h
+++ b/src/crankshaft/hydrogen.h
@@ -1779,57 +1779,6 @@ class HGraphBuilder {
HValue* BuildNewElementsCapacity(HValue* old_capacity);
- class JSArrayBuilder final {
- public:
- JSArrayBuilder(HGraphBuilder* builder,
- ElementsKind kind,
- HValue* allocation_site_payload,
- HValue* constructor_function,
- AllocationSiteOverrideMode override_mode);
-
- JSArrayBuilder(HGraphBuilder* builder,
- ElementsKind kind,
- HValue* constructor_function = NULL);
-
- enum FillMode {
- DONT_FILL_WITH_HOLE,
- FILL_WITH_HOLE
- };
-
- ElementsKind kind() { return kind_; }
- HAllocate* elements_location() { return elements_location_; }
-
- HAllocate* AllocateEmptyArray();
- HAllocate* AllocateArray(HValue* capacity,
- HValue* length_field,
- FillMode fill_mode = FILL_WITH_HOLE);
- HValue* GetElementsLocation() { return elements_location_; }
- HValue* EmitMapCode();
-
- private:
- Zone* zone() const { return builder_->zone(); }
- int elements_size() const {
- return IsFastDoubleElementsKind(kind_) ? kDoubleSize : kPointerSize;
- }
- HGraphBuilder* builder() { return builder_; }
- HGraph* graph() { return builder_->graph(); }
- int initial_capacity() {
- STATIC_ASSERT(JSArray::kPreallocatedArrayElements > 0);
- return JSArray::kPreallocatedArrayElements;
- }
-
- HValue* EmitInternalMapCode();
-
- HGraphBuilder* builder_;
- ElementsKind kind_;
- AllocationSiteMode mode_;
- HValue* allocation_site_payload_;
- HValue* constructor_function_;
- HAllocate* elements_location_;
- };
-
- HValue* BuildAllocateArrayFromLength(JSArrayBuilder* array_builder,
- HValue* length_argument);
HValue* BuildCalculateElementsSize(ElementsKind kind,
HValue* capacity);
HAllocate* AllocateJSArrayObject(AllocationSiteMode mode);
@@ -2439,10 +2388,8 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
void BuildFunctionApply(Call* expr);
void BuildFunctionCall(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);
+ template <class T>
+ bool TryHandleArrayCall(T* expr, HValue* function);
enum ArrayIndexOfMode { kFirstIndexOf, kLastIndexOf };
HValue* BuildArrayIndexOf(HValue* receiver,
@@ -2554,9 +2501,8 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
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);
+ bool TryInlineArrayCall(Expression* expression, int argument_count,
+ Handle<AllocationSite> site);
void BuildInitializeInobjectProperties(HValue* receiver,
Handle<Map> initial_map);
« no previous file with comments | « no previous file | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698