| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 void FullCodeGenerator::Initialize() { | 407 void FullCodeGenerator::Initialize() { |
| 408 // The generation of debug code must match between the snapshot code and the | 408 // The generation of debug code must match between the snapshot code and the |
| 409 // code that is generated later. This is assumed by the debugger when it is | 409 // code that is generated later. This is assumed by the debugger when it is |
| 410 // calculating PC offsets after generating a debug version of code. Therefore | 410 // calculating PC offsets after generating a debug version of code. Therefore |
| 411 // we disable the production of debug code in the full compiler if we are | 411 // we disable the production of debug code in the full compiler if we are |
| 412 // either generating a snapshot or we booted from a snapshot. | 412 // either generating a snapshot or we booted from a snapshot. |
| 413 generate_debug_code_ = FLAG_debug_code && | 413 generate_debug_code_ = FLAG_debug_code && |
| 414 !Serializer::enabled() && | 414 !Serializer::enabled() && |
| 415 !Snapshot::HaveASnapshotToStartFrom(); | 415 !Snapshot::HaveASnapshotToStartFrom(); |
| 416 masm_->set_emit_debug_code(generate_debug_code_); | 416 masm_->set_emit_debug_code(generate_debug_code_); |
| 417 masm_->set_emit_allocations_tracking_code( |
| 418 masm_->isolate()->heap_profiler()->is_tracking_allocations()); |
| 417 masm_->set_predictable_code_size(true); | 419 masm_->set_predictable_code_size(true); |
| 418 InitializeAstVisitor(info_->isolate()); | 420 InitializeAstVisitor(info_->isolate()); |
| 419 } | 421 } |
| 420 | 422 |
| 421 | 423 |
| 422 void FullCodeGenerator::PopulateTypeFeedbackCells(Handle<Code> code) { | 424 void FullCodeGenerator::PopulateTypeFeedbackCells(Handle<Code> code) { |
| 423 if (type_feedback_cells_.is_empty()) return; | 425 if (type_feedback_cells_.is_empty()) return; |
| 424 int length = type_feedback_cells_.length(); | 426 int length = type_feedback_cells_.length(); |
| 425 int array_size = TypeFeedbackCells::LengthOfFixedArray(length); | 427 int array_size = TypeFeedbackCells::LengthOfFixedArray(length); |
| 426 Handle<TypeFeedbackCells> cache = Handle<TypeFeedbackCells>::cast( | 428 Handle<TypeFeedbackCells> cache = Handle<TypeFeedbackCells>::cast( |
| (...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 } | 1687 } |
| 1686 return true; | 1688 return true; |
| 1687 } | 1689 } |
| 1688 #endif // DEBUG | 1690 #endif // DEBUG |
| 1689 | 1691 |
| 1690 | 1692 |
| 1691 #undef __ | 1693 #undef __ |
| 1692 | 1694 |
| 1693 | 1695 |
| 1694 } } // namespace v8::internal | 1696 } } // namespace v8::internal |
| OLD | NEW |