Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index a63915b4667b5eacc1bd4d842fa4770790c30219..3da1cc56248408a33a2176fd0eb195148780d2c6 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -78,6 +78,7 @@ namespace internal { |
V(FastNewClosure) \ |
V(FastNewContext) \ |
V(FastNewRestParameter) \ |
+ V(FastNewStrictArguments) \ |
V(GrowArrayElements) \ |
V(InternalArrayNArgumentsConstructor) \ |
V(InternalArrayNoArgumentConstructor) \ |
@@ -739,6 +740,20 @@ class FastNewRestParameterStub final : public PlatformCodeStub { |
}; |
+// TODO(turbofan): This stub should be possible to write in TurboFan |
+// using the CodeStubAssembler very soon in a way that is as efficient |
+// and easy as the current handwritten version, which is partly a copy |
+// of the strict arguments object materialization code. |
+class FastNewStrictArgumentsStub final : public PlatformCodeStub { |
+ public: |
+ explicit FastNewStrictArgumentsStub(Isolate* isolate) |
+ : PlatformCodeStub(isolate) {} |
+ |
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewStrictArguments); |
+ DEFINE_PLATFORM_CODE_STUB(FastNewStrictArguments, PlatformCodeStub); |
+}; |
+ |
+ |
class FastCloneRegExpStub final : public HydrogenCodeStub { |
public: |
explicit FastCloneRegExpStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} |
@@ -1831,7 +1846,6 @@ class ArgumentsAccessStub: public PlatformCodeStub { |
READ_ELEMENT, |
NEW_SLOPPY_FAST, |
NEW_SLOPPY_SLOW, |
- NEW_STRICT |
}; |
ArgumentsAccessStub(Isolate* isolate, Type type) : PlatformCodeStub(isolate) { |
@@ -1846,10 +1860,8 @@ class ArgumentsAccessStub: public PlatformCodeStub { |
} |
} |
- static Type ComputeType(bool is_unmapped, bool has_duplicate_parameters) { |
- if (is_unmapped) { |
- return Type::NEW_STRICT; |
- } else if (has_duplicate_parameters) { |
+ static Type ComputeType(bool has_duplicate_parameters) { |
+ if (has_duplicate_parameters) { |
return Type::NEW_SLOPPY_SLOW; |
} else { |
return Type::NEW_SLOPPY_FAST; |
@@ -1860,7 +1872,6 @@ class ArgumentsAccessStub: public PlatformCodeStub { |
Type type() const { return TypeBits::decode(minor_key_); } |
void GenerateReadElement(MacroAssembler* masm); |
- void GenerateNewStrict(MacroAssembler* masm); |
void GenerateNewSloppyFast(MacroAssembler* masm); |
void GenerateNewSloppySlow(MacroAssembler* masm); |