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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 // The generation of debug code must match between the snapshot code and the | 391 // The generation of debug code must match between the snapshot code and the |
392 // code that is generated later. This is assumed by the debugger when it is | 392 // code that is generated later. This is assumed by the debugger when it is |
393 // calculating PC offsets after generating a debug version of code. Therefore | 393 // calculating PC offsets after generating a debug version of code. Therefore |
394 // we disable the production of debug code in the full compiler if we are | 394 // we disable the production of debug code in the full compiler if we are |
395 // either generating a snapshot or we booted from a snapshot. | 395 // either generating a snapshot or we booted from a snapshot. |
396 generate_debug_code_ = FLAG_debug_code && | 396 generate_debug_code_ = FLAG_debug_code && |
397 !Serializer::enabled() && | 397 !Serializer::enabled() && |
398 !Snapshot::HaveASnapshotToStartFrom(); | 398 !Snapshot::HaveASnapshotToStartFrom(); |
399 masm_->set_emit_debug_code(generate_debug_code_); | 399 masm_->set_emit_debug_code(generate_debug_code_); |
400 masm_->set_predictable_code_size(true); | 400 masm_->set_predictable_code_size(true); |
401 InitializeAstVisitor(); | |
402 } | 401 } |
403 | 402 |
404 | 403 |
405 void FullCodeGenerator::PopulateTypeFeedbackCells(Handle<Code> code) { | 404 void FullCodeGenerator::PopulateTypeFeedbackCells(Handle<Code> code) { |
406 if (type_feedback_cells_.is_empty()) return; | 405 if (type_feedback_cells_.is_empty()) return; |
407 int length = type_feedback_cells_.length(); | 406 int length = type_feedback_cells_.length(); |
408 int array_size = TypeFeedbackCells::LengthOfFixedArray(length); | 407 int array_size = TypeFeedbackCells::LengthOfFixedArray(length); |
409 Handle<TypeFeedbackCells> cache = Handle<TypeFeedbackCells>::cast( | 408 Handle<TypeFeedbackCells> cache = Handle<TypeFeedbackCells>::cast( |
410 isolate()->factory()->NewFixedArray(array_size, TENURED)); | 409 isolate()->factory()->NewFixedArray(array_size, TENURED)); |
411 for (int i = 0; i < length; i++) { | 410 for (int i = 0; i < length; i++) { |
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 } | 1577 } |
1579 | 1578 |
1580 return false; | 1579 return false; |
1581 } | 1580 } |
1582 | 1581 |
1583 | 1582 |
1584 #undef __ | 1583 #undef __ |
1585 | 1584 |
1586 | 1585 |
1587 } } // namespace v8::internal | 1586 } } // namespace v8::internal |
OLD | NEW |