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

Side by Side Diff: src/deoptimizer.cc

Issue 1422213002: [turbofan] Introduce simplified NumberBitwise{Or,Xor,And} operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use NewNumber instead of NewHeapNumber in the Deoptimizer. Created 5 years, 1 month 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/compiler/verifier.cc ('k') | test/cctest/compiler/test-js-typed-lowering.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/deoptimizer.h" 5 #include "src/deoptimizer.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/disasm.h" 9 #include "src/disasm.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 2473 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 } 2484 }
2485 2485
2486 case kUInt32: { 2486 case kUInt32: {
2487 bool is_smi = (uint32_value() <= static_cast<uintptr_t>(Smi::kMaxValue)); 2487 bool is_smi = (uint32_value() <= static_cast<uintptr_t>(Smi::kMaxValue));
2488 if (is_smi) { 2488 if (is_smi) {
2489 return Smi::FromInt(static_cast<int32_t>(uint32_value())); 2489 return Smi::FromInt(static_cast<int32_t>(uint32_value()));
2490 } 2490 }
2491 break; 2491 break;
2492 } 2492 }
2493 2493
2494 case kDouble: {
2495 int int_value = FastD2IChecked(double_value());
2496 bool is_smi = !IsMinusZero(double_value()) &&
2497 double_value() == int_value && Smi::IsValid(int_value);
2498 if (is_smi) {
2499 return Smi::FromInt(static_cast<int32_t>(int_value));
2500 }
2501 break;
2502 }
2503
2504 case kBoolBit: { 2494 case kBoolBit: {
2505 if (uint32_value() == 0) { 2495 if (uint32_value() == 0) {
2506 return isolate()->heap()->false_value(); 2496 return isolate()->heap()->false_value();
2507 } else { 2497 } else {
2508 CHECK_EQ(1U, uint32_value()); 2498 CHECK_EQ(1U, uint32_value());
2509 return isolate()->heap()->true_value(); 2499 return isolate()->heap()->true_value();
2510 } 2500 }
2511 } 2501 }
2512 2502
2513 default: 2503 default:
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
3412 DCHECK(value_info->IsMaterializedObject()); 3402 DCHECK(value_info->IsMaterializedObject());
3413 3403
3414 value_info->value_ = 3404 value_info->value_ =
3415 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3405 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3416 } 3406 }
3417 } 3407 }
3418 } 3408 }
3419 3409
3420 } // namespace internal 3410 } // namespace internal
3421 } // namespace v8 3411 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698