OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 return new_object; | 128 return new_object; |
129 } | 129 } |
130 | 130 |
131 | 131 |
132 void CodeStub::VerifyPlatformFeatures(Isolate* isolate) { | 132 void CodeStub::VerifyPlatformFeatures(Isolate* isolate) { |
133 ASSERT(CpuFeatures::VerifyCrossCompiling()); | 133 ASSERT(CpuFeatures::VerifyCrossCompiling()); |
134 } | 134 } |
135 | 135 |
136 | 136 |
137 Handle<Code> CodeStub::GetCode(Isolate* isolate) { | 137 Handle<Code> CodeStub::GetCode(Isolate* isolate) { |
138 Factory* factory = isolate->factory(); | |
139 Heap* heap = isolate->heap(); | 138 Heap* heap = isolate->heap(); |
140 Code* code; | 139 Code* code; |
141 if (UseSpecialCache() | 140 if (UseSpecialCache() |
142 ? FindCodeInSpecialCache(&code, isolate) | 141 ? FindCodeInSpecialCache(&code, isolate) |
143 : FindCodeInCache(&code, isolate)) { | 142 : FindCodeInCache(&code, isolate)) { |
144 ASSERT(GetCodeKind() == code->kind()); | 143 ASSERT(GetCodeKind() == code->kind()); |
145 return Handle<Code>(code); | 144 return Handle<Code>(code); |
146 } | 145 } |
147 | 146 |
148 #ifdef DEBUG | 147 #ifdef DEBUG |
(...skipping 14 matching lines...) Expand all Loading... |
163 new_object->Disassemble(GetName().get(), trace_scope.file()); | 162 new_object->Disassemble(GetName().get(), trace_scope.file()); |
164 PrintF(trace_scope.file(), "\n"); | 163 PrintF(trace_scope.file(), "\n"); |
165 } | 164 } |
166 #endif | 165 #endif |
167 | 166 |
168 if (UseSpecialCache()) { | 167 if (UseSpecialCache()) { |
169 AddToSpecialCache(new_object); | 168 AddToSpecialCache(new_object); |
170 } else { | 169 } else { |
171 // Update the dictionary and the root in Heap. | 170 // Update the dictionary and the root in Heap. |
172 Handle<UnseededNumberDictionary> dict = | 171 Handle<UnseededNumberDictionary> dict = |
173 factory->DictionaryAtNumberPut( | 172 UnseededNumberDictionary::AtNumberPut( |
174 Handle<UnseededNumberDictionary>(heap->code_stubs()), | 173 Handle<UnseededNumberDictionary>(heap->code_stubs()), |
175 GetKey(), | 174 GetKey(), |
176 new_object); | 175 new_object); |
177 heap->public_set_code_stubs(*dict); | 176 heap->public_set_code_stubs(*dict); |
178 } | 177 } |
179 code = *new_object; | 178 code = *new_object; |
180 } | 179 } |
181 | 180 |
182 Activate(code); | 181 Activate(code); |
183 ASSERT(!NeedsImmovableCode() || | 182 ASSERT(!NeedsImmovableCode() || |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 InstallDescriptor(isolate, &stub3); | 815 InstallDescriptor(isolate, &stub3); |
817 } | 816 } |
818 | 817 |
819 InternalArrayConstructorStub::InternalArrayConstructorStub( | 818 InternalArrayConstructorStub::InternalArrayConstructorStub( |
820 Isolate* isolate) { | 819 Isolate* isolate) { |
821 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 820 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
822 } | 821 } |
823 | 822 |
824 | 823 |
825 } } // namespace v8::internal | 824 } } // namespace v8::internal |
OLD | NEW |