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

Side by Side Diff: src/compiler.cc

Issue 43020: Move InitLineEnds and GetLineNumber to handles.cc to avoid... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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/accessors.cc ('k') | src/handles.h » ('j') | src/handles.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 Top::StackOverflow(); 310 Top::StackOverflow();
311 return false; 311 return false;
312 } 312 }
313 313
314 #if defined ENABLE_LOGGING_AND_PROFILING || defined ENABLE_OPROFILE_AGENT 314 #if defined ENABLE_LOGGING_AND_PROFILING || defined ENABLE_OPROFILE_AGENT
315 // Log the code generation. If source information is available include script 315 // Log the code generation. If source information is available include script
316 // name and line number. Check explicit whether logging is enabled as finding 316 // name and line number. Check explicit whether logging is enabled as finding
317 // the line number is not for free. 317 // the line number is not for free.
318 if (Logger::is_enabled() || OProfileAgent::is_enabled()) { 318 if (Logger::is_enabled() || OProfileAgent::is_enabled()) {
319 if (script->name()->IsString()) { 319 if (script->name()->IsString()) {
320 int line_num = script->GetLineNumber(start_position); 320 int line_num = GetScriptLineNumber(script, start_position);
321 if (line_num > 0) { 321 if (line_num > 0) {
322 line_num += script->line_offset()->value() + 1; 322 line_num += script->line_offset()->value() + 1;
323 } 323 }
324 LOG(CodeCreateEvent("LazyCompile", *code, *lit->name(), 324 LOG(CodeCreateEvent("LazyCompile", *code, *lit->name(),
325 String::cast(script->name()), line_num)); 325 String::cast(script->name()), line_num));
326 OProfileAgent::CreateNativeCodeRegion(*lit->name(), 326 OProfileAgent::CreateNativeCodeRegion(*lit->name(),
327 String::cast(script->name()), 327 String::cast(script->name()),
328 line_num, code->address(), 328 line_num, code->address(),
329 code->ExecutableSize()); 329 code->ExecutableSize());
330 } else { 330 } else {
(...skipping 10 matching lines...) Expand all
341 // Set the expected number of properties for instances. 341 // Set the expected number of properties for instances.
342 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); 342 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());
343 343
344 // Check the function has compiled code. 344 // Check the function has compiled code.
345 ASSERT(shared->is_compiled()); 345 ASSERT(shared->is_compiled());
346 return true; 346 return true;
347 } 347 }
348 348
349 349
350 } } // namespace v8::internal 350 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/handles.h » ('j') | src/handles.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698