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

Side by Side Diff: src/compiler/simplified-operator.h

Issue 617853002: [turbofan] Add BoundsCheckMode to ElementAccess. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/simplified-operator.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_SIMPLIFIED_OPERATOR_H_ 5 #ifndef V8_COMPILER_SIMPLIFIED_OPERATOR_H_
6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_H_ 6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_H_
7 7
8 #include <iosfwd>
9
8 #include "src/compiler/machine-type.h" 10 #include "src/compiler/machine-type.h"
9 #include "src/handles.h" 11 #include "src/handles.h"
10 12
11 namespace v8 { 13 namespace v8 {
12 namespace internal { 14 namespace internal {
13 15
14 // Forward declarations. 16 // Forward declarations.
15 template <class> 17 template <class>
16 class TypeImpl; 18 class TypeImpl;
17 struct ZoneTypeConfig; 19 struct ZoneTypeConfig;
(...skipping 19 matching lines...) Expand all
37 BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged. 39 BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged.
38 int offset; // offset of the field, without tag. 40 int offset; // offset of the field, without tag.
39 Handle<Name> name; // debugging only. 41 Handle<Name> name; // debugging only.
40 Type* type; // type of the field. 42 Type* type; // type of the field.
41 MachineType machine_type; // machine type of the field. 43 MachineType machine_type; // machine type of the field.
42 44
43 int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; } 45 int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; }
44 }; 46 };
45 47
46 48
49 enum BoundsCheckMode { kNoBoundsCheck, kTypedArrayBoundsCheck };
50
51 std::ostream& operator<<(std::ostream&, BoundsCheckMode);
52
53
47 // An access descriptor for loads/stores of indexed structures like characters 54 // An access descriptor for loads/stores of indexed structures like characters
48 // in strings or off-heap backing stores. Accesses from either tagged or 55 // in strings or off-heap backing stores. Accesses from either tagged or
49 // untagged base pointers are supported; untagging is done automatically during 56 // untagged base pointers are supported; untagging is done automatically during
50 // lowering. 57 // lowering.
51 struct ElementAccess { 58 struct ElementAccess {
59 BoundsCheckMode bounds_check; // specifies the bounds checking mode.
52 BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged. 60 BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged.
53 int header_size; // size of the header, without tag. 61 int header_size; // size of the header, without tag.
54 Type* type; // type of the element. 62 Type* type; // type of the element.
55 MachineType machine_type; // machine type of the element. 63 MachineType machine_type; // machine type of the element.
56 64
57 int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; } 65 int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; }
58 }; 66 };
59 67
60 bool operator==(ElementAccess const& lhs, ElementAccess const& rhs); 68 bool operator==(ElementAccess const& lhs, ElementAccess const& rhs);
61 bool operator!=(ElementAccess const& lhs, ElementAccess const& rhs); 69 bool operator!=(ElementAccess const& lhs, ElementAccess const& rhs);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 Zone* const zone_; 151 Zone* const zone_;
144 152
145 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); 153 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder);
146 }; 154 };
147 155
148 } // namespace compiler 156 } // namespace compiler
149 } // namespace internal 157 } // namespace internal
150 } // namespace v8 158 } // namespace v8
151 159
152 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ 160 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_
OLDNEW
« 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