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

Side by Side Diff: src/compiler.cc

Issue 239113009: Reland "Move functions from handles.cc to where they belong." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix 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(info->isolate()->builtins()->CompileUnoptimized())) 1260 if (code.is_identical_to(
1261 info->isolate()->builtins()->CompileUnoptimized())) {
1261 return; 1262 return;
1262 int line_num = GetScriptLineNumber(script, shared->start_position()) + 1; 1263 }
1264 int line_num = Script::GetLineNumber(script, shared->start_position()) + 1;
1263 int column_num = 1265 int column_num =
1264 GetScriptColumnNumber(script, shared->start_position()) + 1; 1266 Script::GetColumnNumber(script, shared->start_position()) + 1;
1265 USE(line_num);
1266 String* script_name = script->name()->IsString() 1267 String* script_name = script->name()->IsString()
1267 ? String::cast(script->name()) 1268 ? String::cast(script->name())
1268 : info->isolate()->heap()->empty_string(); 1269 : info->isolate()->heap()->empty_string();
1269 Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script); 1270 Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script);
1270 PROFILE(info->isolate(), CodeCreateEvent( 1271 PROFILE(info->isolate(), CodeCreateEvent(
1271 log_tag, *code, *shared, info, script_name, line_num, column_num)); 1272 log_tag, *code, *shared, info, script_name, line_num, column_num));
1272 } 1273 }
1273 1274
1274 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1275 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1275 Handle<Script>(info->script()), 1276 Handle<Script>(info->script()),
(...skipping 26 matching lines...) Expand all
1302 AllowHandleDereference allow_deref; 1303 AllowHandleDereference allow_deref;
1303 bool tracing_on = info()->IsStub() 1304 bool tracing_on = info()->IsStub()
1304 ? FLAG_trace_hydrogen_stubs 1305 ? FLAG_trace_hydrogen_stubs
1305 : (FLAG_trace_hydrogen && 1306 : (FLAG_trace_hydrogen &&
1306 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1307 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1307 return (tracing_on && 1308 return (tracing_on &&
1308 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1309 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1309 } 1310 }
1310 1311
1311 } } // namespace v8::internal 1312 } } // 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