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

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

Issue 7400019: Encapsulated the AST ID recording a bit, this time for MIPS. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/mips/assembler-mips.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 (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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 // Debugging. 826 // Debugging.
827 827
828 // Mark address of the ExitJSFrame code. 828 // Mark address of the ExitJSFrame code.
829 void RecordJSReturn(); 829 void RecordJSReturn();
830 830
831 // Mark address of a debug break slot. 831 // Mark address of a debug break slot.
832 void RecordDebugBreakSlot(); 832 void RecordDebugBreakSlot();
833 833
834 // Record the AST id of the CallIC being compiled, so that it can be placed 834 // Record the AST id of the CallIC being compiled, so that it can be placed
835 // in the relocation information. 835 // in the relocation information.
836 void RecordAstId(unsigned ast_id) { ast_id_for_reloc_info_ = ast_id; } 836 void SetRecordedAstId(unsigned ast_id) {
837 ASSERT(recorded_ast_id_ == kNoASTId);
838 recorded_ast_id_ = ast_id;
839 }
840
841 unsigned RecordedAstId() {
842 ASSERT(recorded_ast_id_ != kNoASTId);
843 return recorded_ast_id_;
844 }
845
846 void ClearRecordedAstId() { recorded_ast_id_ = kNoASTId; }
837 847
838 // Record a comment relocation entry that can be used by a disassembler. 848 // Record a comment relocation entry that can be used by a disassembler.
839 // Use --code-comments to enable. 849 // Use --code-comments to enable.
840 void RecordComment(const char* msg); 850 void RecordComment(const char* msg);
841 851
842 static int RelocateInternalReference(byte* pc, intptr_t pc_delta); 852 static int RelocateInternalReference(byte* pc, intptr_t pc_delta);
843 853
844 // Writes a single byte or word of data in the code stream. Used for 854 // Writes a single byte or word of data in the code stream. Used for
845 // inline tables, e.g., jump-tables. 855 // inline tables, e.g., jump-tables.
846 void db(uint8_t data); 856 void db(uint8_t data);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 static Instr SetAddImmediateOffset(Instr instr, int16_t offset); 929 static Instr SetAddImmediateOffset(Instr instr, int16_t offset);
920 930
921 static bool IsAndImmediate(Instr instr); 931 static bool IsAndImmediate(Instr instr);
922 932
923 void CheckTrampolinePool(); 933 void CheckTrampolinePool();
924 934
925 protected: 935 protected:
926 // Relocation for a type-recording IC has the AST id added to it. This 936 // Relocation for a type-recording IC has the AST id added to it. This
927 // member variable is a way to pass the information from the call site to 937 // member variable is a way to pass the information from the call site to
928 // the relocation info. 938 // the relocation info.
929 unsigned ast_id_for_reloc_info_; 939 unsigned recorded_ast_id_;
930 940
931 bool emit_debug_code() const { return emit_debug_code_; } 941 bool emit_debug_code() const { return emit_debug_code_; }
932 942
933 int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; } 943 int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; }
934 944
935 // Decode branch instruction at pos and return branch target pos. 945 // Decode branch instruction at pos and return branch target pos.
936 int target_at(int32_t pos); 946 int target_at(int32_t pos);
937 947
938 // Patch branch instruction at pos to branch to given branch target pos. 948 // Patch branch instruction at pos to branch to given branch target pos.
939 void target_at_put(int32_t pos, int32_t target_pos); 949 void target_at_put(int32_t pos, int32_t target_pos);
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 class EnsureSpace BASE_EMBEDDED { 1196 class EnsureSpace BASE_EMBEDDED {
1187 public: 1197 public:
1188 explicit EnsureSpace(Assembler* assembler) { 1198 explicit EnsureSpace(Assembler* assembler) {
1189 assembler->CheckBuffer(); 1199 assembler->CheckBuffer();
1190 } 1200 }
1191 }; 1201 };
1192 1202
1193 } } // namespace v8::internal 1203 } } // namespace v8::internal
1194 1204
1195 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1205 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « no previous file | src/mips/assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698