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 7360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7371 void HOptimizedGraphBuilder::VisitCallRuntime(CallRuntime* expr) { | 7371 void HOptimizedGraphBuilder::VisitCallRuntime(CallRuntime* expr) { |
7372 ASSERT(!HasStackOverflow()); | 7372 ASSERT(!HasStackOverflow()); |
7373 ASSERT(current_block() != NULL); | 7373 ASSERT(current_block() != NULL); |
7374 ASSERT(current_block()->HasPredecessor()); | 7374 ASSERT(current_block()->HasPredecessor()); |
7375 if (expr->is_jsruntime()) { | 7375 if (expr->is_jsruntime()) { |
7376 return Bailout("call to a JavaScript runtime function"); | 7376 return Bailout("call to a JavaScript runtime function"); |
7377 } | 7377 } |
7378 | 7378 |
7379 const Runtime::Function* function = expr->function(); | 7379 const Runtime::Function* function = expr->function(); |
7380 ASSERT(function != NULL); | 7380 ASSERT(function != NULL); |
7381 | |
7382 if (static_cast<int>(function->function_id) | |
7383 == static_cast<int>(Runtime::kNeverOptimize) | |
7384 && expr->arguments()->length() == 0) { | |
7385 // %NeverOptimize() without arguments marks the caller as never optimize. | |
7386 return Bailout("function marked itself as never optimize"); | |
7387 } | |
7388 | |
7389 if (function->intrinsic_type == Runtime::INLINE) { | 7381 if (function->intrinsic_type == Runtime::INLINE) { |
7390 ASSERT(expr->name()->length() > 0); | 7382 ASSERT(expr->name()->length() > 0); |
7391 ASSERT(expr->name()->Get(0) == '_'); | 7383 ASSERT(expr->name()->Get(0) == '_'); |
7392 // Call to an inline function. | 7384 // Call to an inline function. |
7393 int lookup_index = static_cast<int>(function->function_id) - | 7385 int lookup_index = static_cast<int>(function->function_id) - |
7394 static_cast<int>(Runtime::kFirstInlineFunction); | 7386 static_cast<int>(Runtime::kFirstInlineFunction); |
7395 ASSERT(lookup_index >= 0); | 7387 ASSERT(lookup_index >= 0); |
7396 ASSERT(static_cast<size_t>(lookup_index) < | 7388 ASSERT(static_cast<size_t>(lookup_index) < |
7397 ARRAY_SIZE(kInlineFunctionGenerators)); | 7389 ARRAY_SIZE(kInlineFunctionGenerators)); |
7398 InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index]; | 7390 InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index]; |
(...skipping 2531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9930 if (ShouldProduceTraceOutput()) { | 9922 if (ShouldProduceTraceOutput()) { |
9931 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9923 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9932 } | 9924 } |
9933 | 9925 |
9934 #ifdef DEBUG | 9926 #ifdef DEBUG |
9935 graph_->Verify(false); // No full verify. | 9927 graph_->Verify(false); // No full verify. |
9936 #endif | 9928 #endif |
9937 } | 9929 } |
9938 | 9930 |
9939 } } // namespace v8::internal | 9931 } } // namespace v8::internal |
OLD | NEW |