Commit c2614f9f authored by Théotime Grohens's avatar Théotime Grohens Committed by Commit Bot

[dataview] Move DataView getters and setters to Torque

This CL adds a baseline Torque implementation of the DataView getters
and setters.
Right now, the Torque code just calls the C++ implementation, which
has moved to runtime.

Change-Id: Ic96fde7ea908c628af9586e84511037c237c4d3b
Reviewed-on: https://chromium-review.googlesource.com/1061520Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Théotime Grohens <theotime@google.com>
Cr-Commit-Position: refs/heads/master@{#53312}
parent 5f4de3e0
......@@ -848,6 +848,7 @@ torque_files = [
"src/builtins/base.tq",
"src/builtins/array.tq",
"src/builtins/typed-array.tq",
"src/builtins/data-view.tq",
"test/torque/test-torque.tq",
]
......@@ -855,6 +856,7 @@ torque_modules = [
"base",
"array",
"typed-array",
"data-view",
"test",
]
......@@ -2241,6 +2243,7 @@ v8_source_set("v8_base") {
"src/runtime/runtime-classes.cc",
"src/runtime/runtime-collections.cc",
"src/runtime/runtime-compiler.cc",
"src/runtime/runtime-dataview.cc",
"src/runtime/runtime-date.cc",
"src/runtime/runtime-debug.cc",
"src/runtime/runtime-error.cc",
......
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_BUILTINS_BUILTINS_DATA_VIEW_GEN_H_
#define V8_BUILTINS_BUILTINS_DATA_VIEW_GEN_H_
#include "src/code-stub-assembler.h"
namespace v8 {
namespace internal {
class DataViewBuiltinsAssembler : public CodeStubAssembler {
public:
explicit DataViewBuiltinsAssembler(compiler::CodeAssemblerState* state)
: CodeStubAssembler(state) {}
};
} // namespace internal
} // namespace v8
#endif // V8_BUILTINS_BUILTINS_DATA_VIEW_GEN_H_
This diff is collapsed.
......@@ -449,26 +449,6 @@ namespace internal {
CPP(DataViewPrototypeGetBuffer) \
CPP(DataViewPrototypeGetByteLength) \
CPP(DataViewPrototypeGetByteOffset) \
CPP(DataViewPrototypeGetInt8) \
CPP(DataViewPrototypeSetInt8) \
CPP(DataViewPrototypeGetUint8) \
CPP(DataViewPrototypeSetUint8) \
CPP(DataViewPrototypeGetInt16) \
CPP(DataViewPrototypeSetInt16) \
CPP(DataViewPrototypeGetUint16) \
CPP(DataViewPrototypeSetUint16) \
CPP(DataViewPrototypeGetInt32) \
CPP(DataViewPrototypeSetInt32) \
CPP(DataViewPrototypeGetUint32) \
CPP(DataViewPrototypeSetUint32) \
CPP(DataViewPrototypeGetFloat32) \
CPP(DataViewPrototypeSetFloat32) \
CPP(DataViewPrototypeGetFloat64) \
CPP(DataViewPrototypeSetFloat64) \
CPP(DataViewPrototypeGetBigInt64) \
CPP(DataViewPrototypeSetBigInt64) \
CPP(DataViewPrototypeGetBigUint64) \
CPP(DataViewPrototypeSetBigUint64) \
\
/* Date */ \
/* ES #sec-date-constructor */ \
......
This diff is collapsed.
......@@ -354,6 +354,17 @@ bool IntrinsicHasNoSideEffect(Runtime::FunctionId id) {
V(PrepareElementsForSort) \
V(TrySliceSimpleNonFastElements) \
V(TypedArrayGetBuffer) \
/* DataView */ \
V(DataViewGetInt8) \
V(DataViewGetUint8) \
V(DataViewGetInt16) \
V(DataViewGetUint16) \
V(DataViewGetInt32) \
V(DataViewGetUint32) \
V(DataViewGetFloat32) \
V(DataViewGetFloat64) \
V(DataViewGetBigInt64) \
V(DataViewGetBigUint64) \
/* Errors */ \
V(NewTypeError) \
V(ReThrow) \
......
This diff is collapsed.
......@@ -606,6 +606,28 @@ namespace internal {
F(TypedArraySet, 2, 1) \
F(TypedArraySortFast, 1, 1)
#define FOR_EACH_INTRINSIC_DATAVIEW(F) \
F(DataViewGetInt8, 1, 1) \
F(DataViewGetUint8, 1, 1) \
F(DataViewGetInt16, 2, 1) \
F(DataViewGetUint16, 2, 1) \
F(DataViewGetInt32, 2, 1) \
F(DataViewGetUint32, 2, 1) \
F(DataViewGetFloat32, 2, 1) \
F(DataViewGetFloat64, 2, 1) \
F(DataViewGetBigInt64, 2, 1) \
F(DataViewGetBigUint64, 2, 1) \
F(DataViewSetInt8, 2, 1) \
F(DataViewSetUint8, 2, 1) \
F(DataViewSetInt16, 3, 1) \
F(DataViewSetUint16, 3, 1) \
F(DataViewSetInt32, 3, 1) \
F(DataViewSetUint32, 3, 1) \
F(DataViewSetFloat32, 3, 1) \
F(DataViewSetFloat64, 3, 1) \
F(DataViewSetBigInt64, 3, 1) \
F(DataViewSetBigUint64, 3, 1)
#define FOR_EACH_INTRINSIC_WASM(F) \
F(ThrowWasmError, 1, 1) \
F(ThrowWasmStackOverflow, 0, 1) \
......@@ -675,6 +697,7 @@ namespace internal {
FOR_EACH_INTRINSIC_SYMBOL(F) \
FOR_EACH_INTRINSIC_TEST(F) \
FOR_EACH_INTRINSIC_TYPEDARRAY(F) \
FOR_EACH_INTRINSIC_DATAVIEW(F) \
FOR_EACH_INTRINSIC_WASM(F)
// FOR_EACH_INTRINSIC defines the list of all intrinsics, coming in 2 flavors,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment