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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 Code* optimized_code); | 277 Code* optimized_code); |
278 void DeleteFrameDescriptions(); | 278 void DeleteFrameDescriptions(); |
279 | 279 |
280 void DoComputeOutputFrames(); | 280 void DoComputeOutputFrames(); |
281 void DoComputeOsrOutputFrame(); | 281 void DoComputeOsrOutputFrame(); |
282 void DoComputeJSFrame(TranslationIterator* iterator, int frame_index); | 282 void DoComputeJSFrame(TranslationIterator* iterator, int frame_index); |
283 void DoComputeArgumentsAdaptorFrame(TranslationIterator* iterator, | 283 void DoComputeArgumentsAdaptorFrame(TranslationIterator* iterator, |
284 int frame_index); | 284 int frame_index); |
285 void DoComputeConstructStubFrame(TranslationIterator* iterator, | 285 void DoComputeConstructStubFrame(TranslationIterator* iterator, |
286 int frame_index); | 286 int frame_index); |
287 void DoComputeSetterStubFrame(TranslationIterator* iterator, | 287 void DoComputeAccessorStubFrame(TranslationIterator* iterator, |
288 int frame_index); | 288 int frame_index, |
| 289 bool is_setter_stub_frame); |
289 void DoTranslateCommand(TranslationIterator* iterator, | 290 void DoTranslateCommand(TranslationIterator* iterator, |
290 int frame_index, | 291 int frame_index, |
291 unsigned output_offset); | 292 unsigned output_offset); |
292 // Translate a command for OSR. Updates the input offset to be used for | 293 // Translate a command for OSR. Updates the input offset to be used for |
293 // the next command. Returns false if translation of the command failed | 294 // the next command. Returns false if translation of the command failed |
294 // (e.g., a number conversion failed) and may or may not have updated the | 295 // (e.g., a number conversion failed) and may or may not have updated the |
295 // input offset. | 296 // input offset. |
296 bool DoOsrTranslateCommand(TranslationIterator* iterator, | 297 bool DoOsrTranslateCommand(TranslationIterator* iterator, |
297 int* input_offset); | 298 int* input_offset); |
298 | 299 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 int index_; | 555 int index_; |
555 }; | 556 }; |
556 | 557 |
557 | 558 |
558 class Translation BASE_EMBEDDED { | 559 class Translation BASE_EMBEDDED { |
559 public: | 560 public: |
560 enum Opcode { | 561 enum Opcode { |
561 BEGIN, | 562 BEGIN, |
562 JS_FRAME, | 563 JS_FRAME, |
563 CONSTRUCT_STUB_FRAME, | 564 CONSTRUCT_STUB_FRAME, |
| 565 GETTER_STUB_FRAME, |
564 SETTER_STUB_FRAME, | 566 SETTER_STUB_FRAME, |
565 ARGUMENTS_ADAPTOR_FRAME, | 567 ARGUMENTS_ADAPTOR_FRAME, |
566 REGISTER, | 568 REGISTER, |
567 INT32_REGISTER, | 569 INT32_REGISTER, |
568 UINT32_REGISTER, | 570 UINT32_REGISTER, |
569 DOUBLE_REGISTER, | 571 DOUBLE_REGISTER, |
570 STACK_SLOT, | 572 STACK_SLOT, |
571 INT32_STACK_SLOT, | 573 INT32_STACK_SLOT, |
572 UINT32_STACK_SLOT, | 574 UINT32_STACK_SLOT, |
573 DOUBLE_STACK_SLOT, | 575 DOUBLE_STACK_SLOT, |
(...skipping 14 matching lines...) Expand all Loading... |
588 buffer_->Add(frame_count, zone); | 590 buffer_->Add(frame_count, zone); |
589 buffer_->Add(jsframe_count, zone); | 591 buffer_->Add(jsframe_count, zone); |
590 } | 592 } |
591 | 593 |
592 int index() const { return index_; } | 594 int index() const { return index_; } |
593 | 595 |
594 // Commands. | 596 // Commands. |
595 void BeginJSFrame(BailoutId node_id, int literal_id, unsigned height); | 597 void BeginJSFrame(BailoutId node_id, int literal_id, unsigned height); |
596 void BeginArgumentsAdaptorFrame(int literal_id, unsigned height); | 598 void BeginArgumentsAdaptorFrame(int literal_id, unsigned height); |
597 void BeginConstructStubFrame(int literal_id, unsigned height); | 599 void BeginConstructStubFrame(int literal_id, unsigned height); |
| 600 void BeginGetterStubFrame(int literal_id); |
598 void BeginSetterStubFrame(int literal_id); | 601 void BeginSetterStubFrame(int literal_id); |
599 void StoreRegister(Register reg); | 602 void StoreRegister(Register reg); |
600 void StoreInt32Register(Register reg); | 603 void StoreInt32Register(Register reg); |
601 void StoreUint32Register(Register reg); | 604 void StoreUint32Register(Register reg); |
602 void StoreDoubleRegister(DoubleRegister reg); | 605 void StoreDoubleRegister(DoubleRegister reg); |
603 void StoreStackSlot(int index); | 606 void StoreStackSlot(int index); |
604 void StoreInt32StackSlot(int index); | 607 void StoreInt32StackSlot(int index); |
605 void StoreUint32StackSlot(int index); | 608 void StoreUint32StackSlot(int index); |
606 void StoreDoubleStackSlot(int index); | 609 void StoreDoubleStackSlot(int index); |
607 void StoreLiteral(int literal_id); | 610 void StoreLiteral(int literal_id); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 Object** expression_stack_; | 811 Object** expression_stack_; |
809 int source_position_; | 812 int source_position_; |
810 | 813 |
811 friend class Deoptimizer; | 814 friend class Deoptimizer; |
812 }; | 815 }; |
813 #endif | 816 #endif |
814 | 817 |
815 } } // namespace v8::internal | 818 } } // namespace v8::internal |
816 | 819 |
817 #endif // V8_DEOPTIMIZER_H_ | 820 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |