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

Side by Side Diff: src/runtime.cc

Issue 12455002: ES6 symbols: filter symbols form for-in loops and Object.keys (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/proxy.js ('k') | src/v8natives.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 4855 matching lines...) Expand 10 before | Expand all | Expand 10 after
4866 GetKeysInFixedArrayFor(object, LOCAL_ONLY, &threw); 4866 GetKeysInFixedArrayFor(object, LOCAL_ONLY, &threw);
4867 if (threw) return Failure::Exception(); 4867 if (threw) return Failure::Exception();
4868 4868
4869 // Some fast paths through GetKeysInFixedArrayFor reuse a cached 4869 // Some fast paths through GetKeysInFixedArrayFor reuse a cached
4870 // property array and since the result is mutable we have to create 4870 // property array and since the result is mutable we have to create
4871 // a fresh clone on each invocation. 4871 // a fresh clone on each invocation.
4872 int length = contents->length(); 4872 int length = contents->length();
4873 Handle<FixedArray> copy = isolate->factory()->NewFixedArray(length); 4873 Handle<FixedArray> copy = isolate->factory()->NewFixedArray(length);
4874 for (int i = 0; i < length; i++) { 4874 for (int i = 0; i < length; i++) {
4875 Object* entry = contents->get(i); 4875 Object* entry = contents->get(i);
4876 if (entry->IsName()) { 4876 if (entry->IsString()) {
4877 copy->set(i, entry); 4877 copy->set(i, entry);
4878 } else { 4878 } else {
4879 ASSERT(entry->IsNumber()); 4879 ASSERT(entry->IsNumber());
4880 HandleScope scope(isolate); 4880 HandleScope scope(isolate);
4881 Handle<Object> entry_handle(entry, isolate); 4881 Handle<Object> entry_handle(entry, isolate);
4882 Handle<Object> entry_str = 4882 Handle<Object> entry_str =
4883 isolate->factory()->NumberToString(entry_handle); 4883 isolate->factory()->NumberToString(entry_handle);
4884 copy->set(i, *entry_str); 4884 copy->set(i, *entry_str);
4885 } 4885 }
4886 } 4886 }
(...skipping 8427 matching lines...) Expand 10 before | Expand all | Expand 10 after
13314 // Handle last resort GC and make sure to allow future allocations 13314 // Handle last resort GC and make sure to allow future allocations
13315 // to grow the heap without causing GCs (if possible). 13315 // to grow the heap without causing GCs (if possible).
13316 isolate->counters()->gc_last_resort_from_js()->Increment(); 13316 isolate->counters()->gc_last_resort_from_js()->Increment();
13317 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13317 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13318 "Runtime::PerformGC"); 13318 "Runtime::PerformGC");
13319 } 13319 }
13320 } 13320 }
13321 13321
13322 13322
13323 } } // namespace v8::internal 13323 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/proxy.js ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698