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

Side by Side Diff: src/runtime.cc

Issue 660379: Prevent "control reaches end of non-void function" warning from gcc on Mac. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 4953 matching lines...) Expand 10 before | Expand all | Expand 10 after
4964 ASSERT(month >= 0); 4964 ASSERT(month >= 0);
4965 ASSERT(month < 12); 4965 ASSERT(month < 12);
4966 4966
4967 static const int base_day = 365*1969 + 1969/4 - 1969/100 + 1969/400; 4967 static const int base_day = 365*1969 + 1969/4 - 1969/100 + 1969/400;
4968 int year1 = year - 1; 4968 int year1 = year - 1;
4969 int day_from_year = 365 * year1 + year1 / 4 - year1 / 100 + year1 / 400 - 4969 int day_from_year = 365 * year1 + year1 / 4 - year1 / 100 + year1 / 400 -
4970 base_day; 4970 base_day;
4971 4971
4972 if (year % 4 || (year % 100 == 0 && year % 400 != 0)) { 4972 if (year % 4 || (year % 100 == 0 && year % 400 != 0)) {
4973 return Smi::FromInt(day_from_year + day_from_month[month] + date - 1); 4973 return Smi::FromInt(day_from_year + day_from_month[month] + date - 1);
4974 } else {
4975 return Smi::FromInt(day_from_year + day_from_month_leap[month] + date - 1);
4976 } 4974 }
4975
4976 return Smi::FromInt(day_from_year + day_from_month_leap[month] + date - 1);
4977 } 4977 }
4978 4978
4979 4979
4980 static Object* Runtime_NewArgumentsFast(Arguments args) { 4980 static Object* Runtime_NewArgumentsFast(Arguments args) {
4981 NoHandleAllocation ha; 4981 NoHandleAllocation ha;
4982 ASSERT(args.length() == 3); 4982 ASSERT(args.length() == 3);
4983 4983
4984 JSFunction* callee = JSFunction::cast(args[0]); 4984 JSFunction* callee = JSFunction::cast(args[0]);
4985 Object** parameters = reinterpret_cast<Object**>(args[1]); 4985 Object** parameters = reinterpret_cast<Object**>(args[1]);
4986 const int length = Smi::cast(args[2])->value(); 4986 const int length = Smi::cast(args[2])->value();
(...skipping 3407 matching lines...) Expand 10 before | Expand all | Expand 10 after
8394 } else { 8394 } else {
8395 // Handle last resort GC and make sure to allow future allocations 8395 // Handle last resort GC and make sure to allow future allocations
8396 // to grow the heap without causing GCs (if possible). 8396 // to grow the heap without causing GCs (if possible).
8397 Counters::gc_last_resort_from_js.Increment(); 8397 Counters::gc_last_resort_from_js.Increment();
8398 Heap::CollectAllGarbage(false); 8398 Heap::CollectAllGarbage(false);
8399 } 8399 }
8400 } 8400 }
8401 8401
8402 8402
8403 } } // namespace v8::internal 8403 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698