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/optimizing-compile-dispatcher.h" | 5 #include "src/optimizing-compile-dispatcher.h" |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/base/atomicops.h" | 9 #include "src/base/atomicops.h" |
10 #include "src/full-codegen.h" | 10 #include "src/full-codegen.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 // Remove stack check that guards OSR entry on original code. | 26 // Remove stack check that guards OSR entry on original code. |
27 Handle<Code> code = info->unoptimized_code(); | 27 Handle<Code> code = info->unoptimized_code(); |
28 uint32_t offset = code->TranslateAstIdToPcOffset(info->osr_ast_id()); | 28 uint32_t offset = code->TranslateAstIdToPcOffset(info->osr_ast_id()); |
29 BackEdgeTable::RemoveStackCheck(code, offset); | 29 BackEdgeTable::RemoveStackCheck(code, offset); |
30 } | 30 } |
31 } else { | 31 } else { |
32 Handle<JSFunction> function = info->closure(); | 32 Handle<JSFunction> function = info->closure(); |
33 function->ReplaceCode(function->shared()->code()); | 33 function->ReplaceCode(function->shared()->code()); |
34 } | 34 } |
35 } | 35 } |
| 36 job->~OptimizedCompileJob(); |
36 delete info; | 37 delete info; |
37 } | 38 } |
38 | 39 |
39 } // namespace | 40 } // namespace |
40 | 41 |
41 | 42 |
42 class OptimizingCompileDispatcher::CompileTask : public v8::Task { | 43 class OptimizingCompileDispatcher::CompileTask : public v8::Task { |
43 public: | 44 public: |
44 explicit CompileTask(Isolate* isolate) : isolate_(isolate) { | 45 explicit CompileTask(Isolate* isolate) : isolate_(isolate) { |
45 OptimizingCompileDispatcher* dispatcher = | 46 OptimizingCompileDispatcher* dispatcher = |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 info->closure()->PrintName(); | 352 info->closure()->PrintName(); |
352 PrintF(", AST id %d]\n", info->osr_ast_id().ToInt()); | 353 PrintF(", AST id %d]\n", info->osr_ast_id().ToInt()); |
353 } | 354 } |
354 DisposeOptimizedCompileJob(stale, false); | 355 DisposeOptimizedCompileJob(stale, false); |
355 } | 356 } |
356 osr_buffer_[osr_buffer_cursor_] = job; | 357 osr_buffer_[osr_buffer_cursor_] = job; |
357 osr_buffer_cursor_ = (osr_buffer_cursor_ + 1) % osr_buffer_capacity_; | 358 osr_buffer_cursor_ = (osr_buffer_cursor_ + 1) % osr_buffer_capacity_; |
358 } | 359 } |
359 } // namespace internal | 360 } // namespace internal |
360 } // namespace v8 | 361 } // namespace v8 |
OLD | NEW |