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

Side by Side Diff: runtime/vm/ast.cc

Issue 11941021: More ^= to |= (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | runtime/vm/code_descriptors.cc » ('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 (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/ast.h" 5 #include "vm/ast.h"
6 #include "vm/compiler.h" 6 #include "vm/compiler.h"
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 #include "vm/resolver.h" 10 #include "vm/resolver.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const Instance& literal = 88 const Instance& literal =
89 Instance::ZoneHandle(Integer::New(-smi.Value())); 89 Instance::ZoneHandle(Integer::New(-smi.Value()));
90 return new LiteralNode(this->token_pos(), literal); 90 return new LiteralNode(this->token_pos(), literal);
91 } 91 }
92 if (literal().IsDouble()) { 92 if (literal().IsDouble()) {
93 const Double& dbl = Double::Cast(literal()); 93 const Double& dbl = Double::Cast(literal());
94 // Preserve negative zero. 94 // Preserve negative zero.
95 double new_value = (dbl.value() == 0.0) ? -0.0 : (0.0 - dbl.value()); 95 double new_value = (dbl.value() == 0.0) ? -0.0 : (0.0 - dbl.value());
96 Double& double_instance = 96 Double& double_instance =
97 Double::ZoneHandle(Double::New(new_value, Heap::kOld)); 97 Double::ZoneHandle(Double::New(new_value, Heap::kOld));
98 double_instance ^= double_instance.Canonicalize(); 98 double_instance |= double_instance.Canonicalize();
99 return new LiteralNode(this->token_pos(), double_instance); 99 return new LiteralNode(this->token_pos(), double_instance);
100 } 100 }
101 } 101 }
102 return NULL; 102 return NULL;
103 } 103 }
104 104
105 105
106 bool ComparisonNode::IsKindValid() const { 106 bool ComparisonNode::IsKindValid() const {
107 return Token::IsRelationalOperator(kind_) 107 return Token::IsRelationalOperator(kind_)
108 || Token::IsEqualityOperator(kind_) 108 || Token::IsEqualityOperator(kind_)
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 if (result.IsError() || result.IsNull()) { 434 if (result.IsError() || result.IsNull()) {
435 // TODO(turnidge): We could get better error messages by returning 435 // TODO(turnidge): We could get better error messages by returning
436 // the Error object directly to the parser. This will involve 436 // the Error object directly to the parser. This will involve
437 // replumbing all of the EvalConstExpr methods. 437 // replumbing all of the EvalConstExpr methods.
438 return NULL; 438 return NULL;
439 } 439 }
440 return &Instance::ZoneHandle(Instance::Cast(result).raw()); 440 return &Instance::ZoneHandle(Instance::Cast(result).raw());
441 } 441 }
442 442
443 } // namespace dart 443 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_descriptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698