| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 int argc, | 247 int argc, |
| 248 InLoopFlag in_loop) { | 248 InLoopFlag in_loop) { |
| 249 if (in_loop == IN_LOOP) { | 249 if (in_loop == IN_LOOP) { |
| 250 // Force the creation of the corresponding stub outside loops, | 250 // Force the creation of the corresponding stub outside loops, |
| 251 // because it may be used when clearing the ICs later - it is | 251 // because it may be used when clearing the ICs later - it is |
| 252 // possible for a series of IC transitions to lose the in-loop | 252 // possible for a series of IC transitions to lose the in-loop |
| 253 // information, and the IC clearing code can't generate a stub | 253 // information, and the IC clearing code can't generate a stub |
| 254 // that it needs so we need to ensure it is generated already. | 254 // that it needs so we need to ensure it is generated already. |
| 255 ComputeCallInitialize(argc, NOT_IN_LOOP); | 255 ComputeCallInitialize(argc, NOT_IN_LOOP); |
| 256 } | 256 } |
| 257 CALL_HEAP_FUNCTION(StubCache::ComputeCallInitialize(argc, in_loop), Code); | 257 CALL_HEAP_FUNCTION( |
| 258 StubCache::ComputeCallInitialize(argc, in_loop, Code::CALL_IC), |
| 259 Code); |
| 258 } | 260 } |
| 259 | 261 |
| 260 | 262 |
| 263 Handle<Code> CodeGenerator::ComputeKeyedCallInitialize( |
| 264 int argc, |
| 265 InLoopFlag in_loop) { |
| 266 if (in_loop == IN_LOOP) { |
| 267 // Force the creation of the corresponding stub outside loops, |
| 268 // because it may be used when clearing the ICs later - it is |
| 269 // possible for a series of IC transitions to lose the in-loop |
| 270 // information, and the IC clearing code can't generate a stub |
| 271 // that it needs so we need to ensure it is generated already. |
| 272 ComputeKeyedCallInitialize(argc, NOT_IN_LOOP); |
| 273 } |
| 274 CALL_HEAP_FUNCTION( |
| 275 StubCache::ComputeCallInitialize(argc, in_loop, Code::KEYED_CALL_IC), |
| 276 Code); |
| 277 } |
| 278 |
| 261 void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) { | 279 void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) { |
| 262 int length = declarations->length(); | 280 int length = declarations->length(); |
| 263 int globals = 0; | 281 int globals = 0; |
| 264 for (int i = 0; i < length; i++) { | 282 for (int i = 0; i < length; i++) { |
| 265 Declaration* node = declarations->at(i); | 283 Declaration* node = declarations->at(i); |
| 266 Variable* var = node->proxy()->var(); | 284 Variable* var = node->proxy()->var(); |
| 267 Slot* slot = var->slot(); | 285 Slot* slot = var->slot(); |
| 268 | 286 |
| 269 // If it was not possible to allocate the variable at compile | 287 // If it was not possible to allocate the variable at compile |
| 270 // time, we need to "declare" it at runtime to make sure it | 288 // time, we need to "declare" it at runtime to make sure it |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 } | 494 } |
| 477 } | 495 } |
| 478 | 496 |
| 479 | 497 |
| 480 void ApiGetterEntryStub::SetCustomCache(Code* value) { | 498 void ApiGetterEntryStub::SetCustomCache(Code* value) { |
| 481 info()->set_load_stub_cache(value); | 499 info()->set_load_stub_cache(value); |
| 482 } | 500 } |
| 483 | 501 |
| 484 | 502 |
| 485 } } // namespace v8::internal | 503 } } // namespace v8::internal |
| OLD | NEW |