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

Side by Side Diff: src/factory.cc

Issue 17153011: DataView implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes Created 7 years, 6 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/factory.h ('k') | src/globals.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer() { 1073 Handle<JSArrayBuffer> Factory::NewJSArrayBuffer() {
1074 JSFunction* array_buffer_fun = 1074 JSFunction* array_buffer_fun =
1075 isolate()->context()->native_context()->array_buffer_fun(); 1075 isolate()->context()->native_context()->array_buffer_fun();
1076 CALL_HEAP_FUNCTION( 1076 CALL_HEAP_FUNCTION(
1077 isolate(), 1077 isolate(),
1078 isolate()->heap()->AllocateJSObject(array_buffer_fun), 1078 isolate()->heap()->AllocateJSObject(array_buffer_fun),
1079 JSArrayBuffer); 1079 JSArrayBuffer);
1080 } 1080 }
1081 1081
1082 1082
1083 Handle<JSDataView> Factory::NewJSDataView() {
1084 JSFunction* data_view_fun =
1085 isolate()->context()->native_context()->data_view_fun();
1086 CALL_HEAP_FUNCTION(
1087 isolate(),
1088 isolate()->heap()->AllocateJSObject(data_view_fun),
1089 JSDataView);
1090 }
1091
1092
1083 Handle<JSTypedArray> Factory::NewJSTypedArray(ExternalArrayType type) { 1093 Handle<JSTypedArray> Factory::NewJSTypedArray(ExternalArrayType type) {
1084 JSFunction* typed_array_fun; 1094 JSFunction* typed_array_fun;
1085 Context* native_context = isolate()->context()->native_context(); 1095 Context* native_context = isolate()->context()->native_context();
1086 switch (type) { 1096 switch (type) {
1087 case kExternalUnsignedByteArray: 1097 case kExternalUnsignedByteArray:
1088 typed_array_fun = native_context->uint8_array_fun(); 1098 typed_array_fun = native_context->uint8_array_fun();
1089 break; 1099 break;
1090 1100
1091 case kExternalByteArray: 1101 case kExternalByteArray:
1092 typed_array_fun = native_context->int8_array_fun(); 1102 typed_array_fun = native_context->int8_array_fun();
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 return Handle<Object>::null(); 1582 return Handle<Object>::null();
1573 } 1583 }
1574 1584
1575 1585
1576 Handle<Object> Factory::ToBoolean(bool value) { 1586 Handle<Object> Factory::ToBoolean(bool value) {
1577 return value ? true_value() : false_value(); 1587 return value ? true_value() : false_value();
1578 } 1588 }
1579 1589
1580 1590
1581 } } // namespace v8::internal 1591 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698