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

Unified Diff: src/code-stubs.h

Issue 1100083002: Don't MISS if you read the hole from certain FastHoley arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE and fix arm64 compilation. Created 5 years, 8 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/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index a6bd45f876b984d655ae5bc82a9f5ccfe25c4798..f832f40dd450eb89a3cadba194df13c630ea800f 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -2228,13 +2228,19 @@ class StoreScriptContextFieldStub : public ScriptContextFieldStub {
class LoadFastElementStub : public HydrogenCodeStub {
public:
LoadFastElementStub(Isolate* isolate, bool is_js_array,
- ElementsKind elements_kind)
+ ElementsKind elements_kind,
+ bool convert_hole_to_undefined = false)
: HydrogenCodeStub(isolate) {
- set_sub_minor_key(ElementsKindBits::encode(elements_kind) |
- IsJSArrayBits::encode(is_js_array));
+ set_sub_minor_key(
+ ElementsKindBits::encode(elements_kind) |
+ IsJSArrayBits::encode(is_js_array) |
+ CanConvertHoleToUndefined::encode(convert_hole_to_undefined));
}
bool is_js_array() const { return IsJSArrayBits::decode(sub_minor_key()); }
+ bool convert_hole_to_undefined() const {
+ return CanConvertHoleToUndefined::decode(sub_minor_key());
+ }
ElementsKind elements_kind() const {
return ElementsKindBits::decode(sub_minor_key());
@@ -2243,6 +2249,7 @@ class LoadFastElementStub : public HydrogenCodeStub {
private:
class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
class IsJSArrayBits: public BitField<bool, 8, 1> {};
+ class CanConvertHoleToUndefined : public BitField<bool, 9, 1> {};
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
if (FLAG_vector_ics) {
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698