| 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/bootstrapper.h" | 9 #include "src/bootstrapper.h" | 
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" | 
| (...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 974       script->set_column_offset(Smi::FromInt(column_offset)); | 974       script->set_column_offset(Smi::FromInt(column_offset)); | 
| 975     } | 975     } | 
| 976     script->set_is_shared_cross_origin(is_shared_cross_origin); | 976     script->set_is_shared_cross_origin(is_shared_cross_origin); | 
| 977 | 977 | 
| 978     // Compile the function and add it to the cache. | 978     // Compile the function and add it to the cache. | 
| 979     CompilationInfoWithZone info(script); | 979     CompilationInfoWithZone info(script); | 
| 980     info.MarkAsGlobal(); | 980     info.MarkAsGlobal(); | 
| 981     info.SetCachedData(cached_data, cached_data_mode); | 981     info.SetCachedData(cached_data, cached_data_mode); | 
| 982     info.SetExtension(extension); | 982     info.SetExtension(extension); | 
| 983     info.SetContext(context); | 983     info.SetContext(context); | 
|  | 984     if (FLAG_serialize_toplevel && cached_data_mode == PRODUCE_CACHED_DATA) { | 
|  | 985       info.PrepareForSerializing(); | 
|  | 986     } | 
| 984     if (FLAG_use_strict) info.SetStrictMode(STRICT); | 987     if (FLAG_use_strict) info.SetStrictMode(STRICT); | 
| 985 | 988 | 
| 986     result = CompileToplevel(&info); | 989     result = CompileToplevel(&info); | 
| 987     if (extension == NULL && !result.is_null() && !result->dont_cache()) { | 990     if (extension == NULL && !result.is_null() && !result->dont_cache()) { | 
| 988       compilation_cache->PutScript(source, context, result); | 991       compilation_cache->PutScript(source, context, result); | 
| 989       if (FLAG_serialize_toplevel && cached_data_mode == PRODUCE_CACHED_DATA) { | 992       if (FLAG_serialize_toplevel && cached_data_mode == PRODUCE_CACHED_DATA) { | 
| 990         *cached_data = CodeSerializer::Serialize(result); | 993         *cached_data = CodeSerializer::Serialize(result); | 
| 991       } | 994       } | 
| 992     } | 995     } | 
| 993     if (result.is_null()) isolate->ReportPendingMessages(); | 996     if (result.is_null()) isolate->ReportPendingMessages(); | 
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1321   AllowHandleDereference allow_deref; | 1324   AllowHandleDereference allow_deref; | 
| 1322   bool tracing_on = info()->IsStub() | 1325   bool tracing_on = info()->IsStub() | 
| 1323       ? FLAG_trace_hydrogen_stubs | 1326       ? FLAG_trace_hydrogen_stubs | 
| 1324       : (FLAG_trace_hydrogen && | 1327       : (FLAG_trace_hydrogen && | 
| 1325          info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1328          info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 
| 1326   return (tracing_on && | 1329   return (tracing_on && | 
| 1327       base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1330       base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 
| 1328 } | 1331 } | 
| 1329 | 1332 | 
| 1330 } }  // namespace v8::internal | 1333 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|