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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 TestContext context(this, expr, if_true, if_false, fall_through); | 355 TestContext context(this, expr, if_true, if_false, fall_through); |
356 VisitInCurrentContext(expr); | 356 VisitInCurrentContext(expr); |
357 } | 357 } |
358 | 358 |
359 void VisitDeclarations(ZoneList<Declaration*>* declarations); | 359 void VisitDeclarations(ZoneList<Declaration*>* declarations); |
360 void DeclareGlobals(Handle<FixedArray> pairs); | 360 void DeclareGlobals(Handle<FixedArray> pairs); |
361 | 361 |
362 // Try to perform a comparison as a fast inlined literal compare if | 362 // Try to perform a comparison as a fast inlined literal compare if |
363 // the operands allow it. Returns true if the compare operations | 363 // the operands allow it. Returns true if the compare operations |
364 // has been matched and all code generated; false otherwise. | 364 // has been matched and all code generated; false otherwise. |
365 bool TryLiteralCompare(Token::Value op, | 365 bool TryLiteralCompare(CompareOperation* compare, |
366 Expression* left, | |
367 Expression* right, | |
368 Label* if_true, | 366 Label* if_true, |
369 Label* if_false, | 367 Label* if_false, |
370 Label* fall_through); | 368 Label* fall_through); |
371 | 369 |
| 370 // Platform-specific code for comparing the type of a value with |
| 371 // a given literal string. |
| 372 void EmitLiteralCompareTypeof(Expression* expr, |
| 373 Handle<String> check, |
| 374 Label* if_true, |
| 375 Label* if_false, |
| 376 Label* fall_through); |
| 377 |
| 378 // Platform-specific code for strict equality comparison with |
| 379 // the undefined value. |
| 380 void EmitLiteralCompareUndefined(Expression* expr, |
| 381 Label* if_true, |
| 382 Label* if_false, |
| 383 Label* fall_through); |
| 384 |
372 // Bailout support. | 385 // Bailout support. |
373 void PrepareForBailout(Expression* node, State state); | 386 void PrepareForBailout(Expression* node, State state); |
374 void PrepareForBailoutForId(int id, State state); | 387 void PrepareForBailoutForId(int id, State state); |
375 | 388 |
376 // Record a call's return site offset, used to rebuild the frame if the | 389 // Record a call's return site offset, used to rebuild the frame if the |
377 // called function was inlined at the site. | 390 // called function was inlined at the site. |
378 void RecordJSReturnSite(Call* call); | 391 void RecordJSReturnSite(Call* call); |
379 | 392 |
380 // Prepare for bailout before a test (or compare) and branch. If | 393 // Prepare for bailout before a test (or compare) and branch. If |
381 // should_normalize, then the following comparison will not handle the | 394 // should_normalize, then the following comparison will not handle the |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 | 765 |
753 friend class NestedStatement; | 766 friend class NestedStatement; |
754 | 767 |
755 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); | 768 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); |
756 }; | 769 }; |
757 | 770 |
758 | 771 |
759 } } // namespace v8::internal | 772 } } // namespace v8::internal |
760 | 773 |
761 #endif // V8_FULL_CODEGEN_H_ | 774 #endif // V8_FULL_CODEGEN_H_ |
OLD | NEW |