Skip to content

Commit dad002a

Browse files
Make sure files end with exactly one new line and police this in presubmit.
The changes are (excluding presubmit.py) mechanical. I added the following lines after the check and iterated the presubmit script until all errors went away: f = open(name, "w"); if contents.endswith('\n\n'):   f.write(contents[0:-1]) else:   f.write(contents + '\n') [email protected] Review URL: https://codereview.chromium.org/82803005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@18017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
1 parent b8272ba commit dad002a

File tree

390 files changed

+111
-459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

390 files changed

+111
-459
lines changed

build/all.gyp

-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@
2222
}
2323
]
2424
}
25-

src/allocation-tracker.h

-1
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,3 @@ class AllocationTracker {
135135
} } // namespace v8::internal
136136

137137
#endif // V8_ALLOCATION_TRACKER_H_
138-

src/arraybuffer.js

-2
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,3 @@ function SetUpArrayBuffer() {
107107
}
108108

109109
SetUpArrayBuffer();
110-
111-

src/checks.cc

-1
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,3 @@ namespace v8 { namespace internal {
132132
intptr_t HeapObjectTagMask() { return kHeapObjectTagMask; }
133133

134134
} } // namespace v8::internal
135-

src/harmony-array.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,4 @@ function HarmonyArrayExtendArrayPrototype() {
121121
));
122122
}
123123

124-
HarmonyArrayExtendArrayPrototype();
124+
HarmonyArrayExtendArrayPrototype();

src/harmony-string.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,4 @@ function ExtendStringPrototype() {
151151
));
152152
}
153153

154-
ExtendStringPrototype();
154+
ExtendStringPrototype();

src/heap-snapshot-generator-inl.h

-1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,3 @@ int V8HeapExplorer::GetGcSubrootOrder(HeapObject* subroot) {
8585
} } // namespace v8::internal
8686

8787
#endif // V8_HEAP_SNAPSHOT_GENERATOR_INL_H_
88-

src/heap-snapshot-generator.h

-1
Original file line numberDiff line numberDiff line change
@@ -704,4 +704,3 @@ class HeapSnapshotJSONSerializer {
704704
} } // namespace v8::internal
705705

706706
#endif // V8_HEAP_SNAPSHOT_GENERATOR_H_
707-

src/ia32/simulator-ia32.cc

-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@
2727

2828

2929
// Since there is no simulator for the ia32 architecture this file is empty.
30-

src/x64/simulator-x64.cc

-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@
2424
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2525
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27-

test/cctest/test-unbound-queue.cc

-1
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,3 @@ TEST(MultipleRecords) {
7474
}
7575
CHECK(cq.IsEmpty());
7676
}
77-

test/cctest/test-unique.cc

-1
Original file line numberDiff line numberDiff line change
@@ -546,4 +546,3 @@ TEST(UniqueSet_UnionExhaustive) {
546546
}
547547
}
548548
}
549-

test/intl/collator/sr-sort.js

-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ assertEquals('Стара Планина', result[6]);
4343
assertEquals('ћук', result[7]);
4444
assertEquals('чука', result[8]);
4545
assertEquals('џак', result[9]);
46-

test/intl/overrides/caching.js

-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,3 @@ collatorTime = endTime.getTime() - startTime.getTime();
5757
assertTrue(collatorTime < cachedTime);
5858
// Non-cached time is much slower, measured to 12.5 times.
5959
assertTrue(cachedTime < nonCachedTime);
60-

test/message/isvar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
// Flags: --allow-natives-syntax
2929
var x;
3030
%IS_VAR(x);
31-
%IS_VAR(x+x);
31+
%IS_VAR(x+x);

test/message/paren_in_arg_string.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

2828
var paren_in_arg_string_good = new Function('x', 'return;');
29-
var paren_in_arg_string_bad = new Function(')', 'return;');
29+
var paren_in_arg_string_bad = new Function(')', 'return;');

test/message/replacement-marker-as-argument.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
"use strict";
2929

3030
var o = { get "%3" (){} };
31-
o["%3"] = 10;
31+
o["%3"] = 10;

test/message/single-function-literal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@
2929
var single_function_good = "(function() { return 5; })";
3030
%CompileString(single_function_good, true);
3131
var single_function_bad = "(function() { return 5; })();";
32-
%CompileString(single_function_bad, true);
32+
%CompileString(single_function_bad, true);

test/mjsunit/arguments-load-across-eval.js

-2
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,3 @@ function testShadowing(x, h) {
8282
}
8383

8484
testShadowing(1, function() { return 2; });
85-
86-

test/mjsunit/arguments-read-and-assignment.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,4 @@ function weirdargs(a,b,c) { if (!a) return arguments;
161161
var args1 = weirdargs(false, null, 40);
162162
var res = weirdargs(true, args1, 15);
163163
assertEquals(40, res[0], "return old args element");
164-
assertEquals(15, res[1], "return own args element");
164+
assertEquals(15, res[1], "return own args element");

test/mjsunit/arguments.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ function arg_del(x) { return delete arguments[x]; }
187187
function arg_set(x) { return (arguments[x] = 117); }
188188
assertEquals(undefined, arg_get(0xFFFFFFFF));
189189
assertEquals(true, arg_del(0xFFFFFFFF));
190-
assertEquals(117, arg_set(0xFFFFFFFF));
190+
assertEquals(117, arg_set(0xFFFFFFFF));

test/mjsunit/array-iteration.js

-1
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,3 @@
225225
assertEquals(2, count);
226226

227227
})();
228-

test/mjsunit/array-non-smi-length.js

-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ function TestNonSmiArrayLength() {
4343
}
4444

4545
TestNonSmiArrayLength();
46-

test/mjsunit/array-tostring.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,4 @@ for (var i = 0; i < 3; i++) {
156156
}});
157157
}
158158
Number.prototype.arrayToLocaleString = Array.prototype.toLocaleString;
159-
assertEquals("42,42,42", (42).arrayToLocaleString());
159+
assertEquals("42,42,42", (42).arrayToLocaleString());

test/mjsunit/bugs/bug-1344252.js

-1
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,3 @@ Object.prototype.__defineSetter__('z', function(value) { result_z = value; });
7676
o2.z = 27;
7777
assertEquals(27, result_z);
7878
assertTrue(typeof o2.z == 'undefined');
79-

test/mjsunit/bugs/bug-proto.js

-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,3 @@ assertSame(undefined, Realm.eval(realmB, "Realm.shared.__proto__"));
5959
Realm.eval(realmB, "Realm.shared.__proto__ = {c: 3}");
6060
assertSame(1, o.a);
6161
assertSame(undefined, o.c);
62-

test/mjsunit/closures.js

-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ function test(n) {
4444
test(1);
4545
test(42);
4646
test(239);
47-

test/mjsunit/compare-character.js

-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ for (var i in a) {
4747
assertEquals(f < x, 'f' < x, ">r" + x);
4848
assertEquals(f <= x, 'f' <= x, ">=r" + x);
4949
}
50-

test/mjsunit/compare-nan.js

-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,3 @@ for (var i in b) {
6363
"assertFalse(" + x + " >= NaN, '' + " + x + " + ' >= NaN');\n";
6464
eval(program);
6565
}
66-

test/mjsunit/compiler/control-flow-1.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ function g1(x, y) {
5252
}
5353

5454
assertTrue(g1(0, 0));
55-
assertFalse(g1(0, 1));
55+
assertFalse(g1(0, 1));

test/mjsunit/compiler/inline-throw.js

-1
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,3 @@ try {
6666
} catch(e) {
6767
assertEquals("wow", e);
6868
}
69-

test/mjsunit/compiler/lazy-const-lookup.js

-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ function outer() {
3838
}
3939

4040
outer();
41-

test/mjsunit/compiler/optimized-closures.js

-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,3 @@ f();
5151
assertEquals(42, a[0]);
5252
assertEquals(49, a[7]);
5353
assertEquals(-19, a[23]);
54-
55-
56-
57-

test/mjsunit/compiler/regress-1394.js

-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,3 @@ for (var i = 0; i < 3; i++) assertEquals(i, f(i));
5656

5757
assertEquals(0, f(0));
5858
assertEquals(1, f(1));
59-

test/mjsunit/compiler/regress-3260426.js

-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ function always_false() {}
3333
function test() { return always_false() ? 0 : 1; }
3434

3535
assertEquals(1, test());
36-

test/mjsunit/compiler/regress-closures-with-eval.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ for (var n = 0; n < 5; n++) {
5353
withEval(expr, function(a) { return a; });
5454
}
5555
%OptimizeFunctionOnNextCall(withEval);
56-
withEval(expr, function(a) { return a; });
56+
withEval(expr, function(a) { return a; });

test/mjsunit/compiler/regress-inline-callfunctionstub.js

-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ main(o.g);
4343
main(o.g);
4444
%OptimizeFunctionOnNextCall(main);
4545
main(o.g);
46-

test/mjsunit/compiler/regress-toint32.js

-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ assertEquals(G, f(G));
4242
assertEquals(G, f(G));
4343
%OptimizeFunctionOnNextCall(f);
4444
assertEquals(G, f(G));
45-

test/mjsunit/compiler/rotate.js

-2
Original file line numberDiff line numberDiff line change
@@ -306,5 +306,3 @@ assertEquals(ROR4(0xFFFFFFFF, 40), ROR4_sa40(0xFFFFFFFF));
306306
assertEquals(ROR4(0xFFFFFFFF, 40), ROR4_sa40(0xFFFFFFFF));
307307
%OptimizeFunctionOnNextCall(ROR4_sa40);
308308
assertEquals(ROR4(0xFFFFFFFF, 40), ROR4_sa40(0xFFFFFFFF));
309-
310-

test/mjsunit/const-declaration.js

-1
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,3 @@
169169
}
170170
f("const x = 0;");
171171
})();
172-

test/mjsunit/cyclic-array-to-string.js

-1
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,3 @@ a1.push(a2);
6262
assertEquals("", a1.toString());
6363
assertEquals("", a1.toLocaleString());
6464
assertEquals("", a1.join());
65-

test/mjsunit/debug-breakpoints.js

-1
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,3 @@ for(var i = 0; i < scenario.length; i++) {
222222
Debug.BreakPositionAlignment.BreakPosition).indexOf(scenario[i][1]) > 0);
223223
Debug.clearBreakPoint(bp1);
224224
}
225-

test/mjsunit/debug-constructor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ Debug.clearStepping(); // Clear stepping as the listener leaves it on.
7575
assertEquals("bbccdcb", call_graph);
7676

7777
// Get rid of the debug event listener.
78-
Debug.setListener(null);
78+
Debug.setListener(null);

test/mjsunit/debug-evaluate-const.js

-1
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,3 @@ Debug.setListener(null);
118118

119119
assertFalse(exception, "exception in listener")
120120
assertTrue(listenerComplete);
121-

test/mjsunit/debug-function-scopes.js

-1
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,3 @@ CheckNoScopeVisible(Function.toString);
159159

160160
// This getter is known to be implemented as closure.
161161
CheckNoScopeVisible(new Error().__lookupGetter__("stack"));
162-

test/mjsunit/debug-ignore-breakpoints.js

-1
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,3 @@ f();
8686
assertEquals(5, break_point_hit_count);
8787
f();
8888
assertEquals(6, break_point_hit_count);
89-

test/mjsunit/debug-liveedit-3.js

-2
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,3 @@ assertEquals(8, z6());
6666
var z100 = Factory(100)();
6767

6868
assertEquals(102, z100());
69-
70-

test/mjsunit/debug-liveedit-check-stack.js

-1
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,3 @@ test = new TestBase("Test with C++ frame above ChooseAnimal frame");
138138
exception_holder = {};
139139
assertEquals("Cat", test.ChooseAnimal(WrapInNativeCall(WrapInDebuggerCall(WrapInCatcher(test.ScriptChanger, exception_holder)))));
140140
assertTrue(!!exception_holder[0]);
141-

test/mjsunit/debug-liveedit-compile-error.js

-2
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,3 @@ assertEquals("Unexpected token )",
5656
caught_exception.details.syntaxErrorMessage);
5757

5858
assertEquals(2, caught_exception.details.position.start.line);
59-
60-

test/mjsunit/debug-liveedit-diff.js

-1
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,3 @@ CheckCompare(
110110
"yesterday\nall\nmy\ntroubles\nseemed\nso\nfar\naway",
111111
"yesterday\nall\nmy\ntroubles\nseemed\nso\n"
112112
);
113-

test/mjsunit/debug-liveedit-utils.js

-2
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,3 @@ assertEquals(69, MultiChunkTranslator.Translate(59));
9393
assertEquals(2010, MultiChunkTranslator.Translate(60, Return2010));
9494
assertEquals(70, MultiChunkTranslator.Translate(70));
9595
assertEquals(75, MultiChunkTranslator.Translate(75));
96-
97-

test/mjsunit/debug-mirror-cache.js

-1
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,3 @@ debugger;
8282
assertEquals([], listenerExceptions, "Exception in listener");
8383
// Make sure that the debug event listener vas invoked.
8484
assertEquals(2, listenerCallCount, "Listener not called");
85-

test/mjsunit/debug-setbreakpoint.js

-1
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,3 @@ function SetBreakpointInI1Script() {
214214
// moment. Since there's no way of simply getting the pointer to the function,
215215
// we run this code while the script function is being activated on stack.
216216
eval('SetBreakpointInI1Script()\nfunction i1(){}\n\n\n\nfunction i2(){}\n');
217-

test/mjsunit/debug-stepin-positions.js

-2
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,3 @@ var fun = (function(p) {
221221
};
222222
})(Object);
223223
TestCaseWithDebugger(fun);
224-
225-

test/mjsunit/debug-stepout-scope-part1.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ function nop() {}
187187

188188

189189
// With block as the last(!) statement in global code.
190-
with ({}) { debugger; }
190+
with ({}) { debugger; }

test/mjsunit/elide-double-hole-check-9.js

-1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ assertEquals(0.5, f(arr, 0));
4646
assertEquals(0.5, f(arr, 0));
4747
do_set = true;
4848
assertEquals(2, f(arr, 1));
49-

test/mjsunit/enumeration-order.js

-4
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,3 @@ var expected = ['23', '42', // indexed from 'o'
103103
var actual = [];
104104
for (var p in o) actual.push(p);
105105
assertArrayEquals(expected, actual);
106-
107-
108-
109-

test/mjsunit/error-accessors.js

-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ assertEquals("x is not defined",
5151
o.message = "another message";
5252
assertEquals("another message", o.message);
5353
assertEquals("x is not defined", error2.message);
54-

test/mjsunit/eval-stack-trace.js

-1
Original file line numberDiff line numberDiff line change
@@ -201,4 +201,3 @@ try {
201201
[true, false].verifyUndefined(frames, "getFileName");
202202
["eval at <anonymous> ("].verifyContains(frames, "getEvalOrigin");
203203
}
204-

test/mjsunit/extra-arguments.js

-2
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,3 @@ for (var i = 0; i < 25; i++) {
5050
}
5151
assertEquals(expected, f.apply(null, array), String(i));
5252
}
53-
54-

test/mjsunit/fast-array-length.js

-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@ var a = [0, 1, 2, 3, 4, 5];
3434
assertTrue(%HasFastSmiElements(a));
3535
a.length = (1 << 30);
3636
assertFalse(%HasFastSmiElements(a));
37-

test/mjsunit/fast-literal.js

-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,3 @@ f(); f(); f();
3737
for (var i=0; i<50; i++) {
3838
f();
3939
}
40-
41-
42-

test/mjsunit/fun-name.js

-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,3 @@ function strip(s) {
3131

3232
assertEquals('function(){}', strip((function () { }).toString()));
3333
assertEquals('functionanonymous(){}', strip(new Function().toString()));
34-

test/mjsunit/function.js

-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,3 @@ assertEquals(42, f(2, 21));
8080
f = new Function(x, y, z);
8181
assertEquals(25, f(5, 5));
8282
assertEquals(42, f(2, 21));
83-

test/mjsunit/get-prototype-of.js

-1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,3 @@ GetPrototypeOfObject(y);
6565
GetPrototypeOfObject({x:5});
6666
GetPrototypeOfObject(F);
6767
GetPrototypeOfObject(RegExp);
68-

test/mjsunit/getter-in-value-prototype.js

-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@
3232

3333
String.prototype.__defineGetter__('x', function() { return this; });
3434
assertEquals(Object('asdf'), 'asdf'.x);
35-

test/mjsunit/global-load-from-eval-in-with.js

-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,3 @@ test({ y: 42 }, "function f() { eval('1'); assertEquals(27, x) }; f();");
5656
// in the eval scopes. Deeper nesting this time.
5757
test({ x: 42 }, "function f() { function g() { eval('1'); assertEquals(42, x) }; g() }; f();");
5858
test({ y: 42 }, "function f() { function g() { eval('1'); assertEquals(27, x) }; g() }; f();");
59-

test/mjsunit/global-load-from-nested-eval.js

-5
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,3 @@ function testEvalDontShadow(source) {
5959
eval('eval(' + source +')');
6060
}
6161
testEvalDontShadow('assertEquals(42, x)');
62-
63-
64-
65-
66-

test/mjsunit/harmony/array-find.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,4 +277,4 @@ assertThrows('Array.prototype.find.apply({}, false, [])', TypeError);
277277
assertThrows('Array.prototype.find.apply({}, "", [])', TypeError);
278278
assertThrows('Array.prototype.find.apply({}, {}, [])', TypeError);
279279
assertThrows('Array.prototype.find.apply({}, [], [])', TypeError);
280-
assertThrows('Array.prototype.find.apply({}, /\d+/, [])', TypeError);
280+
assertThrows('Array.prototype.find.apply({}, /\d+/, [])', TypeError);

test/mjsunit/harmony/array-findindex.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,4 +277,4 @@ assertThrows('Array.prototype.findIndex.apply({}, false, [])', TypeError);
277277
assertThrows('Array.prototype.findIndex.apply({}, "", [])', TypeError);
278278
assertThrows('Array.prototype.findIndex.apply({}, {}, [])', TypeError);
279279
assertThrows('Array.prototype.findIndex.apply({}, [], [])', TypeError);
280-
assertThrows('Array.prototype.findIndex.apply({}, /\d+/, [])', TypeError);
280+
assertThrows('Array.prototype.findIndex.apply({}, /\d+/, [])', TypeError);

0 commit comments

Comments
 (0)