OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/handler-compiler.h" | 5 #include "src/ic/handler-compiler.h" |
6 | 6 |
7 #include "src/field-type.h" | 7 #include "src/field-type.h" |
8 #include "src/ic/call-optimization.h" | 8 #include "src/ic/call-optimization.h" |
9 #include "src/ic/handler-configuration-inl.h" | 9 #include "src/ic/handler-configuration-inl.h" |
10 #include "src/ic/ic-inl.h" | 10 #include "src/ic/ic-inl.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 Label* miss, | 154 Label* miss, |
155 Register scratch1, | 155 Register scratch1, |
156 Register scratch2) { | 156 Register scratch2) { |
157 Register holder_reg; | 157 Register holder_reg; |
158 Handle<Map> last_map; | 158 Handle<Map> last_map; |
159 if (holder().is_null()) { | 159 if (holder().is_null()) { |
160 holder_reg = receiver(); | 160 holder_reg = receiver(); |
161 last_map = map(); | 161 last_map = map(); |
162 // If |type| has null as its prototype, |holder()| is | 162 // If |type| has null as its prototype, |holder()| is |
163 // Handle<JSObject>::null(). | 163 // Handle<JSObject>::null(). |
164 DCHECK(last_map->prototype() == isolate()->heap()->null_value()); | 164 DCHECK(last_map->prototype()->IsNull(isolate())); |
165 } else { | 165 } else { |
166 last_map = handle(holder()->map()); | 166 last_map = handle(holder()->map()); |
167 // This condition matches the branches below. | 167 // This condition matches the branches below. |
168 bool need_holder = | 168 bool need_holder = |
169 last_map->is_dictionary_map() && !last_map->IsJSGlobalObjectMap(); | 169 last_map->is_dictionary_map() && !last_map->IsJSGlobalObjectMap(); |
170 holder_reg = | 170 holder_reg = |
171 FrontendHeader(receiver(), name, miss, | 171 FrontendHeader(receiver(), name, miss, |
172 need_holder ? RETURN_HOLDER : DONT_RETURN_ANYTHING); | 172 need_holder ? RETURN_HOLDER : DONT_RETURN_ANYTHING); |
173 } | 173 } |
174 | 174 |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 } | 498 } |
499 | 499 |
500 void ElementHandlerCompiler::CompileElementHandlers( | 500 void ElementHandlerCompiler::CompileElementHandlers( |
501 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { | 501 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { |
502 for (int i = 0; i < receiver_maps->length(); ++i) { | 502 for (int i = 0; i < receiver_maps->length(); ++i) { |
503 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); | 503 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); |
504 } | 504 } |
505 } | 505 } |
506 } // namespace internal | 506 } // namespace internal |
507 } // namespace v8 | 507 } // namespace v8 |
OLD | NEW |