| 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 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2069 AddIncrementCounter(isolate()->counters()->string_add_native()); | 2069 AddIncrementCounter(isolate()->counters()->string_add_native()); |
| 2070 | 2070 |
| 2071 // Return the sequential string. | 2071 // Return the sequential string. |
| 2072 Push(result); | 2072 Push(result); |
| 2073 } | 2073 } |
| 2074 if_sameencodingandsequential.Else(); | 2074 if_sameencodingandsequential.Else(); |
| 2075 { | 2075 { |
| 2076 // Fallback to the runtime to add the two strings. | 2076 // Fallback to the runtime to add the two strings. |
| 2077 Add<HPushArgument>(left); | 2077 Add<HPushArgument>(left); |
| 2078 Add<HPushArgument>(right); | 2078 Add<HPushArgument>(right); |
| 2079 Push(Add<HCallRuntime>(isolate()->factory()->empty_string(), | 2079 Push(Add<HCallRuntime>( |
| 2080 Runtime::FunctionForId(Runtime::kStringAdd), | 2080 isolate()->factory()->empty_string(), |
| 2081 2)); | 2081 Runtime::FunctionForId(Runtime::kHiddenStringAdd), |
| 2082 2)); |
| 2082 } | 2083 } |
| 2083 if_sameencodingandsequential.End(); | 2084 if_sameencodingandsequential.End(); |
| 2084 } | 2085 } |
| 2085 if_createcons.End(); | 2086 if_createcons.End(); |
| 2086 | 2087 |
| 2087 return Pop(); | 2088 return Pop(); |
| 2088 } | 2089 } |
| 2089 | 2090 |
| 2090 | 2091 |
| 2091 HValue* HGraphBuilder::BuildStringAdd( | 2092 HValue* HGraphBuilder::BuildStringAdd( |
| (...skipping 6309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8401 | 8402 |
| 8402 // Lookup table for generators for runtime calls that are generated inline. | 8403 // Lookup table for generators for runtime calls that are generated inline. |
| 8403 // Elements of the table are member pointers to functions of | 8404 // Elements of the table are member pointers to functions of |
| 8404 // HOptimizedGraphBuilder. | 8405 // HOptimizedGraphBuilder. |
| 8405 #define INLINE_FUNCTION_GENERATOR_ADDRESS(Name, argc, ressize) \ | 8406 #define INLINE_FUNCTION_GENERATOR_ADDRESS(Name, argc, ressize) \ |
| 8406 &HOptimizedGraphBuilder::Generate##Name, | 8407 &HOptimizedGraphBuilder::Generate##Name, |
| 8407 | 8408 |
| 8408 const HOptimizedGraphBuilder::InlineFunctionGenerator | 8409 const HOptimizedGraphBuilder::InlineFunctionGenerator |
| 8409 HOptimizedGraphBuilder::kInlineFunctionGenerators[] = { | 8410 HOptimizedGraphBuilder::kInlineFunctionGenerators[] = { |
| 8410 INLINE_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_ADDRESS) | 8411 INLINE_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_ADDRESS) |
| 8412 INLINE_OPTIMIZED_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_ADDRESS) |
| 8411 }; | 8413 }; |
| 8412 #undef INLINE_FUNCTION_GENERATOR_ADDRESS | 8414 #undef INLINE_FUNCTION_GENERATOR_ADDRESS |
| 8413 | 8415 |
| 8414 | 8416 |
| 8415 template <class ViewClass> | 8417 template <class ViewClass> |
| 8416 void HGraphBuilder::BuildArrayBufferViewInitialization( | 8418 void HGraphBuilder::BuildArrayBufferViewInitialization( |
| 8417 HValue* obj, | 8419 HValue* obj, |
| 8418 HValue* buffer, | 8420 HValue* buffer, |
| 8419 HValue* byte_offset, | 8421 HValue* byte_offset, |
| 8420 HValue* byte_length) { | 8422 HValue* byte_length) { |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8727 ASSERT(!HasStackOverflow()); | 8729 ASSERT(!HasStackOverflow()); |
| 8728 ASSERT(current_block() != NULL); | 8730 ASSERT(current_block() != NULL); |
| 8729 ASSERT(current_block()->HasPredecessor()); | 8731 ASSERT(current_block()->HasPredecessor()); |
| 8730 if (expr->is_jsruntime()) { | 8732 if (expr->is_jsruntime()) { |
| 8731 return Bailout(kCallToAJavaScriptRuntimeFunction); | 8733 return Bailout(kCallToAJavaScriptRuntimeFunction); |
| 8732 } | 8734 } |
| 8733 | 8735 |
| 8734 const Runtime::Function* function = expr->function(); | 8736 const Runtime::Function* function = expr->function(); |
| 8735 ASSERT(function != NULL); | 8737 ASSERT(function != NULL); |
| 8736 | 8738 |
| 8737 if (function->intrinsic_type == Runtime::INLINE) { | 8739 if (function->intrinsic_type == Runtime::INLINE || |
| 8740 function->intrinsic_type == Runtime::INLINE_OPTIMIZED) { |
| 8738 ASSERT(expr->name()->length() > 0); | 8741 ASSERT(expr->name()->length() > 0); |
| 8739 ASSERT(expr->name()->Get(0) == '_'); | 8742 ASSERT(expr->name()->Get(0) == '_'); |
| 8740 // Call to an inline function. | 8743 // Call to an inline function. |
| 8741 int lookup_index = static_cast<int>(function->function_id) - | 8744 int lookup_index = static_cast<int>(function->function_id) - |
| 8742 static_cast<int>(Runtime::kFirstInlineFunction); | 8745 static_cast<int>(Runtime::kFirstInlineFunction); |
| 8743 ASSERT(lookup_index >= 0); | 8746 ASSERT(lookup_index >= 0); |
| 8744 ASSERT(static_cast<size_t>(lookup_index) < | 8747 ASSERT(static_cast<size_t>(lookup_index) < |
| 8745 ARRAY_SIZE(kInlineFunctionGenerators)); | 8748 ARRAY_SIZE(kInlineFunctionGenerators)); |
| 8746 InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index]; | 8749 InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index]; |
| 8747 | 8750 |
| (...skipping 2691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11439 if (ShouldProduceTraceOutput()) { | 11442 if (ShouldProduceTraceOutput()) { |
| 11440 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11443 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 11441 } | 11444 } |
| 11442 | 11445 |
| 11443 #ifdef DEBUG | 11446 #ifdef DEBUG |
| 11444 graph_->Verify(false); // No full verify. | 11447 graph_->Verify(false); // No full verify. |
| 11445 #endif | 11448 #endif |
| 11446 } | 11449 } |
| 11447 | 11450 |
| 11448 } } // namespace v8::internal | 11451 } } // namespace v8::internal |
| OLD | NEW |