OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/full-codegen.h" | 10 #include "src/full-codegen.h" |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 }; | 871 }; |
872 #undef INLINE_FUNCTION_GENERATOR_ADDRESS | 872 #undef INLINE_FUNCTION_GENERATOR_ADDRESS |
873 | 873 |
874 | 874 |
875 FullCodeGenerator::InlineFunctionGenerator | 875 FullCodeGenerator::InlineFunctionGenerator |
876 FullCodeGenerator::FindInlineFunctionGenerator(Runtime::FunctionId id) { | 876 FullCodeGenerator::FindInlineFunctionGenerator(Runtime::FunctionId id) { |
877 int lookup_index = | 877 int lookup_index = |
878 static_cast<int>(id) - static_cast<int>(Runtime::kFirstInlineFunction); | 878 static_cast<int>(id) - static_cast<int>(Runtime::kFirstInlineFunction); |
879 DCHECK(lookup_index >= 0); | 879 DCHECK(lookup_index >= 0); |
880 DCHECK(static_cast<size_t>(lookup_index) < | 880 DCHECK(static_cast<size_t>(lookup_index) < |
881 ARRAY_SIZE(kInlineFunctionGenerators)); | 881 arraysize(kInlineFunctionGenerators)); |
882 return kInlineFunctionGenerators[lookup_index]; | 882 return kInlineFunctionGenerators[lookup_index]; |
883 } | 883 } |
884 | 884 |
885 | 885 |
886 void FullCodeGenerator::EmitInlineRuntimeCall(CallRuntime* expr) { | 886 void FullCodeGenerator::EmitInlineRuntimeCall(CallRuntime* expr) { |
887 const Runtime::Function* function = expr->function(); | 887 const Runtime::Function* function = expr->function(); |
888 DCHECK(function != NULL); | 888 DCHECK(function != NULL); |
889 DCHECK(function->intrinsic_type == Runtime::INLINE); | 889 DCHECK(function->intrinsic_type == Runtime::INLINE); |
890 InlineFunctionGenerator generator = | 890 InlineFunctionGenerator generator = |
891 FindInlineFunctionGenerator(function->function_id); | 891 FindInlineFunctionGenerator(function->function_id); |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1692 } | 1692 } |
1693 return true; | 1693 return true; |
1694 } | 1694 } |
1695 #endif // DEBUG | 1695 #endif // DEBUG |
1696 | 1696 |
1697 | 1697 |
1698 #undef __ | 1698 #undef __ |
1699 | 1699 |
1700 | 1700 |
1701 } } // namespace v8::internal | 1701 } } // namespace v8::internal |
OLD | NEW |