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/compiler.h" | 5 #include "src/compiler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/asmjs/asm-js.h" | 10 #include "src/asmjs/asm-js.h" |
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1611 "V8.CompileSerialize"); | 1611 "V8.CompileSerialize"); |
1612 *cached_data = CodeSerializer::Serialize(isolate, result, source); | 1612 *cached_data = CodeSerializer::Serialize(isolate, result, source); |
1613 if (FLAG_profile_deserialization) { | 1613 if (FLAG_profile_deserialization) { |
1614 PrintF("[Compiling and serializing took %0.3f ms]\n", | 1614 PrintF("[Compiling and serializing took %0.3f ms]\n", |
1615 timer.Elapsed().InMillisecondsF()); | 1615 timer.Elapsed().InMillisecondsF()); |
1616 } | 1616 } |
1617 } | 1617 } |
1618 } | 1618 } |
1619 | 1619 |
1620 if (result.is_null()) { | 1620 if (result.is_null()) { |
1621 if (natives != EXTENSION_CODE) isolate->ReportPendingMessages(); | 1621 if (natives != EXTENSION_CODE && natives != NATIVES_CODE) { |
| 1622 isolate->ReportPendingMessages(); |
| 1623 } |
1622 } else { | 1624 } else { |
1623 isolate->debug()->OnAfterCompile(script); | 1625 isolate->debug()->OnAfterCompile(script); |
1624 } | 1626 } |
1625 } else if (result->ic_age() != isolate->heap()->global_ic_age()) { | 1627 } else if (result->ic_age() != isolate->heap()->global_ic_age()) { |
1626 result->ResetForNewContext(isolate->heap()->global_ic_age()); | 1628 result->ResetForNewContext(isolate->heap()->global_ic_age()); |
1627 } | 1629 } |
1628 return result; | 1630 return result; |
1629 } | 1631 } |
1630 | 1632 |
1631 Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForStreamedScript( | 1633 Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForStreamedScript( |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1769 DCHECK(shared->is_compiled()); | 1771 DCHECK(shared->is_compiled()); |
1770 function->set_literals(cached.literals); | 1772 function->set_literals(cached.literals); |
1771 } else if (shared->is_compiled()) { | 1773 } else if (shared->is_compiled()) { |
1772 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1774 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1773 JSFunction::EnsureLiterals(function); | 1775 JSFunction::EnsureLiterals(function); |
1774 } | 1776 } |
1775 } | 1777 } |
1776 | 1778 |
1777 } // namespace internal | 1779 } // namespace internal |
1778 } // namespace v8 | 1780 } // namespace v8 |
OLD | NEW |