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/ast.h" | 7 #include "src/ast.h" |
8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 } | 415 } |
416 | 416 |
417 | 417 |
418 void FullCodeGenerator::Initialize() { | 418 void FullCodeGenerator::Initialize() { |
419 InitializeAstVisitor(info_->isolate(), info_->zone()); | 419 InitializeAstVisitor(info_->isolate(), info_->zone()); |
420 // The generation of debug code must match between the snapshot code and the | 420 // The generation of debug code must match between the snapshot code and the |
421 // code that is generated later. This is assumed by the debugger when it is | 421 // code that is generated later. This is assumed by the debugger when it is |
422 // calculating PC offsets after generating a debug version of code. Therefore | 422 // calculating PC offsets after generating a debug version of code. Therefore |
423 // we disable the production of debug code in the full compiler if we are | 423 // we disable the production of debug code in the full compiler if we are |
424 // either generating a snapshot or we booted from a snapshot. | 424 // either generating a snapshot or we booted from a snapshot. |
425 generate_debug_code_ = FLAG_debug_code && | 425 generate_debug_code_ = FLAG_debug_code && !masm_->serializer_enabled() && |
426 !masm_->serializer_enabled() && | 426 !info_->isolate()->snapshot_available(); |
427 !Snapshot::HaveASnapshotToStartFrom(); | |
428 masm_->set_emit_debug_code(generate_debug_code_); | 427 masm_->set_emit_debug_code(generate_debug_code_); |
429 masm_->set_predictable_code_size(true); | 428 masm_->set_predictable_code_size(true); |
430 } | 429 } |
431 | 430 |
432 | 431 |
433 void FullCodeGenerator::PrepareForBailout(Expression* node, State state) { | 432 void FullCodeGenerator::PrepareForBailout(Expression* node, State state) { |
434 PrepareForBailoutForId(node->id(), state); | 433 PrepareForBailoutForId(node->id(), state); |
435 } | 434 } |
436 | 435 |
437 | 436 |
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1823 } | 1822 } |
1824 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); | 1823 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); |
1825 codegen_->scope_ = saved_scope_; | 1824 codegen_->scope_ = saved_scope_; |
1826 } | 1825 } |
1827 | 1826 |
1828 | 1827 |
1829 #undef __ | 1828 #undef __ |
1830 | 1829 |
1831 | 1830 |
1832 } } // namespace v8::internal | 1831 } } // namespace v8::internal |
OLD | NEW |