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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "codegen.h" | 7 #include "codegen.h" |
8 #include "compiler.h" | 8 #include "compiler.h" |
9 #include "debug.h" | 9 #include "debug.h" |
10 #include "full-codegen.h" | 10 #include "full-codegen.h" |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 } | 397 } |
398 | 398 |
399 | 399 |
400 void FullCodeGenerator::Initialize() { | 400 void FullCodeGenerator::Initialize() { |
401 // The generation of debug code must match between the snapshot code and the | 401 // The generation of debug code must match between the snapshot code and the |
402 // code that is generated later. This is assumed by the debugger when it is | 402 // code that is generated later. This is assumed by the debugger when it is |
403 // calculating PC offsets after generating a debug version of code. Therefore | 403 // calculating PC offsets after generating a debug version of code. Therefore |
404 // we disable the production of debug code in the full compiler if we are | 404 // we disable the production of debug code in the full compiler if we are |
405 // either generating a snapshot or we booted from a snapshot. | 405 // either generating a snapshot or we booted from a snapshot. |
406 generate_debug_code_ = FLAG_debug_code && | 406 generate_debug_code_ = FLAG_debug_code && |
407 !Serializer::enabled() && | 407 !Serializer::enabled(isolate()) && |
408 !Snapshot::HaveASnapshotToStartFrom(); | 408 !Snapshot::HaveASnapshotToStartFrom(); |
409 masm_->set_emit_debug_code(generate_debug_code_); | 409 masm_->set_emit_debug_code(generate_debug_code_); |
410 masm_->set_predictable_code_size(true); | 410 masm_->set_predictable_code_size(true); |
411 InitializeAstVisitor(info_->zone()); | 411 InitializeAstVisitor(info_->zone()); |
412 } | 412 } |
413 | 413 |
414 | 414 |
415 void FullCodeGenerator::PrepareForBailout(Expression* node, State state) { | 415 void FullCodeGenerator::PrepareForBailout(Expression* node, State state) { |
416 PrepareForBailoutForId(node->id(), state); | 416 PrepareForBailoutForId(node->id(), state); |
417 } | 417 } |
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1695 } | 1695 } |
1696 return true; | 1696 return true; |
1697 } | 1697 } |
1698 #endif // DEBUG | 1698 #endif // DEBUG |
1699 | 1699 |
1700 | 1700 |
1701 #undef __ | 1701 #undef __ |
1702 | 1702 |
1703 | 1703 |
1704 } } // namespace v8::internal | 1704 } } // namespace v8::internal |
OLD | NEW |