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 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1935 if (info()->is_osr()) { | 1935 if (info()->is_osr()) { |
1936 // TurboFan OSR-compiled functions cannot be entered directly. | 1936 // TurboFan OSR-compiled functions cannot be entered directly. |
1937 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1937 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
1938 | 1938 |
1939 // Unoptimized code jumps directly to this entrypoint while the unoptimized | 1939 // Unoptimized code jumps directly to this entrypoint while the unoptimized |
1940 // frame is still on the stack. Optimized code uses OSR values directly from | 1940 // frame is still on the stack. Optimized code uses OSR values directly from |
1941 // the unoptimized frame. Thus, all that needs to be done is to allocate the | 1941 // the unoptimized frame. Thus, all that needs to be done is to allocate the |
1942 // remaining stack slots. | 1942 // remaining stack slots. |
1943 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); | 1943 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); |
1944 osr_pc_offset_ = __ pc_offset(); | 1944 osr_pc_offset_ = __ pc_offset(); |
1945 // TODO(titzer): cannot address target function == local #-1 | |
1946 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | |
1947 stack_shrink_slots -= OsrHelper(info()).UnoptimizedFrameSlots(); | 1945 stack_shrink_slots -= OsrHelper(info()).UnoptimizedFrameSlots(); |
1948 } | 1946 } |
1949 | 1947 |
1950 const RegList saves = descriptor->CalleeSavedRegisters(); | 1948 const RegList saves = descriptor->CalleeSavedRegisters(); |
1951 if (stack_shrink_slots > 0) { | 1949 if (stack_shrink_slots > 0) { |
1952 __ sub(esp, Immediate(stack_shrink_slots * kPointerSize)); | 1950 __ sub(esp, Immediate(stack_shrink_slots * kPointerSize)); |
1953 } | 1951 } |
1954 | 1952 |
1955 if (saves != 0) { // Save callee-saved registers. | 1953 if (saves != 0) { // Save callee-saved registers. |
1956 DCHECK(!info()->is_osr()); | 1954 DCHECK(!info()->is_osr()); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2244 void CodeGenerator::EnsureSpaceForLazyDeopt() { | 2242 void CodeGenerator::EnsureSpaceForLazyDeopt() { |
2245 is_handler_entry_point = true; | 2243 is_handler_entry_point = true; |
2246 DoEnsureSpaceForLazyDeopt(info(), masm(), last_lazy_deopt_pc_); | 2244 DoEnsureSpaceForLazyDeopt(info(), masm(), last_lazy_deopt_pc_); |
2247 } | 2245 } |
2248 | 2246 |
2249 #undef __ | 2247 #undef __ |
2250 | 2248 |
2251 } // namespace compiler | 2249 } // namespace compiler |
2252 } // namespace internal | 2250 } // namespace internal |
2253 } // namespace v8 | 2251 } // namespace v8 |
OLD | NEW |