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

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

Issue 1592001: Simplify IA32 code generator API. (Closed)
Patch Set: Created 10 years, 8 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
« no previous file with comments | « src/ast.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 // through the context chain. 485 // through the context chain.
486 void LoadTypeofExpression(Expression* x); 486 void LoadTypeofExpression(Expression* x);
487 487
488 // Translate the value on top of the frame into control flow to the 488 // Translate the value on top of the frame into control flow to the
489 // control destination. 489 // control destination.
490 void ToBoolean(ControlDestination* destination); 490 void ToBoolean(ControlDestination* destination);
491 491
492 // Generate code that computes a shortcutting logical operation. 492 // Generate code that computes a shortcutting logical operation.
493 void GenerateLogicalBooleanOperation(BinaryOperation* node); 493 void GenerateLogicalBooleanOperation(BinaryOperation* node);
494 494
495 void GenericBinaryOperation( 495 void GenericBinaryOperation(BinaryOperation* expr,
496 Token::Value op, 496 OverwriteMode overwrite_mode);
497 StaticType* type,
498 OverwriteMode overwrite_mode,
499 bool no_negative_zero);
500 497
501 // If possible, combine two constant smi values using op to produce 498 // If possible, combine two constant smi values using op to produce
502 // a smi result, and push it on the virtual frame, all at compile time. 499 // a smi result, and push it on the virtual frame, all at compile time.
503 // Returns true if it succeeds. Otherwise it has no effect. 500 // Returns true if it succeeds. Otherwise it has no effect.
504 bool FoldConstantSmis(Token::Value op, int left, int right); 501 bool FoldConstantSmis(Token::Value op, int left, int right);
505 502
506 // Emit code to perform a binary operation on a constant 503 // Emit code to perform a binary operation on a constant
507 // smi and a likely smi. Consumes the Result operand. 504 // smi and a likely smi. Consumes the Result operand.
508 Result ConstantSmiBinaryOperation(Token::Value op, 505 Result ConstantSmiBinaryOperation(BinaryOperation* expr,
509 Result* operand, 506 Result* operand,
510 Handle<Object> constant_operand, 507 Handle<Object> constant_operand,
511 StaticType* type,
512 bool reversed, 508 bool reversed,
513 OverwriteMode overwrite_mode, 509 OverwriteMode overwrite_mode);
514 bool no_negative_zero);
515 510
516 // Emit code to perform a binary operation on two likely smis. 511 // Emit code to perform a binary operation on two likely smis.
517 // The code to handle smi arguments is produced inline. 512 // The code to handle smi arguments is produced inline.
518 // Consumes the Results left and right. 513 // Consumes the Results left and right.
519 Result LikelySmiBinaryOperation(Token::Value op, 514 Result LikelySmiBinaryOperation(BinaryOperation* expr,
520 Result* left, 515 Result* left,
521 Result* right, 516 Result* right,
522 OverwriteMode overwrite_mode, 517 OverwriteMode overwrite_mode);
523 bool no_negative_zero);
524 518
525 519
526 // Emit code to perform a binary operation on two untagged int32 values. 520 // Emit code to perform a binary operation on two untagged int32 values.
527 // The values are on top of the frame, and the result is pushed on the frame. 521 // The values are on top of the frame, and the result is pushed on the frame.
528 void Int32BinaryOperation(BinaryOperation* node); 522 void Int32BinaryOperation(BinaryOperation* node);
529 523
530 524
531 void Comparison(AstNode* node, 525 void Comparison(AstNode* node,
532 Condition cc, 526 Condition cc,
533 bool strict, 527 bool strict,
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 return ObjectBits::encode(object_.code()) | 1048 return ObjectBits::encode(object_.code()) |
1055 AddressBits::encode(addr_.code()) | 1049 AddressBits::encode(addr_.code()) |
1056 ScratchBits::encode(scratch_.code()); 1050 ScratchBits::encode(scratch_.code());
1057 } 1051 }
1058 }; 1052 };
1059 1053
1060 1054
1061 } } // namespace v8::internal 1055 } } // namespace v8::internal
1062 1056
1063 #endif // V8_IA32_CODEGEN_IA32_H_ 1057 #endif // V8_IA32_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698