OLD | NEW |
---|---|
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
425 isolate->factory()->NewSharedFunctionInfo( | 425 isolate->factory()->NewSharedFunctionInfo( |
426 lit->name(), | 426 lit->name(), |
427 lit->materialized_literal_count(), | 427 lit->materialized_literal_count(), |
428 info->code(), | 428 info->code(), |
429 SerializedScopeInfo::Create(info->scope())); | 429 SerializedScopeInfo::Create(info->scope())); |
430 | 430 |
431 ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position()); | 431 ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position()); |
432 Compiler::SetFunctionInfo(result, lit, true, script); | 432 Compiler::SetFunctionInfo(result, lit, true, script); |
433 | 433 |
434 if (script->name()->IsString()) { | 434 if (script->name()->IsString()) { |
435 PROFILE(CodeCreateEvent( | 435 PROFILE(isolate, CodeCreateEvent( |
436 info->is_eval() | 436 info->is_eval() |
437 ? Logger::EVAL_TAG | 437 ? Logger::EVAL_TAG |
438 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), | 438 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), |
439 *info->code(), | 439 *info->code(), |
440 *result, | 440 *result, |
441 String::cast(script->name()))); | 441 String::cast(script->name()))); |
442 GDBJIT(AddCode(Handle<String>(String::cast(script->name())), | 442 GDBJIT(AddCode(Handle<String>(String::cast(script->name())), |
443 script, | 443 script, |
444 info->code())); | 444 info->code())); |
445 } else { | 445 } else { |
446 PROFILE(CodeCreateEvent( | 446 PROFILE(isolate, CodeCreateEvent( |
447 info->is_eval() | 447 info->is_eval() |
448 ? Logger::EVAL_TAG | 448 ? Logger::EVAL_TAG |
449 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), | 449 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), |
450 *info->code(), | 450 *info->code(), |
451 *result, | 451 *result, |
452 isolate->heap()->empty_string())); | 452 isolate->heap()->empty_string())); |
453 GDBJIT(AddCode(Handle<String>(), script, info->code())); | 453 GDBJIT(AddCode(Handle<String>(), script, info->code())); |
454 } | 454 } |
455 | 455 |
456 // Hint to the runtime system used when allocating space for initial | 456 // Hint to the runtime system used when allocating space for initial |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
796 // script name and line number. Check explicitly whether logging is | 796 // script name and line number. Check explicitly whether logging is |
797 // enabled as finding the line number is not free. | 797 // enabled as finding the line number is not free. |
798 if (info->isolate()->logger()->is_logging() || CpuProfiler::is_profiling()) { | 798 if (info->isolate()->logger()->is_logging() || CpuProfiler::is_profiling()) { |
799 Handle<Script> script = info->script(); | 799 Handle<Script> script = info->script(); |
800 Handle<Code> code = info->code(); | 800 Handle<Code> code = info->code(); |
801 if (*code == info->isolate()->builtins()->builtin(Builtins::LazyCompile)) | 801 if (*code == info->isolate()->builtins()->builtin(Builtins::LazyCompile)) |
802 return; | 802 return; |
803 if (script->name()->IsString()) { | 803 if (script->name()->IsString()) { |
804 int line_num = GetScriptLineNumber(script, shared->start_position()) + 1; | 804 int line_num = GetScriptLineNumber(script, shared->start_position()) + 1; |
805 USE(line_num); | 805 USE(line_num); |
806 PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script), | 806 PROFILE(info->isolate(), CodeCreateEvent(Logger::ToNativeByScript(tag, *sc ript), |
Vitaly Repeshko
2011/03/16 17:33:24
Lines should fit in 80 chars. Please run tools/pre
| |
807 *code, | 807 *code, |
808 *shared, | 808 *shared, |
809 String::cast(script->name()), | 809 String::cast(script->name()), |
810 line_num)); | 810 line_num)); |
811 } else { | 811 } else { |
812 PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script), | 812 PROFILE(info->isolate(), CodeCreateEvent(Logger::ToNativeByScript(tag, *sc ript), |
813 *code, | 813 *code, |
814 *shared, | 814 *shared, |
815 shared->DebugName())); | 815 shared->DebugName())); |
816 } | 816 } |
817 } | 817 } |
818 | 818 |
819 GDBJIT(AddCode(name, | 819 GDBJIT(AddCode(name, |
820 Handle<Script>(info->script()), | 820 Handle<Script>(info->script()), |
821 Handle<Code>(info->code()))); | 821 Handle<Code>(info->code()))); |
822 } | 822 } |
823 | 823 |
824 } } // namespace v8::internal | 824 } } // namespace v8::internal |
OLD | NEW |