| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler.h" | 5 #include "src/compiler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "src/ast/ast-numbering.h" | 9 #include "src/ast/ast-numbering.h" |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 | 1020 |
| 1021 Handle<String> script_name = | 1021 Handle<String> script_name = |
| 1022 script->name()->IsString() | 1022 script->name()->IsString() |
| 1023 ? Handle<String>(String::cast(script->name())) | 1023 ? Handle<String>(String::cast(script->name())) |
| 1024 : isolate->factory()->empty_string(); | 1024 : isolate->factory()->empty_string(); |
| 1025 Logger::LogEventsAndTags log_tag = info->is_eval() | 1025 Logger::LogEventsAndTags log_tag = info->is_eval() |
| 1026 ? Logger::EVAL_TAG | 1026 ? Logger::EVAL_TAG |
| 1027 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script); | 1027 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script); |
| 1028 | 1028 |
| 1029 PROFILE(isolate, CodeCreateEvent(log_tag, result->abstract_code(), *result, | 1029 PROFILE(isolate, CodeCreateEvent(log_tag, result->abstract_code(), *result, |
| 1030 info, *script_name)); | 1030 *script_name)); |
| 1031 | 1031 |
| 1032 if (!script.is_null()) | 1032 if (!script.is_null()) |
| 1033 script->set_compilation_state(Script::COMPILATION_STATE_COMPILED); | 1033 script->set_compilation_state(Script::COMPILATION_STATE_COMPILED); |
| 1034 | 1034 |
| 1035 live_edit_tracker.RecordFunctionInfo(result, lit, info->zone()); | 1035 live_edit_tracker.RecordFunctionInfo(result, lit, info->zone()); |
| 1036 } | 1036 } |
| 1037 | 1037 |
| 1038 return result; | 1038 return result; |
| 1039 } | 1039 } |
| 1040 | 1040 |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 MaybeHandle<Code> code; | 1674 MaybeHandle<Code> code; |
| 1675 if (cached.code != nullptr) code = handle(cached.code); | 1675 if (cached.code != nullptr) code = handle(cached.code); |
| 1676 Handle<Context> native_context(function->context()->native_context()); | 1676 Handle<Context> native_context(function->context()->native_context()); |
| 1677 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, | 1677 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, |
| 1678 literals, BailoutId::None()); | 1678 literals, BailoutId::None()); |
| 1679 } | 1679 } |
| 1680 } | 1680 } |
| 1681 | 1681 |
| 1682 } // namespace internal | 1682 } // namespace internal |
| 1683 } // namespace v8 | 1683 } // namespace v8 |
| OLD | NEW |