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

Side by Side Diff: src/compiler.cc

Issue 239543010: Revert "Move functions from handles.cc to where they belong." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/builtins.cc ('k') | src/debug.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 // 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 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 // SharedFunctionInfo is passed separately, because if CompilationInfo 1250 // SharedFunctionInfo is passed separately, because if CompilationInfo
1251 // was created using Script object, it will not have it. 1251 // was created using Script object, it will not have it.
1252 1252
1253 // Log the code generation. If source information is available include 1253 // Log the code generation. If source information is available include
1254 // script name and line number. Check explicitly whether logging is 1254 // script name and line number. Check explicitly whether logging is
1255 // enabled as finding the line number is not free. 1255 // enabled as finding the line number is not free.
1256 if (info->isolate()->logger()->is_logging_code_events() || 1256 if (info->isolate()->logger()->is_logging_code_events() ||
1257 info->isolate()->cpu_profiler()->is_profiling()) { 1257 info->isolate()->cpu_profiler()->is_profiling()) {
1258 Handle<Script> script = info->script(); 1258 Handle<Script> script = info->script();
1259 Handle<Code> code = info->code(); 1259 Handle<Code> code = info->code();
1260 if (code.is_identical_to( 1260 if (code.is_identical_to(info->isolate()->builtins()->CompileUnoptimized()))
1261 info->isolate()->builtins()->CompileUnoptimized())) {
1262 return; 1261 return;
1263 } 1262 int line_num = GetScriptLineNumber(script, shared->start_position()) + 1;
1263 int column_num =
1264 GetScriptColumnNumber(script, shared->start_position()) + 1;
1265 USE(line_num);
1266 String* script_name = script->name()->IsString()
1267 ? String::cast(script->name())
1268 : info->isolate()->heap()->empty_string();
1264 Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script); 1269 Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script);
1265 PROFILE(info->isolate(), CodeCreateEvent( 1270 PROFILE(info->isolate(), CodeCreateEvent(
1266 log_tag, 1271 log_tag, *code, *shared, info, script_name, line_num, column_num));
1267 *code,
1268 *shared,
1269 info,
1270 script->name()->IsString()
1271 ? String::cast(script->name())
1272 : info->isolate()->heap()->empty_string(),
1273 Script::GetLineNumber(script, shared->start_position()) + 1,
1274 Script::GetColumnNumber(script, shared->start_position()) + 1));
1275 } 1272 }
1276 1273
1277 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1274 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1278 Handle<Script>(info->script()), 1275 Handle<Script>(info->script()),
1279 Handle<Code>(info->code()), 1276 Handle<Code>(info->code()),
1280 info)); 1277 info));
1281 } 1278 }
1282 1279
1283 1280
1284 CompilationPhase::CompilationPhase(const char* name, CompilationInfo* info) 1281 CompilationPhase::CompilationPhase(const char* name, CompilationInfo* info)
(...skipping 20 matching lines...) Expand all
1305 AllowHandleDereference allow_deref; 1302 AllowHandleDereference allow_deref;
1306 bool tracing_on = info()->IsStub() 1303 bool tracing_on = info()->IsStub()
1307 ? FLAG_trace_hydrogen_stubs 1304 ? FLAG_trace_hydrogen_stubs
1308 : (FLAG_trace_hydrogen && 1305 : (FLAG_trace_hydrogen &&
1309 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1306 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1310 return (tracing_on && 1307 return (tracing_on &&
1311 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1308 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1312 } 1309 }
1313 1310
1314 } } // namespace v8::internal 1311 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698