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

Side by Side Diff: src/ic/ic.cc

Issue 2418063003: [ic] Smi-handlers are now able to represent loads of constants from descriptor array. (Closed)
Patch Set: Created 4 years, 2 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/handler-configuration-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-arguments-inl.h" 8 #include "src/api-arguments-inl.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 SimpleFieldLoadFromPrototype(field, map, holder); 1203 SimpleFieldLoadFromPrototype(field, map, holder);
1204 if (!handler.is_null()) { 1204 if (!handler.is_null()) {
1205 return handler; 1205 return handler;
1206 } 1206 }
1207 break; // Custom-compiled handler. 1207 break; // Custom-compiled handler.
1208 } 1208 }
1209 1209
1210 // -------------- Constant properties -------------- 1210 // -------------- Constant properties --------------
1211 DCHECK(lookup->property_details().type() == DATA_CONSTANT); 1211 DCHECK(lookup->property_details().type() == DATA_CONSTANT);
1212 if (receiver_is_holder) { 1212 if (receiver_is_holder) {
1213 if (FLAG_tf_load_ic_stub) {
1214 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantDH);
1215 return SmiHandler::MakeLoadConstantHandler(
1216 isolate(), lookup->GetConstantIndex());
1217 }
1213 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantStub); 1218 TRACE_HANDLER_STATS(isolate(), LoadIC_LoadConstantStub);
1214 LoadConstantStub stub(isolate(), lookup->GetConstantIndex()); 1219 LoadConstantStub stub(isolate(), lookup->GetConstantIndex());
1215 return stub.GetCode(); 1220 return stub.GetCode();
1216 } 1221 }
1217 break; // Custom-compiled handler. 1222 break; // Custom-compiled handler.
1218 } 1223 }
1219 1224
1220 case LookupIterator::INTEGER_INDEXED_EXOTIC: 1225 case LookupIterator::INTEGER_INDEXED_EXOTIC:
1221 TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub); 1226 TRACE_HANDLER_STATS(isolate(), LoadIC_SlowStub);
1222 return slow_stub(); 1227 return slow_stub();
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after
2961 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); 2966 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state());
2962 it.Next(); 2967 it.Next();
2963 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 2968 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
2964 Object::GetProperty(&it)); 2969 Object::GetProperty(&it));
2965 } 2970 }
2966 2971
2967 return *result; 2972 return *result;
2968 } 2973 }
2969 } // namespace internal 2974 } // namespace internal
2970 } // namespace v8 2975 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/handler-configuration-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698