| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 isolate()->factory()->NewFixedArray(array_size, TENURED)); | 433 isolate()->factory()->NewFixedArray(array_size, TENURED)); |
| 434 for (int i = 0; i < length; i++) { | 434 for (int i = 0; i < length; i++) { |
| 435 cache->SetAstId(i, type_feedback_cells_[i].ast_id); | 435 cache->SetAstId(i, type_feedback_cells_[i].ast_id); |
| 436 cache->SetCell(i, *type_feedback_cells_[i].cell); | 436 cache->SetCell(i, *type_feedback_cells_[i].cell); |
| 437 } | 437 } |
| 438 TypeFeedbackInfo::cast(code->type_feedback_info())->set_type_feedback_cells( | 438 TypeFeedbackInfo::cast(code->type_feedback_info())->set_type_feedback_cells( |
| 439 *cache); | 439 *cache); |
| 440 } | 440 } |
| 441 | 441 |
| 442 | 442 |
| 443 | |
| 444 void FullCodeGenerator::PrepareForBailout(Expression* node, State state) { | 443 void FullCodeGenerator::PrepareForBailout(Expression* node, State state) { |
| 445 PrepareForBailoutForId(node->id(), state); | 444 PrepareForBailoutForId(node->id(), state); |
| 446 } | 445 } |
| 447 | 446 |
| 448 | 447 |
| 448 void FullCodeGenerator::CallLoadIC(ContextualMode mode, TypeFeedbackId id) { |
| 449 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); |
| 450 CallIC(ic, mode, id); |
| 451 } |
| 452 |
| 453 |
| 454 void FullCodeGenerator::CallStoreIC(ContextualMode mode, TypeFeedbackId id) { |
| 455 Handle<Code> ic = StoreIC::initialize_stub(isolate(), strict_mode(), mode); |
| 456 CallIC(ic, mode, id); |
| 457 } |
| 458 |
| 459 |
| 449 void FullCodeGenerator::RecordJSReturnSite(Call* call) { | 460 void FullCodeGenerator::RecordJSReturnSite(Call* call) { |
| 450 // We record the offset of the function return so we can rebuild the frame | 461 // We record the offset of the function return so we can rebuild the frame |
| 451 // if the function was inlined, i.e., this is the return address in the | 462 // if the function was inlined, i.e., this is the return address in the |
| 452 // inlined function's frame. | 463 // inlined function's frame. |
| 453 // | 464 // |
| 454 // The state is ignored. We defensively set it to TOS_REG, which is the | 465 // The state is ignored. We defensively set it to TOS_REG, which is the |
| 455 // real state of the unoptimized code at the return site. | 466 // real state of the unoptimized code at the return site. |
| 456 PrepareForBailoutForId(call->ReturnId(), TOS_REG); | 467 PrepareForBailoutForId(call->ReturnId(), TOS_REG); |
| 457 #ifdef DEBUG | 468 #ifdef DEBUG |
| 458 // In debug builds, mark the return so we can verify that this function | 469 // In debug builds, mark the return so we can verify that this function |
| (...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1735 } | 1746 } |
| 1736 return true; | 1747 return true; |
| 1737 } | 1748 } |
| 1738 #endif // DEBUG | 1749 #endif // DEBUG |
| 1739 | 1750 |
| 1740 | 1751 |
| 1741 #undef __ | 1752 #undef __ |
| 1742 | 1753 |
| 1743 | 1754 |
| 1744 } } // namespace v8::internal | 1755 } } // namespace v8::internal |
| OLD | NEW |