| 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 17 matching lines...) Expand all Loading... |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 #include "compiler.h" | 30 #include "compiler.h" |
| 31 | 31 |
| 32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
| 33 #include "codegen-inl.h" | 33 #include "codegen-inl.h" |
| 34 #include "compilation-cache.h" | 34 #include "compilation-cache.h" |
| 35 #include "data-flow.h" | 35 #include "data-flow.h" |
| 36 #include "debug.h" | 36 #include "debug.h" |
| 37 #include "full-codegen.h" | 37 #include "full-codegen.h" |
| 38 #include "gdbjit.h" |
| 38 #include "hydrogen.h" | 39 #include "hydrogen.h" |
| 39 #include "lithium-allocator.h" | 40 #include "lithium-allocator.h" |
| 40 #include "liveedit.h" | 41 #include "liveedit.h" |
| 41 #include "oprofile-agent.h" | 42 #include "oprofile-agent.h" |
| 42 #include "parser.h" | 43 #include "parser.h" |
| 43 #include "rewriter.h" | 44 #include "rewriter.h" |
| 44 #include "runtime-profiler.h" | 45 #include "runtime-profiler.h" |
| 45 #include "scopeinfo.h" | 46 #include "scopeinfo.h" |
| 46 #include "scopes.h" | 47 #include "scopes.h" |
| 47 #include "vm-state-inl.h" | 48 #include "vm-state-inl.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 if (script->name()->IsString()) { | 393 if (script->name()->IsString()) { |
| 393 PROFILE(CodeCreateEvent( | 394 PROFILE(CodeCreateEvent( |
| 394 info->is_eval() | 395 info->is_eval() |
| 395 ? Logger::EVAL_TAG | 396 ? Logger::EVAL_TAG |
| 396 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), | 397 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), |
| 397 *info->code(), | 398 *info->code(), |
| 398 String::cast(script->name()))); | 399 String::cast(script->name()))); |
| 399 OPROFILE(CreateNativeCodeRegion(String::cast(script->name()), | 400 OPROFILE(CreateNativeCodeRegion(String::cast(script->name()), |
| 400 info->code()->instruction_start(), | 401 info->code()->instruction_start(), |
| 401 info->code()->instruction_size())); | 402 info->code()->instruction_size())); |
| 403 GDBJIT(AddCode(Handle<String>(String::cast(script->name())), |
| 404 script, |
| 405 info->code())); |
| 402 } else { | 406 } else { |
| 403 PROFILE(CodeCreateEvent( | 407 PROFILE(CodeCreateEvent( |
| 404 info->is_eval() | 408 info->is_eval() |
| 405 ? Logger::EVAL_TAG | 409 ? Logger::EVAL_TAG |
| 406 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), | 410 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), |
| 407 *info->code(), | 411 *info->code(), |
| 408 "")); | 412 "")); |
| 409 OPROFILE(CreateNativeCodeRegion(info->is_eval() ? "Eval" : "Script", | 413 OPROFILE(CreateNativeCodeRegion(info->is_eval() ? "Eval" : "Script", |
| 410 info->code()->instruction_start(), | 414 info->code()->instruction_start(), |
| 411 info->code()->instruction_size())); | 415 info->code()->instruction_size())); |
| 416 GDBJIT(AddCode(Handle<String>(), script, info->code())); |
| 412 } | 417 } |
| 413 | 418 |
| 414 // Allocate function. | 419 // Allocate function. |
| 415 Handle<SharedFunctionInfo> result = | 420 Handle<SharedFunctionInfo> result = |
| 416 Factory::NewSharedFunctionInfo( | 421 Factory::NewSharedFunctionInfo( |
| 417 lit->name(), | 422 lit->name(), |
| 418 lit->materialized_literal_count(), | 423 lit->materialized_literal_count(), |
| 419 info->code(), | 424 info->code(), |
| 420 SerializedScopeInfo::Create(info->scope())); | 425 SerializedScopeInfo::Create(info->scope())); |
| 421 | 426 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 code->instruction_size())); | 770 code->instruction_size())); |
| 766 } else { | 771 } else { |
| 767 PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script), | 772 PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script), |
| 768 *code, | 773 *code, |
| 769 *name)); | 774 *name)); |
| 770 OPROFILE(CreateNativeCodeRegion(*name, | 775 OPROFILE(CreateNativeCodeRegion(*name, |
| 771 code->instruction_start(), | 776 code->instruction_start(), |
| 772 code->instruction_size())); | 777 code->instruction_size())); |
| 773 } | 778 } |
| 774 } | 779 } |
| 780 |
| 781 GDBJIT(AddCode(name, |
| 782 Handle<Script>(info->script()), |
| 783 Handle<Code>(info->code()))); |
| 775 } | 784 } |
| 776 | 785 |
| 777 } } // namespace v8::internal | 786 } } // namespace v8::internal |
| OLD | NEW |