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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 VisitInCurrentContext(expr); | 384 VisitInCurrentContext(expr); |
385 } | 385 } |
386 | 386 |
387 void VisitDeclarations(ZoneList<Declaration*>* declarations); | 387 void VisitDeclarations(ZoneList<Declaration*>* declarations); |
388 void DeclareGlobals(Handle<FixedArray> pairs); | 388 void DeclareGlobals(Handle<FixedArray> pairs); |
389 int DeclareGlobalsFlags(); | 389 int DeclareGlobalsFlags(); |
390 | 390 |
391 // Try to perform a comparison as a fast inlined literal compare if | 391 // Try to perform a comparison as a fast inlined literal compare if |
392 // the operands allow it. Returns true if the compare operations | 392 // the operands allow it. Returns true if the compare operations |
393 // has been matched and all code generated; false otherwise. | 393 // has been matched and all code generated; false otherwise. |
394 bool TryLiteralCompare(CompareOperation* compare, | 394 bool TryLiteralCompare(CompareOperation* compare); |
395 Label* if_true, | |
396 Label* if_false, | |
397 Label* fall_through); | |
398 | 395 |
399 // Platform-specific code for comparing the type of a value with | 396 // Platform-specific code for comparing the type of a value with |
400 // a given literal string. | 397 // a given literal string. |
401 void EmitLiteralCompareTypeof(Expression* expr, | 398 void EmitLiteralCompareTypeof(Expression* expr, Handle<String> check); |
402 Handle<String> check, | |
403 Label* if_true, | |
404 Label* if_false, | |
405 Label* fall_through); | |
406 | 399 |
407 // Platform-specific code for strict equality comparison with | 400 // Platform-specific code for equality comparison with a nil-like value. |
408 // the undefined value. | 401 void EmitLiteralCompareNil(CompareOperation* expr, |
409 void EmitLiteralCompareUndefined(Expression* expr, | 402 Expression* sub_expr, |
410 Label* if_true, | 403 NilValue nil); |
411 Label* if_false, | |
412 Label* fall_through); | |
413 | 404 |
414 // Platform-specific code for equality comparison with the null value. | |
415 void EmitLiteralCompareNull(Expression* expr, | |
416 bool is_strict, | |
417 Label* if_true, | |
418 Label* if_false, | |
419 Label* fall_through); | |
420 // Bailout support. | 405 // Bailout support. |
421 void PrepareForBailout(Expression* node, State state); | 406 void PrepareForBailout(Expression* node, State state); |
422 void PrepareForBailoutForId(int id, State state); | 407 void PrepareForBailoutForId(int id, State state); |
423 | 408 |
424 // Record a call's return site offset, used to rebuild the frame if the | 409 // Record a call's return site offset, used to rebuild the frame if the |
425 // called function was inlined at the site. | 410 // called function was inlined at the site. |
426 void RecordJSReturnSite(Call* call); | 411 void RecordJSReturnSite(Call* call); |
427 | 412 |
428 // Prepare for bailout before a test (or compare) and branch. If | 413 // Prepare for bailout before a test (or compare) and branch. If |
429 // should_normalize, then the following comparison will not handle the | 414 // should_normalize, then the following comparison will not handle the |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 | 824 |
840 friend class NestedStatement; | 825 friend class NestedStatement; |
841 | 826 |
842 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); | 827 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); |
843 }; | 828 }; |
844 | 829 |
845 | 830 |
846 } } // namespace v8::internal | 831 } } // namespace v8::internal |
847 | 832 |
848 #endif // V8_FULL_CODEGEN_H_ | 833 #endif // V8_FULL_CODEGEN_H_ |
OLD | NEW |