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

Unified Diff: src/crankshaft/hydrogen-instructions.h

Issue 1816553002: Introduce a code stub version of Array.prototype.push (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup Created 4 years, 9 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/crankshaft/hydrogen-instructions.h
diff --git a/src/crankshaft/hydrogen-instructions.h b/src/crankshaft/hydrogen-instructions.h
index 4035e79d844db2a67ba6321cc554a127e9d8eb0d..f952401f69d67ea95423513818f179e6ac9a5f4c 100644
--- a/src/crankshaft/hydrogen-instructions.h
+++ b/src/crankshaft/hydrogen-instructions.h
@@ -3826,6 +3826,7 @@ class HApplyArguments final : public HTemplateInstruction<4> {
class HArgumentsElements final : public HTemplateInstruction<0> {
public:
DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsElements, bool);
+ DECLARE_INSTRUCTION_FACTORY_P2(HArgumentsElements, bool, bool);
DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements)
@@ -3834,12 +3835,14 @@ class HArgumentsElements final : public HTemplateInstruction<0> {
}
bool from_inlined() const { return from_inlined_; }
+ bool arguments_adaptor() const { return arguments_adaptor_; }
protected:
bool DataEquals(HValue* other) override { return true; }
private:
- explicit HArgumentsElements(bool from_inlined) : from_inlined_(from_inlined) {
+ explicit HArgumentsElements(bool from_inlined, bool arguments_adaptor = true)
+ : from_inlined_(from_inlined), arguments_adaptor_(arguments_adaptor) {
// The value produced by this instruction is a pointer into the stack
// that looks as if it was a smi because of alignment.
set_representation(Representation::Tagged());
@@ -3849,6 +3852,7 @@ class HArgumentsElements final : public HTemplateInstruction<0> {
bool IsDeletable() const override { return true; }
bool from_inlined_;
+ bool arguments_adaptor_;
};
@@ -5854,6 +5858,10 @@ class HObjectAccess final {
Representation::Integer32());
}
+ static HObjectAccess ForMapDescriptors() {
+ return HObjectAccess(kInobject, Map::kDescriptorsOffset);
+ }
+
static HObjectAccess ForNameHashField() {
return HObjectAccess(kInobject,
Name::kHashFieldOffset,

Powered by Google App Engine
This is Rietveld 408576698