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

Side by Side Diff: src/parsing/parser.cc

Issue 1931653006: Version 5.1.281.21 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.1
Patch Set: Created 4 years, 7 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/assembler.cc ('k') | src/utils.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698