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

Side by Side Diff: src/codegen.cc

Issue 16573: Fixed build with no ENABLE_LOGGING_AND_PROFILING (Closed)
Patch Set: Created 11 years, 11 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 | « no previous file | src/codegen-arm.h » ('j') | src/log.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 #endif // ENABLE_DISASSEMBLER 156 #endif // ENABLE_DISASSEMBLER
157 157
158 if (!code.is_null()) { 158 if (!code.is_null()) {
159 Counters::total_compiled_code_size.Increment(code->instruction_size()); 159 Counters::total_compiled_code_size.Increment(code->instruction_size());
160 } 160 }
161 161
162 return code; 162 return code;
163 } 163 }
164 164
165 165
166 #ifdef ENABLE_LOGGING_AND_PROFILING
167
166 bool CodeGenerator::ShouldGenerateLog(Expression* type) { 168 bool CodeGenerator::ShouldGenerateLog(Expression* type) {
167 ASSERT(type != NULL); 169 ASSERT(type != NULL);
168 if (!Logger::is_enabled()) return false; 170 if (!Logger::is_enabled()) return false;
169 Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle()); 171 Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle());
170 if (FLAG_log_regexp) { 172 if (FLAG_log_regexp) {
171 static Vector<const char> kRegexp = CStrVector("regexp"); 173 static Vector<const char> kRegexp = CStrVector("regexp");
172 if (name->IsEqualTo(kRegexp)) 174 if (name->IsEqualTo(kRegexp))
173 return true; 175 return true;
174 } 176 }
175 return false; 177 return false;
176 } 178 }
177 179
180 #endif
181
178 182
179 // Sets the function info on a function. 183 // Sets the function info on a function.
180 // The start_position points to the first '(' character after the function name 184 // The start_position points to the first '(' character after the function name
181 // in the full script source. When counting characters in the script source the 185 // in the full script source. When counting characters in the script source the
182 // the first character is number 0 (not 1). 186 // the first character is number 0 (not 1).
183 void CodeGenerator::SetFunctionInfo(Handle<JSFunction> fun, 187 void CodeGenerator::SetFunctionInfo(Handle<JSFunction> fun,
184 int length, 188 int length,
185 int function_token_position, 189 int function_token_position,
186 int start_position, 190 int start_position,
187 int end_position, 191 int end_position,
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { 516 void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
513 switch (type_) { 517 switch (type_) {
514 case READ_LENGTH: GenerateReadLength(masm); break; 518 case READ_LENGTH: GenerateReadLength(masm); break;
515 case READ_ELEMENT: GenerateReadElement(masm); break; 519 case READ_ELEMENT: GenerateReadElement(masm); break;
516 case NEW_OBJECT: GenerateNewObject(masm); break; 520 case NEW_OBJECT: GenerateNewObject(masm); break;
517 } 521 }
518 } 522 }
519 523
520 524
521 } } // namespace v8::internal 525 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/codegen-arm.h » ('j') | src/log.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698