| OLD | NEW |
| 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 2899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2910 Code* code = NULL; | 2910 Code* code = NULL; |
| 2911 CHECK(stub.FindCodeInCache(&code)); | 2911 CHECK(stub.FindCodeInCache(&code)); |
| 2912 | 2912 |
| 2913 SetTargetAtAddress(address, code, constant_pool); | 2913 SetTargetAtAddress(address, code, constant_pool); |
| 2914 } | 2914 } |
| 2915 | 2915 |
| 2916 | 2916 |
| 2917 Handle<Object> CompareNilIC::DoCompareNilSlow(Isolate* isolate, NilValue nil, | 2917 Handle<Object> CompareNilIC::DoCompareNilSlow(Isolate* isolate, NilValue nil, |
| 2918 Handle<Object> object) { | 2918 Handle<Object> object) { |
| 2919 if (object->IsNull() || object->IsUndefined()) { | 2919 if (object->IsNull() || object->IsUndefined()) { |
| 2920 return handle(Smi::FromInt(true), isolate); | 2920 return isolate->factory()->true_value(); |
| 2921 } | 2921 } |
| 2922 return handle(Smi::FromInt(object->IsUndetectableObject()), isolate); | 2922 return isolate->factory()->ToBoolean(object->IsUndetectableObject()); |
| 2923 } | 2923 } |
| 2924 | 2924 |
| 2925 | 2925 |
| 2926 Handle<Object> CompareNilIC::CompareNil(Handle<Object> object) { | 2926 Handle<Object> CompareNilIC::CompareNil(Handle<Object> object) { |
| 2927 ExtraICState extra_ic_state = target()->extra_ic_state(); | 2927 ExtraICState extra_ic_state = target()->extra_ic_state(); |
| 2928 | 2928 |
| 2929 CompareNilICStub stub(isolate(), extra_ic_state); | 2929 CompareNilICStub stub(isolate(), extra_ic_state); |
| 2930 | 2930 |
| 2931 // Extract the current supported types from the patched IC and calculate what | 2931 // Extract the current supported types from the patched IC and calculate what |
| 2932 // types must be supported as a result of the miss. | 2932 // types must be supported as a result of the miss. |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3149 KeyedLoadICNexus nexus(vector, vector_slot); | 3149 KeyedLoadICNexus nexus(vector, vector_slot); |
| 3150 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 3150 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
| 3151 ic.UpdateState(receiver, key); | 3151 ic.UpdateState(receiver, key); |
| 3152 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); | 3152 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); |
| 3153 } | 3153 } |
| 3154 | 3154 |
| 3155 return *result; | 3155 return *result; |
| 3156 } | 3156 } |
| 3157 } // namespace internal | 3157 } // namespace internal |
| 3158 } // namespace v8 | 3158 } // namespace v8 |
| OLD | NEW |