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

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

Issue 11312165: Refactoring: Make emit_debug_code flag handling architecture-independent. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 | « src/ia32/assembler-ia32.cc ('k') | 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 // buffer, and buffer_size determines the initial buffer size. The buffer is 518 // buffer, and buffer_size determines the initial buffer size. The buffer is
519 // owned by the assembler and deallocated upon destruction of the assembler. 519 // owned by the assembler and deallocated upon destruction of the assembler.
520 // 520 //
521 // If the provided buffer is not NULL, the assembler uses the provided buffer 521 // If the provided buffer is not NULL, the assembler uses the provided buffer
522 // for code generation and assumes its size to be buffer_size. If the buffer 522 // for code generation and assumes its size to be buffer_size. If the buffer
523 // is too small, a fatal error occurs. No deallocation of the buffer is done 523 // is too small, a fatal error occurs. No deallocation of the buffer is done
524 // upon destruction of the assembler. 524 // upon destruction of the assembler.
525 Assembler(Isolate* isolate, void* buffer, int buffer_size); 525 Assembler(Isolate* isolate, void* buffer, int buffer_size);
526 ~Assembler(); 526 ~Assembler();
527 527
528 // Overrides the default provided by FLAG_debug_code.
529 void set_emit_debug_code(bool value) { emit_debug_code_ = value; }
530
531 // Dummy for cross platform compatibility. 528 // Dummy for cross platform compatibility.
532 void set_predictable_code_size(bool value) { } 529 void set_predictable_code_size(bool value) { }
533 530
534 // GetCode emits any pending (non-emitted) code and fills the descriptor 531 // GetCode emits any pending (non-emitted) code and fills the descriptor
535 // desc. GetCode() is idempotent; it returns the same result if no other 532 // desc. GetCode() is idempotent; it returns the same result if no other
536 // Assembler functions are invoked in between GetCode() calls. 533 // Assembler functions are invoked in between GetCode() calls.
537 void GetCode(CodeDesc* desc); 534 void GetCode(CodeDesc* desc);
538 535
539 // Label operations & relative jumps (PPUM Appendix D). 536 // Label operations & relative jumps (PPUM Appendix D).
540 // 537 //
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 static bool IsAndImmediate(Instr instr); 1023 static bool IsAndImmediate(Instr instr);
1027 1024
1028 void CheckTrampolinePool(); 1025 void CheckTrampolinePool();
1029 1026
1030 protected: 1027 protected:
1031 // Relocation for a type-recording IC has the AST id added to it. This 1028 // Relocation for a type-recording IC has the AST id added to it. This
1032 // member variable is a way to pass the information from the call site to 1029 // member variable is a way to pass the information from the call site to
1033 // the relocation info. 1030 // the relocation info.
1034 TypeFeedbackId recorded_ast_id_; 1031 TypeFeedbackId recorded_ast_id_;
1035 1032
1036 bool emit_debug_code() const { return emit_debug_code_; }
1037
1038 int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; } 1033 int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; }
1039 1034
1040 // Decode branch instruction at pos and return branch target pos. 1035 // Decode branch instruction at pos and return branch target pos.
1041 int target_at(int32_t pos); 1036 int target_at(int32_t pos);
1042 1037
1043 // Patch branch instruction at pos to branch to given branch target pos. 1038 // Patch branch instruction at pos to branch to given branch target pos.
1044 void target_at_put(int32_t pos, int32_t target_pos); 1039 void target_at_put(int32_t pos, int32_t target_pos);
1045 1040
1046 // Say if we need to relocate with this mode. 1041 // Say if we need to relocate with this mode.
1047 bool MustUseReg(RelocInfo::Mode rmode); 1042 bool MustUseReg(RelocInfo::Mode rmode);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 1273
1279 Trampoline trampoline_; 1274 Trampoline trampoline_;
1280 bool internal_trampoline_exception_; 1275 bool internal_trampoline_exception_;
1281 1276
1282 friend class RegExpMacroAssemblerMIPS; 1277 friend class RegExpMacroAssemblerMIPS;
1283 friend class RelocInfo; 1278 friend class RelocInfo;
1284 friend class CodePatcher; 1279 friend class CodePatcher;
1285 friend class BlockTrampolinePoolScope; 1280 friend class BlockTrampolinePoolScope;
1286 1281
1287 PositionsRecorder positions_recorder_; 1282 PositionsRecorder positions_recorder_;
1288 bool emit_debug_code_;
1289 friend class PositionsRecorder; 1283 friend class PositionsRecorder;
1290 friend class EnsureSpace; 1284 friend class EnsureSpace;
1291 }; 1285 };
1292 1286
1293 1287
1294 class EnsureSpace BASE_EMBEDDED { 1288 class EnsureSpace BASE_EMBEDDED {
1295 public: 1289 public:
1296 explicit EnsureSpace(Assembler* assembler) { 1290 explicit EnsureSpace(Assembler* assembler) {
1297 assembler->CheckBuffer(); 1291 assembler->CheckBuffer();
1298 } 1292 }
1299 }; 1293 };
1300 1294
1301 } } // namespace v8::internal 1295 } } // namespace v8::internal
1302 1296
1303 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1297 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/mips/assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698