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

Unified Diff: src/fast-accessor-assembler.h

Issue 2186593002: Add faster, but unsafe version of LoadInternalField. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Refactor LoadInternalField and its unchecked counterpart 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
Index: src/fast-accessor-assembler.h
diff --git a/src/fast-accessor-assembler.h b/src/fast-accessor-assembler.h
index 41337a2b09d8883efd2243e785040da4db4bfde3..fd3e482fa5b8e602423c38954a089b220a248f21 100644
--- a/src/fast-accessor-assembler.h
+++ b/src/fast-accessor-assembler.h
@@ -54,6 +54,15 @@ class FastAccessorAssembler {
ValueId IntegerConstant(int int_constant);
ValueId GetReceiver();
ValueId LoadInternalField(ValueId value_id, int field_no);
+
+ // Loads internal field and assumes the object is indeed a valid API object
+ // with the proper internal fields present.
+ // The intended use is to call this on an object whose structure has already
+ // been checked previously, e.g. the accessor's receiver, which is map-checked
+ // before the fast accessor is called on it. Using this on an arbitrary object
+ // will result in unsafe memory accesses.
+ ValueId LoadInternalFieldUnchecked(ValueId value_id, int field_no);
+
ValueId LoadValue(ValueId value_id, int offset);
ValueId LoadObject(ValueId value_id, int offset);
@@ -76,6 +85,7 @@ class FastAccessorAssembler {
LabelId FromRaw(CodeStubAssembler::Label* label);
compiler::Node* FromId(ValueId value) const;
CodeStubAssembler::Label* FromId(LabelId value) const;
+ void CheckIsJSObjectOrJump(ValueId value, LabelId label_id);
vogelheim 2016/08/08 11:47:22 nitpick: Maybe add empty line. The previous 4 meth
Alfonso 2016/08/08 13:03:28 Acknowledged.
void Clear();
Zone* zone() { return &zone_; }

Powered by Google App Engine
This is Rietveld 408576698