| 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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 NORMAL, | 782 NORMAL, |
| 783 argc); | 783 argc); |
| 784 Object* probe = ProbeCache(flags); | 784 Object* probe = ProbeCache(flags); |
| 785 if (!probe->IsUndefined()) return probe; | 785 if (!probe->IsUndefined()) return probe; |
| 786 StubCompiler compiler; | 786 StubCompiler compiler; |
| 787 return FillCache(compiler.CompileCallDebugPrepareStepIn(flags)); | 787 return FillCache(compiler.CompileCallDebugPrepareStepIn(flags)); |
| 788 } | 788 } |
| 789 #endif | 789 #endif |
| 790 | 790 |
| 791 | 791 |
| 792 Object* StubCache::ComputeLazyCompile(int argc) { | |
| 793 Code::Flags flags = | |
| 794 Code::ComputeFlags(Code::STUB, NOT_IN_LOOP, UNINITIALIZED, NORMAL, argc); | |
| 795 Object* probe = ProbeCache(flags); | |
| 796 if (!probe->IsUndefined()) return probe; | |
| 797 StubCompiler compiler; | |
| 798 Object* result = FillCache(compiler.CompileLazyCompile(flags)); | |
| 799 if (result->IsCode()) { | |
| 800 Code* code = Code::cast(result); | |
| 801 USE(code); | |
| 802 PROFILE(CodeCreateEvent(Logger::LAZY_COMPILE_TAG, | |
| 803 code, code->arguments_count())); | |
| 804 } | |
| 805 return result; | |
| 806 } | |
| 807 | |
| 808 | |
| 809 void StubCache::Clear() { | 792 void StubCache::Clear() { |
| 810 for (int i = 0; i < kPrimaryTableSize; i++) { | 793 for (int i = 0; i < kPrimaryTableSize; i++) { |
| 811 primary_[i].key = Heap::empty_string(); | 794 primary_[i].key = Heap::empty_string(); |
| 812 primary_[i].value = Builtins::builtin(Builtins::Illegal); | 795 primary_[i].value = Builtins::builtin(Builtins::Illegal); |
| 813 } | 796 } |
| 814 for (int j = 0; j < kSecondaryTableSize; j++) { | 797 for (int j = 0; j < kSecondaryTableSize; j++) { |
| 815 secondary_[j].key = Heap::empty_string(); | 798 secondary_[j].key = Heap::empty_string(); |
| 816 secondary_[j].value = Builtins::builtin(Builtins::Illegal); | 799 secondary_[j].value = Builtins::builtin(Builtins::Illegal); |
| 817 } | 800 } |
| 818 } | 801 } |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1363 expected_receiver_type_ = | 1346 expected_receiver_type_ = |
| 1364 FunctionTemplateInfo::cast(signature->receiver()); | 1347 FunctionTemplateInfo::cast(signature->receiver()); |
| 1365 } | 1348 } |
| 1366 } | 1349 } |
| 1367 | 1350 |
| 1368 is_simple_api_call_ = true; | 1351 is_simple_api_call_ = true; |
| 1369 } | 1352 } |
| 1370 | 1353 |
| 1371 | 1354 |
| 1372 } } // namespace v8::internal | 1355 } } // namespace v8::internal |
| OLD | NEW |