OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 if (proto != Heap::null_value()) { | 1179 if (proto != Heap::null_value()) { |
1180 proto->Lookup(name, lookup); | 1180 proto->Lookup(name, lookup); |
1181 } | 1181 } |
1182 } | 1182 } |
1183 } | 1183 } |
1184 | 1184 |
1185 | 1185 |
1186 | 1186 |
1187 Object* LoadStubCompiler::GetCode(PropertyType type, String* name) { | 1187 Object* LoadStubCompiler::GetCode(PropertyType type, String* name) { |
1188 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, type); | 1188 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, type); |
1189 return GetCodeWithFlags(flags, name); | 1189 Object* result = GetCodeWithFlags(flags, name); |
| 1190 if (!result->IsFailure()) { |
| 1191 PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(result), name)); |
| 1192 } |
| 1193 return result; |
1190 } | 1194 } |
1191 | 1195 |
1192 | 1196 |
1193 Object* KeyedLoadStubCompiler::GetCode(PropertyType type, String* name) { | 1197 Object* KeyedLoadStubCompiler::GetCode(PropertyType type, String* name) { |
1194 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, type); | 1198 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, type); |
1195 return GetCodeWithFlags(flags, name); | 1199 Object* result = GetCodeWithFlags(flags, name); |
| 1200 if (!result->IsFailure()) { |
| 1201 PROFILE( |
| 1202 CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(result), name)); |
| 1203 } |
| 1204 return result; |
1196 } | 1205 } |
1197 | 1206 |
1198 | 1207 |
1199 Object* StoreStubCompiler::GetCode(PropertyType type, String* name) { | 1208 Object* StoreStubCompiler::GetCode(PropertyType type, String* name) { |
1200 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, type); | 1209 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, type); |
1201 return GetCodeWithFlags(flags, name); | 1210 Object* result = GetCodeWithFlags(flags, name); |
| 1211 if (!result->IsFailure()) { |
| 1212 PROFILE(CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(result), name)); |
| 1213 } |
| 1214 return result; |
1202 } | 1215 } |
1203 | 1216 |
1204 | 1217 |
1205 Object* KeyedStoreStubCompiler::GetCode(PropertyType type, String* name) { | 1218 Object* KeyedStoreStubCompiler::GetCode(PropertyType type, String* name) { |
1206 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_STORE_IC, type); | 1219 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_STORE_IC, type); |
1207 return GetCodeWithFlags(flags, name); | 1220 Object* result = GetCodeWithFlags(flags, name); |
| 1221 if (!result->IsFailure()) { |
| 1222 PROFILE( |
| 1223 CodeCreateEvent(Logger::KEYED_STORE_IC_TAG, Code::cast(result), name)); |
| 1224 } |
| 1225 return result; |
1208 } | 1226 } |
1209 | 1227 |
1210 | 1228 |
1211 CallStubCompiler::CallStubCompiler(int argc, | 1229 CallStubCompiler::CallStubCompiler(int argc, |
1212 InLoopFlag in_loop, | 1230 InLoopFlag in_loop, |
1213 Code::Kind kind, | 1231 Code::Kind kind, |
1214 InlineCacheHolderFlag cache_holder) | 1232 InlineCacheHolderFlag cache_holder) |
1215 : arguments_(argc) | 1233 : arguments_(argc) |
1216 , in_loop_(in_loop) | 1234 , in_loop_(in_loop) |
1217 , kind_(kind) | 1235 , kind_(kind) |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 expected_receiver_type_ = | 1353 expected_receiver_type_ = |
1336 FunctionTemplateInfo::cast(signature->receiver()); | 1354 FunctionTemplateInfo::cast(signature->receiver()); |
1337 } | 1355 } |
1338 } | 1356 } |
1339 | 1357 |
1340 is_simple_api_call_ = true; | 1358 is_simple_api_call_ = true; |
1341 } | 1359 } |
1342 | 1360 |
1343 | 1361 |
1344 } } // namespace v8::internal | 1362 } } // namespace v8::internal |
OLD | NEW |