| 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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 | 1156 |
| 1157 | 1157 |
| 1158 #define BUFFER_VIEW_GETTER(Type, getter, accessor) \ | 1158 #define BUFFER_VIEW_GETTER(Type, getter, accessor) \ |
| 1159 RUNTIME_FUNCTION(Runtime_##Type##Get##getter) { \ | 1159 RUNTIME_FUNCTION(Runtime_##Type##Get##getter) { \ |
| 1160 HandleScope scope(isolate); \ | 1160 HandleScope scope(isolate); \ |
| 1161 ASSERT(args.length() == 1); \ | 1161 ASSERT(args.length() == 1); \ |
| 1162 CONVERT_ARG_HANDLE_CHECKED(JS##Type, holder, 0); \ | 1162 CONVERT_ARG_HANDLE_CHECKED(JS##Type, holder, 0); \ |
| 1163 return holder->accessor(); \ | 1163 return holder->accessor(); \ |
| 1164 } | 1164 } |
| 1165 | 1165 |
| 1166 BUFFER_VIEW_GETTER(ArrayBufferView, ByteLength, byte_length) | 1166 BUFFER_VIEW_GETTER(TypedArray, ByteLength, byte_length) |
| 1167 BUFFER_VIEW_GETTER(ArrayBufferView, ByteOffset, byte_offset) | 1167 BUFFER_VIEW_GETTER(TypedArray, ByteOffset, byte_offset) |
| 1168 BUFFER_VIEW_GETTER(TypedArray, Length, length) | 1168 BUFFER_VIEW_GETTER(TypedArray, Length, length) |
| 1169 BUFFER_VIEW_GETTER(DataView, ByteLength, byte_length) |
| 1170 BUFFER_VIEW_GETTER(DataView, ByteOffset, byte_offset) |
| 1169 BUFFER_VIEW_GETTER(DataView, Buffer, buffer) | 1171 BUFFER_VIEW_GETTER(DataView, Buffer, buffer) |
| 1170 | 1172 |
| 1171 #undef BUFFER_VIEW_GETTER | 1173 #undef BUFFER_VIEW_GETTER |
| 1172 | 1174 |
| 1173 RUNTIME_FUNCTION(Runtime_TypedArrayGetBuffer) { | 1175 RUNTIME_FUNCTION(Runtime_TypedArrayGetBuffer) { |
| 1174 HandleScope scope(isolate); | 1176 HandleScope scope(isolate); |
| 1175 ASSERT(args.length() == 1); | 1177 ASSERT(args.length() == 1); |
| 1176 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0); | 1178 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0); |
| 1177 return *holder->GetBuffer(); | 1179 return *holder->GetBuffer(); |
| 1178 } | 1180 } |
| (...skipping 13965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15144 } | 15146 } |
| 15145 return NULL; | 15147 return NULL; |
| 15146 } | 15148 } |
| 15147 | 15149 |
| 15148 | 15150 |
| 15149 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15151 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15150 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15152 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15151 } | 15153 } |
| 15152 | 15154 |
| 15153 } } // namespace v8::internal | 15155 } } // namespace v8::internal |
| OLD | NEW |