OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1912 } | 1912 } |
1913 | 1913 |
1914 | 1914 |
1915 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { | 1915 void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { |
1916 for (size_t index = 0; index < target_count; ++index) { | 1916 for (size_t index = 0; index < target_count; ++index) { |
1917 __ dd(targets[index]); | 1917 __ dd(targets[index]); |
1918 } | 1918 } |
1919 } | 1919 } |
1920 | 1920 |
1921 | 1921 |
1922 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } | |
1923 | |
1924 | |
1925 void CodeGenerator::EnsureSpaceForLazyDeopt() { | 1922 void CodeGenerator::EnsureSpaceForLazyDeopt() { |
1926 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { | 1923 if (!info()->ShouldEnsureSpaceForLazyDeopt()) { |
1927 return; | 1924 return; |
1928 } | 1925 } |
1929 | 1926 |
1930 int space_needed = Deoptimizer::patch_size(); | 1927 int space_needed = Deoptimizer::patch_size(); |
1931 // Ensure that we have enough space after the previous lazy-bailout | 1928 // Ensure that we have enough space after the previous lazy-bailout |
1932 // instruction for patching the code here. | 1929 // instruction for patching the code here. |
1933 int current_pc = masm()->pc_offset(); | 1930 int current_pc = masm()->pc_offset(); |
1934 if (current_pc < last_lazy_deopt_pc_ + space_needed) { | 1931 if (current_pc < last_lazy_deopt_pc_ + space_needed) { |
1935 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1932 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1936 __ Nop(padding_size); | 1933 __ Nop(padding_size); |
1937 } | 1934 } |
1938 } | 1935 } |
1939 | 1936 |
1940 #undef __ | 1937 #undef __ |
1941 | 1938 |
1942 } // namespace compiler | 1939 } // namespace compiler |
1943 } // namespace internal | 1940 } // namespace internal |
1944 } // namespace v8 | 1941 } // namespace v8 |
OLD | NEW |