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