OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
10 #include "src/hydrogen.h" | 10 #include "src/hydrogen.h" |
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1811 empty_fixed_array); | 1811 empty_fixed_array); |
1812 Add<HStoreNamedField>(js_function, HObjectAccess::ForLiteralsPointer(), | 1812 Add<HStoreNamedField>(js_function, HObjectAccess::ForLiteralsPointer(), |
1813 empty_fixed_array); | 1813 empty_fixed_array); |
1814 Add<HStoreNamedField>(js_function, HObjectAccess::ForPrototypeOrInitialMap(), | 1814 Add<HStoreNamedField>(js_function, HObjectAccess::ForPrototypeOrInitialMap(), |
1815 graph()->GetConstantHole()); | 1815 graph()->GetConstantHole()); |
1816 Add<HStoreNamedField>( | 1816 Add<HStoreNamedField>( |
1817 js_function, HObjectAccess::ForSharedFunctionInfoPointer(), shared_info); | 1817 js_function, HObjectAccess::ForSharedFunctionInfoPointer(), shared_info); |
1818 Add<HStoreNamedField>(js_function, HObjectAccess::ForFunctionContextPointer(), | 1818 Add<HStoreNamedField>(js_function, HObjectAccess::ForFunctionContextPointer(), |
1819 context()); | 1819 context()); |
1820 | 1820 |
1821 // Initialize the code pointer in the function to be the one | 1821 // Initialize the code pointer in the function to be the one found in the |
1822 // found in the shared function info object. | 1822 // shared function info object. But first check if there is an optimized |
1823 // But first check if there is an optimized version for our context. | 1823 // version for our context. |
1824 if (FLAG_cache_optimized_code) { | 1824 BuildInstallFromOptimizedCodeMap(js_function, shared_info, native_context); |
1825 BuildInstallFromOptimizedCodeMap(js_function, shared_info, native_context); | |
1826 } else { | |
1827 BuildInstallCode(js_function, shared_info); | |
1828 } | |
1829 | 1825 |
1830 return js_function; | 1826 return js_function; |
1831 } | 1827 } |
1832 | 1828 |
1833 | 1829 |
1834 Handle<Code> FastNewClosureStub::GenerateCode() { | 1830 Handle<Code> FastNewClosureStub::GenerateCode() { |
1835 return DoGenerateCode(this); | 1831 return DoGenerateCode(this); |
1836 } | 1832 } |
1837 | 1833 |
1838 | 1834 |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2230 return Pop(); | 2226 return Pop(); |
2231 } | 2227 } |
2232 | 2228 |
2233 | 2229 |
2234 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2230 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
2235 return DoGenerateCode(this); | 2231 return DoGenerateCode(this); |
2236 } | 2232 } |
2237 | 2233 |
2238 } // namespace internal | 2234 } // namespace internal |
2239 } // namespace v8 | 2235 } // namespace v8 |
OLD | NEW |