OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 if (!probe->IsUndefined()) return probe; | 1102 if (!probe->IsUndefined()) return probe; |
1103 StubCompiler compiler; | 1103 StubCompiler compiler; |
1104 return FillCache(isolate_, compiler.CompileCallDebugPrepareStepIn(flags)); | 1104 return FillCache(isolate_, compiler.CompileCallDebugPrepareStepIn(flags)); |
1105 } | 1105 } |
1106 #endif | 1106 #endif |
1107 | 1107 |
1108 | 1108 |
1109 void StubCache::Clear() { | 1109 void StubCache::Clear() { |
1110 Code* empty = isolate_->builtins()->builtin(Builtins::kIllegal); | 1110 Code* empty = isolate_->builtins()->builtin(Builtins::kIllegal); |
1111 for (int i = 0; i < kPrimaryTableSize; i++) { | 1111 for (int i = 0; i < kPrimaryTableSize; i++) { |
1112 Code* code = primary_[i].value; | 1112 primary_[i].key = heap()->empty_string(); |
1113 if (code != empty && !code->is_pregenerated()) { | 1113 primary_[i].value = empty; |
1114 primary_[i].key = heap()->empty_string(); | |
1115 primary_[i].value = empty; | |
1116 } | |
1117 } | 1114 } |
1118 for (int j = 0; j < kSecondaryTableSize; j++) { | 1115 for (int j = 0; j < kSecondaryTableSize; j++) { |
1119 Code* code = secondary_[j].value; | 1116 secondary_[j].key = heap()->empty_string(); |
1120 if (code != empty && !code->is_pregenerated()) { | 1117 secondary_[j].value = empty; |
1121 secondary_[j].key = heap()->empty_string(); | |
1122 secondary_[j].value = empty; | |
1123 } | |
1124 } | 1118 } |
1125 } | 1119 } |
1126 | 1120 |
1127 | 1121 |
1128 void StubCache::CollectMatchingMaps(SmallMapList* types, | 1122 void StubCache::CollectMatchingMaps(SmallMapList* types, |
1129 String* name, | 1123 String* name, |
1130 Code::Flags flags) { | 1124 Code::Flags flags) { |
1131 for (int i = 0; i < kPrimaryTableSize; i++) { | 1125 for (int i = 0; i < kPrimaryTableSize; i++) { |
1132 if (primary_[i].key == name) { | 1126 if (primary_[i].key == name) { |
1133 Map* map = primary_[i].value->FindFirstMap(); | 1127 Map* map = primary_[i].value->FindFirstMap(); |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1846 expected_receiver_type_ = | 1840 expected_receiver_type_ = |
1847 FunctionTemplateInfo::cast(signature->receiver()); | 1841 FunctionTemplateInfo::cast(signature->receiver()); |
1848 } | 1842 } |
1849 } | 1843 } |
1850 | 1844 |
1851 is_simple_api_call_ = true; | 1845 is_simple_api_call_ = true; |
1852 } | 1846 } |
1853 | 1847 |
1854 | 1848 |
1855 } } // namespace v8::internal | 1849 } } // namespace v8::internal |
OLD | NEW |