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

Side by Side Diff: src/stub-cache.cc

Issue 102563004: Zonify types in compiler frontend (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/stub-cache.h ('k') | src/type-info.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 Code::HANDLER, kNoExtraICState, cache_holder, Code::NORMAL, kind); 121 Code::HANDLER, kNoExtraICState, cache_holder, Code::NORMAL, kind);
122 122
123 Handle<Object> probe(stub_holder->FindInCodeCache(*name, flags), isolate_); 123 Handle<Object> probe(stub_holder->FindInCodeCache(*name, flags), isolate_);
124 if (probe->IsCode()) return Handle<Code>::cast(probe); 124 if (probe->IsCode()) return Handle<Code>::cast(probe);
125 return Handle<Code>::null(); 125 return Handle<Code>::null();
126 } 126 }
127 127
128 128
129 Handle<Code> StubCache::ComputeMonomorphicIC( 129 Handle<Code> StubCache::ComputeMonomorphicIC(
130 Handle<Name> name, 130 Handle<Name> name,
131 Handle<Type> type, 131 Handle<HeapType> type,
132 Handle<Code> handler, 132 Handle<Code> handler,
133 ExtraICState extra_ic_state) { 133 ExtraICState extra_ic_state) {
134 Code::Kind kind = handler->handler_kind(); 134 Code::Kind kind = handler->handler_kind();
135 InlineCacheHolderFlag flag = IC::GetCodeCacheFlag(*type); 135 InlineCacheHolderFlag flag = IC::GetCodeCacheFlag(*type);
136 136
137 Handle<Map> stub_holder; 137 Handle<Map> stub_holder;
138 Handle<Code> ic; 138 Handle<Code> ic;
139 // There are multiple string maps that all use the same prototype. That 139 // There are multiple string maps that all use the same prototype. That
140 // prototype cannot hold multiple handlers, one for each of the string maps, 140 // prototype cannot hold multiple handlers, one for each of the string maps,
141 // for a single name. Hence, turn off caching of the IC. 141 // for a single name. Hence, turn off caching of the IC.
142 bool can_be_cached = !type->Is(Type::String()); 142 bool can_be_cached = !type->Is(HeapType::String());
143 if (can_be_cached) { 143 if (can_be_cached) {
144 stub_holder = IC::GetCodeCacheHolder(flag, *type, isolate()); 144 stub_holder = IC::GetCodeCacheHolder(flag, *type, isolate());
145 ic = FindIC(name, stub_holder, kind, extra_ic_state, flag); 145 ic = FindIC(name, stub_holder, kind, extra_ic_state, flag);
146 if (!ic.is_null()) return ic; 146 if (!ic.is_null()) return ic;
147 } 147 }
148 148
149 if (kind == Code::LOAD_IC) { 149 if (kind == Code::LOAD_IC) {
150 LoadStubCompiler ic_compiler(isolate(), flag); 150 LoadStubCompiler ic_compiler(isolate(), flag);
151 ic = ic_compiler.CompileMonomorphicIC(type, handler, name); 151 ic = ic_compiler.CompileMonomorphicIC(type, handler, name);
152 } else if (kind == Code::KEYED_LOAD_IC) { 152 } else if (kind == Code::KEYED_LOAD_IC) {
153 KeyedLoadStubCompiler ic_compiler(isolate(), flag); 153 KeyedLoadStubCompiler ic_compiler(isolate(), flag);
154 ic = ic_compiler.CompileMonomorphicIC(type, handler, name); 154 ic = ic_compiler.CompileMonomorphicIC(type, handler, name);
155 } else if (kind == Code::STORE_IC) { 155 } else if (kind == Code::STORE_IC) {
156 StoreStubCompiler ic_compiler(isolate(), extra_ic_state); 156 StoreStubCompiler ic_compiler(isolate(), extra_ic_state);
157 ic = ic_compiler.CompileMonomorphicIC(type, handler, name); 157 ic = ic_compiler.CompileMonomorphicIC(type, handler, name);
158 } else { 158 } else {
159 ASSERT(kind == Code::KEYED_STORE_IC); 159 ASSERT(kind == Code::KEYED_STORE_IC);
160 ASSERT(STANDARD_STORE == 160 ASSERT(STANDARD_STORE ==
161 KeyedStoreIC::GetKeyedAccessStoreMode(extra_ic_state)); 161 KeyedStoreIC::GetKeyedAccessStoreMode(extra_ic_state));
162 KeyedStoreStubCompiler ic_compiler(isolate(), extra_ic_state); 162 KeyedStoreStubCompiler ic_compiler(isolate(), extra_ic_state);
163 ic = ic_compiler.CompileMonomorphicIC(type, handler, name); 163 ic = ic_compiler.CompileMonomorphicIC(type, handler, name);
164 } 164 }
165 165
166 if (can_be_cached) Map::UpdateCodeCache(stub_holder, name, ic); 166 if (can_be_cached) Map::UpdateCodeCache(stub_holder, name, ic);
167 return ic; 167 return ic;
168 } 168 }
169 169
170 170
171 Handle<Code> StubCache::ComputeLoadNonexistent(Handle<Name> name, 171 Handle<Code> StubCache::ComputeLoadNonexistent(Handle<Name> name,
172 Handle<Type> type) { 172 Handle<HeapType> type) {
173 InlineCacheHolderFlag flag = IC::GetCodeCacheFlag(*type); 173 InlineCacheHolderFlag flag = IC::GetCodeCacheFlag(*type);
174 Handle<Map> stub_holder = IC::GetCodeCacheHolder(flag, *type, isolate()); 174 Handle<Map> stub_holder = IC::GetCodeCacheHolder(flag, *type, isolate());
175 // If no dictionary mode objects are present in the prototype chain, the load 175 // If no dictionary mode objects are present in the prototype chain, the load
176 // nonexistent IC stub can be shared for all names for a given map and we use 176 // nonexistent IC stub can be shared for all names for a given map and we use
177 // the empty string for the map cache in that case. If there are dictionary 177 // the empty string for the map cache in that case. If there are dictionary
178 // mode objects involved, we need to do negative lookups in the stub and 178 // mode objects involved, we need to do negative lookups in the stub and
179 // therefore the stub will be specific to the name. 179 // therefore the stub will be specific to the name.
180 Handle<Map> current_map = stub_holder; 180 Handle<Map> current_map = stub_holder;
181 Handle<Name> cache_name = current_map->is_dictionary_map() 181 Handle<Name> cache_name = current_map->is_dictionary_map()
182 ? name : Handle<Name>::cast(isolate()->factory()->empty_string()); 182 ? name : Handle<Name>::cast(isolate()->factory()->empty_string());
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 Handle<Code> StubCache::ComputeLoadElementPolymorphic( 584 Handle<Code> StubCache::ComputeLoadElementPolymorphic(
585 MapHandleList* receiver_maps) { 585 MapHandleList* receiver_maps) {
586 Code::Flags flags = Code::ComputeFlags(Code::KEYED_LOAD_IC, POLYMORPHIC); 586 Code::Flags flags = Code::ComputeFlags(Code::KEYED_LOAD_IC, POLYMORPHIC);
587 Handle<PolymorphicCodeCache> cache = 587 Handle<PolymorphicCodeCache> cache =
588 isolate_->factory()->polymorphic_code_cache(); 588 isolate_->factory()->polymorphic_code_cache();
589 Handle<Object> probe = cache->Lookup(receiver_maps, flags); 589 Handle<Object> probe = cache->Lookup(receiver_maps, flags);
590 if (probe->IsCode()) return Handle<Code>::cast(probe); 590 if (probe->IsCode()) return Handle<Code>::cast(probe);
591 591
592 TypeHandleList types(receiver_maps->length()); 592 TypeHandleList types(receiver_maps->length());
593 for (int i = 0; i < receiver_maps->length(); i++) { 593 for (int i = 0; i < receiver_maps->length(); i++) {
594 types.Add(Type::Class(receiver_maps->at(i), isolate())); 594 types.Add(HeapType::Class(receiver_maps->at(i), isolate()));
595 } 595 }
596 CodeHandleList handlers(receiver_maps->length()); 596 CodeHandleList handlers(receiver_maps->length());
597 KeyedLoadStubCompiler compiler(isolate_); 597 KeyedLoadStubCompiler compiler(isolate_);
598 compiler.CompileElementHandlers(receiver_maps, &handlers); 598 compiler.CompileElementHandlers(receiver_maps, &handlers);
599 Handle<Code> code = compiler.CompilePolymorphicIC( 599 Handle<Code> code = compiler.CompilePolymorphicIC(
600 &types, &handlers, factory()->empty_string(), Code::NORMAL, ELEMENT); 600 &types, &handlers, factory()->empty_string(), Code::NORMAL, ELEMENT);
601 601
602 isolate()->counters()->keyed_load_polymorphic_stubs()->Increment(); 602 isolate()->counters()->keyed_load_polymorphic_stubs()->Increment();
603 603
604 PolymorphicCodeCache::Update(cache, receiver_maps, flags, code); 604 PolymorphicCodeCache::Update(cache, receiver_maps, flags, code);
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 HandlerFrontendHeader(object, holder, name, check, &miss); 1189 HandlerFrontendHeader(object, holder, name, check, &miss);
1190 GenerateJumpFunction(object, function); 1190 GenerateJumpFunction(object, function);
1191 HandlerFrontendFooter(&miss); 1191 HandlerFrontendFooter(&miss);
1192 1192
1193 // Return the generated code. 1193 // Return the generated code.
1194 return GetCode(function); 1194 return GetCode(function);
1195 } 1195 }
1196 1196
1197 1197
1198 Register LoadStubCompiler::HandlerFrontendHeader( 1198 Register LoadStubCompiler::HandlerFrontendHeader(
1199 Handle<Type> type, 1199 Handle<HeapType> type,
1200 Register object_reg, 1200 Register object_reg,
1201 Handle<JSObject> holder, 1201 Handle<JSObject> holder,
1202 Handle<Name> name, 1202 Handle<Name> name,
1203 Label* miss) { 1203 Label* miss) {
1204 PrototypeCheckType check_type = CHECK_ALL_MAPS; 1204 PrototypeCheckType check_type = CHECK_ALL_MAPS;
1205 int function_index = -1; 1205 int function_index = -1;
1206 if (type->Is(Type::String())) { 1206 if (type->Is(HeapType::String())) {
1207 function_index = Context::STRING_FUNCTION_INDEX; 1207 function_index = Context::STRING_FUNCTION_INDEX;
1208 } else if (type->Is(Type::Symbol())) { 1208 } else if (type->Is(HeapType::Symbol())) {
1209 function_index = Context::SYMBOL_FUNCTION_INDEX; 1209 function_index = Context::SYMBOL_FUNCTION_INDEX;
1210 } else if (type->Is(Type::Number())) { 1210 } else if (type->Is(HeapType::Number())) {
1211 function_index = Context::NUMBER_FUNCTION_INDEX; 1211 function_index = Context::NUMBER_FUNCTION_INDEX;
1212 } else if (type->Is(Type::Boolean())) { 1212 } else if (type->Is(HeapType::Boolean())) {
1213 // Booleans use the generic oddball map, so an additional check is needed to 1213 // Booleans use the generic oddball map, so an additional check is needed to
1214 // ensure the receiver is really a boolean. 1214 // ensure the receiver is really a boolean.
1215 GenerateBooleanCheck(object_reg, miss); 1215 GenerateBooleanCheck(object_reg, miss);
1216 function_index = Context::BOOLEAN_FUNCTION_INDEX; 1216 function_index = Context::BOOLEAN_FUNCTION_INDEX;
1217 } else { 1217 } else {
1218 check_type = SKIP_RECEIVER; 1218 check_type = SKIP_RECEIVER;
1219 } 1219 }
1220 1220
1221 if (check_type == CHECK_ALL_MAPS) { 1221 if (check_type == CHECK_ALL_MAPS) {
1222 GenerateDirectLoadGlobalFunctionPrototype( 1222 GenerateDirectLoadGlobalFunctionPrototype(
1223 masm(), function_index, scratch1(), miss); 1223 masm(), function_index, scratch1(), miss);
1224 Object* function = isolate()->native_context()->get(function_index); 1224 Object* function = isolate()->native_context()->get(function_index);
1225 Object* prototype = JSFunction::cast(function)->instance_prototype(); 1225 Object* prototype = JSFunction::cast(function)->instance_prototype();
1226 type = IC::CurrentTypeOf(handle(prototype, isolate()), isolate()); 1226 type = IC::CurrentTypeOf(handle(prototype, isolate()), isolate());
1227 object_reg = scratch1(); 1227 object_reg = scratch1();
1228 } 1228 }
1229 1229
1230 // Check that the maps starting from the prototype haven't changed. 1230 // Check that the maps starting from the prototype haven't changed.
1231 return CheckPrototypes( 1231 return CheckPrototypes(
1232 type, object_reg, holder, scratch1(), scratch2(), scratch3(), 1232 type, object_reg, holder, scratch1(), scratch2(), scratch3(),
1233 name, miss, check_type); 1233 name, miss, check_type);
1234 } 1234 }
1235 1235
1236 1236
1237 // HandlerFrontend for store uses the name register. It has to be restored 1237 // HandlerFrontend for store uses the name register. It has to be restored
1238 // before a miss. 1238 // before a miss.
1239 Register StoreStubCompiler::HandlerFrontendHeader( 1239 Register StoreStubCompiler::HandlerFrontendHeader(
1240 Handle<Type> type, 1240 Handle<HeapType> type,
1241 Register object_reg, 1241 Register object_reg,
1242 Handle<JSObject> holder, 1242 Handle<JSObject> holder,
1243 Handle<Name> name, 1243 Handle<Name> name,
1244 Label* miss) { 1244 Label* miss) {
1245 return CheckPrototypes(type, object_reg, holder, this->name(), 1245 return CheckPrototypes(type, object_reg, holder, this->name(),
1246 scratch1(), scratch2(), name, miss, SKIP_RECEIVER); 1246 scratch1(), scratch2(), name, miss, SKIP_RECEIVER);
1247 } 1247 }
1248 1248
1249 1249
1250 bool BaseLoadStoreStubCompiler::IncludesNumberType(TypeHandleList* types) { 1250 bool BaseLoadStoreStubCompiler::IncludesNumberType(TypeHandleList* types) {
1251 for (int i = 0; i < types->length(); ++i) { 1251 for (int i = 0; i < types->length(); ++i) {
1252 if (types->at(i)->Is(Type::Number())) return true; 1252 if (types->at(i)->Is(HeapType::Number())) return true;
1253 } 1253 }
1254 return false; 1254 return false;
1255 } 1255 }
1256 1256
1257 1257
1258 Register BaseLoadStoreStubCompiler::HandlerFrontend(Handle<Type> type, 1258 Register BaseLoadStoreStubCompiler::HandlerFrontend(Handle<HeapType> type,
1259 Register object_reg, 1259 Register object_reg,
1260 Handle<JSObject> holder, 1260 Handle<JSObject> holder,
1261 Handle<Name> name) { 1261 Handle<Name> name) {
1262 Label miss; 1262 Label miss;
1263 1263
1264 Register reg = HandlerFrontendHeader(type, object_reg, holder, name, &miss); 1264 Register reg = HandlerFrontendHeader(type, object_reg, holder, name, &miss);
1265 1265
1266 HandlerFrontendFooter(name, &miss); 1266 HandlerFrontendFooter(name, &miss);
1267 1267
1268 return reg; 1268 return reg;
1269 } 1269 }
1270 1270
1271 1271
1272 void LoadStubCompiler::NonexistentHandlerFrontend(Handle<Type> type, 1272 void LoadStubCompiler::NonexistentHandlerFrontend(Handle<HeapType> type,
1273 Handle<JSObject> last, 1273 Handle<JSObject> last,
1274 Handle<Name> name) { 1274 Handle<Name> name) {
1275 Label miss; 1275 Label miss;
1276 1276
1277 Register holder; 1277 Register holder;
1278 Handle<Map> last_map; 1278 Handle<Map> last_map;
1279 if (last.is_null()) { 1279 if (last.is_null()) {
1280 holder = receiver(); 1280 holder = receiver();
1281 last_map = IC::TypeToMap(*type, isolate()); 1281 last_map = IC::TypeToMap(*type, isolate());
1282 // If |type| has null as its prototype, |last| is Handle<JSObject>::null(). 1282 // If |type| has null as its prototype, |last| is Handle<JSObject>::null().
(...skipping 24 matching lines...) Expand all
1307 ? Handle<JSGlobalObject>::cast(type->AsConstant()) 1307 ? Handle<JSGlobalObject>::cast(type->AsConstant())
1308 : Handle<JSGlobalObject>::cast(last); 1308 : Handle<JSGlobalObject>::cast(last);
1309 GenerateCheckPropertyCell(masm(), global, name, scratch2(), &miss); 1309 GenerateCheckPropertyCell(masm(), global, name, scratch2(), &miss);
1310 } 1310 }
1311 1311
1312 HandlerFrontendFooter(name, &miss); 1312 HandlerFrontendFooter(name, &miss);
1313 } 1313 }
1314 1314
1315 1315
1316 Handle<Code> LoadStubCompiler::CompileLoadField( 1316 Handle<Code> LoadStubCompiler::CompileLoadField(
1317 Handle<Type> type, 1317 Handle<HeapType> type,
1318 Handle<JSObject> holder, 1318 Handle<JSObject> holder,
1319 Handle<Name> name, 1319 Handle<Name> name,
1320 PropertyIndex field, 1320 PropertyIndex field,
1321 Representation representation) { 1321 Representation representation) {
1322 Label miss; 1322 Label miss;
1323 1323
1324 Register reg = HandlerFrontendHeader(type, receiver(), holder, name, &miss); 1324 Register reg = HandlerFrontendHeader(type, receiver(), holder, name, &miss);
1325 1325
1326 GenerateLoadField(reg, holder, field, representation); 1326 GenerateLoadField(reg, holder, field, representation);
1327 1327
1328 __ bind(&miss); 1328 __ bind(&miss);
1329 TailCallBuiltin(masm(), MissBuiltin(kind())); 1329 TailCallBuiltin(masm(), MissBuiltin(kind()));
1330 1330
1331 // Return the generated code. 1331 // Return the generated code.
1332 return GetCode(kind(), Code::FAST, name); 1332 return GetCode(kind(), Code::FAST, name);
1333 } 1333 }
1334 1334
1335 1335
1336 Handle<Code> LoadStubCompiler::CompileLoadConstant( 1336 Handle<Code> LoadStubCompiler::CompileLoadConstant(
1337 Handle<Type> type, 1337 Handle<HeapType> type,
1338 Handle<JSObject> holder, 1338 Handle<JSObject> holder,
1339 Handle<Name> name, 1339 Handle<Name> name,
1340 Handle<Object> value) { 1340 Handle<Object> value) {
1341 HandlerFrontend(type, receiver(), holder, name); 1341 HandlerFrontend(type, receiver(), holder, name);
1342 GenerateLoadConstant(value); 1342 GenerateLoadConstant(value);
1343 1343
1344 // Return the generated code. 1344 // Return the generated code.
1345 return GetCode(kind(), Code::FAST, name); 1345 return GetCode(kind(), Code::FAST, name);
1346 } 1346 }
1347 1347
1348 1348
1349 Handle<Code> LoadStubCompiler::CompileLoadCallback( 1349 Handle<Code> LoadStubCompiler::CompileLoadCallback(
1350 Handle<Type> type, 1350 Handle<HeapType> type,
1351 Handle<JSObject> holder, 1351 Handle<JSObject> holder,
1352 Handle<Name> name, 1352 Handle<Name> name,
1353 Handle<ExecutableAccessorInfo> callback) { 1353 Handle<ExecutableAccessorInfo> callback) {
1354 Register reg = CallbackHandlerFrontend( 1354 Register reg = CallbackHandlerFrontend(
1355 type, receiver(), holder, name, callback); 1355 type, receiver(), holder, name, callback);
1356 GenerateLoadCallback(reg, callback); 1356 GenerateLoadCallback(reg, callback);
1357 1357
1358 // Return the generated code. 1358 // Return the generated code.
1359 return GetCode(kind(), Code::FAST, name); 1359 return GetCode(kind(), Code::FAST, name);
1360 } 1360 }
1361 1361
1362 1362
1363 Handle<Code> LoadStubCompiler::CompileLoadCallback( 1363 Handle<Code> LoadStubCompiler::CompileLoadCallback(
1364 Handle<Type> type, 1364 Handle<HeapType> type,
1365 Handle<JSObject> holder, 1365 Handle<JSObject> holder,
1366 Handle<Name> name, 1366 Handle<Name> name,
1367 const CallOptimization& call_optimization) { 1367 const CallOptimization& call_optimization) {
1368 ASSERT(call_optimization.is_simple_api_call()); 1368 ASSERT(call_optimization.is_simple_api_call());
1369 Handle<JSFunction> callback = call_optimization.constant_function(); 1369 Handle<JSFunction> callback = call_optimization.constant_function();
1370 CallbackHandlerFrontend(type, receiver(), holder, name, callback); 1370 CallbackHandlerFrontend(type, receiver(), holder, name, callback);
1371 GenerateLoadCallback(call_optimization); 1371 GenerateLoadCallback(call_optimization);
1372 1372
1373 // Return the generated code. 1373 // Return the generated code.
1374 return GetCode(kind(), Code::FAST, name); 1374 return GetCode(kind(), Code::FAST, name);
1375 } 1375 }
1376 1376
1377 1377
1378 Handle<Code> LoadStubCompiler::CompileLoadInterceptor( 1378 Handle<Code> LoadStubCompiler::CompileLoadInterceptor(
1379 Handle<Type> type, 1379 Handle<HeapType> type,
1380 Handle<JSObject> holder, 1380 Handle<JSObject> holder,
1381 Handle<Name> name) { 1381 Handle<Name> name) {
1382 LookupResult lookup(isolate()); 1382 LookupResult lookup(isolate());
1383 LookupPostInterceptor(holder, name, &lookup); 1383 LookupPostInterceptor(holder, name, &lookup);
1384 1384
1385 Register reg = HandlerFrontend(type, receiver(), holder, name); 1385 Register reg = HandlerFrontend(type, receiver(), holder, name);
1386 // TODO(368): Compile in the whole chain: all the interceptors in 1386 // TODO(368): Compile in the whole chain: all the interceptors in
1387 // prototypes and ultimate answer. 1387 // prototypes and ultimate answer.
1388 GenerateLoadInterceptor(reg, type, holder, &lookup, name); 1388 GenerateLoadInterceptor(reg, type, holder, &lookup, name);
1389 1389
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 1422
1423 Register reg = CallbackHandlerFrontend( 1423 Register reg = CallbackHandlerFrontend(
1424 IC::CurrentTypeOf(interceptor_holder, isolate()), 1424 IC::CurrentTypeOf(interceptor_holder, isolate()),
1425 interceptor_reg, holder, name, callback); 1425 interceptor_reg, holder, name, callback);
1426 GenerateLoadCallback(reg, callback); 1426 GenerateLoadCallback(reg, callback);
1427 } 1427 }
1428 } 1428 }
1429 1429
1430 1430
1431 Handle<Code> BaseLoadStoreStubCompiler::CompileMonomorphicIC( 1431 Handle<Code> BaseLoadStoreStubCompiler::CompileMonomorphicIC(
1432 Handle<Type> type, 1432 Handle<HeapType> type,
1433 Handle<Code> handler, 1433 Handle<Code> handler,
1434 Handle<Name> name) { 1434 Handle<Name> name) {
1435 TypeHandleList types(1); 1435 TypeHandleList types(1);
1436 CodeHandleList handlers(1); 1436 CodeHandleList handlers(1);
1437 types.Add(type); 1437 types.Add(type);
1438 handlers.Add(handler); 1438 handlers.Add(handler);
1439 Code::StubType stub_type = handler->type(); 1439 Code::StubType stub_type = handler->type();
1440 return CompilePolymorphicIC(&types, &handlers, name, stub_type, PROPERTY); 1440 return CompilePolymorphicIC(&types, &handlers, name, stub_type, PROPERTY);
1441 } 1441 }
1442 1442
1443 1443
1444 Handle<Code> LoadStubCompiler::CompileLoadViaGetter( 1444 Handle<Code> LoadStubCompiler::CompileLoadViaGetter(
1445 Handle<Type> type, 1445 Handle<HeapType> type,
1446 Handle<JSObject> holder, 1446 Handle<JSObject> holder,
1447 Handle<Name> name, 1447 Handle<Name> name,
1448 Handle<JSFunction> getter) { 1448 Handle<JSFunction> getter) {
1449 HandlerFrontend(type, receiver(), holder, name); 1449 HandlerFrontend(type, receiver(), holder, name);
1450 GenerateLoadViaGetter(masm(), receiver(), getter); 1450 GenerateLoadViaGetter(masm(), receiver(), getter);
1451 1451
1452 // Return the generated code. 1452 // Return the generated code.
1453 return GetCode(kind(), Code::FAST, name); 1453 return GetCode(kind(), Code::FAST, name);
1454 } 1454 }
1455 1455
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 Handle<FunctionTemplateInfo>( 1901 Handle<FunctionTemplateInfo>(
1902 FunctionTemplateInfo::cast(signature->receiver())); 1902 FunctionTemplateInfo::cast(signature->receiver()));
1903 } 1903 }
1904 } 1904 }
1905 1905
1906 is_simple_api_call_ = true; 1906 is_simple_api_call_ = true;
1907 } 1907 }
1908 1908
1909 1909
1910 } } // namespace v8::internal 1910 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698