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

Side by Side Diff: src/runtime.cc

Issue 304553002: Replace STATIC_CHECK with STATIC_ASSERT. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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
« no previous file with comments | « src/objects-inl.h ('k') | src/spaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "accessors.h" 10 #include "accessors.h"
(...skipping 7559 matching lines...) Expand 10 before | Expand all | Expand 10 after
7570 ASSERT(args.length() == 2); 7570 ASSERT(args.length() == 2);
7571 7571
7572 CONVERT_ARG_HANDLE_CHECKED(String, x, 0); 7572 CONVERT_ARG_HANDLE_CHECKED(String, x, 0);
7573 CONVERT_ARG_HANDLE_CHECKED(String, y, 1); 7573 CONVERT_ARG_HANDLE_CHECKED(String, y, 1);
7574 7574
7575 bool not_equal = !String::Equals(x, y); 7575 bool not_equal = !String::Equals(x, y);
7576 // This is slightly convoluted because the value that signifies 7576 // This is slightly convoluted because the value that signifies
7577 // equality is 0 and inequality is 1 so we have to negate the result 7577 // equality is 0 and inequality is 1 so we have to negate the result
7578 // from String::Equals. 7578 // from String::Equals.
7579 ASSERT(not_equal == 0 || not_equal == 1); 7579 ASSERT(not_equal == 0 || not_equal == 1);
7580 STATIC_CHECK(EQUAL == 0); 7580 STATIC_ASSERT(EQUAL == 0);
7581 STATIC_CHECK(NOT_EQUAL == 1); 7581 STATIC_ASSERT(NOT_EQUAL == 1);
7582 return Smi::FromInt(not_equal); 7582 return Smi::FromInt(not_equal);
7583 } 7583 }
7584 7584
7585 7585
7586 RUNTIME_FUNCTION(Runtime_NumberCompare) { 7586 RUNTIME_FUNCTION(Runtime_NumberCompare) {
7587 SealHandleScope shs(isolate); 7587 SealHandleScope shs(isolate);
7588 ASSERT(args.length() == 3); 7588 ASSERT(args.length() == 3);
7589 7589
7590 CONVERT_DOUBLE_ARG_CHECKED(x, 0); 7590 CONVERT_DOUBLE_ARG_CHECKED(x, 0);
7591 CONVERT_DOUBLE_ARG_CHECKED(y, 1); 7591 CONVERT_DOUBLE_ARG_CHECKED(y, 1);
(...skipping 7579 matching lines...) Expand 10 before | Expand all | Expand 10 after
15171 } 15171 }
15172 return NULL; 15172 return NULL;
15173 } 15173 }
15174 15174
15175 15175
15176 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15176 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15177 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15177 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15178 } 15178 }
15179 15179
15180 } } // namespace v8::internal 15180 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698