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

Side by Side Diff: src/ast.h

Issue 6606002: Merge revision 6500-6600 from bleeding_edge to the isolates branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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
« no previous file with comments | « src/assembler.cc ('k') | src/ast.cc » ('j') | src/ast.cc » ('J')
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 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 Expression* expression_; 1416 Expression* expression_;
1417 }; 1417 };
1418 1418
1419 1419
1420 class BinaryOperation: public Expression { 1420 class BinaryOperation: public Expression {
1421 public: 1421 public:
1422 BinaryOperation(Token::Value op, 1422 BinaryOperation(Token::Value op,
1423 Expression* left, 1423 Expression* left,
1424 Expression* right, 1424 Expression* right,
1425 int pos) 1425 int pos)
1426 : op_(op), left_(left), right_(right), pos_(pos), is_smi_only_(false) { 1426 : op_(op), left_(left), right_(right), pos_(pos) {
1427 ASSERT(Token::IsBinaryOp(op)); 1427 ASSERT(Token::IsBinaryOp(op));
1428 right_id_ = (op == Token::AND || op == Token::OR) 1428 right_id_ = (op == Token::AND || op == Token::OR)
1429 ? static_cast<int>(GetNextId()) 1429 ? static_cast<int>(GetNextId())
1430 : AstNode::kNoNumber; 1430 : AstNode::kNoNumber;
1431 } 1431 }
1432 1432
1433 // Create the binary operation corresponding to a compound assignment. 1433 // Create the binary operation corresponding to a compound assignment.
1434 explicit BinaryOperation(Assignment* assignment); 1434 explicit BinaryOperation(Assignment* assignment);
1435 1435
1436 DECLARE_NODE_TYPE(BinaryOperation) 1436 DECLARE_NODE_TYPE(BinaryOperation)
1437 1437
1438 virtual bool IsInlineable() const; 1438 virtual bool IsInlineable() const;
1439 1439
1440 virtual bool ResultOverwriteAllowed(); 1440 virtual bool ResultOverwriteAllowed();
1441 1441
1442 Token::Value op() const { return op_; } 1442 Token::Value op() const { return op_; }
1443 Expression* left() const { return left_; } 1443 Expression* left() const { return left_; }
1444 Expression* right() const { return right_; } 1444 Expression* right() const { return right_; }
1445 int position() const { return pos_; } 1445 int position() const { return pos_; }
1446 1446
1447 // Type feedback information.
1448 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1449 bool IsSmiOnly() const { return is_smi_only_; }
1450
1451 // Bailout support. 1447 // Bailout support.
1452 int RightId() const { return right_id_; } 1448 int RightId() const { return right_id_; }
1453 1449
1454 private: 1450 private:
1455 Token::Value op_; 1451 Token::Value op_;
1456 Expression* left_; 1452 Expression* left_;
1457 Expression* right_; 1453 Expression* right_;
1458 int pos_; 1454 int pos_;
1459 bool is_smi_only_;
1460 // The short-circuit logical operations have an AST ID for their 1455 // The short-circuit logical operations have an AST ID for their
1461 // right-hand subexpression. 1456 // right-hand subexpression.
1462 int right_id_; 1457 int right_id_;
1463 }; 1458 };
1464 1459
1465 1460
1466 class IncrementOperation: public Expression { 1461 class IncrementOperation: public Expression {
1467 public: 1462 public:
1468 IncrementOperation(Token::Value op, Expression* expr) 1463 IncrementOperation(Token::Value op, Expression* expr)
1469 : op_(op), expression_(expr) { 1464 : op_(op), expression_(expr) {
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 #undef DEF_VISIT 2194 #undef DEF_VISIT
2200 2195
2201 private: 2196 private:
2202 bool stack_overflow_; 2197 bool stack_overflow_;
2203 }; 2198 };
2204 2199
2205 2200
2206 } } // namespace v8::internal 2201 } } // namespace v8::internal
2207 2202
2208 #endif // V8_AST_H_ 2203 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/ast.cc » ('j') | src/ast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698