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

Side by Side Diff: src/accessors.cc

Issue 150813004: In-heap small typed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing Created 6 years, 9 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 | « include/v8.h ('k') | src/api.cc » ('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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return 112 return
113 CheckForName(name, isolate->heap()->length_string(), 113 CheckForName(name, isolate->heap()->length_string(),
114 JSArray::kLengthOffset, object_offset); 114 JSArray::kLengthOffset, object_offset);
115 case JS_TYPED_ARRAY_TYPE: 115 case JS_TYPED_ARRAY_TYPE:
116 return 116 return
117 CheckForName(name, isolate->heap()->length_string(), 117 CheckForName(name, isolate->heap()->length_string(),
118 JSTypedArray::kLengthOffset, object_offset) || 118 JSTypedArray::kLengthOffset, object_offset) ||
119 CheckForName(name, isolate->heap()->byte_length_string(), 119 CheckForName(name, isolate->heap()->byte_length_string(),
120 JSTypedArray::kByteLengthOffset, object_offset) || 120 JSTypedArray::kByteLengthOffset, object_offset) ||
121 CheckForName(name, isolate->heap()->byte_offset_string(), 121 CheckForName(name, isolate->heap()->byte_offset_string(),
122 JSTypedArray::kByteOffsetOffset, object_offset) || 122 JSTypedArray::kByteOffsetOffset, object_offset);
123 CheckForName(name, isolate->heap()->buffer_string(),
124 JSTypedArray::kBufferOffset, object_offset);
125 case JS_ARRAY_BUFFER_TYPE: 123 case JS_ARRAY_BUFFER_TYPE:
126 return 124 return
127 CheckForName(name, isolate->heap()->byte_length_string(), 125 CheckForName(name, isolate->heap()->byte_length_string(),
128 JSArrayBuffer::kByteLengthOffset, object_offset); 126 JSArrayBuffer::kByteLengthOffset, object_offset);
129 case JS_DATA_VIEW_TYPE: 127 case JS_DATA_VIEW_TYPE:
130 return 128 return
131 CheckForName(name, isolate->heap()->byte_length_string(), 129 CheckForName(name, isolate->heap()->byte_length_string(),
132 JSDataView::kByteLengthOffset, object_offset) || 130 JSDataView::kByteLengthOffset, object_offset) ||
133 CheckForName(name, isolate->heap()->byte_offset_string(), 131 CheckForName(name, isolate->heap()->byte_offset_string(),
134 JSDataView::kByteOffsetOffset, object_offset) || 132 JSDataView::kByteOffsetOffset, object_offset);
135 CheckForName(name, isolate->heap()->buffer_string(),
136 JSDataView::kBufferOffset, object_offset);
137 default: 133 default:
138 return false; 134 return false;
139 } 135 }
140 } 136 }
141 137
142 138
143 template 139 template
144 bool Accessors::IsJSObjectFieldAccessor<Type>(Type* type, 140 bool Accessors::IsJSObjectFieldAccessor<Type>(Type* type,
145 Handle<String> name, 141 Handle<String> name,
146 int* object_offset); 142 int* object_offset);
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 info->set_data(Smi::FromInt(index)); 963 info->set_data(Smi::FromInt(index));
968 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 964 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
969 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 965 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
970 info->set_getter(*getter); 966 info->set_getter(*getter);
971 if (!(attributes & ReadOnly)) info->set_setter(*setter); 967 if (!(attributes & ReadOnly)) info->set_setter(*setter);
972 return info; 968 return info;
973 } 969 }
974 970
975 971
976 } } // namespace v8::internal 972 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698