Chromium Code Reviews| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 383 Expression* sub_expr, | 383 Expression* sub_expr, |
| 384 Handle<String> check); | 384 Handle<String> check); |
| 385 | 385 |
| 386 // Platform-specific code for equality comparison with a nil-like value. | 386 // Platform-specific code for equality comparison with a nil-like value. |
| 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(int id, State state); | 393 void PrepareForBailoutForId(unsigned id, State state); |
|
Steven
2011/11/30 17:50:42
Indeed the ast node ids are represented by an 'uns
| |
| 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(Call* 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); |
| 408 | 408 |
| 409 // Platform-specific code for a variable, constant, or function | 409 // Platform-specific code for a variable, constant, or function |
| 410 // declaration. Functions have an initial value. | 410 // declaration. Functions have an initial value. |
| 411 void EmitDeclaration(VariableProxy* proxy, | 411 void EmitDeclaration(VariableProxy* proxy, |
| 412 VariableMode mode, | 412 VariableMode mode, |
| 413 FunctionLiteral* function, | 413 FunctionLiteral* function, |
| 414 int* global_count); | 414 int* global_count); |
| 415 | 415 |
| 416 // Platform-specific code for checking the stack limit at the back edge of | 416 // Platform-specific code for checking the stack limit at the back edge of |
| 417 // a loop. | 417 // a loop. |
| 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(int 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 sequences 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 void EmitCallWithIC(Call* expr, Handle<Object> name, RelocInfo::Mode mode); |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 761 | 761 |
| 762 friend class NestedStatement; | 762 friend class NestedStatement; |
| 763 | 763 |
| 764 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); | 764 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); |
| 765 }; | 765 }; |
| 766 | 766 |
| 767 | 767 |
| 768 } } // namespace v8::internal | 768 } } // namespace v8::internal |
| 769 | 769 |
| 770 #endif // V8_FULL_CODEGEN_H_ | 770 #endif // V8_FULL_CODEGEN_H_ |
| OLD | NEW |