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

Unified Diff: src/hydrogen-instructions.h

Issue 1086873003: Array() in optimized code can create with wrong ElementsKind in corner cases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments and test failure. 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/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('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 0e5e1b6a9bf12241c19aeb8c4bb366894688fce6..2307f9dcc1bec32feef7547162857c016a3f74a0 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -2430,10 +2430,9 @@ class HCallNew FINAL : public HBinaryCall {
class HCallNewArray FINAL : public HBinaryCall {
public:
- DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallNewArray,
- HValue*,
- int,
- ElementsKind);
+ DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HCallNewArray, HValue*, int,
+ ElementsKind,
+ Handle<AllocationSite>);
HValue* context() { return first(); }
HValue* constructor() { return second(); }
@@ -2441,16 +2440,19 @@ class HCallNewArray FINAL : public HBinaryCall {
std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT
ElementsKind elements_kind() const { return elements_kind_; }
+ Handle<AllocationSite> site() const { return site_; }
DECLARE_CONCRETE_INSTRUCTION(CallNewArray)
private:
HCallNewArray(HValue* context, HValue* constructor, int argument_count,
- ElementsKind elements_kind)
+ ElementsKind elements_kind, Handle<AllocationSite> site)
: HBinaryCall(context, constructor, argument_count),
- elements_kind_(elements_kind) {}
+ elements_kind_(elements_kind),
+ site_(site) {}
ElementsKind elements_kind_;
+ Handle<AllocationSite> site_;
};
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698