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

Side by Side Diff: src/bootstrapper.cc

Issue 14884012: Added an extra flag that enables only ArrayBuffer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/arraybuffer.js ('k') | src/flag-definitions.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 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 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 isolate()->initial_object_prototype(), 1310 isolate()->initial_object_prototype(),
1311 Builtins::kIllegal, true); 1311 Builtins::kIllegal, true);
1312 } 1312 }
1313 { // -- W e a k M a p 1313 { // -- W e a k M a p
1314 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, 1314 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize,
1315 isolate()->initial_object_prototype(), 1315 isolate()->initial_object_prototype(),
1316 Builtins::kIllegal, true); 1316 Builtins::kIllegal, true);
1317 } 1317 }
1318 } 1318 }
1319 1319
1320 if (FLAG_harmony_array_buffer) {
1321 // -- A r r a y B u f f e r
1322 Handle<JSFunction> array_buffer_fun =
1323 InstallFunction(global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE,
1324 JSArrayBuffer::kSize,
1325 isolate()->initial_object_prototype(),
1326 Builtins::kIllegal, true);
1327 native_context()->set_array_buffer_fun(*array_buffer_fun);
1328 }
1329
1320 if (FLAG_harmony_typed_arrays) { 1330 if (FLAG_harmony_typed_arrays) {
1321 { // -- A r r a y B u f f e r 1331 // -- T y p e d A r r a y s
1322 Handle<JSFunction> array_buffer_fun = 1332 Handle<JSFunction> int8_fun = InstallTypedArray("Int8Array");
1323 InstallFunction(global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, 1333 native_context()->set_int8_array_fun(*int8_fun);
1324 JSArrayBuffer::kSize, 1334 Handle<JSFunction> uint8_fun = InstallTypedArray("Uint8Array");
1325 isolate()->initial_object_prototype(), 1335 native_context()->set_uint8_array_fun(*uint8_fun);
1326 Builtins::kIllegal, true); 1336 Handle<JSFunction> int16_fun = InstallTypedArray("Int16Array");
1327 native_context()->set_array_buffer_fun(*array_buffer_fun); 1337 native_context()->set_int16_array_fun(*int16_fun);
1328 } 1338 Handle<JSFunction> uint16_fun = InstallTypedArray("Uint16Array");
1329 { 1339 native_context()->set_uint16_array_fun(*uint16_fun);
1330 // -- T y p e d A r r a y s 1340 Handle<JSFunction> int32_fun = InstallTypedArray("Int32Array");
1331 Handle<JSFunction> int8_fun = InstallTypedArray("Int8Array"); 1341 native_context()->set_int32_array_fun(*int32_fun);
1332 native_context()->set_int8_array_fun(*int8_fun); 1342 Handle<JSFunction> uint32_fun = InstallTypedArray("Uint32Array");
1333 Handle<JSFunction> uint8_fun = InstallTypedArray("Uint8Array"); 1343 native_context()->set_uint32_array_fun(*uint32_fun);
1334 native_context()->set_uint8_array_fun(*uint8_fun); 1344 Handle<JSFunction> float_fun = InstallTypedArray("Float32Array");
1335 Handle<JSFunction> int16_fun = InstallTypedArray("Int16Array"); 1345 native_context()->set_float_array_fun(*float_fun);
1336 native_context()->set_int16_array_fun(*int16_fun); 1346 Handle<JSFunction> double_fun = InstallTypedArray("Float64Array");
1337 Handle<JSFunction> uint16_fun = InstallTypedArray("Uint16Array"); 1347 native_context()->set_double_array_fun(*double_fun);
1338 native_context()->set_uint16_array_fun(*uint16_fun); 1348 Handle<JSFunction> uint8c_fun = InstallTypedArray("Uint8ClampedArray");
1339 Handle<JSFunction> int32_fun = InstallTypedArray("Int32Array"); 1349 native_context()->set_uint8c_array_fun(*uint8c_fun);
1340 native_context()->set_int32_array_fun(*int32_fun);
1341 Handle<JSFunction> uint32_fun = InstallTypedArray("Uint32Array");
1342 native_context()->set_uint32_array_fun(*uint32_fun);
1343 Handle<JSFunction> float_fun = InstallTypedArray("Float32Array");
1344 native_context()->set_float_array_fun(*float_fun);
1345 Handle<JSFunction> double_fun = InstallTypedArray("Float64Array");
1346 native_context()->set_double_array_fun(*double_fun);
1347 Handle<JSFunction> uint8c_fun = InstallTypedArray("Uint8ClampedArray");
1348 native_context()->set_uint8c_array_fun(*uint8c_fun);
1349 }
1350 } 1350 }
1351 1351
1352 if (FLAG_harmony_generators) { 1352 if (FLAG_harmony_generators) {
1353 // Create generator meta-objects and install them on the builtins object. 1353 // Create generator meta-objects and install them on the builtins object.
1354 Handle<JSObject> builtins(native_context()->builtins()); 1354 Handle<JSObject> builtins(native_context()->builtins());
1355 Handle<JSObject> generator_object_prototype = 1355 Handle<JSObject> generator_object_prototype =
1356 factory()->NewJSObject(isolate()->object_function(), TENURED); 1356 factory()->NewJSObject(isolate()->object_function(), TENURED);
1357 Handle<JSFunction> generator_function_prototype = 1357 Handle<JSFunction> generator_function_prototype =
1358 InstallFunction(builtins, "GeneratorFunctionPrototype", 1358 InstallFunction(builtins, "GeneratorFunctionPrototype",
1359 JS_FUNCTION_TYPE, JSFunction::kHeaderSize, 1359 JS_FUNCTION_TYPE, JSFunction::kHeaderSize,
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 if (FLAG_harmony_collections && 1985 if (FLAG_harmony_collections &&
1986 strcmp(ExperimentalNatives::GetScriptName(i).start(), 1986 strcmp(ExperimentalNatives::GetScriptName(i).start(),
1987 "native collection.js") == 0) { 1987 "native collection.js") == 0) {
1988 if (!CompileExperimentalBuiltin(isolate(), i)) return false; 1988 if (!CompileExperimentalBuiltin(isolate(), i)) return false;
1989 } 1989 }
1990 if (FLAG_harmony_observation && 1990 if (FLAG_harmony_observation &&
1991 strcmp(ExperimentalNatives::GetScriptName(i).start(), 1991 strcmp(ExperimentalNatives::GetScriptName(i).start(),
1992 "native object-observe.js") == 0) { 1992 "native object-observe.js") == 0) {
1993 if (!CompileExperimentalBuiltin(isolate(), i)) return false; 1993 if (!CompileExperimentalBuiltin(isolate(), i)) return false;
1994 } 1994 }
1995 if (FLAG_harmony_array_buffer &&
1996 strcmp(ExperimentalNatives::GetScriptName(i).start(),
1997 "native arraybuffer.js") == 0) {
1998 if (!CompileExperimentalBuiltin(isolate(), i)) return false;
1999 }
1995 if (FLAG_harmony_typed_arrays && 2000 if (FLAG_harmony_typed_arrays &&
1996 strcmp(ExperimentalNatives::GetScriptName(i).start(), 2001 strcmp(ExperimentalNatives::GetScriptName(i).start(),
1997 "native typedarray.js") == 0) { 2002 "native typedarray.js") == 0) {
1998 if (!CompileExperimentalBuiltin(isolate(), i)) return false; 2003 if (!CompileExperimentalBuiltin(isolate(), i)) return false;
1999 } 2004 }
2000 if (FLAG_harmony_generators && 2005 if (FLAG_harmony_generators &&
2001 strcmp(ExperimentalNatives::GetScriptName(i).start(), 2006 strcmp(ExperimentalNatives::GetScriptName(i).start(),
2002 "native generator.js") == 0) { 2007 "native generator.js") == 0) {
2003 if (!CompileExperimentalBuiltin(isolate(), i)) return false; 2008 if (!CompileExperimentalBuiltin(isolate(), i)) return false;
2004 } 2009 }
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
2580 return from + sizeof(NestingCounterType); 2585 return from + sizeof(NestingCounterType);
2581 } 2586 }
2582 2587
2583 2588
2584 // Called when the top-level V8 mutex is destroyed. 2589 // Called when the top-level V8 mutex is destroyed.
2585 void Bootstrapper::FreeThreadResources() { 2590 void Bootstrapper::FreeThreadResources() {
2586 ASSERT(!IsActive()); 2591 ASSERT(!IsActive());
2587 } 2592 }
2588 2593
2589 } } // namespace v8::internal 2594 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arraybuffer.js ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698