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

Side by Side Diff: src/bootstrapper.cc

Issue 145133013: External Array renaming and boilerplate scrapping (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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
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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 Handle<JSFunction> array_buffer_fun = 1087 Handle<JSFunction> array_buffer_fun =
1088 InstallFunction( 1088 InstallFunction(
1089 global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, 1089 global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE,
1090 JSArrayBuffer::kSizeWithInternalFields, 1090 JSArrayBuffer::kSizeWithInternalFields,
1091 isolate->initial_object_prototype(), 1091 isolate->initial_object_prototype(),
1092 Builtins::kIllegal, true, true); 1092 Builtins::kIllegal, true, true);
1093 native_context()->set_array_buffer_fun(*array_buffer_fun); 1093 native_context()->set_array_buffer_fun(*array_buffer_fun);
1094 } 1094 }
1095 1095
1096 { // -- T y p e d A r r a y s 1096 { // -- T y p e d A r r a y s
1097 Handle<JSFunction> int8_fun = InstallTypedArray("Int8Array", 1097 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
1098 EXTERNAL_BYTE_ELEMENTS); 1098 { \
1099 native_context()->set_int8_array_fun(*int8_fun); 1099 Handle<JSFunction> fun = InstallTypedArray(#Type "Array", \
1100 Handle<JSFunction> uint8_fun = InstallTypedArray("Uint8Array", 1100 EXTERNAL_##TYPE##_ELEMENTS); \
1101 EXTERNAL_UNSIGNED_BYTE_ELEMENTS); 1101 native_context()->set_##type##_array_fun(*fun); \
1102 native_context()->set_uint8_array_fun(*uint8_fun); 1102 }
1103 Handle<JSFunction> int16_fun = InstallTypedArray("Int16Array", 1103 TYPED_ARRAYS(INSTALL_TYPED_ARRAY)
1104 EXTERNAL_SHORT_ELEMENTS); 1104 #undef INSTALL_TYPED_ARRAY
1105 native_context()->set_int16_array_fun(*int16_fun);
1106 Handle<JSFunction> uint16_fun = InstallTypedArray("Uint16Array",
1107 EXTERNAL_UNSIGNED_SHORT_ELEMENTS);
1108 native_context()->set_uint16_array_fun(*uint16_fun);
1109 Handle<JSFunction> int32_fun = InstallTypedArray("Int32Array",
1110 EXTERNAL_INT_ELEMENTS);
1111 native_context()->set_int32_array_fun(*int32_fun);
1112 Handle<JSFunction> uint32_fun = InstallTypedArray("Uint32Array",
1113 EXTERNAL_UNSIGNED_INT_ELEMENTS);
1114 native_context()->set_uint32_array_fun(*uint32_fun);
1115 Handle<JSFunction> float_fun = InstallTypedArray("Float32Array",
1116 EXTERNAL_FLOAT_ELEMENTS);
1117 native_context()->set_float_array_fun(*float_fun);
1118 Handle<JSFunction> double_fun = InstallTypedArray("Float64Array",
1119 EXTERNAL_DOUBLE_ELEMENTS);
1120 native_context()->set_double_array_fun(*double_fun);
1121 Handle<JSFunction> uint8c_fun = InstallTypedArray("Uint8ClampedArray",
1122 EXTERNAL_PIXEL_ELEMENTS);
1123 native_context()->set_uint8c_array_fun(*uint8c_fun);
1124 1105
1125 Handle<JSFunction> data_view_fun = 1106 Handle<JSFunction> data_view_fun =
1126 InstallFunction( 1107 InstallFunction(
1127 global, "DataView", JS_DATA_VIEW_TYPE, 1108 global, "DataView", JS_DATA_VIEW_TYPE,
1128 JSDataView::kSizeWithInternalFields, 1109 JSDataView::kSizeWithInternalFields,
1129 isolate->initial_object_prototype(), 1110 isolate->initial_object_prototype(),
1130 Builtins::kIllegal, true, true); 1111 Builtins::kIllegal, true, true);
1131 native_context()->set_data_view_fun(*data_view_fun); 1112 native_context()->set_data_view_fun(*data_view_fun);
1132 } 1113 }
1133 1114
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 return from + sizeof(NestingCounterType); 2712 return from + sizeof(NestingCounterType);
2732 } 2713 }
2733 2714
2734 2715
2735 // Called when the top-level V8 mutex is destroyed. 2716 // Called when the top-level V8 mutex is destroyed.
2736 void Bootstrapper::FreeThreadResources() { 2717 void Bootstrapper::FreeThreadResources() {
2737 ASSERT(!IsActive()); 2718 ASSERT(!IsActive());
2738 } 2719 }
2739 2720
2740 } } // namespace v8::internal 2721 } } // namespace v8::internal
OLDNEW
« src/api.cc ('K') | « src/arm/lithium-codegen-arm.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698