| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 363 |
| 364 | 364 |
| 365 void FullCodeGenerator::PrepareForBailoutForId(unsigned id, State state) { | 365 void FullCodeGenerator::PrepareForBailoutForId(unsigned id, State state) { |
| 366 // There's no need to prepare this code for bailouts from already optimized | 366 // There's no need to prepare this code for bailouts from already optimized |
| 367 // code or code that can't be optimized. | 367 // code or code that can't be optimized. |
| 368 if (!FLAG_deopt || !info_->HasDeoptimizationSupport()) return; | 368 if (!FLAG_deopt || !info_->HasDeoptimizationSupport()) return; |
| 369 unsigned pc_and_state = | 369 unsigned pc_and_state = |
| 370 StateField::encode(state) | PcField::encode(masm_->pc_offset()); | 370 StateField::encode(state) | PcField::encode(masm_->pc_offset()); |
| 371 BailoutEntry entry = { id, pc_and_state }; | 371 BailoutEntry entry = { id, pc_and_state }; |
| 372 #ifdef DEBUG | 372 #ifdef DEBUG |
| 373 // Assert that we don't have multiple bailout entries for the same node. | 373 if (FLAG_enable_slow_asserts) { |
| 374 for (int i = 0; i < bailout_entries_.length(); i++) { | 374 // Assert that we don't have multiple bailout entries for the same node. |
| 375 if (bailout_entries_.at(i).id == entry.id) { | 375 for (int i = 0; i < bailout_entries_.length(); i++) { |
| 376 AstPrinter printer; | 376 if (bailout_entries_.at(i).id == entry.id) { |
| 377 PrintF("%s", printer.PrintProgram(info_->function())); | 377 AstPrinter printer; |
| 378 UNREACHABLE(); | 378 PrintF("%s", printer.PrintProgram(info_->function())); |
| 379 UNREACHABLE(); |
| 380 } |
| 379 } | 381 } |
| 380 } | 382 } |
| 381 #endif // DEBUG | 383 #endif // DEBUG |
| 382 bailout_entries_.Add(entry); | 384 bailout_entries_.Add(entry); |
| 383 } | 385 } |
| 384 | 386 |
| 385 | 387 |
| 386 void FullCodeGenerator::RecordStackCheck(unsigned ast_id) { | 388 void FullCodeGenerator::RecordStackCheck(unsigned ast_id) { |
| 387 // The pc offset does not need to be encoded and packed together with a | 389 // The pc offset does not need to be encoded and packed together with a |
| 388 // state. | 390 // state. |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 } | 1304 } |
| 1303 | 1305 |
| 1304 return false; | 1306 return false; |
| 1305 } | 1307 } |
| 1306 | 1308 |
| 1307 | 1309 |
| 1308 #undef __ | 1310 #undef __ |
| 1309 | 1311 |
| 1310 | 1312 |
| 1311 } } // namespace v8::internal | 1313 } } // namespace v8::internal |
| OLD | NEW |