OLD | NEW |
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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 // Debugging. | 905 // Debugging. |
906 | 906 |
907 // Mark address of the ExitJSFrame code. | 907 // Mark address of the ExitJSFrame code. |
908 void RecordJSReturn(); | 908 void RecordJSReturn(); |
909 | 909 |
910 // Mark address of a debug break slot. | 910 // Mark address of a debug break slot. |
911 void RecordDebugBreakSlot(); | 911 void RecordDebugBreakSlot(); |
912 | 912 |
913 // Record the AST id of the CallIC being compiled, so that it can be placed | 913 // Record the AST id of the CallIC being compiled, so that it can be placed |
914 // in the relocation information. | 914 // in the relocation information. |
915 void SetRecordedAstId(unsigned ast_id) { | 915 void SetRecordedAstId(TypeFeedbackId ast_id) { |
916 ASSERT(recorded_ast_id_ == kNoASTId); | 916 ASSERT(recorded_ast_id_.IsNone()); |
917 recorded_ast_id_ = ast_id; | 917 recorded_ast_id_ = ast_id; |
918 } | 918 } |
919 | 919 |
920 unsigned RecordedAstId() { | 920 TypeFeedbackId RecordedAstId() { |
921 ASSERT(recorded_ast_id_ != kNoASTId); | 921 ASSERT(!recorded_ast_id_.IsNone()); |
922 return recorded_ast_id_; | 922 return recorded_ast_id_; |
923 } | 923 } |
924 | 924 |
925 void ClearRecordedAstId() { recorded_ast_id_ = kNoASTId; } | 925 void ClearRecordedAstId() { recorded_ast_id_ = TypeFeedbackId::None(); } |
926 | 926 |
927 // Record a comment relocation entry that can be used by a disassembler. | 927 // Record a comment relocation entry that can be used by a disassembler. |
928 // Use --code-comments to enable. | 928 // Use --code-comments to enable. |
929 void RecordComment(const char* msg); | 929 void RecordComment(const char* msg); |
930 | 930 |
931 static int RelocateInternalReference(byte* pc, intptr_t pc_delta); | 931 static int RelocateInternalReference(byte* pc, intptr_t pc_delta); |
932 | 932 |
933 // Writes a single byte or word of data in the code stream. Used for | 933 // Writes a single byte or word of data in the code stream. Used for |
934 // inline tables, e.g., jump-tables. | 934 // inline tables, e.g., jump-tables. |
935 void db(uint8_t data); | 935 void db(uint8_t data); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 static Instr SetAddImmediateOffset(Instr instr, int16_t offset); | 1012 static Instr SetAddImmediateOffset(Instr instr, int16_t offset); |
1013 | 1013 |
1014 static bool IsAndImmediate(Instr instr); | 1014 static bool IsAndImmediate(Instr instr); |
1015 | 1015 |
1016 void CheckTrampolinePool(); | 1016 void CheckTrampolinePool(); |
1017 | 1017 |
1018 protected: | 1018 protected: |
1019 // Relocation for a type-recording IC has the AST id added to it. This | 1019 // Relocation for a type-recording IC has the AST id added to it. This |
1020 // member variable is a way to pass the information from the call site to | 1020 // member variable is a way to pass the information from the call site to |
1021 // the relocation info. | 1021 // the relocation info. |
1022 unsigned recorded_ast_id_; | 1022 TypeFeedbackId recorded_ast_id_; |
1023 | 1023 |
1024 bool emit_debug_code() const { return emit_debug_code_; } | 1024 bool emit_debug_code() const { return emit_debug_code_; } |
1025 | 1025 |
1026 int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; } | 1026 int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; } |
1027 | 1027 |
1028 // Decode branch instruction at pos and return branch target pos. | 1028 // Decode branch instruction at pos and return branch target pos. |
1029 int target_at(int32_t pos); | 1029 int target_at(int32_t pos); |
1030 | 1030 |
1031 // Patch branch instruction at pos to branch to given branch target pos. | 1031 // Patch branch instruction at pos to branch to given branch target pos. |
1032 void target_at_put(int32_t pos, int32_t target_pos); | 1032 void target_at_put(int32_t pos, int32_t target_pos); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 class EnsureSpace BASE_EMBEDDED { | 1282 class EnsureSpace BASE_EMBEDDED { |
1283 public: | 1283 public: |
1284 explicit EnsureSpace(Assembler* assembler) { | 1284 explicit EnsureSpace(Assembler* assembler) { |
1285 assembler->CheckBuffer(); | 1285 assembler->CheckBuffer(); |
1286 } | 1286 } |
1287 }; | 1287 }; |
1288 | 1288 |
1289 } } // namespace v8::internal | 1289 } } // namespace v8::internal |
1290 | 1290 |
1291 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 1291 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
OLD | NEW |