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

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

Issue 1744163002: [stubs] Introduce a proper ToBooleanStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips Created 4 years, 9 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/heap/heap-inl.h ('k') | src/interpreter/interpreter.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/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 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 2713
2714 2714
2715 RUNTIME_FUNCTION(Runtime_Unreachable) { 2715 RUNTIME_FUNCTION(Runtime_Unreachable) {
2716 UNREACHABLE(); 2716 UNREACHABLE();
2717 CHECK(false); 2717 CHECK(false);
2718 return isolate->heap()->undefined_value(); 2718 return isolate->heap()->undefined_value();
2719 } 2719 }
2720 2720
2721 2721
2722 Handle<Object> ToBooleanIC::ToBoolean(Handle<Object> object) { 2722 Handle<Object> ToBooleanIC::ToBoolean(Handle<Object> object) {
2723 ToBooleanStub stub(isolate(), target()->extra_ic_state()); 2723 ToBooleanICStub stub(isolate(), target()->extra_ic_state());
2724 bool to_boolean_value = stub.UpdateStatus(object); 2724 bool to_boolean_value = stub.UpdateStatus(object);
2725 Handle<Code> code = stub.GetCode(); 2725 Handle<Code> code = stub.GetCode();
2726 set_target(*code); 2726 set_target(*code);
2727 return isolate()->factory()->ToBoolean(to_boolean_value); 2727 return isolate()->factory()->ToBoolean(to_boolean_value);
2728 } 2728 }
2729 2729
2730 2730
2731 RUNTIME_FUNCTION(Runtime_ToBooleanIC_Miss) { 2731 RUNTIME_FUNCTION(Runtime_ToBooleanIC_Miss) {
2732 TimerEventScope<TimerEventIcMiss> timer(isolate); 2732 TimerEventScope<TimerEventIcMiss> timer(isolate);
2733 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8"), "V8.IcMiss"); 2733 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8"), "V8.IcMiss");
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2903 KeyedLoadICNexus nexus(vector, vector_slot); 2903 KeyedLoadICNexus nexus(vector, vector_slot);
2904 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 2904 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
2905 ic.UpdateState(receiver, key); 2905 ic.UpdateState(receiver, key);
2906 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); 2906 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2907 } 2907 }
2908 2908
2909 return *result; 2909 return *result;
2910 } 2910 }
2911 } // namespace internal 2911 } // namespace internal
2912 } // namespace v8 2912 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698