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

Unified Diff: src/hydrogen-instructions.h

Issue 892383003: emit premonomorphic ics for loads/stores in optimized code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: wire up stores Created 5 years, 10 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
« src/code-factory.cc ('K') | « src/hydrogen.cc ('k') | src/ic/ic.h » ('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 d02a3488e96384698d2cd9f1c4f478549c1d2800..6fa8e62edb23952f537a37363a6f69b7aa9bbfc0 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -6568,13 +6568,14 @@ class HLoadNamedField FINAL : public HTemplateInstruction<2> {
class HLoadNamedGeneric FINAL : public HTemplateInstruction<2> {
public:
- DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HLoadNamedGeneric, HValue*,
- Handle<Object>);
+ DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadNamedGeneric, HValue*,
+ Handle<Object>, bool);
HValue* context() const { return OperandAt(0); }
HValue* object() const { return OperandAt(1); }
Handle<Object> name() const { return name_; }
+ bool emit_megamorphic() const { return emit_megamorphic_; }
FeedbackVectorICSlot slot() const { return slot_; }
Handle<TypeFeedbackVector> feedback_vector() const {
return feedback_vector_;
@@ -6596,8 +6597,11 @@ class HLoadNamedGeneric FINAL : public HTemplateInstruction<2> {
DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric)
private:
- HLoadNamedGeneric(HValue* context, HValue* object, Handle<Object> name)
- : name_(name), slot_(FeedbackVectorICSlot::Invalid()) {
+ HLoadNamedGeneric(HValue* context, HValue* object, Handle<Object> name,
+ bool emit_megamorphic)
+ : name_(name),
+ slot_(FeedbackVectorICSlot::Invalid()),
+ emit_megamorphic_(emit_megamorphic) {
SetOperandAt(0, context);
SetOperandAt(1, object);
set_representation(Representation::Tagged());
@@ -6607,6 +6611,7 @@ class HLoadNamedGeneric FINAL : public HTemplateInstruction<2> {
Handle<Object> name_;
Handle<TypeFeedbackVector> feedback_vector_;
FeedbackVectorICSlot slot_;
+ bool emit_megamorphic_;
};
@@ -7060,14 +7065,15 @@ class HStoreNamedField FINAL : public HTemplateInstruction<3> {
class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> {
public:
- DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreNamedGeneric, HValue*,
+ DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(HStoreNamedGeneric, HValue*,
Handle<String>, HValue*,
- LanguageMode);
+ LanguageMode, bool);
HValue* object() const { return OperandAt(0); }
HValue* value() const { return OperandAt(1); }
HValue* context() const { return OperandAt(2); }
Handle<String> name() const { return name_; }
LanguageMode language_mode() const { return language_mode_; }
+ bool emit_megamorphic() const { return emit_megamorphic_; }
std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT
@@ -7079,8 +7085,11 @@ class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> {
private:
HStoreNamedGeneric(HValue* context, HValue* object, Handle<String> name,
- HValue* value, LanguageMode language_mode)
- : name_(name), language_mode_(language_mode) {
+ HValue* value, LanguageMode language_mode,
+ bool emit_megamorphic)
+ : name_(name),
+ language_mode_(language_mode),
+ emit_megamorphic_(emit_megamorphic) {
SetOperandAt(0, object);
SetOperandAt(1, value);
SetOperandAt(2, context);
@@ -7089,6 +7098,7 @@ class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> {
Handle<String> name_;
LanguageMode language_mode_;
+ bool emit_megamorphic_;
};
« src/code-factory.cc ('K') | « src/hydrogen.cc ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698