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

Side by Side Diff: src/ic/handler-compiler.cc

Issue 2601503002: Add Object::IsNullOrUndefined(Isolate*) helper method (Closed)
Patch Set: fixing merge conflicts Created 3 years, 11 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/full-codegen/x87/full-codegen-x87.cc ('k') | src/ic/ic.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 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
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
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
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698