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

Side by Side Diff: src/ia32/assembler-ia32.h

Issue 196077: X64: Extract all smi operations into MacroAssembler macros. (Closed)
Patch Set: Created 11 years, 3 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 | « no previous file | src/x64/assembler-x64.h » ('j') | src/x64/builtins-x64.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 }; 842 };
843 843
844 844
845 // Helper class that ensures that there is enough space for generating 845 // Helper class that ensures that there is enough space for generating
846 // instructions and relocation information. The constructor makes 846 // instructions and relocation information. The constructor makes
847 // sure that there is enough space and (in debug mode) the destructor 847 // sure that there is enough space and (in debug mode) the destructor
848 // checks that we did not generate too much. 848 // checks that we did not generate too much.
849 class EnsureSpace BASE_EMBEDDED { 849 class EnsureSpace BASE_EMBEDDED {
850 public: 850 public:
851 explicit EnsureSpace(Assembler* assembler) : assembler_(assembler) { 851 explicit EnsureSpace(Assembler* assembler) : assembler_(assembler) {
852 if (assembler_->overflow()) assembler_->GrowBuffer(); 852 if (assembler_->buffer_overflow()) assembler_->GrowBuffer();
853 #ifdef DEBUG 853 #ifdef DEBUG
854 space_before_ = assembler_->available_space(); 854 space_before_ = assembler_->available_space();
855 #endif 855 #endif
856 } 856 }
857 857
858 #ifdef DEBUG 858 #ifdef DEBUG
859 ~EnsureSpace() { 859 ~EnsureSpace() {
860 int bytes_generated = space_before_ - assembler_->available_space(); 860 int bytes_generated = space_before_ - assembler_->available_space();
861 ASSERT(bytes_generated < assembler_->kGap); 861 ASSERT(bytes_generated < assembler_->kGap);
862 } 862 }
863 #endif 863 #endif
864 864
865 private: 865 private:
866 Assembler* assembler_; 866 Assembler* assembler_;
867 #ifdef DEBUG 867 #ifdef DEBUG
868 int space_before_; 868 int space_before_;
869 #endif 869 #endif
870 }; 870 };
871 871
872 } } // namespace v8::internal 872 } } // namespace v8::internal
873 873
874 #endif // V8_IA32_ASSEMBLER_IA32_H_ 874 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | src/x64/assembler-x64.h » ('j') | src/x64/builtins-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698