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 7227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7238 RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberXor) { | 7238 RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberXor) { |
7239 SealHandleScope shs(isolate); | 7239 SealHandleScope shs(isolate); |
7240 ASSERT(args.length() == 2); | 7240 ASSERT(args.length() == 2); |
7241 | 7241 |
7242 CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); | 7242 CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); |
7243 CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]); | 7243 CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]); |
7244 return isolate->heap()->NumberFromInt32(x ^ y); | 7244 return isolate->heap()->NumberFromInt32(x ^ y); |
7245 } | 7245 } |
7246 | 7246 |
7247 | 7247 |
7248 RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberNot) { | |
7249 SealHandleScope shs(isolate); | |
7250 ASSERT(args.length() == 1); | |
7251 | |
7252 CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); | |
7253 return isolate->heap()->NumberFromInt32(~x); | |
7254 } | |
7255 | |
7256 | |
7257 RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberShl) { | 7248 RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberShl) { |
7258 SealHandleScope shs(isolate); | 7249 SealHandleScope shs(isolate); |
7259 ASSERT(args.length() == 2); | 7250 ASSERT(args.length() == 2); |
7260 | 7251 |
7261 CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); | 7252 CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); |
7262 CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]); | 7253 CONVERT_NUMBER_CHECKED(int32_t, y, Int32, args[1]); |
7263 return isolate->heap()->NumberFromInt32(x << (y & 0x1f)); | 7254 return isolate->heap()->NumberFromInt32(x << (y & 0x1f)); |
7264 } | 7255 } |
7265 | 7256 |
7266 | 7257 |
(...skipping 6903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14170 // Handle last resort GC and make sure to allow future allocations | 14161 // Handle last resort GC and make sure to allow future allocations |
14171 // to grow the heap without causing GCs (if possible). | 14162 // to grow the heap without causing GCs (if possible). |
14172 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14163 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14173 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14164 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14174 "Runtime::PerformGC"); | 14165 "Runtime::PerformGC"); |
14175 } | 14166 } |
14176 } | 14167 } |
14177 | 14168 |
14178 | 14169 |
14179 } } // namespace v8::internal | 14170 } } // namespace v8::internal |
OLD | NEW |