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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 798413003: Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Svens smiley. Created 6 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/mips/code-stubs-mips.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 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 <limits>
6
5 #include "src/v8.h" 7 #include "src/v8.h"
6 8
7 #include "src/base/bits.h" 9 #include "src/base/bits.h"
8 #include "src/double.h" 10 #include "src/double.h"
9 #include "src/factory.h" 11 #include "src/factory.h"
10 #include "src/hydrogen-infer-representation.h" 12 #include "src/hydrogen-infer-representation.h"
11 #include "src/property-details-inl.h" 13 #include "src/property-details-inl.h"
12 14
13 #if V8_TARGET_ARCH_IA32 15 #if V8_TARGET_ARCH_IA32
14 #include "src/ia32/lithium-ia32.h" // NOLINT 16 #include "src/ia32/lithium-ia32.h" // NOLINT
(...skipping 4333 matching lines...) Expand 10 before | Expand all | Expand 10 after
4348 if ((c_left->HasNumberValue() && c_right->HasNumberValue())) { 4350 if ((c_left->HasNumberValue() && c_right->HasNumberValue())) {
4349 if (c_right->DoubleValue() != 0) { 4351 if (c_right->DoubleValue() != 0) {
4350 double double_res = c_left->DoubleValue() / c_right->DoubleValue(); 4352 double double_res = c_left->DoubleValue() / c_right->DoubleValue();
4351 if (IsInt32Double(double_res)) { 4353 if (IsInt32Double(double_res)) {
4352 return H_CONSTANT_INT(double_res); 4354 return H_CONSTANT_INT(double_res);
4353 } 4355 }
4354 return H_CONSTANT_DOUBLE(double_res); 4356 return H_CONSTANT_DOUBLE(double_res);
4355 } else { 4357 } else {
4356 int sign = Double(c_left->DoubleValue()).Sign() * 4358 int sign = Double(c_left->DoubleValue()).Sign() *
4357 Double(c_right->DoubleValue()).Sign(); // Right could be -0. 4359 Double(c_right->DoubleValue()).Sign(); // Right could be -0.
4358 return H_CONSTANT_DOUBLE(sign * V8_INFINITY); 4360 return H_CONSTANT_DOUBLE(sign *
4361 std::numeric_limits<double>::infinity());
4359 } 4362 }
4360 } 4363 }
4361 } 4364 }
4362 return new(zone) HDiv(context, left, right); 4365 return new(zone) HDiv(context, left, right);
4363 } 4366 }
4364 4367
4365 4368
4366 HInstruction* HBitwise::New( 4369 HInstruction* HBitwise::New(
4367 Zone* zone, HValue* context, Token::Value op, HValue* left, HValue* right) { 4370 Zone* zone, HValue* context, Token::Value op, HValue* left, HValue* right) {
4368 if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) { 4371 if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) {
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
4815 break; 4818 break;
4816 case HObjectAccess::kExternalMemory: 4819 case HObjectAccess::kExternalMemory:
4817 os << "[external-memory]"; 4820 os << "[external-memory]";
4818 break; 4821 break;
4819 } 4822 }
4820 4823
4821 return os << "@" << access.offset(); 4824 return os << "@" << access.offset();
4822 } 4825 }
4823 4826
4824 } } // namespace v8::internal 4827 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698