| 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 | 8 |
| 9 #include "src/ast/ast-numbering.h" | 9 #include "src/ast/ast-numbering.h" |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 return AbortOptimization(kTooManyParameters); | 504 return AbortOptimization(kTooManyParameters); |
| 505 } | 505 } |
| 506 | 506 |
| 507 if (info()->is_osr() && | 507 if (info()->is_osr() && |
| 508 LUnallocated::TooManyParametersOrStackSlots(scope->num_parameters(), | 508 LUnallocated::TooManyParametersOrStackSlots(scope->num_parameters(), |
| 509 scope->num_stack_slots())) { | 509 scope->num_stack_slots())) { |
| 510 // Crankshaft would require too many Lithium operands. | 510 // Crankshaft would require too many Lithium operands. |
| 511 return AbortOptimization(kTooManyParametersLocals); | 511 return AbortOptimization(kTooManyParametersLocals); |
| 512 } | 512 } |
| 513 | 513 |
| 514 if (scope->HasIllegalRedeclaration()) { | |
| 515 // Crankshaft cannot handle illegal redeclarations. | |
| 516 return AbortOptimization(kFunctionWithIllegalRedeclaration); | |
| 517 } | |
| 518 | |
| 519 if (FLAG_trace_opt) { | 514 if (FLAG_trace_opt) { |
| 520 OFStream os(stdout); | 515 OFStream os(stdout); |
| 521 os << "[compiling method " << Brief(*info()->closure()) | 516 os << "[compiling method " << Brief(*info()->closure()) |
| 522 << " using Crankshaft"; | 517 << " using Crankshaft"; |
| 523 if (info()->is_osr()) os << " OSR"; | 518 if (info()->is_osr()) os << " OSR"; |
| 524 os << "]" << std::endl; | 519 os << "]" << std::endl; |
| 525 } | 520 } |
| 526 | 521 |
| 527 if (FLAG_trace_hydrogen) { | 522 if (FLAG_trace_hydrogen) { |
| 528 isolate()->GetHTracer()->TraceCompilation(info()); | 523 isolate()->GetHTracer()->TraceCompilation(info()); |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1952 MaybeHandle<Code> code; | 1947 MaybeHandle<Code> code; |
| 1953 if (cached.code != nullptr) code = handle(cached.code); | 1948 if (cached.code != nullptr) code = handle(cached.code); |
| 1954 Handle<Context> native_context(function->context()->native_context()); | 1949 Handle<Context> native_context(function->context()->native_context()); |
| 1955 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, | 1950 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, |
| 1956 literals, BailoutId::None()); | 1951 literals, BailoutId::None()); |
| 1957 } | 1952 } |
| 1958 } | 1953 } |
| 1959 | 1954 |
| 1960 } // namespace internal | 1955 } // namespace internal |
| 1961 } // namespace v8 | 1956 } // namespace v8 |
| OLD | NEW |