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

Side by Side Diff: src/codegen.cc

Issue 2843933002: [cleanup] Minor cleanups concerning assemblers and code generation. (Closed)
Patch Set: Created 3 years, 8 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 | « src/assembler.h ('k') | src/compiler/x64/code-generator-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/codegen.h" 5 #include "src/codegen.h"
6 6
7 #if defined(V8_OS_AIX) 7 #if defined(V8_OS_AIX)
8 #include <fenv.h> // NOLINT(build/c++11) 8 #include <fenv.h> // NOLINT(build/c++11)
9 #endif 9 #endif
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } \ 62 } \
63 double fast_##name(double x, Isolate* isolate) { \ 63 double fast_##name(double x, Isolate* isolate) { \
64 return (*fast_##name##_function)(x, isolate); \ 64 return (*fast_##name##_function)(x, isolate); \
65 } 65 }
66 66
67 UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction) 67 UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction)
68 68
69 #undef UNARY_MATH_FUNCTION 69 #undef UNARY_MATH_FUNCTION
70 70
71 71
72 #define __ ACCESS_MASM(masm_)
73
74 #ifdef DEBUG 72 #ifdef DEBUG
75 73
76 Comment::Comment(MacroAssembler* masm, const char* msg) 74 Comment::Comment(Assembler* assembler, const char* msg)
77 : masm_(masm), msg_(msg) { 75 : assembler_(assembler), msg_(msg) {
78 __ RecordComment(msg); 76 assembler_->RecordComment(msg);
79 } 77 }
80 78
81 79
82 Comment::~Comment() { 80 Comment::~Comment() {
83 if (msg_[0] == '[') __ RecordComment("]"); 81 if (msg_[0] == '[') assembler_->RecordComment("]");
84 } 82 }
85 83
86 #endif // DEBUG 84 #endif // DEBUG
87 85
88 #undef __
89
90 86
91 void CodeGenerator::MakeCodePrologue(CompilationInfo* info, const char* kind) { 87 void CodeGenerator::MakeCodePrologue(CompilationInfo* info, const char* kind) {
92 bool print_ast = false; 88 bool print_ast = false;
93 const char* ftype; 89 const char* ftype;
94 90
95 if (info->isolate()->bootstrapper()->IsActive()) { 91 if (info->isolate()->bootstrapper()->IsActive()) {
96 print_ast = FLAG_print_builtin_ast; 92 print_ast = FLAG_print_builtin_ast;
97 ftype = "builtin"; 93 ftype = "builtin";
98 } else { 94 } else {
99 print_ast = FLAG_print_ast; 95 print_ast = FLAG_print_ast;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 os << "source_position = " << shared->start_position() << "\n"; 280 os << "source_position = " << shared->start_position() << "\n";
285 } 281 }
286 code->Disassemble(debug_name.get(), os); 282 code->Disassemble(debug_name.get(), os);
287 os << "--- End code ---\n"; 283 os << "--- End code ---\n";
288 } 284 }
289 #endif // ENABLE_DISASSEMBLER 285 #endif // ENABLE_DISASSEMBLER
290 } 286 }
291 287
292 } // namespace internal 288 } // namespace internal
293 } // namespace v8 289 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698