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

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

Issue 1362383002: [Interpreter] Add CallRuntime support to the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm32 debug build check errors. 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/bytecode-graph-builder.cc » ('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 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1817 DEFINE_HYDROGEN_CODE_STUB(CompareNilIC, HydrogenCodeStub); 1817 DEFINE_HYDROGEN_CODE_STUB(CompareNilIC, HydrogenCodeStub);
1818 }; 1818 };
1819 1819
1820 1820
1821 std::ostream& operator<<(std::ostream& os, const CompareNilICStub::State& s); 1821 std::ostream& operator<<(std::ostream& os, const CompareNilICStub::State& s);
1822 1822
1823 1823
1824 class CEntryStub : public PlatformCodeStub { 1824 class CEntryStub : public PlatformCodeStub {
1825 public: 1825 public:
1826 CEntryStub(Isolate* isolate, int result_size, 1826 CEntryStub(Isolate* isolate, int result_size,
1827 SaveFPRegsMode save_doubles = kDontSaveFPRegs) 1827 SaveFPRegsMode save_doubles = kDontSaveFPRegs,
1828 ArgvMode argv_mode = kArgvOnStack)
1828 : PlatformCodeStub(isolate) { 1829 : PlatformCodeStub(isolate) {
1829 minor_key_ = SaveDoublesBits::encode(save_doubles == kSaveFPRegs); 1830 minor_key_ = SaveDoublesBits::encode(save_doubles == kSaveFPRegs) |
1831 ArgvMode::encode(argv_mode == kArgvInRegister);
1830 DCHECK(result_size == 1 || result_size == 2); 1832 DCHECK(result_size == 1 || result_size == 2);
1831 #if _WIN64 || V8_TARGET_ARCH_PPC 1833 #if _WIN64 || V8_TARGET_ARCH_PPC
1832 minor_key_ = ResultSizeBits::update(minor_key_, result_size); 1834 minor_key_ = ResultSizeBits::update(minor_key_, result_size);
1833 #endif // _WIN64 1835 #endif // _WIN64
1834 } 1836 }
1835 1837
1836 // The version of this stub that doesn't save doubles is generated ahead of 1838 // The version of this stub that doesn't save doubles is generated ahead of
1837 // time, so it's OK to call it from other stubs that can't cope with GC during 1839 // time, so it's OK to call it from other stubs that can't cope with GC during
1838 // their code generation. On machines that always have gp registers (x64) we 1840 // their code generation. On machines that always have gp registers (x64) we
1839 // can generate both variants ahead of time. 1841 // can generate both variants ahead of time.
1840 static void GenerateAheadOfTime(Isolate* isolate); 1842 static void GenerateAheadOfTime(Isolate* isolate);
1841 1843
1842 private: 1844 private:
1843 bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); } 1845 bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }
1846 bool argv_in_register() const { return ArgvMode::decode(minor_key_); }
1844 #if _WIN64 || V8_TARGET_ARCH_PPC 1847 #if _WIN64 || V8_TARGET_ARCH_PPC
1845 int result_size() const { return ResultSizeBits::decode(minor_key_); } 1848 int result_size() const { return ResultSizeBits::decode(minor_key_); }
1846 #endif // _WIN64 1849 #endif // _WIN64
1847 1850
1848 bool NeedsImmovableCode() override; 1851 bool NeedsImmovableCode() override;
1849 1852
1850 class SaveDoublesBits : public BitField<bool, 0, 1> {}; 1853 class SaveDoublesBits : public BitField<bool, 0, 1> {};
1851 class ResultSizeBits : public BitField<int, 1, 3> {}; 1854 class ArgvMode : public BitField<bool, 1, 1> {};
1855 class ResultSizeBits : public BitField<int, 2, 3> {};
1852 1856
1853 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); 1857 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
1854 DEFINE_PLATFORM_CODE_STUB(CEntry, PlatformCodeStub); 1858 DEFINE_PLATFORM_CODE_STUB(CEntry, PlatformCodeStub);
1855 }; 1859 };
1856 1860
1857 1861
1858 class JSEntryStub : public PlatformCodeStub { 1862 class JSEntryStub : public PlatformCodeStub {
1859 public: 1863 public:
1860 JSEntryStub(Isolate* isolate, StackFrame::Type type) 1864 JSEntryStub(Isolate* isolate, StackFrame::Type type)
1861 : PlatformCodeStub(isolate) { 1865 : PlatformCodeStub(isolate) {
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
3092 #undef DEFINE_HYDROGEN_CODE_STUB 3096 #undef DEFINE_HYDROGEN_CODE_STUB
3093 #undef DEFINE_CODE_STUB 3097 #undef DEFINE_CODE_STUB
3094 #undef DEFINE_CODE_STUB_BASE 3098 #undef DEFINE_CODE_STUB_BASE
3095 3099
3096 extern Representation RepresentationFromType(Type* type); 3100 extern Representation RepresentationFromType(Type* type);
3097 3101
3098 } // namespace internal 3102 } // namespace internal
3099 } // namespace v8 3103 } // namespace v8
3100 3104
3101 #endif // V8_CODE_STUBS_H_ 3105 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698