| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 // --- S y m b o l --- | 1268 // --- S y m b o l --- |
| 1269 Handle<JSFunction> symbol_fun = | 1269 Handle<JSFunction> symbol_fun = |
| 1270 InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize, | 1270 InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize, |
| 1271 isolate()->initial_object_prototype(), | 1271 isolate()->initial_object_prototype(), |
| 1272 Builtins::kIllegal, true); | 1272 Builtins::kIllegal, true); |
| 1273 native_context()->set_symbol_function(*symbol_fun); | 1273 native_context()->set_symbol_function(*symbol_fun); |
| 1274 } | 1274 } |
| 1275 | 1275 |
| 1276 if (FLAG_harmony_collections) { | 1276 if (FLAG_harmony_collections) { |
| 1277 { // -- S e t | 1277 { // -- S e t |
| 1278 Handle<JSObject> prototype = | |
| 1279 factory()->NewJSObject(isolate()->object_function(), TENURED); | |
| 1280 InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize, | 1278 InstallFunction(global, "Set", JS_SET_TYPE, JSSet::kSize, |
| 1281 prototype, Builtins::kIllegal, true); | 1279 isolate()->initial_object_prototype(), |
| 1280 Builtins::kIllegal, true); |
| 1282 } | 1281 } |
| 1283 { // -- M a p | 1282 { // -- M a p |
| 1284 Handle<JSObject> prototype = | |
| 1285 factory()->NewJSObject(isolate()->object_function(), TENURED); | |
| 1286 InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize, | 1283 InstallFunction(global, "Map", JS_MAP_TYPE, JSMap::kSize, |
| 1287 prototype, Builtins::kIllegal, true); | 1284 isolate()->initial_object_prototype(), |
| 1285 Builtins::kIllegal, true); |
| 1288 } | 1286 } |
| 1289 { // -- W e a k M a p | 1287 { // -- W e a k M a p |
| 1290 Handle<JSObject> prototype = | |
| 1291 factory()->NewJSObject(isolate()->object_function(), TENURED); | |
| 1292 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, | 1288 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, |
| 1293 prototype, Builtins::kIllegal, true); | 1289 isolate()->initial_object_prototype(), |
| 1290 Builtins::kIllegal, true); |
| 1294 } | 1291 } |
| 1295 } | 1292 } |
| 1296 | 1293 |
| 1297 if (FLAG_harmony_typed_arrays) { | 1294 if (FLAG_harmony_typed_arrays) { |
| 1298 { // -- A r r a y B u f f e r | 1295 { // -- A r r a y B u f f e r |
| 1299 Handle<JSObject> prototype = | |
| 1300 factory()->NewJSObject(isolate()->object_function(), TENURED); | |
| 1301 InstallFunction(global, "__ArrayBuffer", JS_ARRAY_BUFFER_TYPE, | 1296 InstallFunction(global, "__ArrayBuffer", JS_ARRAY_BUFFER_TYPE, |
| 1302 JSArrayBuffer::kSize, prototype, | 1297 JSArrayBuffer::kSize, |
| 1298 isolate()->initial_object_prototype(), |
| 1303 Builtins::kIllegal, true); | 1299 Builtins::kIllegal, true); |
| 1304 } | 1300 } |
| 1305 } | 1301 } |
| 1306 } | 1302 } |
| 1307 | 1303 |
| 1308 | 1304 |
| 1309 bool Genesis::CompileBuiltin(Isolate* isolate, int index) { | 1305 bool Genesis::CompileBuiltin(Isolate* isolate, int index) { |
| 1310 Vector<const char> name = Natives::GetScriptName(index); | 1306 Vector<const char> name = Natives::GetScriptName(index); |
| 1311 Handle<String> source_code = | 1307 Handle<String> source_code = |
| 1312 isolate->bootstrapper()->NativesSourceLookup(index); | 1308 isolate->bootstrapper()->NativesSourceLookup(index); |
| (...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2492 return from + sizeof(NestingCounterType); | 2488 return from + sizeof(NestingCounterType); |
| 2493 } | 2489 } |
| 2494 | 2490 |
| 2495 | 2491 |
| 2496 // Called when the top-level V8 mutex is destroyed. | 2492 // Called when the top-level V8 mutex is destroyed. |
| 2497 void Bootstrapper::FreeThreadResources() { | 2493 void Bootstrapper::FreeThreadResources() { |
| 2498 ASSERT(!IsActive()); | 2494 ASSERT(!IsActive()); |
| 2499 } | 2495 } |
| 2500 | 2496 |
| 2501 } } // namespace v8::internal | 2497 } } // namespace v8::internal |
| OLD | NEW |