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

Side by Side Diff: src/runtime.cc

Issue 230693002: Fix argument expectation Runtime_StringParseInt. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « no previous file | test/mjsunit/regress/regress-parseint.js » ('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 // 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 6289 matching lines...) Expand 10 before | Expand all | Expand 10 after
6300 ASSERT(args.length() == 1); 6300 ASSERT(args.length() == 1);
6301 BasicJsonStringifier stringifier(isolate); 6301 BasicJsonStringifier stringifier(isolate);
6302 return stringifier.Stringify(Handle<Object>(args[0], isolate)); 6302 return stringifier.Stringify(Handle<Object>(args[0], isolate));
6303 } 6303 }
6304 6304
6305 6305
6306 RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseInt) { 6306 RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseInt) {
6307 SealHandleScope shs(isolate); 6307 SealHandleScope shs(isolate);
6308 6308
6309 CONVERT_ARG_CHECKED(String, s, 0); 6309 CONVERT_ARG_CHECKED(String, s, 0);
6310 CONVERT_SMI_ARG_CHECKED(radix, 1); 6310 CONVERT_NUMBER_CHECKED(int, radix, Int32, args[1]);
6311 6311
6312 s->TryFlatten(); 6312 s->TryFlatten();
6313 6313
6314 RUNTIME_ASSERT(radix == 0 || (2 <= radix && radix <= 36)); 6314 RUNTIME_ASSERT(radix == 0 || (2 <= radix && radix <= 36));
6315 double value = StringToInt(isolate->unicode_cache(), s, radix); 6315 double value = StringToInt(isolate->unicode_cache(), s, radix);
6316 return isolate->heap()->NumberFromDouble(value); 6316 return isolate->heap()->NumberFromDouble(value);
6317 } 6317 }
6318 6318
6319 6319
6320 RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseFloat) { 6320 RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseFloat) {
(...skipping 8886 matching lines...) Expand 10 before | Expand all | Expand 10 after
15207 } 15207 }
15208 } 15208 }
15209 15209
15210 15210
15211 void Runtime::OutOfMemory() { 15211 void Runtime::OutOfMemory() {
15212 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); 15212 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true);
15213 UNREACHABLE(); 15213 UNREACHABLE();
15214 } 15214 }
15215 15215
15216 } } // namespace v8::internal 15216 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-parseint.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698