| 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/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/debug.h" | 9 #include "src/debug.h" |
| 10 #include "src/full-codegen.h" | 10 #include "src/full-codegen.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 isolate, Logger::TimerEventScope::v8_compile_full_code); | 294 isolate, Logger::TimerEventScope::v8_compile_full_code); |
| 295 | 295 |
| 296 Handle<Script> script = info->script(); | 296 Handle<Script> script = info->script(); |
| 297 if (!script->IsUndefined() && !script->source()->IsUndefined()) { | 297 if (!script->IsUndefined() && !script->source()->IsUndefined()) { |
| 298 int len = String::cast(script->source())->length(); | 298 int len = String::cast(script->source())->length(); |
| 299 isolate->counters()->total_full_codegen_source_size()->Increment(len); | 299 isolate->counters()->total_full_codegen_source_size()->Increment(len); |
| 300 } | 300 } |
| 301 CodeGenerator::MakeCodePrologue(info, "full"); | 301 CodeGenerator::MakeCodePrologue(info, "full"); |
| 302 const int kInitialBufferSize = 4 * KB; | 302 const int kInitialBufferSize = 4 * KB; |
| 303 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize); | 303 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize); |
| 304 if (FLAG_serialize_toplevel && | 304 if (info->will_serialize()) masm.enable_serializer(); |
| 305 info->cached_data_mode() == PRODUCE_CACHED_DATA && info->is_global()) { | |
| 306 masm.enable_serializer(); | |
| 307 } | |
| 308 | 305 |
| 309 #ifdef ENABLE_GDB_JIT_INTERFACE | 306 #ifdef ENABLE_GDB_JIT_INTERFACE |
| 310 masm.positions_recorder()->StartGDBJITLineInfoRecording(); | 307 masm.positions_recorder()->StartGDBJITLineInfoRecording(); |
| 311 #endif | 308 #endif |
| 312 LOG_CODE_EVENT(isolate, | 309 LOG_CODE_EVENT(isolate, |
| 313 CodeStartLinePosInfoRecordEvent(masm.positions_recorder())); | 310 CodeStartLinePosInfoRecordEvent(masm.positions_recorder())); |
| 314 | 311 |
| 315 FullCodeGenerator cgen(&masm, info); | 312 FullCodeGenerator cgen(&masm, info); |
| 316 cgen.Generate(); | 313 cgen.Generate(); |
| 317 if (cgen.HasStackOverflow()) { | 314 if (cgen.HasStackOverflow()) { |
| (...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1695 } | 1692 } |
| 1696 return true; | 1693 return true; |
| 1697 } | 1694 } |
| 1698 #endif // DEBUG | 1695 #endif // DEBUG |
| 1699 | 1696 |
| 1700 | 1697 |
| 1701 #undef __ | 1698 #undef __ |
| 1702 | 1699 |
| 1703 | 1700 |
| 1704 } } // namespace v8::internal | 1701 } } // namespace v8::internal |
| OLD | NEW |