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

Side by Side Diff: src/ic/ic.cc

Issue 1491223002: [turbofan] Desugar JSUnaryNot(x) to Select(x, false, true). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo in arm64. Created 5 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
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/ic/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2795 matching lines...) Expand 10 before | Expand all | Expand 10 after
2806 CHECK(false); 2806 CHECK(false);
2807 return isolate->heap()->undefined_value(); 2807 return isolate->heap()->undefined_value();
2808 } 2808 }
2809 2809
2810 2810
2811 Handle<Object> ToBooleanIC::ToBoolean(Handle<Object> object) { 2811 Handle<Object> ToBooleanIC::ToBoolean(Handle<Object> object) {
2812 ToBooleanStub stub(isolate(), target()->extra_ic_state()); 2812 ToBooleanStub stub(isolate(), target()->extra_ic_state());
2813 bool to_boolean_value = stub.UpdateStatus(object); 2813 bool to_boolean_value = stub.UpdateStatus(object);
2814 Handle<Code> code = stub.GetCode(); 2814 Handle<Code> code = stub.GetCode();
2815 set_target(*code); 2815 set_target(*code);
2816 return handle(Smi::FromInt(to_boolean_value ? 1 : 0), isolate()); 2816 return isolate()->factory()->ToBoolean(to_boolean_value);
2817 } 2817 }
2818 2818
2819 2819
2820 RUNTIME_FUNCTION(Runtime_ToBooleanIC_Miss) { 2820 RUNTIME_FUNCTION(Runtime_ToBooleanIC_Miss) {
2821 TimerEventScope<TimerEventIcMiss> timer(isolate); 2821 TimerEventScope<TimerEventIcMiss> timer(isolate);
2822 DCHECK(args.length() == 1); 2822 DCHECK(args.length() == 1);
2823 HandleScope scope(isolate); 2823 HandleScope scope(isolate);
2824 Handle<Object> object = args.at<Object>(0); 2824 Handle<Object> object = args.at<Object>(0);
2825 ToBooleanIC ic(isolate); 2825 ToBooleanIC ic(isolate);
2826 return *ic.ToBoolean(object); 2826 return *ic.ToBoolean(object);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2990 KeyedLoadICNexus nexus(vector, vector_slot); 2990 KeyedLoadICNexus nexus(vector, vector_slot);
2991 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 2991 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
2992 ic.UpdateState(receiver, key); 2992 ic.UpdateState(receiver, key);
2993 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); 2993 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2994 } 2994 }
2995 2995
2996 return *result; 2996 return *result;
2997 } 2997 }
2998 } // namespace internal 2998 } // namespace internal
2999 } // namespace v8 2999 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | test/unittests/compiler/js-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698