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

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: 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..452684ff5680aeeecbecfb944b274e65416be531 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);
+
+ // Unsafe but fast version, does NOT perform any sanity checks.
vogelheim 2016/07/27 09:50:56 nitpick: Your description is correct, but unnecess
Alfonso 2016/07/28 14:39:13 Acknowledged. I lost objectivity.
+ // This is plain unsafe, basically gives read access to memory.
+ // Use ONLY if can be verified 100% that all access paths have proper
+ // checks; and the checks are indeed redundant. Security have clear priority
+ // over performance, there's no trade-off to play here. Use the safe method
+ // otherwise, it's quite fast.
+ ValueId LoadInternalFieldUnsafe(ValueId value_id, int field_no);
+
ValueId LoadValue(ValueId value_id, int offset);
ValueId LoadObject(ValueId value_id, int offset);

Powered by Google App Engine
This is Rietveld 408576698