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

Side by Side Diff: src/ast.h

Issue 6879081: Added type recording for unary minus and unary bitwise negation. Note that the (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Incorporated Florian's suggested changes Created 9 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 | 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 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 1383
1384 private: 1384 private:
1385 Handle<String> name_; 1385 Handle<String> name_;
1386 const Runtime::Function* function_; 1386 const Runtime::Function* function_;
1387 ZoneList<Expression*>* arguments_; 1387 ZoneList<Expression*>* arguments_;
1388 }; 1388 };
1389 1389
1390 1390
1391 class UnaryOperation: public Expression { 1391 class UnaryOperation: public Expression {
1392 public: 1392 public:
1393 UnaryOperation(Token::Value op, Expression* expression) 1393 UnaryOperation(Token::Value op, Expression* expression, int pos)
1394 : op_(op), expression_(expression) { 1394 : op_(op), expression_(expression), pos_(pos) {
1395 ASSERT(Token::IsUnaryOp(op)); 1395 ASSERT(Token::IsUnaryOp(op));
1396 } 1396 }
1397 1397
1398 DECLARE_NODE_TYPE(UnaryOperation) 1398 DECLARE_NODE_TYPE(UnaryOperation)
1399 1399
1400 virtual bool IsInlineable() const; 1400 virtual bool IsInlineable() const;
1401 1401
1402 virtual bool ResultOverwriteAllowed(); 1402 virtual bool ResultOverwriteAllowed();
1403 1403
1404 Token::Value op() const { return op_; } 1404 Token::Value op() const { return op_; }
1405 Expression* expression() const { return expression_; } 1405 Expression* expression() const { return expression_; }
1406 virtual int position() const { return pos_; }
1406 1407
1407 private: 1408 private:
1408 Token::Value op_; 1409 Token::Value op_;
1409 Expression* expression_; 1410 Expression* expression_;
1411 int pos_;
1410 }; 1412 };
1411 1413
1412 1414
1413 class BinaryOperation: public Expression { 1415 class BinaryOperation: public Expression {
1414 public: 1416 public:
1415 BinaryOperation(Token::Value op, 1417 BinaryOperation(Token::Value op,
1416 Expression* left, 1418 Expression* left,
1417 Expression* right, 1419 Expression* right,
1418 int pos) 1420 int pos)
1419 : op_(op), left_(left), right_(right), pos_(pos) { 1421 : op_(op), left_(left), right_(right), pos_(pos) {
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 2178
2177 private: 2179 private:
2178 Isolate* isolate_; 2180 Isolate* isolate_;
2179 bool stack_overflow_; 2181 bool stack_overflow_;
2180 }; 2182 };
2181 2183
2182 2184
2183 } } // namespace v8::internal 2185 } } // namespace v8::internal
2184 2186
2185 #endif // V8_AST_H_ 2187 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/code-stubs.h » ('j') | src/ia32/full-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698