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

Side by Side Diff: src/hydrogen.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 9749 matching lines...) Expand 10 before | Expand all | Expand 10 after
9760 9760
9761 if (function->intrinsic_type == Runtime::INLINE || 9761 if (function->intrinsic_type == Runtime::INLINE ||
9762 function->intrinsic_type == Runtime::INLINE_OPTIMIZED) { 9762 function->intrinsic_type == Runtime::INLINE_OPTIMIZED) {
9763 DCHECK(expr->name()->length() > 0); 9763 DCHECK(expr->name()->length() > 0);
9764 DCHECK(expr->name()->Get(0) == '_'); 9764 DCHECK(expr->name()->Get(0) == '_');
9765 // Call to an inline function. 9765 // Call to an inline function.
9766 int lookup_index = static_cast<int>(function->function_id) - 9766 int lookup_index = static_cast<int>(function->function_id) -
9767 static_cast<int>(Runtime::kFirstInlineFunction); 9767 static_cast<int>(Runtime::kFirstInlineFunction);
9768 DCHECK(lookup_index >= 0); 9768 DCHECK(lookup_index >= 0);
9769 DCHECK(static_cast<size_t>(lookup_index) < 9769 DCHECK(static_cast<size_t>(lookup_index) <
9770 ARRAY_SIZE(kInlineFunctionGenerators)); 9770 arraysize(kInlineFunctionGenerators));
9771 InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index]; 9771 InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index];
9772 9772
9773 // Call the inline code generator using the pointer-to-member. 9773 // Call the inline code generator using the pointer-to-member.
9774 (this->*generator)(expr); 9774 (this->*generator)(expr);
9775 } else { 9775 } else {
9776 DCHECK(function->intrinsic_type == Runtime::RUNTIME); 9776 DCHECK(function->intrinsic_type == Runtime::RUNTIME);
9777 Handle<String> name = expr->name(); 9777 Handle<String> name = expr->name();
9778 int argument_count = expr->arguments()->length(); 9778 int argument_count = expr->arguments()->length();
9779 CHECK_ALIVE(VisitExpressions(expr->arguments())); 9779 CHECK_ALIVE(VisitExpressions(expr->arguments()));
9780 PushArgumentsFromEnvironment(argument_count); 9780 PushArgumentsFromEnvironment(argument_count);
(...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after
12491 if (ShouldProduceTraceOutput()) { 12491 if (ShouldProduceTraceOutput()) {
12492 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12492 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12493 } 12493 }
12494 12494
12495 #ifdef DEBUG 12495 #ifdef DEBUG
12496 graph_->Verify(false); // No full verify. 12496 graph_->Verify(false); // No full verify.
12497 #endif 12497 #endif
12498 } 12498 }
12499 12499
12500 } } // namespace v8::internal 12500 } } // namespace v8::internal
OLDNEW
« src/base/macros.h ('K') | « src/heap/heap.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698