| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/parsing/parser.h" | 5 #include "src/parsing/parser.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/ast-expression-rewriter.h" | 9 #include "src/ast/ast-expression-rewriter.h" |
| 10 #include "src/ast/ast-expression-visitor.h" | 10 #include "src/ast/ast-expression-visitor.h" |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 *x = factory->NewNumberLiteral(value, pos, has_dot); | 433 *x = factory->NewNumberLiteral(value, pos, has_dot); |
| 434 return true; | 434 return true; |
| 435 } | 435 } |
| 436 case Token::SAR: { | 436 case Token::SAR: { |
| 437 uint32_t shift = DoubleToInt32(y_val) & 0x1f; | 437 uint32_t shift = DoubleToInt32(y_val) & 0x1f; |
| 438 int value = ArithmeticShiftRight(DoubleToInt32(x_val), shift); | 438 int value = ArithmeticShiftRight(DoubleToInt32(x_val), shift); |
| 439 *x = factory->NewNumberLiteral(value, pos, has_dot); | 439 *x = factory->NewNumberLiteral(value, pos, has_dot); |
| 440 return true; | 440 return true; |
| 441 } | 441 } |
| 442 case Token::EXP: { | 442 case Token::EXP: { |
| 443 double value = std::pow(x_val, y_val); | 443 double value = Pow(x_val, y_val); |
| 444 int int_value = static_cast<int>(value); | 444 int int_value = static_cast<int>(value); |
| 445 *x = factory->NewNumberLiteral( | 445 *x = factory->NewNumberLiteral( |
| 446 int_value == value && value != -0.0 ? int_value : value, pos, | 446 int_value == value && value != -0.0 ? int_value : value, pos, |
| 447 has_dot); | 447 has_dot); |
| 448 return true; | 448 return true; |
| 449 } | 449 } |
| 450 default: | 450 default: |
| 451 break; | 451 break; |
| 452 } | 452 } |
| 453 } | 453 } |
| (...skipping 6415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6869 try_block, target); | 6869 try_block, target); |
| 6870 final_loop = target; | 6870 final_loop = target; |
| 6871 } | 6871 } |
| 6872 | 6872 |
| 6873 return final_loop; | 6873 return final_loop; |
| 6874 } | 6874 } |
| 6875 | 6875 |
| 6876 | 6876 |
| 6877 } // namespace internal | 6877 } // namespace internal |
| 6878 } // namespace v8 | 6878 } // namespace v8 |
| OLD | NEW |