OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 static Vector<const char> kRegexp = CStrVector("regexp"); | 245 static Vector<const char> kRegexp = CStrVector("regexp"); |
246 if (name->IsEqualTo(kRegexp)) | 246 if (name->IsEqualTo(kRegexp)) |
247 return true; | 247 return true; |
248 } | 248 } |
249 return false; | 249 return false; |
250 } | 250 } |
251 | 251 |
252 #endif | 252 #endif |
253 | 253 |
254 | 254 |
255 Handle<Code> CodeGenerator::ComputeCallInitialize( | |
256 int argc, | |
257 InLoopFlag in_loop) { | |
258 if (in_loop == IN_LOOP) { | |
259 // Force the creation of the corresponding stub outside loops, | |
260 // because it may be used when clearing the ICs later - it is | |
261 // possible for a series of IC transitions to lose the in-loop | |
262 // information, and the IC clearing code can't generate a stub | |
263 // that it needs so we need to ensure it is generated already. | |
264 ComputeCallInitialize(argc, NOT_IN_LOOP); | |
265 } | |
266 CALL_HEAP_FUNCTION( | |
267 StubCache::ComputeCallInitialize(argc, in_loop, Code::CALL_IC), | |
268 Code); | |
269 } | |
270 | |
271 | |
272 Handle<Code> CodeGenerator::ComputeKeyedCallInitialize( | |
273 int argc, | |
274 InLoopFlag in_loop) { | |
275 if (in_loop == IN_LOOP) { | |
276 // Force the creation of the corresponding stub outside loops, | |
277 // because it may be used when clearing the ICs later - it is | |
278 // possible for a series of IC transitions to lose the in-loop | |
279 // information, and the IC clearing code can't generate a stub | |
280 // that it needs so we need to ensure it is generated already. | |
281 ComputeKeyedCallInitialize(argc, NOT_IN_LOOP); | |
282 } | |
283 CALL_HEAP_FUNCTION( | |
284 StubCache::ComputeCallInitialize(argc, in_loop, Code::KEYED_CALL_IC), | |
285 Code); | |
286 } | |
287 | |
288 void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) { | 255 void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) { |
289 int length = declarations->length(); | 256 int length = declarations->length(); |
290 int globals = 0; | 257 int globals = 0; |
291 for (int i = 0; i < length; i++) { | 258 for (int i = 0; i < length; i++) { |
292 Declaration* node = declarations->at(i); | 259 Declaration* node = declarations->at(i); |
293 Variable* var = node->proxy()->var(); | 260 Variable* var = node->proxy()->var(); |
294 Slot* slot = var->AsSlot(); | 261 Slot* slot = var->AsSlot(); |
295 | 262 |
296 // If it was not possible to allocate the variable at compile | 263 // If it was not possible to allocate the variable at compile |
297 // time, we need to "declare" it at runtime to make sure it | 264 // time, we need to "declare" it at runtime to make sure it |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 return GetCustomCacheHelper(info()->call_stub_cache(), code_out); | 474 return GetCustomCacheHelper(info()->call_stub_cache(), code_out); |
508 } | 475 } |
509 | 476 |
510 | 477 |
511 void ApiCallEntryStub::SetCustomCache(Code* value) { | 478 void ApiCallEntryStub::SetCustomCache(Code* value) { |
512 info()->set_call_stub_cache(value); | 479 info()->set_call_stub_cache(value); |
513 } | 480 } |
514 | 481 |
515 | 482 |
516 } } // namespace v8::internal | 483 } } // namespace v8::internal |
OLD | NEW |