OLD | NEW |
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 abort_due_to_dependency_ = false; | 135 abort_due_to_dependency_ = false; |
136 if (script_->type()->value() == Script::TYPE_NATIVE) { | 136 if (script_->type()->value() == Script::TYPE_NATIVE) { |
137 MarkAsNative(); | 137 MarkAsNative(); |
138 } | 138 } |
139 if (!shared_info_.is_null()) { | 139 if (!shared_info_.is_null()) { |
140 ASSERT(language_mode() == CLASSIC_MODE); | 140 ASSERT(language_mode() == CLASSIC_MODE); |
141 SetLanguageMode(shared_info_->language_mode()); | 141 SetLanguageMode(shared_info_->language_mode()); |
142 } | 142 } |
143 set_bailout_reason(kUnknown); | 143 set_bailout_reason(kUnknown); |
144 | 144 |
145 if (!shared_info().is_null()) { | 145 if (!shared_info().is_null() && shared_info()->is_compiled()) { |
146 FixedArray* info_feedback_vector = shared_info()->feedback_vector(); | 146 // We should initialize the CompilationInfo feedback vector from the |
147 if (info_feedback_vector->length() > 0) { | 147 // passed in shared info, rather than creating a new one. |
148 // We should initialize the CompilationInfo feedback vector from the | 148 feedback_vector_ = Handle<FixedArray>(shared_info()->feedback_vector(), |
149 // passed in shared info, rather than creating a new one. | 149 isolate); |
150 feedback_vector_ = Handle<FixedArray>(info_feedback_vector, isolate); | |
151 } | |
152 } | 150 } |
153 } | 151 } |
154 | 152 |
155 | 153 |
156 CompilationInfo::~CompilationInfo() { | 154 CompilationInfo::~CompilationInfo() { |
157 delete deferred_handles_; | 155 delete deferred_handles_; |
158 delete no_frame_ranges_; | 156 delete no_frame_ranges_; |
159 #ifdef DEBUG | 157 #ifdef DEBUG |
160 // Check that no dependent maps have been added or added dependent maps have | 158 // Check that no dependent maps have been added or added dependent maps have |
161 // been rolled back or committed. | 159 // been rolled back or committed. |
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1331 AllowHandleDereference allow_deref; | 1329 AllowHandleDereference allow_deref; |
1332 bool tracing_on = info()->IsStub() | 1330 bool tracing_on = info()->IsStub() |
1333 ? FLAG_trace_hydrogen_stubs | 1331 ? FLAG_trace_hydrogen_stubs |
1334 : (FLAG_trace_hydrogen && | 1332 : (FLAG_trace_hydrogen && |
1335 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1333 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
1336 return (tracing_on && | 1334 return (tracing_on && |
1337 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1335 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
1338 } | 1336 } |
1339 | 1337 |
1340 } } // namespace v8::internal | 1338 } } // namespace v8::internal |
OLD | NEW |