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/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2313 // Count the native string addition. | 2313 // Count the native string addition. |
2314 AddIncrementCounter(isolate()->counters()->string_add_native()); | 2314 AddIncrementCounter(isolate()->counters()->string_add_native()); |
2315 | 2315 |
2316 // Return the sequential string. | 2316 // Return the sequential string. |
2317 Push(result); | 2317 Push(result); |
2318 } | 2318 } |
2319 if_sameencodingandsequential.Else(); | 2319 if_sameencodingandsequential.Else(); |
2320 { | 2320 { |
2321 // Fallback to the runtime to add the two strings. | 2321 // Fallback to the runtime to add the two strings. |
2322 Add<HPushArguments>(left, right); | 2322 Add<HPushArguments>(left, right); |
2323 Push(Add<HCallRuntime>( | 2323 Push(Add<HCallRuntime>(isolate()->factory()->empty_string(), |
2324 isolate()->factory()->empty_string(), | 2324 Runtime::FunctionForId(Runtime::kStringAddRT), 2)); |
2325 Runtime::FunctionForId(Runtime::kStringAdd), | |
2326 2)); | |
2327 } | 2325 } |
2328 if_sameencodingandsequential.End(); | 2326 if_sameencodingandsequential.End(); |
2329 } | 2327 } |
2330 if_createcons.End(); | 2328 if_createcons.End(); |
2331 | 2329 |
2332 return Pop(); | 2330 return Pop(); |
2333 } | 2331 } |
2334 | 2332 |
2335 | 2333 |
2336 HValue* HGraphBuilder::BuildStringAdd( | 2334 HValue* HGraphBuilder::BuildStringAdd( |
(...skipping 11079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13416 if (ShouldProduceTraceOutput()) { | 13414 if (ShouldProduceTraceOutput()) { |
13417 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13415 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13418 } | 13416 } |
13419 | 13417 |
13420 #ifdef DEBUG | 13418 #ifdef DEBUG |
13421 graph_->Verify(false); // No full verify. | 13419 graph_->Verify(false); // No full verify. |
13422 #endif | 13420 #endif |
13423 } | 13421 } |
13424 | 13422 |
13425 } } // namespace v8::internal | 13423 } } // namespace v8::internal |
OLD | NEW |