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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast/ast-numbering.h" | 10 #include "src/ast/ast-numbering.h" |
(...skipping 12867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12878 | 12878 |
12879 void HOptimizedGraphBuilder::GenerateGetCachedArrayIndex(CallRuntime* call) { | 12879 void HOptimizedGraphBuilder::GenerateGetCachedArrayIndex(CallRuntime* call) { |
12880 DCHECK(call->arguments()->length() == 1); | 12880 DCHECK(call->arguments()->length() == 1); |
12881 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12881 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
12882 HValue* value = Pop(); | 12882 HValue* value = Pop(); |
12883 HGetCachedArrayIndex* result = New<HGetCachedArrayIndex>(value); | 12883 HGetCachedArrayIndex* result = New<HGetCachedArrayIndex>(value); |
12884 return ast_context()->ReturnInstruction(result, call->id()); | 12884 return ast_context()->ReturnInstruction(result, call->id()); |
12885 } | 12885 } |
12886 | 12886 |
12887 | 12887 |
| 12888 void HOptimizedGraphBuilder::GenerateFastOneByteArrayJoin(CallRuntime* call) { |
| 12889 // Simply returning undefined here would be semantically correct and even |
| 12890 // avoid the bailout. Nevertheless, some ancient benchmarks like SunSpider's |
| 12891 // string-fasta would tank, because fullcode contains an optimized version. |
| 12892 // Obviously the fullcode => Crankshaft => bailout => fullcode dance is |
| 12893 // faster... *sigh* |
| 12894 return Bailout(kInlinedRuntimeFunctionFastOneByteArrayJoin); |
| 12895 } |
| 12896 |
| 12897 |
12888 void HOptimizedGraphBuilder::GenerateDebugBreakInOptimizedCode( | 12898 void HOptimizedGraphBuilder::GenerateDebugBreakInOptimizedCode( |
12889 CallRuntime* call) { | 12899 CallRuntime* call) { |
12890 Add<HDebugBreak>(); | 12900 Add<HDebugBreak>(); |
12891 return ast_context()->ReturnValue(graph()->GetConstant0()); | 12901 return ast_context()->ReturnValue(graph()->GetConstant0()); |
12892 } | 12902 } |
12893 | 12903 |
12894 | 12904 |
12895 void HOptimizedGraphBuilder::GenerateDebugIsActive(CallRuntime* call) { | 12905 void HOptimizedGraphBuilder::GenerateDebugIsActive(CallRuntime* call) { |
12896 DCHECK(call->arguments()->length() == 0); | 12906 DCHECK(call->arguments()->length() == 0); |
12897 HValue* ref = | 12907 HValue* ref = |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13535 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13545 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13536 } | 13546 } |
13537 | 13547 |
13538 #ifdef DEBUG | 13548 #ifdef DEBUG |
13539 graph_->Verify(false); // No full verify. | 13549 graph_->Verify(false); // No full verify. |
13540 #endif | 13550 #endif |
13541 } | 13551 } |
13542 | 13552 |
13543 } // namespace internal | 13553 } // namespace internal |
13544 } // namespace v8 | 13554 } // namespace v8 |
OLD | NEW |