| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/factory.h" | 8 #include "src/factory.h" |
| 9 #include "src/messages.h" | 9 #include "src/messages.h" |
| 10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 RUNTIME_FUNCTION(Runtime_##Type##Get##getter) { \ | 277 RUNTIME_FUNCTION(Runtime_##Type##Get##getter) { \ |
| 278 HandleScope scope(isolate); \ | 278 HandleScope scope(isolate); \ |
| 279 DCHECK_EQ(1, args.length()); \ | 279 DCHECK_EQ(1, args.length()); \ |
| 280 CONVERT_ARG_HANDLE_CHECKED(JS##Type, holder, 0); \ | 280 CONVERT_ARG_HANDLE_CHECKED(JS##Type, holder, 0); \ |
| 281 return holder->accessor(); \ | 281 return holder->accessor(); \ |
| 282 } | 282 } |
| 283 | 283 |
| 284 BUFFER_VIEW_GETTER(ArrayBufferView, ByteLength, byte_length) | 284 BUFFER_VIEW_GETTER(ArrayBufferView, ByteLength, byte_length) |
| 285 BUFFER_VIEW_GETTER(ArrayBufferView, ByteOffset, byte_offset) | 285 BUFFER_VIEW_GETTER(ArrayBufferView, ByteOffset, byte_offset) |
| 286 BUFFER_VIEW_GETTER(TypedArray, Length, length) | 286 BUFFER_VIEW_GETTER(TypedArray, Length, length) |
| 287 BUFFER_VIEW_GETTER(DataView, Buffer, buffer) | |
| 288 | 287 |
| 289 #undef BUFFER_VIEW_GETTER | 288 #undef BUFFER_VIEW_GETTER |
| 290 | 289 |
| 291 RUNTIME_FUNCTION(Runtime_TypedArrayGetBuffer) { | 290 RUNTIME_FUNCTION(Runtime_TypedArrayGetBuffer) { |
| 292 HandleScope scope(isolate); | 291 HandleScope scope(isolate); |
| 293 DCHECK_EQ(1, args.length()); | 292 DCHECK_EQ(1, args.length()); |
| 294 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0); | 293 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0); |
| 295 return *holder->GetBuffer(); | 294 return *holder->GetBuffer(); |
| 296 } | 295 } |
| 297 | 296 |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 DATA_VIEW_SETTER(Uint16, uint16_t) | 634 DATA_VIEW_SETTER(Uint16, uint16_t) |
| 636 DATA_VIEW_SETTER(Int16, int16_t) | 635 DATA_VIEW_SETTER(Int16, int16_t) |
| 637 DATA_VIEW_SETTER(Uint32, uint32_t) | 636 DATA_VIEW_SETTER(Uint32, uint32_t) |
| 638 DATA_VIEW_SETTER(Int32, int32_t) | 637 DATA_VIEW_SETTER(Int32, int32_t) |
| 639 DATA_VIEW_SETTER(Float32, float) | 638 DATA_VIEW_SETTER(Float32, float) |
| 640 DATA_VIEW_SETTER(Float64, double) | 639 DATA_VIEW_SETTER(Float64, double) |
| 641 | 640 |
| 642 #undef DATA_VIEW_SETTER | 641 #undef DATA_VIEW_SETTER |
| 643 } // namespace internal | 642 } // namespace internal |
| 644 } // namespace v8 | 643 } // namespace v8 |
| OLD | NEW |