| 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 4619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4630 switch (instance_type) { | 4630 switch (instance_type) { |
| 4631 case ODDBALL_TYPE: | 4631 case ODDBALL_TYPE: |
| 4632 if (heap_obj->IsTrue() || heap_obj->IsFalse()) { | 4632 if (heap_obj->IsTrue() || heap_obj->IsFalse()) { |
| 4633 return isolate->heap()->boolean_symbol(); | 4633 return isolate->heap()->boolean_symbol(); |
| 4634 } | 4634 } |
| 4635 if (heap_obj->IsNull()) { | 4635 if (heap_obj->IsNull()) { |
| 4636 return isolate->heap()->object_symbol(); | 4636 return isolate->heap()->object_symbol(); |
| 4637 } | 4637 } |
| 4638 ASSERT(heap_obj->IsUndefined()); | 4638 ASSERT(heap_obj->IsUndefined()); |
| 4639 return isolate->heap()->undefined_symbol(); | 4639 return isolate->heap()->undefined_symbol(); |
| 4640 case JS_FUNCTION_TYPE: case JS_REGEXP_TYPE: | 4640 case JS_FUNCTION_TYPE: |
| 4641 return isolate->heap()->function_symbol(); | 4641 return isolate->heap()->function_symbol(); |
| 4642 default: | 4642 default: |
| 4643 // For any kind of object not handled above, the spec rule for | 4643 // For any kind of object not handled above, the spec rule for |
| 4644 // host objects gives that it is okay to return "object" | 4644 // host objects gives that it is okay to return "object" |
| 4645 return isolate->heap()->object_symbol(); | 4645 return isolate->heap()->object_symbol(); |
| 4646 } | 4646 } |
| 4647 } | 4647 } |
| 4648 | 4648 |
| 4649 | 4649 |
| 4650 static bool AreDigits(const char*s, int from, int to) { | 4650 static bool AreDigits(const char*s, int from, int to) { |
| (...skipping 7567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12218 } else { | 12218 } else { |
| 12219 // Handle last resort GC and make sure to allow future allocations | 12219 // Handle last resort GC and make sure to allow future allocations |
| 12220 // to grow the heap without causing GCs (if possible). | 12220 // to grow the heap without causing GCs (if possible). |
| 12221 isolate->counters()->gc_last_resort_from_js()->Increment(); | 12221 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 12222 isolate->heap()->CollectAllGarbage(false); | 12222 isolate->heap()->CollectAllGarbage(false); |
| 12223 } | 12223 } |
| 12224 } | 12224 } |
| 12225 | 12225 |
| 12226 | 12226 |
| 12227 } } // namespace v8::internal | 12227 } } // namespace v8::internal |
| OLD | NEW |