Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Side by Side Diff: src/full-codegen.cc

Issue 501323002: Replace our homegrown ARRAY_SIZE() with Chrome's arraysize(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« src/base/macros.h ('K') | « src/factory.cc ('k') | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698