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

Side by Side Diff: src/code-stubs.h

Issue 1348773002: [turbofan] Call ArgumentsAccessStub to materialize arguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/code-factory.cc ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 NEW_STRICT 1892 NEW_STRICT
1893 }; 1893 };
1894 1894
1895 ArgumentsAccessStub(Isolate* isolate, Type type) : PlatformCodeStub(isolate) { 1895 ArgumentsAccessStub(Isolate* isolate, Type type) : PlatformCodeStub(isolate) {
1896 minor_key_ = TypeBits::encode(type); 1896 minor_key_ = TypeBits::encode(type);
1897 } 1897 }
1898 1898
1899 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { 1899 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override {
1900 if (type() == READ_ELEMENT) { 1900 if (type() == READ_ELEMENT) {
1901 return ArgumentsAccessReadDescriptor(isolate()); 1901 return ArgumentsAccessReadDescriptor(isolate());
1902 } else {
1903 return ArgumentsAccessNewDescriptor(isolate());
1902 } 1904 }
1903 return ContextOnlyDescriptor(isolate()); 1905 }
1906
1907 static Type ComputeType(bool is_unmapped, bool has_duplicate_parameters) {
1908 if (is_unmapped) {
1909 return Type::NEW_STRICT;
1910 } else if (has_duplicate_parameters) {
1911 return Type::NEW_SLOPPY_SLOW;
1912 } else {
1913 return Type::NEW_SLOPPY_FAST;
1914 }
1904 } 1915 }
1905 1916
1906 private: 1917 private:
1907 Type type() const { return TypeBits::decode(minor_key_); } 1918 Type type() const { return TypeBits::decode(minor_key_); }
1908 1919
1909 void GenerateReadElement(MacroAssembler* masm); 1920 void GenerateReadElement(MacroAssembler* masm);
1910 void GenerateNewStrict(MacroAssembler* masm); 1921 void GenerateNewStrict(MacroAssembler* masm);
1911 void GenerateNewSloppyFast(MacroAssembler* masm); 1922 void GenerateNewSloppyFast(MacroAssembler* masm);
1912 void GenerateNewSloppySlow(MacroAssembler* masm); 1923 void GenerateNewSloppySlow(MacroAssembler* masm);
1913 1924
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 #undef DEFINE_HYDROGEN_CODE_STUB 3091 #undef DEFINE_HYDROGEN_CODE_STUB
3081 #undef DEFINE_CODE_STUB 3092 #undef DEFINE_CODE_STUB
3082 #undef DEFINE_CODE_STUB_BASE 3093 #undef DEFINE_CODE_STUB_BASE
3083 3094
3084 extern Representation RepresentationFromType(Type* type); 3095 extern Representation RepresentationFromType(Type* type);
3085 3096
3086 } // namespace internal 3097 } // namespace internal
3087 } // namespace v8 3098 } // namespace v8
3088 3099
3089 #endif // V8_CODE_STUBS_H_ 3100 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698