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

Side by Side Diff: vm/parser.cc

Issue 8921012: Allocate double temporaries in old space ... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years 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
« vm/ast.cc ('K') | « vm/opt_code_generator_ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« vm/ast.cc ('K') | « vm/opt_code_generator_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698