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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 !GenerateUnoptimizedCode(info)) { | 507 !GenerateUnoptimizedCode(info)) { |
508 Isolate* isolate = info->isolate(); | 508 Isolate* isolate = info->isolate(); |
509 if (!isolate->has_pending_exception()) isolate->StackOverflow(); | 509 if (!isolate->has_pending_exception()) isolate->StackOverflow(); |
510 return false; | 510 return false; |
511 } | 511 } |
512 return true; | 512 return true; |
513 } | 513 } |
514 | 514 |
515 void InstallSharedScopeInfo(CompilationInfo* info, | 515 void InstallSharedScopeInfo(CompilationInfo* info, |
516 Handle<SharedFunctionInfo> shared) { | 516 Handle<SharedFunctionInfo> shared) { |
517 Handle<ScopeInfo> scope_info = | 517 Handle<ScopeInfo> scope_info = info->scope()->GetScopeInfo(info->isolate()); |
518 ScopeInfo::Create(info->isolate(), info->zone(), info->scope()); | |
519 shared->set_scope_info(*scope_info); | 518 shared->set_scope_info(*scope_info); |
520 } | 519 } |
521 | 520 |
522 void InstallSharedCompilationResult(CompilationInfo* info, | 521 void InstallSharedCompilationResult(CompilationInfo* info, |
523 Handle<SharedFunctionInfo> shared) { | 522 Handle<SharedFunctionInfo> shared) { |
524 // TODO(mstarzinger): Compiling for debug code might be used to reveal inner | 523 // TODO(mstarzinger): Compiling for debug code might be used to reveal inner |
525 // functions via {FindSharedFunctionInfoInScript}, in which case we end up | 524 // functions via {FindSharedFunctionInfoInScript}, in which case we end up |
526 // regenerating existing bytecode. Fix this! | 525 // regenerating existing bytecode. Fix this! |
527 if (info->is_debug() && info->has_bytecode_array()) { | 526 if (info->is_debug() && info->has_bytecode_array()) { |
528 shared->ClearBytecodeArray(); | 527 shared->ClearBytecodeArray(); |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1964 DCHECK(shared->is_compiled()); | 1963 DCHECK(shared->is_compiled()); |
1965 function->set_literals(cached.literals); | 1964 function->set_literals(cached.literals); |
1966 } else if (shared->is_compiled()) { | 1965 } else if (shared->is_compiled()) { |
1967 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1966 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
1968 JSFunction::EnsureLiterals(function); | 1967 JSFunction::EnsureLiterals(function); |
1969 } | 1968 } |
1970 } | 1969 } |
1971 | 1970 |
1972 } // namespace internal | 1971 } // namespace internal |
1973 } // namespace v8 | 1972 } // namespace v8 |
OLD | NEW |