• Seth Brenith's avatar
    [torque][cleanup] Simplify some Torque-defined classes · e7693985
    Seth Brenith authored
    This CL is pretty mechanical; I just iterated through some Torque
    classes making the following changes:
    
    - Use @generateCppClass if it seems easy to
    - Use @generatePrint if the existing printer doesn't do anything special
    - Fix up any imprecise field types
    
    It also includes two minor changes to implementation-visitor:
    
    - Add a new -inl.h file with the things needed for
      torque-generated/class-definitions-tq.cc so we don't need to keep
      changing the compiler when we add @generateCppClass.
    - Avoid emitting incorrect accessors for ExternalPointers. This isn't
      strictly necessary for correctness, as the accessors defined in C++
      already hide the ones inherited from generated code, but it makes me
      feel safer.
    
    Change-Id: I4d5a8ba6f86ebff57a0d147619212a3993b087c0
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2185824Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#67719}
    e7693985
js-number-format-inl.h 906 Bytes
// 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_INTL_SUPPORT
#error Internationalization is expected to be enabled.
#endif  // V8_INTL_SUPPORT

#ifndef V8_OBJECTS_JS_NUMBER_FORMAT_INL_H_
#define V8_OBJECTS_JS_NUMBER_FORMAT_INL_H_

#include "src/objects/js-number-format.h"
#include "src/objects/objects-inl.h"

// Has to be the last include (doesn't have include guards):
#include "src/objects/object-macros.h"

namespace v8 {
namespace internal {

TQ_OBJECT_CONSTRUCTORS_IMPL(JSNumberFormat)

ACCESSORS(JSNumberFormat, icu_number_formatter,
          Managed<icu::number::LocalizedNumberFormatter>,
          kIcuNumberFormatterOffset)

}  // namespace internal
}  // namespace v8

#include "src/objects/object-macros-undef.h"

#endif  // V8_OBJECTS_JS_NUMBER_FORMAT_INL_H_