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

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

Issue 2647493002: [ic] Clean up handler boilerplate (Closed)
Patch Set: rebased 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/ic/accessor-assembler-impl.h ('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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 case LookupIterator::INTEGER_INDEXED_EXOTIC: 276 case LookupIterator::INTEGER_INDEXED_EXOTIC:
277 case LookupIterator::TRANSITION: 277 case LookupIterator::TRANSITION:
278 UNREACHABLE(); 278 UNREACHABLE();
279 case LookupIterator::DATA: { 279 case LookupIterator::DATA: {
280 DCHECK_EQ(kData, it->property_details().kind()); 280 DCHECK_EQ(kData, it->property_details().kind());
281 DCHECK_EQ(kField, it->property_details().location()); 281 DCHECK_EQ(kField, it->property_details().location());
282 __ Move(LoadFieldDescriptor::ReceiverRegister(), reg); 282 __ Move(LoadFieldDescriptor::ReceiverRegister(), reg);
283 Handle<Object> smi_handler = 283 Handle<Object> smi_handler =
284 LoadIC::SimpleFieldLoad(isolate(), it->GetFieldIndex()); 284 LoadIC::SimpleFieldLoad(isolate(), it->GetFieldIndex());
285 __ Move(LoadFieldDescriptor::SmiHandlerRegister(), smi_handler); 285 __ Move(LoadFieldDescriptor::SmiHandlerRegister(), smi_handler);
286 LoadFieldStub stub(isolate()); 286 GenerateTailCall(masm(), isolate()->builtins()->LoadField());
287 GenerateTailCall(masm(), stub.GetCode());
288 break; 287 break;
289 } 288 }
290 case LookupIterator::ACCESSOR: 289 case LookupIterator::ACCESSOR:
291 if (it->GetAccessors()->IsAccessorInfo()) { 290 if (it->GetAccessors()->IsAccessorInfo()) {
292 Handle<AccessorInfo> info = 291 Handle<AccessorInfo> info =
293 Handle<AccessorInfo>::cast(it->GetAccessors()); 292 Handle<AccessorInfo>::cast(it->GetAccessors());
294 DCHECK_NOT_NULL(info->getter()); 293 DCHECK_NOT_NULL(info->getter());
295 GenerateLoadCallback(reg, info); 294 GenerateLoadCallback(reg, info);
296 } else { 295 } else {
297 Handle<Object> function = handle( 296 Handle<Object> function = handle(
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 382 }
384 383
385 void ElementHandlerCompiler::CompileElementHandlers( 384 void ElementHandlerCompiler::CompileElementHandlers(
386 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { 385 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) {
387 for (int i = 0; i < receiver_maps->length(); ++i) { 386 for (int i = 0; i < receiver_maps->length(); ++i) {
388 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); 387 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate()));
389 } 388 }
390 } 389 }
391 } // namespace internal 390 } // namespace internal
392 } // namespace v8 391 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/accessor-assembler-impl.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698