Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1207 | 1207 |
| 1208 Handle<JSFunction> data_view_fun = | 1208 Handle<JSFunction> data_view_fun = |
| 1209 InstallFunction( | 1209 InstallFunction( |
| 1210 global, "DataView", JS_DATA_VIEW_TYPE, | 1210 global, "DataView", JS_DATA_VIEW_TYPE, |
| 1211 JSDataView::kSizeWithInternalFields, | 1211 JSDataView::kSizeWithInternalFields, |
| 1212 isolate->initial_object_prototype(), | 1212 isolate->initial_object_prototype(), |
| 1213 Builtins::kIllegal); | 1213 Builtins::kIllegal); |
| 1214 native_context()->set_data_view_fun(*data_view_fun); | 1214 native_context()->set_data_view_fun(*data_view_fun); |
| 1215 } | 1215 } |
| 1216 | 1216 |
| 1217 // -- M a p | 1217 { // -- M a p |
| 1218 InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize, | 1218 Handle<JSFunction> js_map_fun = InstallFunction( |
| 1219 isolate->initial_object_prototype(), Builtins::kIllegal); | 1219 global, "Map", JS_MAP_TYPE, JSMap::kSize, |
| 1220 isolate->initial_object_prototype(), Builtins::kIllegal); | |
| 1221 native_context()->set_js_map_map(js_map_fun->initial_map()); | |
|
jochen (gone - plz use gerrit)
2015/06/01 13:32:27
this doesn't work :-/
the prototype of the Map()
adamk
2015/06/01 21:30:02
Good eye, fix up for review at https://codereview.
| |
| 1222 } | |
| 1220 | 1223 |
| 1221 // -- S e t | 1224 { // -- S e t |
| 1222 InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize, | 1225 Handle<JSFunction> js_set_fun = InstallFunction( |
| 1223 isolate->initial_object_prototype(), Builtins::kIllegal); | 1226 global, "Set", JS_SET_TYPE, JSSet::kSize, |
| 1227 isolate->initial_object_prototype(), Builtins::kIllegal); | |
| 1228 native_context()->set_js_set_map(js_set_fun->initial_map()); | |
| 1229 } | |
| 1224 | 1230 |
| 1225 { // Set up the iterator result object | 1231 { // Set up the iterator result object |
| 1226 STATIC_ASSERT(JSGeneratorObject::kResultPropertyCount == 2); | 1232 STATIC_ASSERT(JSGeneratorObject::kResultPropertyCount == 2); |
| 1227 Handle<JSFunction> object_function(native_context()->object_function()); | 1233 Handle<JSFunction> object_function(native_context()->object_function()); |
| 1228 Handle<Map> iterator_result_map = | 1234 Handle<Map> iterator_result_map = |
| 1229 Map::Create(isolate, JSGeneratorObject::kResultPropertyCount); | 1235 Map::Create(isolate, JSGeneratorObject::kResultPropertyCount); |
| 1230 DCHECK_EQ(JSGeneratorObject::kResultSize, | 1236 DCHECK_EQ(JSGeneratorObject::kResultSize, |
| 1231 iterator_result_map->instance_size()); | 1237 iterator_result_map->instance_size()); |
| 1232 DCHECK_EQ(JSGeneratorObject::kResultPropertyCount, | 1238 DCHECK_EQ(JSGeneratorObject::kResultPropertyCount, |
| 1233 iterator_result_map->inobject_properties()); | 1239 iterator_result_map->inobject_properties()); |
| (...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3044 return from + sizeof(NestingCounterType); | 3050 return from + sizeof(NestingCounterType); |
| 3045 } | 3051 } |
| 3046 | 3052 |
| 3047 | 3053 |
| 3048 // Called when the top-level V8 mutex is destroyed. | 3054 // Called when the top-level V8 mutex is destroyed. |
| 3049 void Bootstrapper::FreeThreadResources() { | 3055 void Bootstrapper::FreeThreadResources() { |
| 3050 DCHECK(!IsActive()); | 3056 DCHECK(!IsActive()); |
| 3051 } | 3057 } |
| 3052 | 3058 |
| 3053 } } // namespace v8::internal | 3059 } } // namespace v8::internal |
| OLD | NEW |