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

Unified Diff: src/compiler/simplified-operator.h

Issue 768543002: [WIP] TrapHandler 2014/11/27. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/simplified-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-operator.h
diff --git a/src/compiler/simplified-operator.h b/src/compiler/simplified-operator.h
index c918042ba5733c0ecb216e3a3e5c430e8ada765c..e9efce55db3920ff65c27742882eaeef36ca3bbc 100644
--- a/src/compiler/simplified-operator.h
+++ b/src/compiler/simplified-operator.h
@@ -53,11 +53,7 @@ size_t hash_value(FieldAccess const&);
std::ostream& operator<<(std::ostream&, FieldAccess const&);
-
-// The bound checking mode for ElementAccess below.
-enum BoundsCheckMode { kNoBoundsCheck, kTypedArrayBoundsCheck };
-
-std::ostream& operator<<(std::ostream&, BoundsCheckMode);
+const FieldAccess& FieldAccessOf(const Operator* op) WARN_UNUSED_RESULT;
// An access descriptor for loads/stores of indexed structures like characters
@@ -65,7 +61,6 @@ std::ostream& operator<<(std::ostream&, BoundsCheckMode);
// untagged base pointers are supported; untagging is done automatically during
// lowering.
struct ElementAccess {
- BoundsCheckMode bounds_check; // specifies the bounds checking mode.
BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged.
int header_size; // size of the header, without tag.
Type* type; // type of the element.
@@ -81,13 +76,32 @@ size_t hash_value(ElementAccess const&);
std::ostream& operator<<(std::ostream&, ElementAccess const&);
+const ElementAccess& ElementAccessOf(const Operator* op) WARN_UNUSED_RESULT;
+
-// If the accessed object is not a heap object, add this to the header_size.
-static const int kNonHeapObjectHeaderSize = kHeapObjectTag;
+// TODO(bmeurer)
+class BufferAccess FINAL {
+ public:
+ BufferAccess(ExternalArrayType external_array_type, size_t guard_size)
+ : external_array_type_(external_array_type), guard_size_(guard_size) {}
+ ExternalArrayType external_array_type() const { return external_array_type_; }
+ MachineType machine_type() const;
+ size_t guard_size() const { return guard_size_; }
-const FieldAccess& FieldAccessOf(const Operator* op) WARN_UNUSED_RESULT;
-const ElementAccess& ElementAccessOf(const Operator* op) WARN_UNUSED_RESULT;
+ private:
+ ExternalArrayType external_array_type_;
+ size_t guard_size_;
+};
+
+bool operator==(BufferAccess const&, BufferAccess const&);
+bool operator!=(BufferAccess const&, BufferAccess const&);
+
+size_t hash_value(BufferAccess const&);
+
+std::ostream& operator<<(std::ostream&, BufferAccess const&);
+
+BufferAccess const& BufferAccessOf(const Operator* op) WARN_UNUSED_RESULT;
// Interface for building simplified operators, which represent the
@@ -154,10 +168,16 @@ class SimplifiedOperatorBuilder FINAL {
// load-element [base + index], length
const Operator* LoadElement(ElementAccess const&);
-
// store-element [base + index], length, value
const Operator* StoreElement(ElementAccess const&);
+ // load-buffer [base + offset], length
+ const Operator* LoadBuffer(BufferAccess const&);
+ // store-buffer [base + offset], length, value
+ const Operator* StoreBuffer(BufferAccess const&);
+ // bounds-check(guard) offset, length
+ const Operator* BoundsCheck(size_t);
+
private:
Zone* zone() const { return zone_; }
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/simplified-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698