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

Side by Side Diff: src/hydrogen.h

Issue 71783003: Reland and fix "Add support for keyed-call on arrays of fast elements" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Test + fix Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 class JSArrayBuilder V8_FINAL { 1576 class JSArrayBuilder V8_FINAL {
1577 public: 1577 public:
1578 JSArrayBuilder(HGraphBuilder* builder, 1578 JSArrayBuilder(HGraphBuilder* builder,
1579 ElementsKind kind, 1579 ElementsKind kind,
1580 HValue* allocation_site_payload, 1580 HValue* allocation_site_payload,
1581 HValue* constructor_function, 1581 HValue* constructor_function,
1582 AllocationSiteOverrideMode override_mode); 1582 AllocationSiteOverrideMode override_mode);
1583 1583
1584 JSArrayBuilder(HGraphBuilder* builder, 1584 JSArrayBuilder(HGraphBuilder* builder,
1585 ElementsKind kind, 1585 ElementsKind kind,
1586 HValue* constructor_function); 1586 HValue* constructor_function = NULL);
1587 1587
1588 enum FillMode { 1588 enum FillMode {
1589 DONT_FILL_WITH_HOLE, 1589 DONT_FILL_WITH_HOLE,
1590 FILL_WITH_HOLE 1590 FILL_WITH_HOLE
1591 }; 1591 };
1592 1592
1593 ElementsKind kind() { return kind_; } 1593 ElementsKind kind() { return kind_; }
1594 1594
1595 HValue* AllocateEmptyArray(); 1595 HValue* AllocateEmptyArray();
1596 HValue* AllocateArray(HValue* capacity, HValue* length_field, 1596 HValue* AllocateArray(HValue* capacity, HValue* length_field,
1597 FillMode fill_mode = FILL_WITH_HOLE); 1597 FillMode fill_mode = FILL_WITH_HOLE);
1598 HValue* GetElementsLocation() { return elements_location_; } 1598 HValue* GetElementsLocation() { return elements_location_; }
1599 HValue* EmitMapCode();
1599 1600
1600 private: 1601 private:
1601 Zone* zone() const { return builder_->zone(); } 1602 Zone* zone() const { return builder_->zone(); }
1602 int elements_size() const { 1603 int elements_size() const {
1603 return IsFastDoubleElementsKind(kind_) ? kDoubleSize : kPointerSize; 1604 return IsFastDoubleElementsKind(kind_) ? kDoubleSize : kPointerSize;
1604 } 1605 }
1605 HGraphBuilder* builder() { return builder_; } 1606 HGraphBuilder* builder() { return builder_; }
1606 HGraph* graph() { return builder_->graph(); } 1607 HGraph* graph() { return builder_->graph(); }
1607 int initial_capacity() { 1608 int initial_capacity() {
1608 STATIC_ASSERT(JSArray::kPreallocatedArrayElements > 0); 1609 STATIC_ASSERT(JSArray::kPreallocatedArrayElements > 0);
1609 return JSArray::kPreallocatedArrayElements; 1610 return JSArray::kPreallocatedArrayElements;
1610 } 1611 }
1611 1612
1612 HValue* EmitMapCode();
1613 HValue* EmitInternalMapCode(); 1613 HValue* EmitInternalMapCode();
1614 HValue* EstablishEmptyArrayAllocationSize(); 1614 HValue* EstablishEmptyArrayAllocationSize();
1615 HValue* EstablishAllocationSize(HValue* length_node); 1615 HValue* EstablishAllocationSize(HValue* length_node);
1616 HValue* AllocateArray(HValue* size_in_bytes, HValue* capacity, 1616 HValue* AllocateArray(HValue* size_in_bytes, HValue* capacity,
1617 HValue* length_field, 1617 HValue* length_field,
1618 FillMode fill_mode = FILL_WITH_HOLE); 1618 FillMode fill_mode = FILL_WITH_HOLE);
1619 1619
1620 HGraphBuilder* builder_; 1620 HGraphBuilder* builder_;
1621 ElementsKind kind_; 1621 ElementsKind kind_;
1622 AllocationSiteMode mode_; 1622 AllocationSiteMode mode_;
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
2536 } 2536 }
2537 2537
2538 private: 2538 private:
2539 HGraphBuilder* builder_; 2539 HGraphBuilder* builder_;
2540 }; 2540 };
2541 2541
2542 2542
2543 } } // namespace v8::internal 2543 } } // namespace v8::internal
2544 2544
2545 #endif // V8_HYDROGEN_H_ 2545 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698