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

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: Revert 'deferred' label Created 4 years, 4 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
« no previous file with comments | « src/api-experimental.cc ('k') | src/fast-accessor-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fast-accessor-assembler.h
diff --git a/src/fast-accessor-assembler.h b/src/fast-accessor-assembler.h
index 41337a2b09d8883efd2243e785040da4db4bfde3..b9bfdc5aaef824869988de8da4f012c1ee5ceefc 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);
@@ -77,6 +86,8 @@ class FastAccessorAssembler {
compiler::Node* FromId(ValueId value) const;
CodeStubAssembler::Label* FromId(LabelId value) const;
+ void CheckIsJSObjectOrJump(ValueId value, LabelId label_id);
+
void Clear();
Zone* zone() { return &zone_; }
Isolate* isolate() const { return isolate_; }
« no previous file with comments | « src/api-experimental.cc ('k') | src/fast-accessor-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698