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 5017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5028 if (heap_obj->IsTrue() || heap_obj->IsFalse()) { | 5028 if (heap_obj->IsTrue() || heap_obj->IsFalse()) { |
5029 return isolate->heap()->boolean_string(); | 5029 return isolate->heap()->boolean_string(); |
5030 } | 5030 } |
5031 if (heap_obj->IsNull()) { | 5031 if (heap_obj->IsNull()) { |
5032 return FLAG_harmony_typeof | 5032 return FLAG_harmony_typeof |
5033 ? isolate->heap()->null_string() | 5033 ? isolate->heap()->null_string() |
5034 : isolate->heap()->object_string(); | 5034 : isolate->heap()->object_string(); |
5035 } | 5035 } |
5036 ASSERT(heap_obj->IsUndefined()); | 5036 ASSERT(heap_obj->IsUndefined()); |
5037 return isolate->heap()->undefined_string(); | 5037 return isolate->heap()->undefined_string(); |
| 5038 case SYMBOL_TYPE: |
| 5039 return isolate->heap()->symbol_string(); |
5038 case JS_FUNCTION_TYPE: | 5040 case JS_FUNCTION_TYPE: |
5039 case JS_FUNCTION_PROXY_TYPE: | 5041 case JS_FUNCTION_PROXY_TYPE: |
5040 return isolate->heap()->function_string(); | 5042 return isolate->heap()->function_string(); |
5041 default: | 5043 default: |
5042 // For any kind of object not handled above, the spec rule for | 5044 // For any kind of object not handled above, the spec rule for |
5043 // host objects gives that it is okay to return "object" | 5045 // host objects gives that it is okay to return "object" |
5044 return isolate->heap()->object_string(); | 5046 return isolate->heap()->object_string(); |
5045 } | 5047 } |
5046 } | 5048 } |
5047 | 5049 |
(...skipping 8357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13405 // Handle last resort GC and make sure to allow future allocations | 13407 // Handle last resort GC and make sure to allow future allocations |
13406 // to grow the heap without causing GCs (if possible). | 13408 // to grow the heap without causing GCs (if possible). |
13407 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13409 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13408 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13410 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13409 "Runtime::PerformGC"); | 13411 "Runtime::PerformGC"); |
13410 } | 13412 } |
13411 } | 13413 } |
13412 | 13414 |
13413 | 13415 |
13414 } } // namespace v8::internal | 13416 } } // namespace v8::internal |
OLD | NEW |