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

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

Issue 2060213002: Revert of Replace all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-types.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 "src/crankshaft/hydrogen-instructions.h" 5 #include "src/crankshaft/hydrogen-instructions.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/ieee754.h" 8 #include "src/base/ieee754.h"
9 #include "src/base/safe_math.h" 9 #include "src/base/safe_math.h"
10 #include "src/crankshaft/hydrogen-infer-representation.h" 10 #include "src/crankshaft/hydrogen-infer-representation.h"
(...skipping 2402 matching lines...) Expand 10 before | Expand all | Expand 10 after
2413 2413
2414 Maybe<HConstant*> HConstant::CopyToTruncatedNumber(Isolate* isolate, 2414 Maybe<HConstant*> HConstant::CopyToTruncatedNumber(Isolate* isolate,
2415 Zone* zone) { 2415 Zone* zone) {
2416 HConstant* res = NULL; 2416 HConstant* res = NULL;
2417 Handle<Object> handle = this->handle(isolate); 2417 Handle<Object> handle = this->handle(isolate);
2418 if (handle->IsBoolean()) { 2418 if (handle->IsBoolean()) {
2419 res = handle->BooleanValue() ? 2419 res = handle->BooleanValue() ?
2420 new(zone) HConstant(1) : new(zone) HConstant(0); 2420 new(zone) HConstant(1) : new(zone) HConstant(0);
2421 } else if (handle->IsUndefined(isolate)) { 2421 } else if (handle->IsUndefined(isolate)) {
2422 res = new (zone) HConstant(std::numeric_limits<double>::quiet_NaN()); 2422 res = new (zone) HConstant(std::numeric_limits<double>::quiet_NaN());
2423 } else if (handle->IsNull(isolate)) { 2423 } else if (handle->IsNull()) {
2424 res = new(zone) HConstant(0); 2424 res = new(zone) HConstant(0);
2425 } else if (handle->IsString()) { 2425 } else if (handle->IsString()) {
2426 res = new(zone) HConstant(String::ToNumber(Handle<String>::cast(handle))); 2426 res = new(zone) HConstant(String::ToNumber(Handle<String>::cast(handle)));
2427 } 2427 }
2428 return res != NULL ? Just(res) : Nothing<HConstant*>(); 2428 return res != NULL ? Just(res) : Nothing<HConstant*>();
2429 } 2429 }
2430 2430
2431 2431
2432 std::ostream& HConstant::PrintDataTo(std::ostream& os) const { // NOLINT 2432 std::ostream& HConstant::PrintDataTo(std::ostream& os) const { // NOLINT
2433 if (HasInteger32Value()) { 2433 if (HasInteger32Value()) {
(...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after
4032 case HObjectAccess::kExternalMemory: 4032 case HObjectAccess::kExternalMemory:
4033 os << "[external-memory]"; 4033 os << "[external-memory]";
4034 break; 4034 break;
4035 } 4035 }
4036 4036
4037 return os << "@" << access.offset(); 4037 return os << "@" << access.offset();
4038 } 4038 }
4039 4039
4040 } // namespace internal 4040 } // namespace internal
4041 } // namespace v8 4041 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698