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

Side by Side Diff: src/bootstrapper.cc

Issue 1134333005: [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
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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 initial_map->AppendDescriptor(&d); 1005 initial_map->AppendDescriptor(&d);
1006 } 1006 }
1007 1007
1008 // array_function is used internally. JS code creating array object should 1008 // array_function is used internally. JS code creating array object should
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, false);
Dmitry Lomov (no reviews) 2015/05/18 09:15:56 Where do you call this function with 'true'?
rossberg 2015/05/18 09:32:37 In JSFunction::SetInstancePrototype (objects.cc:10
Dmitry Lomov (no reviews) 2015/05/18 10:56:30 Sounds like a bug/oversight - ask Yang or Ulan?
rossberg 2015/05/18 12:01:25 Toon pointed out that the code here is to capture
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 } 1019 }
1020 1020
1021 { // --- N u m b e r --- 1021 { // --- N u m b e r ---
1022 Handle<JSFunction> number_fun = 1022 Handle<JSFunction> number_fun =
1023 InstallFunction(global, "Number", JS_VALUE_TYPE, JSValue::kSize, 1023 InstallFunction(global, "Number", JS_VALUE_TYPE, JSValue::kSize,
1024 isolate->initial_object_prototype(), 1024 isolate->initial_object_prototype(),
1025 Builtins::kIllegal); 1025 Builtins::kIllegal);
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after
3023 return from + sizeof(NestingCounterType); 3023 return from + sizeof(NestingCounterType);
3024 } 3024 }
3025 3025
3026 3026
3027 // Called when the top-level V8 mutex is destroyed. 3027 // Called when the top-level V8 mutex is destroyed.
3028 void Bootstrapper::FreeThreadResources() { 3028 void Bootstrapper::FreeThreadResources() {
3029 DCHECK(!IsActive()); 3029 DCHECK(!IsActive());
3030 } 3030 }
3031 3031
3032 } } // namespace v8::internal 3032 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/contexts.h » ('j') | test/mjsunit/strong/literals.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698