| 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 !GenerateUnoptimizedCode(info)) { | 558 !GenerateUnoptimizedCode(info)) { |
| 559 Isolate* isolate = info->isolate(); | 559 Isolate* isolate = info->isolate(); |
| 560 if (!isolate->has_pending_exception()) isolate->StackOverflow(); | 560 if (!isolate->has_pending_exception()) isolate->StackOverflow(); |
| 561 return false; | 561 return false; |
| 562 } | 562 } |
| 563 return true; | 563 return true; |
| 564 } | 564 } |
| 565 | 565 |
| 566 void InstallSharedScopeInfo(CompilationInfo* info, | 566 void InstallSharedScopeInfo(CompilationInfo* info, |
| 567 Handle<SharedFunctionInfo> shared) { | 567 Handle<SharedFunctionInfo> shared) { |
| 568 Handle<ScopeInfo> scope_info = info->scope()->GetScopeInfo(info->isolate()); | 568 Handle<ScopeInfo> scope_info = info->scope()->scope_info(); |
| 569 shared->set_scope_info(*scope_info); | 569 shared->set_scope_info(*scope_info); |
| 570 } | 570 } |
| 571 | 571 |
| 572 void InstallSharedCompilationResult(CompilationInfo* info, | 572 void InstallSharedCompilationResult(CompilationInfo* info, |
| 573 Handle<SharedFunctionInfo> shared) { | 573 Handle<SharedFunctionInfo> shared) { |
| 574 // TODO(mstarzinger): Compiling for debug code might be used to reveal inner | 574 // TODO(mstarzinger): Compiling for debug code might be used to reveal inner |
| 575 // functions via {FindSharedFunctionInfoInScript}, in which case we end up | 575 // functions via {FindSharedFunctionInfoInScript}, in which case we end up |
| 576 // regenerating existing bytecode. Fix this! | 576 // regenerating existing bytecode. Fix this! |
| 577 if (info->is_debug() && info->has_bytecode_array()) { | 577 if (info->is_debug() && info->has_bytecode_array()) { |
| 578 shared->ClearBytecodeArray(); | 578 shared->ClearBytecodeArray(); |
| (...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2075 DCHECK(shared->is_compiled()); | 2075 DCHECK(shared->is_compiled()); |
| 2076 function->set_literals(cached.literals); | 2076 function->set_literals(cached.literals); |
| 2077 } else if (shared->is_compiled()) { | 2077 } else if (shared->is_compiled()) { |
| 2078 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 2078 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
| 2079 JSFunction::EnsureLiterals(function); | 2079 JSFunction::EnsureLiterals(function); |
| 2080 } | 2080 } |
| 2081 } | 2081 } |
| 2082 | 2082 |
| 2083 } // namespace internal | 2083 } // namespace internal |
| 2084 } // namespace v8 | 2084 } // namespace v8 |
| OLD | NEW |