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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 function->shared()->ReplaceCode(*entry); | 929 function->shared()->ReplaceCode(*entry); |
930 return entry; | 930 return entry; |
931 } | 931 } |
932 | 932 |
933 Zone zone(isolate->allocator(), ZONE_NAME); | 933 Zone zone(isolate->allocator(), ZONE_NAME); |
934 ParseInfo parse_info(&zone, handle(function->shared())); | 934 ParseInfo parse_info(&zone, handle(function->shared())); |
935 CompilationInfo info(&parse_info, function); | 935 CompilationInfo info(&parse_info, function); |
936 Handle<Code> result; | 936 Handle<Code> result; |
937 ASSIGN_RETURN_ON_EXCEPTION(isolate, result, GetUnoptimizedCode(&info), Code); | 937 ASSIGN_RETURN_ON_EXCEPTION(isolate, result, GetUnoptimizedCode(&info), Code); |
938 | 938 |
939 if (FLAG_always_opt) { | 939 if (FLAG_always_opt && !info.shared_info()->HasAsmWasmData()) { |
940 Handle<Code> opt_code; | 940 Handle<Code> opt_code; |
941 if (GetOptimizedCode(function, Compiler::NOT_CONCURRENT) | 941 if (GetOptimizedCode(function, Compiler::NOT_CONCURRENT) |
942 .ToHandle(&opt_code)) { | 942 .ToHandle(&opt_code)) { |
943 result = opt_code; | 943 result = opt_code; |
944 } | 944 } |
945 } | 945 } |
946 | 946 |
947 return result; | 947 return result; |
948 } | 948 } |
949 | 949 |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 DCHECK(shared->is_compiled()); | 1726 DCHECK(shared->is_compiled()); |
1727 function->set_literals(cached.literals); | 1727 function->set_literals(cached.literals); |
1728 } else if (shared->is_compiled()) { | 1728 } else if (shared->is_compiled()) { |
1729 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1729 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1730 JSFunction::EnsureLiterals(function); | 1730 JSFunction::EnsureLiterals(function); |
1731 } | 1731 } |
1732 } | 1732 } |
1733 | 1733 |
1734 } // namespace internal | 1734 } // namespace internal |
1735 } // namespace v8 | 1735 } // namespace v8 |
OLD | NEW |