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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
10 #include "src/hydrogen.h" | 10 #include "src/hydrogen.h" |
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 } | 1095 } |
1096 | 1096 |
1097 | 1097 |
1098 template <> | 1098 template <> |
1099 HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() { | 1099 HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() { |
1100 Isolate* isolate = graph()->isolate(); | 1100 Isolate* isolate = graph()->isolate(); |
1101 CompareNilICStub* stub = casted_stub(); | 1101 CompareNilICStub* stub = casted_stub(); |
1102 HIfContinuation continuation; | 1102 HIfContinuation continuation; |
1103 Handle<Map> sentinel_map(isolate->heap()->meta_map()); | 1103 Handle<Map> sentinel_map(isolate->heap()->meta_map()); |
1104 Type* type = stub->GetType(zone(), sentinel_map); | 1104 Type* type = stub->GetType(zone(), sentinel_map); |
1105 BuildCompareNil(GetParameter(0), type, &continuation); | 1105 BuildCompareNil(GetParameter(0), type, &continuation, kEmbedMapsViaWeakCells); |
1106 IfBuilder if_nil(this, &continuation); | 1106 IfBuilder if_nil(this, &continuation); |
1107 if_nil.Then(); | 1107 if_nil.Then(); |
1108 if (continuation.IsFalseReachable()) { | 1108 if (continuation.IsFalseReachable()) { |
1109 if_nil.Else(); | 1109 if_nil.Else(); |
1110 if_nil.Return(graph()->GetConstant0()); | 1110 if_nil.Return(graph()->GetConstant0()); |
1111 } | 1111 } |
1112 if_nil.End(); | 1112 if_nil.End(); |
1113 return continuation.IsTrueReachable() | 1113 return continuation.IsTrueReachable() |
1114 ? graph()->GetConstant1() | 1114 ? graph()->GetConstant1() |
1115 : graph()->GetConstantUndefined(); | 1115 : graph()->GetConstantUndefined(); |
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2200 // megamorphic case is handled as part of the default stub. | 2200 // megamorphic case is handled as part of the default stub. |
2201 DCHECK(!FLAG_vector_ics); | 2201 DCHECK(!FLAG_vector_ics); |
2202 | 2202 |
2203 // Probe the stub cache. | 2203 // Probe the stub cache. |
2204 Add<HTailCallThroughMegamorphicCache>(receiver, name); | 2204 Add<HTailCallThroughMegamorphicCache>(receiver, name); |
2205 | 2205 |
2206 // We never continue. | 2206 // We never continue. |
2207 return graph()->GetConstant0(); | 2207 return graph()->GetConstant0(); |
2208 } | 2208 } |
2209 } } // namespace v8::internal | 2209 } } // namespace v8::internal |
OLD | NEW |