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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 // Emit code to pop values from the stack associated with nested statements | 476 // Emit code to pop values from the stack associated with nested statements |
477 // like try/catch, try/finally, etc, running the finallies and unwinding the | 477 // like try/catch, try/finally, etc, running the finallies and unwinding the |
478 // handlers as needed. | 478 // handlers as needed. |
479 void EmitUnwindBeforeReturn(); | 479 void EmitUnwindBeforeReturn(); |
480 | 480 |
481 // Platform-specific return sequence | 481 // Platform-specific return sequence |
482 void EmitReturnSequence(); | 482 void EmitReturnSequence(); |
483 | 483 |
484 // Platform-specific code sequences for calls | 484 // Platform-specific code sequences for calls |
485 void EmitCallWithStub(Call* expr, CallFunctionFlags flags); | 485 void EmitCallWithStub(Call* expr, CallFunctionFlags flags); |
486 void EmitCallWithIC(Call* expr, Handle<Object> name, RelocInfo::Mode mode); | 486 void EmitCallWithIC(Call* expr, Handle<Object> name, ContextualMode mode); |
487 void EmitKeyedCallWithIC(Call* expr, Expression* key); | 487 void EmitKeyedCallWithIC(Call* expr, Expression* key); |
488 | 488 |
489 // Platform-specific code for inline runtime calls. | 489 // Platform-specific code for inline runtime calls. |
490 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id); | 490 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id); |
491 | 491 |
492 void EmitInlineRuntimeCall(CallRuntime* expr); | 492 void EmitInlineRuntimeCall(CallRuntime* expr); |
493 | 493 |
494 #define EMIT_INLINE_RUNTIME_CALL(name, x, y) \ | 494 #define EMIT_INLINE_RUNTIME_CALL(name, x, y) \ |
495 void Emit##name(CallRuntime* expr); | 495 void Emit##name(CallRuntime* expr); |
496 INLINE_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) | 496 INLINE_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 // Complete a named property assignment. The receiver is expected on top | 558 // Complete a named property assignment. The receiver is expected on top |
559 // of the stack and the right-hand-side value in the accumulator. | 559 // of the stack and the right-hand-side value in the accumulator. |
560 void EmitNamedPropertyAssignment(Assignment* expr); | 560 void EmitNamedPropertyAssignment(Assignment* expr); |
561 | 561 |
562 // Complete a keyed property assignment. The receiver and key are | 562 // Complete a keyed property assignment. The receiver and key are |
563 // expected on top of the stack and the right-hand-side value in the | 563 // expected on top of the stack and the right-hand-side value in the |
564 // accumulator. | 564 // accumulator. |
565 void EmitKeyedPropertyAssignment(Assignment* expr); | 565 void EmitKeyedPropertyAssignment(Assignment* expr); |
566 | 566 |
567 void CallIC(Handle<Code> code, | 567 void CallIC(Handle<Code> code, |
568 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 568 ContextualMode mode = NOT_CONTEXTUAL, |
569 TypeFeedbackId id = TypeFeedbackId::None()); | 569 TypeFeedbackId id = TypeFeedbackId::None()); |
570 | 570 |
| 571 void CallLoadIC(ContextualMode mode, |
| 572 TypeFeedbackId id = TypeFeedbackId::None()); |
| 573 void CallStoreIC(ContextualMode mode, |
| 574 TypeFeedbackId id = TypeFeedbackId::None()); |
| 575 |
571 void SetFunctionPosition(FunctionLiteral* fun); | 576 void SetFunctionPosition(FunctionLiteral* fun); |
572 void SetReturnPosition(FunctionLiteral* fun); | 577 void SetReturnPosition(FunctionLiteral* fun); |
573 void SetStatementPosition(Statement* stmt); | 578 void SetStatementPosition(Statement* stmt); |
574 void SetExpressionPosition(Expression* expr); | 579 void SetExpressionPosition(Expression* expr); |
575 void SetStatementPosition(int pos); | 580 void SetStatementPosition(int pos); |
576 void SetSourcePosition(int pos); | 581 void SetSourcePosition(int pos); |
577 | 582 |
578 // Non-local control flow support. | 583 // Non-local control flow support. |
579 void EnterFinallyBlock(); | 584 void EnterFinallyBlock(); |
580 void ExitFinallyBlock(); | 585 void ExitFinallyBlock(); |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 | 964 |
960 Address start_; | 965 Address start_; |
961 Address instruction_start_; | 966 Address instruction_start_; |
962 uint32_t length_; | 967 uint32_t length_; |
963 }; | 968 }; |
964 | 969 |
965 | 970 |
966 } } // namespace v8::internal | 971 } } // namespace v8::internal |
967 | 972 |
968 #endif // V8_FULL_CODEGEN_H_ | 973 #endif // V8_FULL_CODEGEN_H_ |
OLD | NEW |