| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 void EmitLiteralCompareNil(CompareOperation* expr, | 387 void EmitLiteralCompareNil(CompareOperation* expr, |
| 388 Expression* sub_expr, | 388 Expression* sub_expr, |
| 389 NilValue nil); | 389 NilValue nil); |
| 390 | 390 |
| 391 // Bailout support. | 391 // Bailout support. |
| 392 void PrepareForBailout(Expression* node, State state); | 392 void PrepareForBailout(Expression* node, State state); |
| 393 void PrepareForBailoutForId(unsigned id, State state); | 393 void PrepareForBailoutForId(unsigned id, State state); |
| 394 | 394 |
| 395 // Record a call's return site offset, used to rebuild the frame if the | 395 // Record a call's return site offset, used to rebuild the frame if the |
| 396 // called function was inlined at the site. | 396 // called function was inlined at the site. |
| 397 void RecordJSReturnSite(Call* call); | 397 void RecordJSReturnSite(CallBase* call); |
| 398 | 398 |
| 399 // Prepare for bailout before a test (or compare) and branch. If | 399 // Prepare for bailout before a test (or compare) and branch. If |
| 400 // should_normalize, then the following comparison will not handle the | 400 // should_normalize, then the following comparison will not handle the |
| 401 // canonical JS true value so we will insert a (dead) test against true at | 401 // canonical JS true value so we will insert a (dead) test against true at |
| 402 // the actual bailout target from the optimized code. If not | 402 // the actual bailout target from the optimized code. If not |
| 403 // should_normalize, the true and false labels are ignored. | 403 // should_normalize, the true and false labels are ignored. |
| 404 void PrepareForBailoutBeforeSplit(Expression* expr, | 404 void PrepareForBailoutBeforeSplit(Expression* expr, |
| 405 bool should_normalize, | 405 bool should_normalize, |
| 406 Label* if_true, | 406 Label* if_true, |
| 407 Label* if_false); | 407 Label* if_false); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 418 void EmitStackCheck(IterationStatement* stmt); | 418 void EmitStackCheck(IterationStatement* stmt); |
| 419 // Record the OSR AST id corresponding to a stack check in the code. | 419 // Record the OSR AST id corresponding to a stack check in the code. |
| 420 void RecordStackCheck(unsigned osr_ast_id); | 420 void RecordStackCheck(unsigned osr_ast_id); |
| 421 // Emit a table of stack check ids and pcs into the code stream. Return | 421 // Emit a table of stack check ids and pcs into the code stream. Return |
| 422 // the offset of the start of the table. | 422 // the offset of the start of the table. |
| 423 unsigned EmitStackCheckTable(); | 423 unsigned EmitStackCheckTable(); |
| 424 | 424 |
| 425 // Platform-specific return sequence | 425 // Platform-specific return sequence |
| 426 void EmitReturnSequence(); | 426 void EmitReturnSequence(); |
| 427 | 427 |
| 428 // Platform-specific code sequences for calls | 428 // Platform-specific code sequence for calls |
| 429 void EmitCallWithStub(Call* expr, CallFunctionFlags flags); | 429 void EmitCallWithStub(Call* expr, CallFunctionFlags flags); |
| 430 void EmitCallWithIC(Call* expr, Handle<Object> name, RelocInfo::Mode mode); | 430 |
| 431 void EmitKeyedCallWithIC(Call* expr, Expression* key); | 431 // Platform-specific code sequences for calls and constructor calls |
| 432 void EmitCallWithIC(CallBase* expr, |
| 433 Handle<Object> name, |
| 434 RelocInfo::Mode mode); |
| 435 void EmitKeyedCallWithIC(CallBase* expr, |
| 436 Expression* key, |
| 437 RelocInfo::Mode mode); |
| 432 | 438 |
| 433 // Platform-specific code for inline runtime calls. | 439 // Platform-specific code for inline runtime calls. |
| 434 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id); | 440 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id); |
| 435 | 441 |
| 436 void EmitInlineRuntimeCall(CallRuntime* expr); | 442 void EmitInlineRuntimeCall(CallRuntime* expr); |
| 437 | 443 |
| 438 #define EMIT_INLINE_RUNTIME_CALL(name, x, y) \ | 444 #define EMIT_INLINE_RUNTIME_CALL(name, x, y) \ |
| 439 void Emit##name(CallRuntime* expr); | 445 void Emit##name(CallRuntime* expr); |
| 440 INLINE_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) | 446 INLINE_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) |
| 441 INLINE_RUNTIME_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) | 447 INLINE_RUNTIME_FUNCTION_LIST(EMIT_INLINE_RUNTIME_CALL) |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 | 767 |
| 762 friend class NestedStatement; | 768 friend class NestedStatement; |
| 763 | 769 |
| 764 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); | 770 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); |
| 765 }; | 771 }; |
| 766 | 772 |
| 767 | 773 |
| 768 } } // namespace v8::internal | 774 } } // namespace v8::internal |
| 769 | 775 |
| 770 #endif // V8_FULL_CODEGEN_H_ | 776 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |