| 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 6253 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6264 | 6264 | 
| 6265   CONVERT_DOUBLE_ARG_CHECKED(x, 0); | 6265   CONVERT_DOUBLE_ARG_CHECKED(x, 0); | 
| 6266   CONVERT_DOUBLE_ARG_CHECKED(y, 1); | 6266   CONVERT_DOUBLE_ARG_CHECKED(y, 1); | 
| 6267 | 6267 | 
| 6268   x = modulo(x, y); | 6268   x = modulo(x, y); | 
| 6269   // NumberFromDouble may return a Smi instead of a Number object | 6269   // NumberFromDouble may return a Smi instead of a Number object | 
| 6270   return isolate->heap()->NumberFromDouble(x); | 6270   return isolate->heap()->NumberFromDouble(x); | 
| 6271 } | 6271 } | 
| 6272 | 6272 | 
| 6273 | 6273 | 
|  | 6274 RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberImul) { | 
|  | 6275   NoHandleAllocation ha(isolate); | 
|  | 6276   ASSERT(args.length() == 2); | 
|  | 6277 | 
|  | 6278   CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); | 
|  | 6279   CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]); | 
|  | 6280   return isolate->heap()->NumberFromInt32(x * y); | 
|  | 6281 } | 
|  | 6282 | 
|  | 6283 | 
| 6274 RUNTIME_FUNCTION(MaybeObject*, Runtime_StringAdd) { | 6284 RUNTIME_FUNCTION(MaybeObject*, Runtime_StringAdd) { | 
| 6275   NoHandleAllocation ha(isolate); | 6285   NoHandleAllocation ha(isolate); | 
| 6276   ASSERT(args.length() == 2); | 6286   ASSERT(args.length() == 2); | 
| 6277   CONVERT_ARG_CHECKED(String, str1, 0); | 6287   CONVERT_ARG_CHECKED(String, str1, 0); | 
| 6278   CONVERT_ARG_CHECKED(String, str2, 1); | 6288   CONVERT_ARG_CHECKED(String, str2, 1); | 
| 6279   isolate->counters()->string_add_runtime()->Increment(); | 6289   isolate->counters()->string_add_runtime()->Increment(); | 
| 6280   return isolate->heap()->AllocateConsString(str1, str2); | 6290   return isolate->heap()->AllocateConsString(str1, str2); | 
| 6281 } | 6291 } | 
| 6282 | 6292 | 
| 6283 | 6293 | 
| (...skipping 7066 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 13350     // Handle last resort GC and make sure to allow future allocations | 13360     // Handle last resort GC and make sure to allow future allocations | 
| 13351     // to grow the heap without causing GCs (if possible). | 13361     // to grow the heap without causing GCs (if possible). | 
| 13352     isolate->counters()->gc_last_resort_from_js()->Increment(); | 13362     isolate->counters()->gc_last_resort_from_js()->Increment(); | 
| 13353     isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13363     isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 
| 13354                                        "Runtime::PerformGC"); | 13364                                        "Runtime::PerformGC"); | 
| 13355   } | 13365   } | 
| 13356 } | 13366 } | 
| 13357 | 13367 | 
| 13358 | 13368 | 
| 13359 } }  // namespace v8::internal | 13369 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|