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

Side by Side Diff: src/factory.cc

Issue 950283002: Move Maps' back pointers from "transitions" to "constructor" field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix stupidity on arm64 Created 5 years, 10 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 | « src/builtins.cc ('k') | src/heap-snapshot-generator.cc » ('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/conversions.h" 9 #include "src/conversions.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 // context the JSProxy originated in. But that context isn't stored anywhere. 1949 // context the JSProxy originated in. But that context isn't stored anywhere.
1950 Handle<Context> context(isolate()->native_context()); 1950 Handle<Context> context(isolate()->native_context());
1951 1951
1952 // Functions require some minimal initialization. 1952 // Functions require some minimal initialization.
1953 if (type == JS_FUNCTION_TYPE) { 1953 if (type == JS_FUNCTION_TYPE) {
1954 map->set_function_with_prototype(true); 1954 map->set_function_with_prototype(true);
1955 Handle<JSFunction> js_function = Handle<JSFunction>::cast(proxy); 1955 Handle<JSFunction> js_function = Handle<JSFunction>::cast(proxy);
1956 InitializeFunction(js_function, shared.ToHandleChecked(), context); 1956 InitializeFunction(js_function, shared.ToHandleChecked(), context);
1957 } else { 1957 } else {
1958 // Provide JSObjects with a constructor. 1958 // Provide JSObjects with a constructor.
1959 map->set_constructor(context->object_function()); 1959 map->SetConstructor(context->object_function());
1960 } 1960 }
1961 } 1961 }
1962 1962
1963 1963
1964 Handle<JSGlobalProxy> Factory::NewUninitializedJSGlobalProxy() { 1964 Handle<JSGlobalProxy> Factory::NewUninitializedJSGlobalProxy() {
1965 // Create an empty shell of a JSGlobalProxy that needs to be reinitialized 1965 // Create an empty shell of a JSGlobalProxy that needs to be reinitialized
1966 // via ReinitializeJSGlobalProxy later. 1966 // via ReinitializeJSGlobalProxy later.
1967 Handle<Map> map = NewMap(JS_GLOBAL_PROXY_TYPE, JSGlobalProxy::kSize); 1967 Handle<Map> map = NewMap(JS_GLOBAL_PROXY_TYPE, JSGlobalProxy::kSize);
1968 // Maintain invariant expected from any JSGlobalProxy. 1968 // Maintain invariant expected from any JSGlobalProxy.
1969 map->set_is_access_check_needed(true); 1969 map->set_is_access_check_needed(true);
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 return Handle<Object>::null(); 2332 return Handle<Object>::null();
2333 } 2333 }
2334 2334
2335 2335
2336 Handle<Object> Factory::ToBoolean(bool value) { 2336 Handle<Object> Factory::ToBoolean(bool value) {
2337 return value ? true_value() : false_value(); 2337 return value ? true_value() : false_value();
2338 } 2338 }
2339 2339
2340 2340
2341 } } // namespace v8::internal 2341 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698