| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/parser.h" | 5 #include "vm/parser.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 5439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5450 if ((lhs_literal != NULL) && (rhs_literal != NULL)) { | 5450 if ((lhs_literal != NULL) && (rhs_literal != NULL)) { |
| 5451 if (lhs_literal->literal().IsDouble() && | 5451 if (lhs_literal->literal().IsDouble() && |
| 5452 rhs_literal->literal().IsDouble()) { | 5452 rhs_literal->literal().IsDouble()) { |
| 5453 Double& dbl_obj = Double::ZoneHandle(); | 5453 Double& dbl_obj = Double::ZoneHandle(); |
| 5454 dbl_obj ^= lhs_literal->literal().raw(); | 5454 dbl_obj ^= lhs_literal->literal().raw(); |
| 5455 double left_double = dbl_obj.value(); | 5455 double left_double = dbl_obj.value(); |
| 5456 dbl_obj ^= rhs_literal->literal().raw(); | 5456 dbl_obj ^= rhs_literal->literal().raw(); |
| 5457 double right_double = dbl_obj.value(); | 5457 double right_double = dbl_obj.value(); |
| 5458 if (binary_op == Token::kDIV) { | 5458 if (binary_op == Token::kDIV) { |
| 5459 dbl_obj = Double::New(left_double / right_double); | 5459 dbl_obj = Double::New(left_double / right_double); |
| 5460 dbl_obj ^= dbl_obj.Canonicalize(); |
| 5460 return new LiteralNode(op_pos, dbl_obj); | 5461 return new LiteralNode(op_pos, dbl_obj); |
| 5461 } | 5462 } |
| 5462 } | 5463 } |
| 5463 } | 5464 } |
| 5464 return new BinaryOpNode(op_pos, binary_op, lhs, rhs); | 5465 return new BinaryOpNode(op_pos, binary_op, lhs, rhs); |
| 5465 } | 5466 } |
| 5466 | 5467 |
| 5467 | 5468 |
| 5468 AstNode* Parser::ExpandAssignableOp(intptr_t op_pos, | 5469 AstNode* Parser::ExpandAssignableOp(intptr_t op_pos, |
| 5469 Token::Kind assignment_op, | 5470 Token::Kind assignment_op, |
| (...skipping 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7631 } | 7632 } |
| 7632 | 7633 |
| 7633 | 7634 |
| 7634 void Parser::SkipNestedExpr() { | 7635 void Parser::SkipNestedExpr() { |
| 7635 const bool saved_mode = SetAllowFunctionLiterals(true); | 7636 const bool saved_mode = SetAllowFunctionLiterals(true); |
| 7636 SkipExpr(); | 7637 SkipExpr(); |
| 7637 SetAllowFunctionLiterals(saved_mode); | 7638 SetAllowFunctionLiterals(saved_mode); |
| 7638 } | 7639 } |
| 7639 | 7640 |
| 7640 } // namespace dart | 7641 } // namespace dart |
| OLD | NEW |