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

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

Issue 1576093004: [Interpreter] Add ForInPrepare runtime function which returns a ObjectTriple. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add MIPS port Created 4 years, 11 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/assembler.cc ('k') | src/compiler/linkage.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 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 1739
1740 1740
1741 class CEntryStub : public PlatformCodeStub { 1741 class CEntryStub : public PlatformCodeStub {
1742 public: 1742 public:
1743 CEntryStub(Isolate* isolate, int result_size, 1743 CEntryStub(Isolate* isolate, int result_size,
1744 SaveFPRegsMode save_doubles = kDontSaveFPRegs, 1744 SaveFPRegsMode save_doubles = kDontSaveFPRegs,
1745 ArgvMode argv_mode = kArgvOnStack) 1745 ArgvMode argv_mode = kArgvOnStack)
1746 : PlatformCodeStub(isolate) { 1746 : PlatformCodeStub(isolate) {
1747 minor_key_ = SaveDoublesBits::encode(save_doubles == kSaveFPRegs) | 1747 minor_key_ = SaveDoublesBits::encode(save_doubles == kSaveFPRegs) |
1748 ArgvMode::encode(argv_mode == kArgvInRegister); 1748 ArgvMode::encode(argv_mode == kArgvInRegister);
1749 DCHECK(result_size == 1 || result_size == 2); 1749 DCHECK(result_size == 1 || result_size == 2 || result_size == 3);
1750 #if _WIN64 || V8_TARGET_ARCH_PPC
1751 minor_key_ = ResultSizeBits::update(minor_key_, result_size); 1750 minor_key_ = ResultSizeBits::update(minor_key_, result_size);
1752 #endif // _WIN64
1753 } 1751 }
1754 1752
1755 // The version of this stub that doesn't save doubles is generated ahead of 1753 // The version of this stub that doesn't save doubles is generated ahead of
1756 // time, so it's OK to call it from other stubs that can't cope with GC during 1754 // time, so it's OK to call it from other stubs that can't cope with GC during
1757 // their code generation. On machines that always have gp registers (x64) we 1755 // their code generation. On machines that always have gp registers (x64) we
1758 // can generate both variants ahead of time. 1756 // can generate both variants ahead of time.
1759 static void GenerateAheadOfTime(Isolate* isolate); 1757 static void GenerateAheadOfTime(Isolate* isolate);
1760 1758
1761 private: 1759 private:
1762 bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); } 1760 bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }
1763 bool argv_in_register() const { return ArgvMode::decode(minor_key_); } 1761 bool argv_in_register() const { return ArgvMode::decode(minor_key_); }
1764 #if _WIN64 || V8_TARGET_ARCH_PPC
1765 int result_size() const { return ResultSizeBits::decode(minor_key_); } 1762 int result_size() const { return ResultSizeBits::decode(minor_key_); }
1766 #endif // _WIN64
1767 1763
1768 bool NeedsImmovableCode() override; 1764 bool NeedsImmovableCode() override;
1769 1765
1770 class SaveDoublesBits : public BitField<bool, 0, 1> {}; 1766 class SaveDoublesBits : public BitField<bool, 0, 1> {};
1771 class ArgvMode : public BitField<bool, 1, 1> {}; 1767 class ArgvMode : public BitField<bool, 1, 1> {};
1772 class ResultSizeBits : public BitField<int, 2, 3> {}; 1768 class ResultSizeBits : public BitField<int, 2, 3> {};
1773 1769
1774 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); 1770 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
1775 DEFINE_PLATFORM_CODE_STUB(CEntry, PlatformCodeStub); 1771 DEFINE_PLATFORM_CODE_STUB(CEntry, PlatformCodeStub);
1776 }; 1772 };
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
2974 #undef DEFINE_HYDROGEN_CODE_STUB 2970 #undef DEFINE_HYDROGEN_CODE_STUB
2975 #undef DEFINE_CODE_STUB 2971 #undef DEFINE_CODE_STUB
2976 #undef DEFINE_CODE_STUB_BASE 2972 #undef DEFINE_CODE_STUB_BASE
2977 2973
2978 extern Representation RepresentationFromType(Type* type); 2974 extern Representation RepresentationFromType(Type* type);
2979 2975
2980 } // namespace internal 2976 } // namespace internal
2981 } // namespace v8 2977 } // namespace v8
2982 2978
2983 #endif // V8_CODE_STUBS_H_ 2979 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698