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

Side by Side Diff: src/bootstrapper.cc

Issue 1135493006: Revert of [strong] Object literals create strong objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/ast.h ('k') | src/contexts.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/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 // search for the 'Array' property on the global object and use that one 1009 // search for the 'Array' property on the global object and use that one
1010 // as the constructor. 'Array' property on a global object can be 1010 // as the constructor. 'Array' property on a global object can be
1011 // overwritten by JS code. 1011 // overwritten by JS code.
1012 native_context()->set_array_function(*array_function); 1012 native_context()->set_array_function(*array_function);
1013 1013
1014 // Cache the array maps, needed by ArrayConstructorStub 1014 // Cache the array maps, needed by ArrayConstructorStub
1015 CacheInitialJSArrayMaps(native_context(), initial_map); 1015 CacheInitialJSArrayMaps(native_context(), initial_map);
1016 ArrayConstructorStub array_constructor_stub(isolate); 1016 ArrayConstructorStub array_constructor_stub(isolate);
1017 Handle<Code> code = array_constructor_stub.GetCode(); 1017 Handle<Code> code = array_constructor_stub.GetCode();
1018 array_function->shared()->set_construct_stub(*code); 1018 array_function->shared()->set_construct_stub(*code);
1019
1020 Handle<Map> initial_strong_map =
1021 Map::Copy(initial_map, "SetInstancePrototype");
1022 initial_strong_map->set_is_strong(true);
1023 CacheInitialJSArrayMaps(native_context(), initial_strong_map);
1024 } 1019 }
1025 1020
1026 { // --- N u m b e r --- 1021 { // --- N u m b e r ---
1027 Handle<JSFunction> number_fun = 1022 Handle<JSFunction> number_fun =
1028 InstallFunction(global, "Number", JS_VALUE_TYPE, JSValue::kSize, 1023 InstallFunction(global, "Number", JS_VALUE_TYPE, JSValue::kSize,
1029 isolate->initial_object_prototype(), 1024 isolate->initial_object_prototype(),
1030 Builtins::kIllegal); 1025 Builtins::kIllegal);
1031 native_context()->set_number_function(*number_fun); 1026 native_context()->set_number_function(*number_fun);
1032 } 1027 }
1033 1028
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after
3028 return from + sizeof(NestingCounterType); 3023 return from + sizeof(NestingCounterType);
3029 } 3024 }
3030 3025
3031 3026
3032 // Called when the top-level V8 mutex is destroyed. 3027 // Called when the top-level V8 mutex is destroyed.
3033 void Bootstrapper::FreeThreadResources() { 3028 void Bootstrapper::FreeThreadResources() {
3034 DCHECK(!IsActive()); 3029 DCHECK(!IsActive());
3035 } 3030 }
3036 3031
3037 } } // namespace v8::internal 3032 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698