Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v7.x backport) doc: change Mac OS X to macOS #12649

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f882f47
deps: cherry-pick 79aee39 from upstream v8
bnoordhuis Apr 14, 2017
2bbee49
v8: fix build errors with g++ 7
bnoordhuis Apr 13, 2017
2c69ab7
buffer,util: refactor for performance
Trott Apr 1, 2017
b869abd
tools: replace custom ESLint timers rule
Trott Apr 2, 2017
71d3f94
url: extend URLSearchParams constructor
TimothyGu Jan 28, 2017
c40a45f
doc: document URLSearchParams constructor
TimothyGu Jan 28, 2017
b0fecbe
url: enforce valid UTF-8 in WHATWG parser
TimothyGu Feb 4, 2017
c3366a5
url: prioritize toString when stringifying
TimothyGu Mar 8, 2017
6b2cb6d
url: spec-compliant URLSearchParams serializer
TimothyGu Feb 4, 2017
7e7fd66
src: remove explicit UTF-8 validity check in url
TimothyGu Mar 15, 2017
4a94c2d
querystring: move isHexTable to internal
TimothyGu Mar 15, 2017
d86f0d7
url: spec-compliant URLSearchParams parser
TimothyGu Mar 15, 2017
a2a3d6c
url: use a class for WHATWG url[context]
TimothyGu Mar 22, 2017
75ef213
url: add ToObject method to native URL class
jasnell Mar 27, 2017
5b7b775
src: WHATWG URL C++ parser cleanup
TimothyGu Mar 16, 2017
d912e28
url: change path parsing for non-special URLs
watilde Apr 3, 2017
dceb12e
test: synchronize WPT url test data
watilde Apr 3, 2017
43faf56
url: error when domainTo*() is called w/o argument
TimothyGu Mar 20, 2017
dafa600
url: avoid instanceof for WHATWG URL
mscdex Mar 5, 2017
68cf850
url: trim leading slashes of file URL paths
watilde Apr 10, 2017
752097c
url: remove javascript URL special case
watilde Apr 12, 2017
f484cfd
url: disallow invalid IPv4 in IPv6 parser
watilde Apr 14, 2017
9288b73
url: clean up WHATWG URL origin generation
TimothyGu Apr 5, 2017
8f702ef
url: improve WHATWG URL inspection
TimothyGu Apr 5, 2017
473bd5e
src: clean up WHATWG WG parser
TimothyGu Apr 6, 2017
7db0af6
2017-04-11, Version 7.9.0 (Current)
italoacasas Apr 11, 2017
da50af6
Working on v7.9.1
italoacasas Apr 11, 2017
abc5749
doc: change Mac OS X to macOS
Apr 25, 2017
89d073b
doc: correct markdown file line lengths
Mar 29, 2017
41eb8fb
doc: update Mac OS X references in releases.md
Mar 29, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ rules:
new-parens: 2
no-mixed-spaces-and-tabs: 2
no-multiple-empty-lines: [2, {max: 2, maxEOF: 0, maxBOF: 0}]
no-restricted-syntax: [2, {
selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]",
message: "setTimeout() must be invoked with at least two arguments."
}, {
selector: "CallExpression[callee.name='setInterval'][arguments.length<2]",
message: "setInterval() must be invoked with at least 2 arguments"
}]
no-tabs: 2
no-trailing-spaces: 2
one-var-declaration-per-line: 2
Expand Down Expand Up @@ -135,7 +142,6 @@ rules:
assert-fail-single-argument: 2
assert-throws-arguments: [2, { requireTwo: false }]
new-with-error: [2, Error, RangeError, TypeError, SyntaxError, ReferenceError]
timer-arguments: 2

# Global scoped method and vars
globals:
Expand Down
12 changes: 6 additions & 6 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If you consistently can reproduce a test failure, search for it in the
file a new issue.


### Unix / OS X
### Unix / macOS

Prerequisites:

Expand All @@ -18,7 +18,7 @@ Prerequisites:
* Python 2.6 or 2.7
* GNU Make 3.81 or newer

On OS X, you will also need:
On macOS, you will also need:
* [Xcode](https://developer.apple.com/xcode/download/)
* You also need to install the `Command Line Tools` via Xcode. You can find
this under the menu `Xcode -> Preferences -> Downloads`
Expand Down Expand Up @@ -171,7 +171,7 @@ With the `--download=all`, this may download ICU if you don't have an
ICU in `deps/icu`. (The embedded `small-icu` included in the default
Node.js source does not include all locales.)

##### Unix / OS X:
##### Unix / macOS:

```console
$ ./configure --with-intl=full-icu --download=all
Expand All @@ -188,7 +188,7 @@ $ ./configure --with-intl=full-icu --download=all
The `Intl` object will not be available, nor some other APIs such as
`String.normalize`.

##### Unix / OS X:
##### Unix / macOS:

```console
$ ./configure --without-intl
Expand All @@ -200,7 +200,7 @@ $ ./configure --without-intl
> .\vcbuild nosign without-intl
```

#### Use existing installed ICU (Unix / OS X only):
#### Use existing installed ICU (Unix / macOS only):

```console
$ pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
Expand All @@ -216,7 +216,7 @@ You can find other ICU releases at
Download the file named something like `icu4c-**##.#**-src.tgz` (or
`.zip`).

##### Unix / OS X
##### Unix / macOS

From an already-unpacked ICU:
```console
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V7.md#7.8.0">7.8.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V7.md#7.9.0">7.9.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.8.0">7.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.4">7.7.4</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.3">7.7.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V7.md#7.7.2">7.7.2</a><br/>
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Bug fixes and features **should come with tests**. Add your tests in the
project, see this [guide](./doc/guides/writing-tests.md). Looking at other tests
to see how they should be structured can also help.

To run the tests on Unix / OS X:
To run the tests on Unix / macOS:

```text
$ ./configure && make -j4 test
Expand Down
2 changes: 1 addition & 1 deletion benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const inputs = require('../fixtures/url-inputs.js').searchParams;
const bench = common.createBenchmark(main, {
type: Object.keys(inputs),
method: ['legacy', 'whatwg'],
n: [1e5]
n: [1e6]
});

function useLegacy(n, input) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const inputs = require('../fixtures/url-inputs.js').searchParams;
const bench = common.createBenchmark(main, {
type: Object.keys(inputs),
method: ['legacy', 'whatwg'],
n: [1e5]
n: [1e6]
});

function useLegacy(n, input, prop) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/url/url-searchparams-read.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { URLSearchParams } = require('url');
const bench = common.createBenchmark(main, {
method: ['get', 'getAll', 'has'],
param: ['one', 'two', 'three', 'nonexistent'],
n: [1e6]
n: [2e7]
});

const str = 'one=single&two=first&three=first&two=2nd&three=2nd&three=3rd';
Expand Down
2 changes: 1 addition & 1 deletion benchmark/url/whatwg-url-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
prop: ['href', 'origin', 'protocol',
'username', 'password', 'host', 'hostname', 'port',
'pathname', 'search', 'searchParams', 'hash'],
n: [1e4]
n: [3e5]
});

function setAndGet(n, url, prop, alternative) {
Expand Down
4 changes: 2 additions & 2 deletions deps/v8/src/builtins/builtins-object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ void Builtins::Generate_ObjectProtoToString(CodeStubAssembler* assembler) {
Node* context = assembler->Parameter(3);

assembler->GotoIf(
assembler->Word32Equal(receiver, assembler->UndefinedConstant()),
assembler->WordEqual(receiver, assembler->UndefinedConstant()),
&return_undefined);

assembler->GotoIf(assembler->Word32Equal(receiver, assembler->NullConstant()),
assembler->GotoIf(assembler->WordEqual(receiver, assembler->NullConstant()),
&return_null);

assembler->GotoIf(assembler->WordIsSmi(receiver), &return_number);
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/objects-body-descriptors.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase {

template <typename StaticVisitor>
static inline void IterateBody(HeapObject* obj, int object_size) {
IterateBody(obj);
IterateBody<StaticVisitor>(obj);
}
};

Expand Down
21 changes: 21 additions & 0 deletions deps/v8/src/objects-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,27 @@
namespace v8 {
namespace internal {

template <typename Derived, typename Shape, typename Key>
uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) {
if (Shape::UsesSeed) {
return Shape::SeededHash(key, GetHeap()->HashSeed());
} else {
return Shape::Hash(key);
}
}


template <typename Derived, typename Shape, typename Key>
uint32_t HashTable<Derived, Shape, Key>::HashForObject(Key key,
Object* object) {
if (Shape::UsesSeed) {
return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
} else {
return Shape::HashForObject(key, object);
}
}


PropertyDetails::PropertyDetails(Smi* smi) {
value_ = smi->value();
}
Expand Down
20 changes: 4 additions & 16 deletions deps/v8/src/objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -3352,22 +3352,10 @@ class HashTable : public HashTableBase {
public:
typedef Shape ShapeT;

// Wrapper methods
inline uint32_t Hash(Key key) {
if (Shape::UsesSeed) {
return Shape::SeededHash(key, GetHeap()->HashSeed());
} else {
return Shape::Hash(key);
}
}

inline uint32_t HashForObject(Key key, Object* object) {
if (Shape::UsesSeed) {
return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object);
} else {
return Shape::HashForObject(key, object);
}
}
// Wrapper methods. Defined in src/objects-inl.h
// to break a cycle with src/heap/heap.h.
inline uint32_t Hash(Key key);
inline uint32_t HashForObject(Key key, Object* object);

// Returns a new HashTable object.
MUST_USE_RESULT static Handle<Derived> New(
Expand Down
11 changes: 11 additions & 0 deletions deps/v8/test/mjsunit/regress/regress-crbug-664506.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2016 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.

// Flags: --expose-gc --predictable --random-seed=-1109634722

gc();
gc();
assertEquals("[object Object]", Object.prototype.toString.call({}));
gc();
assertEquals("[object Array]", Object.prototype.toString.call([]));
2 changes: 1 addition & 1 deletion doc/STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* When documenting APIs, note the version the API was introduced in at
the end of the section. If an API has been deprecated, also note the first
version that the API appeared deprecated in.
* When using dashes, use emdashes ("—", Ctrl+Alt+"-" on OSX) surrounded by
* When using dashes, use emdashes ("—", Ctrl+Alt+"-" on macOS) surrounded by
spaces, per the New York Times usage.
* Including assets:
* If you wish to add an illustration or full program, add it to the
Expand Down
4 changes: 2 additions & 2 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ when the child process terminates.

The importance of the distinction between [`child_process.exec()`][] and
[`child_process.execFile()`][] can vary based on platform. On Unix-type operating
systems (Unix, Linux, OSX) [`child_process.execFile()`][] can be more efficient
systems (Unix, Linux, macOS) [`child_process.execFile()`][] can be more efficient
because it does not spawn a shell. On Windows, however, `.bat` and `.cmd`
files are not executable on their own without a terminal, and therefore cannot
be launched using [`child_process.execFile()`][]. When running on Windows, `.bat`
Expand Down Expand Up @@ -430,7 +430,7 @@ child.on('error', (err) => {
});
```

*Note: Certain platforms (OS X, Linux) will use the value of `argv[0]` for the
*Note: Certain platforms (macOS, Linux) will use the value of `argv[0]` for the
process title while others (Windows, SunOS) will use `command`.*

*Note: Node.js currently overwrites `argv[0]` with `process.execPath` on
Expand Down
4 changes: 2 additions & 2 deletions doc/api/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ like `fs.open()`, will document that. The docs link to the corresponding man
pages (short for manual pages) which describe how the syscalls work.

**Caveat:** some syscalls, like lchown(2), are BSD-specific. That means, for
example, that `fs.lchown()` only works on Mac OS X and other BSD-derived systems,
example, that `fs.lchown()` only works on macOS and other BSD-derived systems,
and is not available on Linux.

Most Unix syscalls have Windows equivalents, but behavior may differ on Windows
relative to Linux and OS X. For an example of the subtle ways in which it's
relative to Linux and macOS. For an example of the subtle ways in which it's
sometimes impossible to replace Unix syscall semantics on Windows, see [Node
issue 4760](https://github.com/nodejs/node/issues/4760).

Expand Down
2 changes: 1 addition & 1 deletion doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ found [here][online].
[file descriptors][] allowable on the system has been reached, and
requests for another descriptor cannot be fulfilled until at least one
has been closed. This is encountered when opening many files at once in
parallel, especially on systems (in particular, OS X) where there is a low
parallel, especially on systems (in particular, macOS) where there is a low
file descriptor limit for processes. To remedy a low limit, run
`ulimit -n 2048` in the same shell that will run the Node.js process.

Expand Down
18 changes: 9 additions & 9 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ changes:
Asynchronous lchmod(2). No arguments other than a possible exception
are given to the completion callback.

Only available on Mac OS X.
Only available on macOS.

## fs.lchmodSync(path, mode)
<!-- YAML
Expand Down Expand Up @@ -1374,12 +1374,12 @@ The kernel ignores the position argument and always appends the data to
the end of the file.

_Note: The behavior of `fs.open()` is platform specific for some flags. As such,
opening a directory on OS X and Linux with the `'a+'` flag - see example below -
will return an error. In contrast, on Windows and FreeBSD, a file descriptor
will be returned._
opening a directory on macOS and Linux with the `'a+'` flag - see example
below - will return an error. In contrast, on Windows and FreeBSD, a file
descriptor will be returned._

```js
// OS X and Linux
// macOS and Linux
fs.open('<directory>', 'a+', (err, fd) => {
// => [Error: EISDIR: illegal operation on a directory, open <directory>]
});
Expand Down Expand Up @@ -1944,7 +1944,7 @@ Also note the listener callback is attached to the `'change'` event fired by
The `fs.watch` API is not 100% consistent across platforms, and is
unavailable in some situations.

The recursive option is only supported on OS X and Windows.
The recursive option is only supported on macOS and Windows.

#### Availability

Expand All @@ -1955,7 +1955,7 @@ to be notified of filesystem changes.

* On Linux systems, this uses [`inotify`]
* On BSD systems, this uses [`kqueue`]
* On OS X, this uses [`kqueue`] for files and [`FSEvents`] for directories.
* On macOS, this uses [`kqueue`] for files and [`FSEvents`] for directories.
* On SunOS systems (including Solaris and SmartOS), this uses [`event ports`].
* On Windows systems, this feature depends on [`ReadDirectoryChangesW`].
* On Aix systems, this feature depends on [`AHAFS`], which must be enabled.
Expand All @@ -1973,7 +1973,7 @@ less reliable.

<!--type=misc-->

On Linux and OS X systems, `fs.watch()` resolves the path to an [inode][] and
On Linux and macOS systems, `fs.watch()` resolves the path to an [inode][] and
watches the inode. If the watched path is deleted and recreated, it is assigned
a new inode. The watch will emit an event for the delete but will continue
watching the *original* inode. Events for the new inode will not be emitted.
Expand All @@ -1983,7 +1983,7 @@ In AIX, save and close of a file being watched causes two notifications -
one for adding new content, and one for truncation. Moreover, save and
close operations on some platforms cause inode changes that force watch
operations to become invalid and ineffective. AIX retains inode for the
lifetime of a file, that way though this is different from Linux / OS X,
lifetime of a file, that way though this is different from Linux / macOS,
this improves the usability of file watching. This is expected behavior.

#### Filename Argument
Expand Down
2 changes: 1 addition & 1 deletion doc/api/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ added: v0.3.3
* Returns: {string}

The `os.type()` method returns a string identifying the operating system name
as returned by uname(3). For example `'Linux'` on Linux, `'Darwin'` on OS X and
as returned by uname(3). For example `'Linux'` on Linux, `'Darwin'` on macOS and
`'Windows_NT'` on Windows.

Please see https://en.wikipedia.org/wiki/Uname#Examples for additional
Expand Down
12 changes: 6 additions & 6 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1621,12 +1621,12 @@ the current value of `ps`.

*Note*: When a new value is assigned, different platforms will impose different
maximum length restrictions on the title. Usually such restrictions are quite
limited. For instance, on Linux and OS X, `process.title` is limited to the size
of the binary name plus the length of the command line arguments because setting
the `process.title` overwrites the `argv` memory of the process. Node.js v0.8
allowed for longer process title strings by also overwriting the `environ`
memory but that was potentially insecure and confusing in some (rather obscure)
cases.
limited. For instance, on Linux and macOS, `process.title` is limited to the
size of the binary name plus the length of the command line arguments because
setting the `process.title` overwrites the `argv` memory of the process.
Node.js v0.8 allowed for longer process title strings by also overwriting the
`environ` memory but that was potentially insecure and confusing in some
(rather obscure) cases.

## process.umask([mask])
<!-- YAML
Expand Down
Loading