Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: src/runtime.cc

Issue 12957004: ES6 symbols: turn symbols into a proper primitive type (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/runtime.h ('k') | src/runtime.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698