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

Unified Diff: src/hydrogen-instructions.h

Issue 112913002: Split up HLoadNamedField and HStoreNamedField. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/hydrogen-escape-analysis.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 4dd24fd871552456a10bb77ab8f6a0e4b4b25138..8fa53b6f1cb646dd3e3b66f3ef9e98b12b01e4d4 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -200,6 +200,7 @@ class LChunkBuilder;
V(ArrayLengths) \
V(StringLengths) \
V(BackingStoreFields) \
+ V(BackingStore) \
V(Calls) \
V(ContextSlots) \
V(DoubleArrayElements) \
@@ -6075,6 +6076,8 @@ class HObjectAccess V8_FINAL {
static HObjectAccess ForBackingStoreOffset(int offset,
Representation representation = Representation::Tagged());
+ static HObjectAccess ForBackingStore();
+
// Create an access to a resolved field (in-object or backing store).
static HObjectAccess ForField(Handle<Map> map,
LookupResult *lookup, Handle<String> name = Handle<String>::null());
@@ -6136,6 +6139,7 @@ class HObjectAccess V8_FINAL {
kStringLengths, // the length of a string
kElementsPointer, // elements pointer
kBackingStore, // some field in the backing store
+ kBackingStorePointer, // the backing store itself
kDouble, // some double field
kInobject, // some other in-object field
kExternalMemory // some field in external memory
@@ -6154,9 +6158,9 @@ class HObjectAccess V8_FINAL {
ASSERT(RepresentationField::decode(value_) == representation.kind());
}
- class PortionField : public BitField<Portion, 0, 3> {};
- class RepresentationField : public BitField<Representation::Kind, 3, 4> {};
- class OffsetField : public BitField<int, 7, 25> {};
+ class PortionField : public BitField<Portion, 0, 4> {};
+ class RepresentationField : public BitField<Representation::Kind, 4, 4> {};
+ class OffsetField : public BitField<int, 8, 24> {};
uint32_t value_; // encodes portion, representation, and offset
Handle<String> name_;
@@ -6512,7 +6516,7 @@ class HLoadKeyedGeneric V8_FINAL : public HTemplateInstruction<3> {
};
-class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> {
+class HStoreNamedField V8_FINAL : public HTemplateInstruction<2> {
public:
DECLARE_INSTRUCTION_FACTORY_P3(HStoreNamedField, HValue*,
HObjectAccess, HValue*);
@@ -6559,28 +6563,16 @@ class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> {
HValue* object() const { return OperandAt(0); }
HValue* value() const { return OperandAt(1); }
- HValue* transition() const { return OperandAt(2); }
HObjectAccess access() const { return access_; }
HValue* new_space_dominator() const { return new_space_dominator_; }
bool has_transition() const { return has_transition_; }
- Handle<Map> transition_map() const {
- if (has_transition()) {
- return Handle<Map>::cast(
- HConstant::cast(transition())->handle(Isolate::Current()));
- } else {
- return Handle<Map>();
- }
- }
-
- void SetTransition(HConstant* map_constant, CompilationInfo* info) {
+ void SetTransition(Handle<Map> map, CompilationInfo* info) {
ASSERT(!has_transition()); // Only set once.
- Handle<Map> map = Handle<Map>::cast(map_constant->handle(info->isolate()));
if (map->CanBeDeprecated()) {
map->AddDependentCompilationInfo(DependentCode::kTransitionGroup, info);
}
- SetOperandAt(2, map_constant);
has_transition_ = true;
}
@@ -6597,12 +6589,6 @@ class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> {
new_space_dominator());
}
- bool NeedsWriteBarrierForMap() {
- if (IsSkipWriteBarrier()) return false;
- return ReceiverObjectNeedsWriteBarrier(object(), transition(),
- new_space_dominator());
- }
-
Representation field_representation() const {
return access_.representation();
}
@@ -6621,7 +6607,6 @@ class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> {
has_transition_(false) {
SetOperandAt(0, obj);
SetOperandAt(1, val);
- SetOperandAt(2, obj);
access.SetGVNFlags(this, true);
}
« no previous file with comments | « src/hydrogen-escape-analysis.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698