| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/elements.h" | 8 #include "src/elements.h" |
| 9 #include "src/messages.h" | 9 #include "src/messages.h" |
| 10 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift); | 48 InstallBuiltin(isolate, holder, "shift", Builtins::kArrayShift); |
| 49 InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift); | 49 InstallBuiltin(isolate, holder, "unshift", Builtins::kArrayUnshift); |
| 50 InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice); | 50 InstallBuiltin(isolate, holder, "slice", Builtins::kArraySlice); |
| 51 InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice); | 51 InstallBuiltin(isolate, holder, "splice", Builtins::kArraySplice); |
| 52 InstallBuiltin(isolate, holder, "concat", Builtins::kArrayConcat); | 52 InstallBuiltin(isolate, holder, "concat", Builtins::kArrayConcat); |
| 53 | 53 |
| 54 return *holder; | 54 return *holder; |
| 55 } | 55 } |
| 56 | 56 |
| 57 | 57 |
| 58 RUNTIME_FUNCTION(Runtime_FeedbackVectorGet) { |
| 59 SealHandleScope shs(isolate); |
| 60 DCHECK(args.length() == 2); |
| 61 CONVERT_ARG_CHECKED(TypeFeedbackVector, object, 0); |
| 62 CONVERT_SMI_ARG_CHECKED(index, 1); |
| 63 return object->get(index); |
| 64 } |
| 65 |
| 66 |
| 58 RUNTIME_FUNCTION(Runtime_FixedArrayGet) { | 67 RUNTIME_FUNCTION(Runtime_FixedArrayGet) { |
| 59 SealHandleScope shs(isolate); | 68 SealHandleScope shs(isolate); |
| 60 DCHECK(args.length() == 2); | 69 DCHECK(args.length() == 2); |
| 61 CONVERT_ARG_CHECKED(FixedArray, object, 0); | 70 CONVERT_ARG_CHECKED(FixedArray, object, 0); |
| 62 CONVERT_SMI_ARG_CHECKED(index, 1); | 71 CONVERT_SMI_ARG_CHECKED(index, 1); |
| 63 return object->get(index); | 72 return object->get(index); |
| 64 } | 73 } |
| 65 | 74 |
| 66 | 75 |
| 67 RUNTIME_FUNCTION(Runtime_FixedArraySet) { | 76 RUNTIME_FUNCTION(Runtime_FixedArraySet) { |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 | 1326 |
| 1318 RUNTIME_FUNCTION(Runtime_FastOneByteArrayJoin) { | 1327 RUNTIME_FUNCTION(Runtime_FastOneByteArrayJoin) { |
| 1319 SealHandleScope shs(isolate); | 1328 SealHandleScope shs(isolate); |
| 1320 DCHECK(args.length() == 2); | 1329 DCHECK(args.length() == 2); |
| 1321 // Returning undefined means that this fast path fails and one has to resort | 1330 // Returning undefined means that this fast path fails and one has to resort |
| 1322 // to a slow path. | 1331 // to a slow path. |
| 1323 return isolate->heap()->undefined_value(); | 1332 return isolate->heap()->undefined_value(); |
| 1324 } | 1333 } |
| 1325 } // namespace internal | 1334 } // namespace internal |
| 1326 } // namespace v8 | 1335 } // namespace v8 |
| OLD | NEW |