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

Unified Diff: src/code-stubs.h

Issue 1695633003: [runtime] Turn ArgumentAccessStub into FastNewSloppyArgumentsStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix MIPS dead code 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 8d270d4fca6849f70373753676e69ea9ad6431ee..2fa97bad90f567f18dc2984a490f6fb6ace1d7ff 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -21,7 +21,6 @@ namespace internal {
// List of code stubs used on all platforms.
#define CODE_STUB_LIST_ALL_PLATFORMS(V) \
/* PlatformCodeStubs */ \
- V(ArgumentsAccess) \
V(ArrayConstructor) \
V(BinaryOpICWithAllocationSite) \
V(CallApiFunction) \
@@ -78,7 +77,8 @@ namespace internal {
V(FastNewClosure) \
V(FastNewContext) \
V(FastNewRestParameter) \
- V(FastNewStrictArguments) \
+ V(FastNewSloppyArguments) \
+ V(FastNewStrictArguments) \
V(GrowArrayElements) \
V(InternalArrayNArgumentsConstructor) \
V(InternalArrayNoArgumentConstructor) \
@@ -742,8 +742,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.
+// and easy as the current handwritten version.
+class FastNewSloppyArgumentsStub final : public PlatformCodeStub {
+ public:
+ explicit FastNewSloppyArgumentsStub(Isolate* isolate)
+ : PlatformCodeStub(isolate) {}
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewSloppyArguments);
+ DEFINE_PLATFORM_CODE_STUB(FastNewSloppyArguments, 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.
class FastNewStrictArgumentsStub final : public PlatformCodeStub {
public:
explicit FastNewStrictArgumentsStub(Isolate* isolate)
@@ -1840,43 +1852,6 @@ class JSEntryStub : public PlatformCodeStub {
};
-class ArgumentsAccessStub: public PlatformCodeStub {
- public:
- enum Type {
- NEW_SLOPPY_FAST,
- NEW_SLOPPY_SLOW,
- };
-
- ArgumentsAccessStub(Isolate* isolate, Type type) : PlatformCodeStub(isolate) {
- minor_key_ = TypeBits::encode(type);
- }
-
- CallInterfaceDescriptor GetCallInterfaceDescriptor() const override {
- return ArgumentsAccessNewDescriptor(isolate());
- }
-
- static Type ComputeType(bool has_duplicate_parameters) {
- if (has_duplicate_parameters) {
- return Type::NEW_SLOPPY_SLOW;
- } else {
- return Type::NEW_SLOPPY_FAST;
- }
- }
-
- private:
- Type type() const { return TypeBits::decode(minor_key_); }
-
- void GenerateNewSloppyFast(MacroAssembler* masm);
- void GenerateNewSloppySlow(MacroAssembler* masm);
-
- void PrintName(std::ostream& os) const override; // NOLINT
-
- class TypeBits : public BitField<Type, 0, 1> {};
-
- DEFINE_PLATFORM_CODE_STUB(ArgumentsAccess, PlatformCodeStub);
-};
-
-
class RegExpExecStub: public PlatformCodeStub {
public:
explicit RegExpExecStub(Isolate* isolate) : PlatformCodeStub(isolate) { }
« 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