Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: src/full-codegen.h

Issue 7216008: Better codegen for '<expression> === void <literal>'. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(Token::Value op,
366 Expression* left, 366 Expression* left,
367 Expression* right, 367 Expression* right,
368 Label* if_true, 368 Label* if_true,
369 Label* if_false, 369 Label* if_false,
370 Label* fall_through); 370 Label* fall_through);
371 371
372 // Platform-specific code for comparing the type of a value with
373 // a given literal string.
374 void EmitLiteralCompareTypeof(Expression* expr,
375 Handle<String> check,
376 Label* if_true,
377 Label* if_false,
378 Label* fall_through);
379
380 // Platform-specific code for strict equality comparison with
381 // the undefined value.
382 void EmitLiteralCompareUndefined(Expression* expr,
383 Label* if_true,
384 Label* if_false,
385 Label* fall_through);
386
372 // Bailout support. 387 // Bailout support.
373 void PrepareForBailout(Expression* node, State state); 388 void PrepareForBailout(Expression* node, State state);
374 void PrepareForBailoutForId(int id, State state); 389 void PrepareForBailoutForId(int id, State state);
375 390
376 // Record a call's return site offset, used to rebuild the frame if the 391 // Record a call's return site offset, used to rebuild the frame if the
377 // called function was inlined at the site. 392 // called function was inlined at the site.
378 void RecordJSReturnSite(Call* call); 393 void RecordJSReturnSite(Call* call);
379 394
380 // Prepare for bailout before a test (or compare) and branch. If 395 // Prepare for bailout before a test (or compare) and branch. If
381 // should_normalize, then the following comparison will not handle the 396 // should_normalize, then the following comparison will not handle the
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 767
753 friend class NestedStatement; 768 friend class NestedStatement;
754 769
755 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); 770 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator);
756 }; 771 };
757 772
758 773
759 } } // namespace v8::internal 774 } } // namespace v8::internal
760 775
761 #endif // V8_FULL_CODEGEN_H_ 776 #endif // V8_FULL_CODEGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698