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

Side by Side Diff: src/factory.cc

Issue 2467073002: Revert "Create internal fields on global proxy objects" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « src/bootstrapper.cc ('k') | src/objects.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2175 result->set_target(*target); 2175 result->set_target(*target);
2176 result->set_handler(*handler); 2176 result->set_handler(*handler);
2177 result->set_hash(*undefined_value(), SKIP_WRITE_BARRIER); 2177 result->set_hash(*undefined_value(), SKIP_WRITE_BARRIER);
2178 return result; 2178 return result;
2179 } 2179 }
2180 2180
2181 2181
2182 Handle<JSGlobalProxy> Factory::NewUninitializedJSGlobalProxy() { 2182 Handle<JSGlobalProxy> Factory::NewUninitializedJSGlobalProxy() {
2183 // Create an empty shell of a JSGlobalProxy that needs to be reinitialized 2183 // Create an empty shell of a JSGlobalProxy that needs to be reinitialized
2184 // via ReinitializeJSGlobalProxy later. 2184 // via ReinitializeJSGlobalProxy later.
2185 Handle<Map> map = 2185 Handle<Map> map = NewMap(JS_GLOBAL_PROXY_TYPE, JSGlobalProxy::kSize);
2186 NewMap(JS_GLOBAL_PROXY_TYPE, JSGlobalProxy::kSizeWithInternalFields);
2187 // Maintain invariant expected from any JSGlobalProxy. 2186 // Maintain invariant expected from any JSGlobalProxy.
2188 map->set_is_access_check_needed(true); 2187 map->set_is_access_check_needed(true);
2189 CALL_HEAP_FUNCTION( 2188 CALL_HEAP_FUNCTION(
2190 isolate(), isolate()->heap()->AllocateJSObjectFromMap(*map, NOT_TENURED), 2189 isolate(), isolate()->heap()->AllocateJSObjectFromMap(*map, NOT_TENURED),
2191 JSGlobalProxy); 2190 JSGlobalProxy);
2192 } 2191 }
2193 2192
2194 2193
2195 void Factory::ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> object, 2194 void Factory::ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> object,
2196 Handle<JSFunction> constructor) { 2195 Handle<JSFunction> constructor) {
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); 2708 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map));
2710 iterator->set_initial_next(*next); 2709 iterator->set_initial_next(*next);
2711 iterator->set_array(*array); 2710 iterator->set_array(*array);
2712 iterator->set_index(0); 2711 iterator->set_index(0);
2713 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); 2712 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next);
2714 return iterator; 2713 return iterator;
2715 } 2714 }
2716 2715
2717 } // namespace internal 2716 } // namespace internal
2718 } // namespace v8 2717 } // namespace v8
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698