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

Side by Side Diff: src/assembler.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/arm/assembler-arm.cc ('k') | src/assembler.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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // ----------------------------------------------------------------------------- 54 // -----------------------------------------------------------------------------
55 // Platform independent assembler base class. 55 // Platform independent assembler base class.
56 56
57 class AssemblerBase: public Malloced { 57 class AssemblerBase: public Malloced {
58 public: 58 public:
59 explicit AssemblerBase(Isolate* isolate); 59 explicit AssemblerBase(Isolate* isolate);
60 60
61 Isolate* isolate() const { return isolate_; } 61 Isolate* isolate() const { return isolate_; }
62 int jit_cookie() const { return jit_cookie_; } 62 int jit_cookie() const { return jit_cookie_; }
63 63
64 bool emit_debug_code() const { return emit_debug_code_; }
65 void set_emit_debug_code(bool value) { emit_debug_code_ = value; }
66
64 bool predictable_code_size() const { return predictable_code_size_; } 67 bool predictable_code_size() const { return predictable_code_size_; }
65 void set_predictable_code_size(bool value) { predictable_code_size_ = value; } 68 void set_predictable_code_size(bool value) { predictable_code_size_ = value; }
66 69
67 // Overwrite a host NaN with a quiet target NaN. Used by mksnapshot for 70 // Overwrite a host NaN with a quiet target NaN. Used by mksnapshot for
68 // cross-snapshotting. 71 // cross-snapshotting.
69 static void QuietNaN(HeapObject* nan) { } 72 static void QuietNaN(HeapObject* nan) { }
70 73
71 private: 74 private:
72 Isolate* isolate_; 75 Isolate* isolate_;
73 int jit_cookie_; 76 int jit_cookie_;
77 bool emit_debug_code_;
74 bool predictable_code_size_; 78 bool predictable_code_size_;
75 }; 79 };
76 80
77 81
78 // Avoids using instructions that vary in size in unpredictable ways between the 82 // Avoids using instructions that vary in size in unpredictable ways between the
79 // snapshot and the running VM. 83 // snapshot and the running VM.
80 class PredictableCodeSizeScope { 84 class PredictableCodeSizeScope {
81 public: 85 public:
82 explicit PredictableCodeSizeScope(AssemblerBase* assembler) 86 explicit PredictableCodeSizeScope(AssemblerBase* assembler)
83 : assembler_(assembler) { 87 : assembler_(assembler) {
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 public: 937 public:
934 NullCallWrapper() { } 938 NullCallWrapper() { }
935 virtual ~NullCallWrapper() { } 939 virtual ~NullCallWrapper() { }
936 virtual void BeforeCall(int call_size) const { } 940 virtual void BeforeCall(int call_size) const { }
937 virtual void AfterCall() const { } 941 virtual void AfterCall() const { }
938 }; 942 };
939 943
940 } } // namespace v8::internal 944 } } // namespace v8::internal
941 945
942 #endif // V8_ASSEMBLER_H_ 946 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698