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

Side by Side Diff: src/factory.cc

Issue 1575423002: Move properties from JSObject to JSReceiver (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | 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/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 if (target->IsConstructor()) { 2018 if (target->IsConstructor()) {
2019 map = Handle<Map>(isolate()->proxy_constructor_map()); 2019 map = Handle<Map>(isolate()->proxy_constructor_map());
2020 } else { 2020 } else {
2021 map = Handle<Map>(isolate()->proxy_callable_map()); 2021 map = Handle<Map>(isolate()->proxy_callable_map());
2022 } 2022 }
2023 } else { 2023 } else {
2024 map = Handle<Map>(isolate()->proxy_map()); 2024 map = Handle<Map>(isolate()->proxy_map());
2025 } 2025 }
2026 DCHECK(map->prototype()->IsNull()); 2026 DCHECK(map->prototype()->IsNull());
2027 Handle<JSProxy> result = New<JSProxy>(map, NEW_SPACE); 2027 Handle<JSProxy> result = New<JSProxy>(map, NEW_SPACE);
2028 result->initialize_properties();
jochen (gone - plz use gerrit) 2016/01/12 14:51:05 is there any other way to allocate a JSProxy? some
Toon Verwaest 2016/01/12 15:03:25 Not afaik
2028 result->set_target(*target); 2029 result->set_target(*target);
2029 result->set_handler(*handler); 2030 result->set_handler(*handler);
2030 result->set_hash(*undefined_value(), SKIP_WRITE_BARRIER); 2031 result->set_hash(*undefined_value(), SKIP_WRITE_BARRIER);
2031 return result; 2032 return result;
2032 } 2033 }
2033 2034
2034 2035
2035 Handle<JSGlobalProxy> Factory::NewUninitializedJSGlobalProxy() { 2036 Handle<JSGlobalProxy> Factory::NewUninitializedJSGlobalProxy() {
2036 // Create an empty shell of a JSGlobalProxy that needs to be reinitialized 2037 // Create an empty shell of a JSGlobalProxy that needs to be reinitialized
2037 // via ReinitializeJSGlobalProxy later. 2038 // via ReinitializeJSGlobalProxy later.
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
2398 } 2399 }
2399 2400
2400 2401
2401 Handle<Object> Factory::ToBoolean(bool value) { 2402 Handle<Object> Factory::ToBoolean(bool value) {
2402 return value ? true_value() : false_value(); 2403 return value ? true_value() : false_value();
2403 } 2404 }
2404 2405
2405 2406
2406 } // namespace internal 2407 } // namespace internal
2407 } // namespace v8 2408 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698