| OLD | NEW |
| 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 7564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7575 time > DateCache::kMaxTimeInMs) { | 7575 time > DateCache::kMaxTimeInMs) { |
| 7576 value = isolate->heap()->nan_value(); | 7576 value = isolate->heap()->nan_value(); |
| 7577 is_value_nan = true; | 7577 is_value_nan = true; |
| 7578 } else { | 7578 } else { |
| 7579 MaybeObject* maybe_result = | 7579 MaybeObject* maybe_result = |
| 7580 isolate->heap()->AllocateHeapNumber(DoubleToInteger(time)); | 7580 isolate->heap()->AllocateHeapNumber(DoubleToInteger(time)); |
| 7581 if (!maybe_result->ToObject(&value)) return maybe_result; | 7581 if (!maybe_result->ToObject(&value)) return maybe_result; |
| 7582 } | 7582 } |
| 7583 } | 7583 } |
| 7584 date->SetValue(value, is_value_nan); | 7584 date->SetValue(value, is_value_nan); |
| 7585 return *date; | 7585 return value; |
| 7586 } | 7586 } |
| 7587 | 7587 |
| 7588 | 7588 |
| 7589 RUNTIME_FUNCTION(MaybeObject*, Runtime_NewArgumentsFast) { | 7589 RUNTIME_FUNCTION(MaybeObject*, Runtime_NewArgumentsFast) { |
| 7590 HandleScope scope(isolate); | 7590 HandleScope scope(isolate); |
| 7591 ASSERT(args.length() == 3); | 7591 ASSERT(args.length() == 3); |
| 7592 | 7592 |
| 7593 Handle<JSFunction> callee = args.at<JSFunction>(0); | 7593 Handle<JSFunction> callee = args.at<JSFunction>(0); |
| 7594 Object** parameters = reinterpret_cast<Object**>(args[1]); | 7594 Object** parameters = reinterpret_cast<Object**>(args[1]); |
| 7595 const int argument_count = Smi::cast(args[2])->value(); | 7595 const int argument_count = Smi::cast(args[2])->value(); |
| (...skipping 5749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13345 // Handle last resort GC and make sure to allow future allocations | 13345 // Handle last resort GC and make sure to allow future allocations |
| 13346 // to grow the heap without causing GCs (if possible). | 13346 // to grow the heap without causing GCs (if possible). |
| 13347 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13347 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13348 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13348 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13349 "Runtime::PerformGC"); | 13349 "Runtime::PerformGC"); |
| 13350 } | 13350 } |
| 13351 } | 13351 } |
| 13352 | 13352 |
| 13353 | 13353 |
| 13354 } } // namespace v8::internal | 13354 } } // namespace v8::internal |
| OLD | NEW |