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

Unified Diff: src/code-stubs.h

Issue 1693513002: [runtime] Introduce FastNewStrictArgumentsStub to optimize strict arguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips and mips64. Created 4 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
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.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 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);
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698