| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2061 AddIncrementCounter(isolate()->counters()->string_add_native()); | 2061 AddIncrementCounter(isolate()->counters()->string_add_native()); |
| 2062 | 2062 |
| 2063 // Return the sequential string. | 2063 // Return the sequential string. |
| 2064 Push(result); | 2064 Push(result); |
| 2065 } | 2065 } |
| 2066 if_sameencodingandsequential.Else(); | 2066 if_sameencodingandsequential.Else(); |
| 2067 { | 2067 { |
| 2068 // Fallback to the runtime to add the two strings. | 2068 // Fallback to the runtime to add the two strings. |
| 2069 Add<HPushArgument>(left); | 2069 Add<HPushArgument>(left); |
| 2070 Add<HPushArgument>(right); | 2070 Add<HPushArgument>(right); |
| 2071 Push(Add<HCallRuntime>(isolate()->factory()->empty_string(), | 2071 Push(Add<HCallRuntime>( |
| 2072 Runtime::FunctionForId(Runtime::kStringAdd), | 2072 isolate()->factory()->empty_string(), |
| 2073 2)); | 2073 Runtime::FunctionForId(Runtime::kHiddenStringAdd), |
| 2074 2)); |
| 2074 } | 2075 } |
| 2075 if_sameencodingandsequential.End(); | 2076 if_sameencodingandsequential.End(); |
| 2076 } | 2077 } |
| 2077 if_createcons.End(); | 2078 if_createcons.End(); |
| 2078 | 2079 |
| 2079 return Pop(); | 2080 return Pop(); |
| 2080 } | 2081 } |
| 2081 | 2082 |
| 2082 | 2083 |
| 2083 HValue* HGraphBuilder::BuildStringAdd( | 2084 HValue* HGraphBuilder::BuildStringAdd( |
| (...skipping 6306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8390 | 8391 |
| 8391 // Lookup table for generators for runtime calls that are generated inline. | 8392 // Lookup table for generators for runtime calls that are generated inline. |
| 8392 // Elements of the table are member pointers to functions of | 8393 // Elements of the table are member pointers to functions of |
| 8393 // HOptimizedGraphBuilder. | 8394 // HOptimizedGraphBuilder. |
| 8394 #define INLINE_FUNCTION_GENERATOR_ADDRESS(Name, argc, ressize) \ | 8395 #define INLINE_FUNCTION_GENERATOR_ADDRESS(Name, argc, ressize) \ |
| 8395 &HOptimizedGraphBuilder::Generate##Name, | 8396 &HOptimizedGraphBuilder::Generate##Name, |
| 8396 | 8397 |
| 8397 const HOptimizedGraphBuilder::InlineFunctionGenerator | 8398 const HOptimizedGraphBuilder::InlineFunctionGenerator |
| 8398 HOptimizedGraphBuilder::kInlineFunctionGenerators[] = { | 8399 HOptimizedGraphBuilder::kInlineFunctionGenerators[] = { |
| 8399 INLINE_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_ADDRESS) | 8400 INLINE_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_ADDRESS) |
| 8401 INLINE_OPTIMIZED_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_ADDRESS) |
| 8400 }; | 8402 }; |
| 8401 #undef INLINE_FUNCTION_GENERATOR_ADDRESS | 8403 #undef INLINE_FUNCTION_GENERATOR_ADDRESS |
| 8402 | 8404 |
| 8403 | 8405 |
| 8404 template <class ViewClass> | 8406 template <class ViewClass> |
| 8405 void HGraphBuilder::BuildArrayBufferViewInitialization( | 8407 void HGraphBuilder::BuildArrayBufferViewInitialization( |
| 8406 HValue* obj, | 8408 HValue* obj, |
| 8407 HValue* buffer, | 8409 HValue* buffer, |
| 8408 HValue* byte_offset, | 8410 HValue* byte_offset, |
| 8409 HValue* byte_length) { | 8411 HValue* byte_length) { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8592 ASSERT(!HasStackOverflow()); | 8594 ASSERT(!HasStackOverflow()); |
| 8593 ASSERT(current_block() != NULL); | 8595 ASSERT(current_block() != NULL); |
| 8594 ASSERT(current_block()->HasPredecessor()); | 8596 ASSERT(current_block()->HasPredecessor()); |
| 8595 if (expr->is_jsruntime()) { | 8597 if (expr->is_jsruntime()) { |
| 8596 return Bailout(kCallToAJavaScriptRuntimeFunction); | 8598 return Bailout(kCallToAJavaScriptRuntimeFunction); |
| 8597 } | 8599 } |
| 8598 | 8600 |
| 8599 const Runtime::Function* function = expr->function(); | 8601 const Runtime::Function* function = expr->function(); |
| 8600 ASSERT(function != NULL); | 8602 ASSERT(function != NULL); |
| 8601 | 8603 |
| 8602 if (function->intrinsic_type == Runtime::INLINE) { | 8604 if (function->intrinsic_type == Runtime::INLINE || |
| 8605 function->intrinsic_type == Runtime::INLINE_OPTIMIZED) { |
| 8603 ASSERT(expr->name()->length() > 0); | 8606 ASSERT(expr->name()->length() > 0); |
| 8604 ASSERT(expr->name()->Get(0) == '_'); | 8607 ASSERT(expr->name()->Get(0) == '_'); |
| 8605 // Call to an inline function. | 8608 // Call to an inline function. |
| 8606 int lookup_index = static_cast<int>(function->function_id) - | 8609 int lookup_index = static_cast<int>(function->function_id) - |
| 8607 static_cast<int>(Runtime::kFirstInlineFunction); | 8610 static_cast<int>(Runtime::kFirstInlineFunction); |
| 8608 ASSERT(lookup_index >= 0); | 8611 ASSERT(lookup_index >= 0); |
| 8609 ASSERT(static_cast<size_t>(lookup_index) < | 8612 ASSERT(static_cast<size_t>(lookup_index) < |
| 8610 ARRAY_SIZE(kInlineFunctionGenerators)); | 8613 ARRAY_SIZE(kInlineFunctionGenerators)); |
| 8611 InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index]; | 8614 InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index]; |
| 8612 | 8615 |
| (...skipping 2691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11304 if (ShouldProduceTraceOutput()) { | 11307 if (ShouldProduceTraceOutput()) { |
| 11305 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11308 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 11306 } | 11309 } |
| 11307 | 11310 |
| 11308 #ifdef DEBUG | 11311 #ifdef DEBUG |
| 11309 graph_->Verify(false); // No full verify. | 11312 graph_->Verify(false); // No full verify. |
| 11310 #endif | 11313 #endif |
| 11311 } | 11314 } |
| 11312 | 11315 |
| 11313 } } // namespace v8::internal | 11316 } } // namespace v8::internal |
| OLD | NEW |