| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 13145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13156 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedByteElements) | 13156 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedByteElements) |
| 13157 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalShortElements) | 13157 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalShortElements) |
| 13158 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedShortElements) | 13158 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedShortElements) |
| 13159 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalIntElements) | 13159 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalIntElements) |
| 13160 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedIntElements) | 13160 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedIntElements) |
| 13161 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalFloatElements) | 13161 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalFloatElements) |
| 13162 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalDoubleElements) | 13162 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalDoubleElements) |
| 13163 | 13163 |
| 13164 #undef ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION | 13164 #undef ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION |
| 13165 | 13165 |
| 13166 |
| 13167 RUNTIME_FUNCTION(MaybeObject*, Runtime_HaveSameMap) { |
| 13168 ASSERT(args.length() == 2); |
| 13169 CONVERT_CHECKED(JSObject, obj1, args[0]); |
| 13170 CONVERT_CHECKED(JSObject, obj2, args[1]); |
| 13171 return isolate->heap()->ToBoolean(obj1->map() == obj2->map()); |
| 13172 } |
| 13173 |
| 13166 // ---------------------------------------------------------------------------- | 13174 // ---------------------------------------------------------------------------- |
| 13167 // Implementation of Runtime | 13175 // Implementation of Runtime |
| 13168 | 13176 |
| 13169 #define F(name, number_of_args, result_size) \ | 13177 #define F(name, number_of_args, result_size) \ |
| 13170 { Runtime::k##name, Runtime::RUNTIME, #name, \ | 13178 { Runtime::k##name, Runtime::RUNTIME, #name, \ |
| 13171 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size }, | 13179 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size }, |
| 13172 | 13180 |
| 13173 | 13181 |
| 13174 #define I(name, number_of_args, result_size) \ | 13182 #define I(name, number_of_args, result_size) \ |
| 13175 { Runtime::kInline##name, Runtime::INLINE, \ | 13183 { Runtime::kInline##name, Runtime::INLINE, \ |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13239 } else { | 13247 } else { |
| 13240 // Handle last resort GC and make sure to allow future allocations | 13248 // Handle last resort GC and make sure to allow future allocations |
| 13241 // to grow the heap without causing GCs (if possible). | 13249 // to grow the heap without causing GCs (if possible). |
| 13242 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13250 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13243 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags); | 13251 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags); |
| 13244 } | 13252 } |
| 13245 } | 13253 } |
| 13246 | 13254 |
| 13247 | 13255 |
| 13248 } } // namespace v8::internal | 13256 } } // namespace v8::internal |
| OLD | NEW |