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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 | 8 |
9 #include "src/ast-numbering.h" | 9 #include "src/ast-numbering.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 | 1188 |
1189 // Do a lookup in the compilation cache but not for extensions. | 1189 // Do a lookup in the compilation cache but not for extensions. |
1190 MaybeHandle<SharedFunctionInfo> maybe_result; | 1190 MaybeHandle<SharedFunctionInfo> maybe_result; |
1191 Handle<SharedFunctionInfo> result; | 1191 Handle<SharedFunctionInfo> result; |
1192 if (extension == NULL) { | 1192 if (extension == NULL) { |
1193 if (FLAG_serialize_toplevel && | 1193 if (FLAG_serialize_toplevel && |
1194 compile_options == ScriptCompiler::kConsumeCodeCache && | 1194 compile_options == ScriptCompiler::kConsumeCodeCache && |
1195 !isolate->debug()->is_loaded()) { | 1195 !isolate->debug()->is_loaded()) { |
1196 HistogramTimerScope timer(isolate->counters()->compile_deserialize()); | 1196 HistogramTimerScope timer(isolate->counters()->compile_deserialize()); |
1197 Handle<SharedFunctionInfo> result; | 1197 Handle<SharedFunctionInfo> result; |
1198 if (CodeSerializer::Deserialize(isolate, *cached_data, source) | 1198 if (CodeSerializer::Deserialize(isolate, cached_data, source) |
1199 .ToHandle(&result)) { | 1199 .ToHandle(&result)) { |
1200 return result; | 1200 return result; |
1201 } | 1201 } |
1202 // Deserializer failed. Fall through to compile. | 1202 // Deserializer failed. Fall through to compile. |
1203 } else { | 1203 } else { |
1204 maybe_result = compilation_cache->LookupScript( | 1204 maybe_result = compilation_cache->LookupScript( |
1205 source, script_name, line_offset, column_offset, | 1205 source, script_name, line_offset, column_offset, |
1206 is_shared_cross_origin, context); | 1206 is_shared_cross_origin, context); |
1207 } | 1207 } |
1208 } | 1208 } |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1470 AllowHandleDereference allow_deref; | 1470 AllowHandleDereference allow_deref; |
1471 bool tracing_on = info()->IsStub() | 1471 bool tracing_on = info()->IsStub() |
1472 ? FLAG_trace_hydrogen_stubs | 1472 ? FLAG_trace_hydrogen_stubs |
1473 : (FLAG_trace_hydrogen && | 1473 : (FLAG_trace_hydrogen && |
1474 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1474 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
1475 return (tracing_on && | 1475 return (tracing_on && |
1476 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1476 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
1477 } | 1477 } |
1478 | 1478 |
1479 } } // namespace v8::internal | 1479 } } // namespace v8::internal |
OLD | NEW |