Revision: 21298
Author: [email protected]
Date: Wed May 14 08:51:10 2014 UTC
Log: Avoid name clashes of builtins and runtime functions.
This makes it possible to use %Percent() notation to call any given builtin
or runtime function in tests.
[email protected]
Review URL: https://codereview.chromium.org/280243002
http://code.google.com/p/v8/source/detail?r=21298
Added:
/branches/bleeding_edge/test/mjsunit/runtime-gen/mathexprt.js
/branches/bleeding_edge/test/mjsunit/runtime-gen/mathfloorrt.js
/branches/bleeding_edge/test/mjsunit/runtime-gen/mathsqrtrt.js
Deleted:
/branches/bleeding_edge/test/mjsunit/runtime-gen/mathexp.js
/branches/bleeding_edge/test/mjsunit/runtime-gen/mathfloor.js
/branches/bleeding_edge/test/mjsunit/runtime-gen/mathsqrt.js
Modified:
/branches/bleeding_edge/src/array.js
/branches/bleeding_edge/src/arraybuffer.js
/branches/bleeding_edge/src/bootstrapper.cc
/branches/bleeding_edge/src/builtins.cc
/branches/bleeding_edge/src/collection.js
/branches/bleeding_edge/src/harmony-math.js
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/math.js
/branches/bleeding_edge/src/messages.js
/branches/bleeding_edge/src/object-observe.js
/branches/bleeding_edge/src/regexp.js
/branches/bleeding_edge/src/runtime.cc
/branches/bleeding_edge/src/runtime.h
/branches/bleeding_edge/src/string.js
/branches/bleeding_edge/src/uri.js
/branches/bleeding_edge/src/v8natives.js
=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/runtime-gen/mathexprt.js Wed May
14 08:51:10 2014 UTC
@@ -0,0 +1,5 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
+// Flags: --allow-natives-syntax --harmony
+var _x = 1.5;
+%MathExpRT(_x);
=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/runtime-gen/mathfloorrt.js Wed May
14 08:51:10 2014 UTC
@@ -0,0 +1,5 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
+// Flags: --allow-natives-syntax --harmony
+var _x = 1.5;
+%MathFloorRT(_x);
=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/runtime-gen/mathsqrtrt.js Wed May
14 08:51:10 2014 UTC
@@ -0,0 +1,5 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
+// Flags: --allow-natives-syntax --harmony
+var _x = 1.5;
+%_MathSqrtRT(_x);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/mathexp.js Thu May 8
13:11:59 2014 UTC
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var _x = 1.5;
-%MathExp(_x);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/mathfloor.js Thu May
8 13:11:59 2014 UTC
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var _x = 1.5;
-%MathFloor(_x);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/mathsqrt.js Thu May 8
13:11:59 2014 UTC
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
-// Flags: --allow-natives-syntax --harmony
-var _x = 1.5;
-%_MathSqrt(_x);
=======================================
--- /branches/bleeding_edge/src/array.js Mon May 12 09:37:26 2014 UTC
+++ /branches/bleeding_edge/src/array.js Wed May 14 08:51:10 2014 UTC
@@ -45,7 +45,7 @@
}
-function SparseJoinWithSeparator(array, len, convert, separator) {
+function SparseJoinWithSeparatorJS(array, len, convert, separator) {
var keys = GetSortedArrayKeys(array, %GetArrayKeys(array, len));
var totalLength = 0;
var elements = new InternalArray(keys.length * 2);
@@ -111,7 +111,7 @@
if (separator.length == 0) {
return SparseJoin(array, length, convert);
} else {
- return SparseJoinWithSeparator(array, length, convert, separator);
+ return SparseJoinWithSeparatorJS(array, length, convert,
separator);
}
}
@@ -457,7 +457,7 @@
// Returns an array containing the array elements of the object followed
// by the array elements of each argument in order. See ECMA-262,
// section 15.4.4.7.
-function ArrayConcat(arg1) { // length == 1
+function ArrayConcatJS(arg1) { // length == 1
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.concat");
var array = ToObject(this);
@@ -1492,7 +1492,7 @@
"join", getFunction("join", ArrayJoin),
"pop", getFunction("pop", ArrayPop),
"push", getFunction("push", ArrayPush, 1),
- "concat", getFunction("concat", ArrayConcat, 1),
+ "concat", getFunction("concat", ArrayConcatJS, 1),
"reverse", getFunction("reverse", ArrayReverse),
"shift", getFunction("shift", ArrayShift),
"unshift", getFunction("unshift", ArrayUnshift, 1),
@@ -1516,7 +1516,7 @@
// exposed to user code.
// Adding only the functions that are actually used.
SetUpLockedPrototype(InternalArray, $Array(), $Array(
- "concat", getFunction("concat", ArrayConcat),
+ "concat", getFunction("concat", ArrayConcatJS),
"indexOf", getFunction("indexOf", ArrayIndexOf),
"join", getFunction("join", ArrayJoin),
"pop", getFunction("pop", ArrayPop),
=======================================
--- /branches/bleeding_edge/src/arraybuffer.js Tue Apr 29 06:42:26 2014 UTC
+++ /branches/bleeding_edge/src/arraybuffer.js Wed May 14 08:51:10 2014 UTC
@@ -62,7 +62,7 @@
return result;
}
-function ArrayBufferIsView(obj) {
+function ArrayBufferIsViewJS(obj) {
return %ArrayBufferIsView(obj);
}
@@ -79,7 +79,7 @@
InstallGetter($ArrayBuffer.prototype, "byteLength",
ArrayBufferGetByteLen);
InstallFunctions($ArrayBuffer, DONT_ENUM, $Array(
- "isView", ArrayBufferIsView
+ "isView", ArrayBufferIsViewJS
));
InstallFunctions($ArrayBuffer.prototype, DONT_ENUM, $Array(
=======================================
--- /branches/bleeding_edge/src/bootstrapper.cc Mon May 12 13:47:01 2014 UTC
+++ /branches/bleeding_edge/src/bootstrapper.cc Wed May 14 08:51:10 2014 UTC
@@ -1548,7 +1548,7 @@
void Genesis::InstallExperimentalNativeFunctions() {
- INSTALL_NATIVE(JSFunction, "RunMicrotasks", run_microtasks);
+ INSTALL_NATIVE(JSFunction, "RunMicrotasksJS", run_microtasks);
INSTALL_NATIVE(JSFunction, "EnqueueMicrotask", enqueue_microtask);
if (FLAG_harmony_proxies) {
=======================================
--- /branches/bleeding_edge/src/builtins.cc Fri May 9 12:51:52 2014 UTC
+++ /branches/bleeding_edge/src/builtins.cc Wed May 14 08:51:10 2014 UTC
@@ -995,7 +995,7 @@
JSObject::cast(native_context->array_function()->prototype());
if (!ArrayPrototypeHasNoElements(heap, native_context, array_proto)) {
AllowHeapAllocation allow_allocation;
- return CallJsBuiltin(isolate, "ArrayConcat", args);
+ return CallJsBuiltin(isolate, "ArrayConcatJS", args);
}
// Iterate through all the arguments performing checks
@@ -1007,7 +1007,7 @@
!JSArray::cast(arg)->HasFastElements() ||
JSArray::cast(arg)->GetPrototype() != array_proto) {
AllowHeapAllocation allow_allocation;
- return CallJsBuiltin(isolate, "ArrayConcat", args);
+ return CallJsBuiltin(isolate, "ArrayConcatJS", args);
}
int len = Smi::cast(JSArray::cast(arg)->length())->value();
@@ -1020,7 +1020,7 @@
if (result_len > FixedDoubleArray::kMaxLength) {
AllowHeapAllocation allow_allocation;
- return CallJsBuiltin(isolate, "ArrayConcat", args);
+ return CallJsBuiltin(isolate, "ArrayConcatJS", args);
}
ElementsKind arg_kind = JSArray::cast(arg)->map()->elements_kind();
=======================================
--- /branches/bleeding_edge/src/collection.js Tue Apr 29 06:42:26 2014 UTC
+++ /branches/bleeding_edge/src/collection.js Wed May 14 08:51:10 2014 UTC
@@ -43,7 +43,7 @@
}
-function SetAdd(key) {
+function SetAddJS(key) {
if (!IS_SET(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Set.prototype.add', this]);
@@ -52,7 +52,7 @@
}
-function SetHas(key) {
+function SetHasJS(key) {
if (!IS_SET(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Set.prototype.has', this]);
@@ -61,7 +61,7 @@
}
-function SetDelete(key) {
+function SetDeleteJS(key) {
if (!IS_SET(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Set.prototype.delete', this]);
@@ -76,7 +76,7 @@
}
-function SetGetSize() {
+function SetGetSizeJS() {
if (!IS_SET(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Set.prototype.size', this]);
@@ -85,7 +85,7 @@
}
-function SetClear() {
+function SetClearJS() {
if (!IS_SET(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Set.prototype.clear', this]);
@@ -128,12 +128,12 @@
%FunctionSetLength(SetForEach, 1);
// Set up the non-enumerable functions on the Set prototype object.
- InstallGetter($Set.prototype, "size", SetGetSize);
+ InstallGetter($Set.prototype, "size", SetGetSizeJS);
InstallFunctions($Set.prototype, DONT_ENUM, $Array(
- "add", SetAdd,
- "has", SetHas,
- "delete", SetDelete,
- "clear", SetClear,
+ "add", SetAddJS,
+ "has", SetHasJS,
+ "delete", SetDeleteJS,
+ "clear", SetClearJS,
"forEach", SetForEach
));
}
@@ -153,7 +153,7 @@
}
-function MapGet(key) {
+function MapGetJS(key) {
if (!IS_MAP(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Map.prototype.get', this]);
@@ -162,7 +162,7 @@
}
-function MapSet(key, value) {
+function MapSetJS(key, value) {
if (!IS_MAP(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Map.prototype.set', this]);
@@ -171,7 +171,7 @@
}
-function MapHas(key) {
+function MapHasJS(key) {
if (!IS_MAP(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Map.prototype.has', this]);
@@ -180,7 +180,7 @@
}
-function MapDelete(key) {
+function MapDeleteJS(key) {
if (!IS_MAP(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Map.prototype.delete', this]);
@@ -189,7 +189,7 @@
}
-function MapGetSize() {
+function MapGetSizeJS() {
if (!IS_MAP(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Map.prototype.size', this]);
@@ -198,7 +198,7 @@
}
-function MapClear() {
+function MapClearJS() {
if (!IS_MAP(this)) {
throw MakeTypeError('incompatible_method_receiver',
['Map.prototype.clear', this]);
@@ -241,13 +241,13 @@
%FunctionSetLength(MapForEach, 1);
// Set up the non-enumerable functions on the Map prototype object.
- InstallGetter($Map.prototype, "size", MapGetSize);
+ InstallGetter($Map.prototype, "size", MapGetSizeJS);
InstallFunctions($Map.prototype, DONT_ENUM, $Array(
- "get", MapGet,
- "set", MapSet,
- "has", MapHas,
- "delete", MapDelete,
- "clear", MapClear,
+ "get", MapGetJS,
+ "set", MapSetJS,
+ "has", MapHasJS,
+ "delete", MapDeleteJS,
+ "clear", MapClearJS,
"forEach", MapForEach
));
}
=======================================
--- /branches/bleeding_edge/src/harmony-math.js Tue Apr 29 06:42:26 2014 UTC
+++ /branches/bleeding_edge/src/harmony-math.js Wed May 14 08:51:10 2014 UTC
@@ -132,7 +132,7 @@
// ES6 draft 09-27-13, section 20.2.2.16.
-function MathFround(x) {
+function MathFroundJS(x) {
return %MathFround(TO_NUMBER_INLINE(x));
}
@@ -234,7 +234,7 @@
"log10", MathLog10,
"log2", MathLog2,
"hypot", MathHypot,
- "fround", MathFround,
+ "fround", MathFroundJS,
"clz32", MathClz32,
"cbrt", MathCbrt,
"log1p", MathLog1p,
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Mon May 12 20:05:52 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc Wed May 14 08:51:10 2014 UTC
@@ -11126,7 +11126,7 @@
}
-void HOptimizedGraphBuilder::GenerateMathSqrt(CallRuntime* call) {
+void HOptimizedGraphBuilder::GenerateMathSqrtRT(CallRuntime* call) {
ASSERT(call->arguments()->length() == 1);
CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
HValue* value = Pop();
=======================================
--- /branches/bleeding_edge/src/math.js Mon May 12 08:43:01 2014 UTC
+++ /branches/bleeding_edge/src/math.js Wed May 14 08:51:10 2014 UTC
@@ -47,7 +47,7 @@
// ECMA 262 - 15.8.2.5
// The naming of y and x matches the spec, as does the order in which
// ToNumber (valueOf) is called.
-function MathAtan2(y, x) {
+function MathAtan2JS(y, x) {
return %MathAtan2(TO_NUMBER_INLINE(y), TO_NUMBER_INLINE(x));
}
@@ -64,7 +64,7 @@
// ECMA 262 - 15.8.2.8
function MathExp(x) {
- return %MathExp(TO_NUMBER_INLINE(x));
+ return %MathExpRT(TO_NUMBER_INLINE(x));
}
// ECMA 262 - 15.8.2.9
@@ -79,7 +79,7 @@
// has to be -0, which wouldn't be the case with the shift.
return TO_UINT32(x);
} else {
- return %MathFloor(x);
+ return %MathFloorRT(x);
}
}
@@ -173,7 +173,7 @@
// ECMA 262 - 15.8.2.17
function MathSqrt(x) {
- return %_MathSqrt(TO_NUMBER_INLINE(x));
+ return %_MathSqrtRT(TO_NUMBER_INLINE(x));
}
// ECMA 262 - 15.8.2.18
@@ -296,7 +296,7 @@
"sin", MathSin,
"sqrt", MathSqrt,
"tan", MathTan,
- "atan2", MathAtan2,
+ "atan2", MathAtan2JS,
"pow", MathPow,
"max", MathMax,
"min", MathMin,
=======================================
--- /branches/bleeding_edge/src/messages.js Fri May 9 13:14:09 2014 UTC
+++ /branches/bleeding_edge/src/messages.js Wed May 14 08:51:10 2014 UTC
@@ -957,12 +957,12 @@
var methodName = this.getMethodName();
if (functionName) {
if (typeName &&
- %_CallFunction(functionName, typeName, StringIndexOf) != 0) {
+ %_CallFunction(functionName, typeName, StringIndexOfJS) != 0) {
line += typeName + ".";
}
line += functionName;
if (methodName &&
- (%_CallFunction(functionName, "." + methodName, StringIndexOf) !=
+ (%_CallFunction(functionName, "." + methodName,
StringIndexOfJS) !=
functionName.length - methodName.length - 1)) {
line += " [as " + methodName + "]";
}
=======================================
--- /branches/bleeding_edge/src/object-observe.js Fri May 9 18:22:28 2014
UTC
+++ /branches/bleeding_edge/src/object-observe.js Wed May 14 08:51:10 2014
UTC
@@ -35,7 +35,7 @@
var observationState;
-function GetObservationState() {
+function GetObservationStateJS() {
if (IS_UNDEFINED(observationState))
observationState = %GetObservationState();
@@ -76,7 +76,7 @@
function GetContextMaps() {
if (IS_UNDEFINED(contextMaps)) {
var map = GetWeakMapWrapper();
- var observationState = GetObservationState();
+ var observationState = GetObservationStateJS();
contextMaps = {
callbackInfoMap: new map(observationState.callbackInfoMap),
objectInfoMap: new map(observationState.objectInfoMap),
@@ -100,15 +100,15 @@
}
function GetPendingObservers() {
- return GetObservationState().pendingObservers;
+ return GetObservationStateJS().pendingObservers;
}
function SetPendingObservers(pendingObservers) {
- GetObservationState().pendingObservers = pendingObservers;
+ GetObservationStateJS().pendingObservers = pendingObservers;
}
function GetNextCallbackPriority() {
- return GetObservationState().nextCallbackPriority++;
+ return GetObservationStateJS().nextCallbackPriority++;
}
function nullProtoObject() {
@@ -440,7 +440,7 @@
%DefineOrRedefineDataProperty(newRecord, prop, changeRecord[prop],
READ_ONLY + DONT_DELETE);
}
- ObjectFreeze(newRecord);
+ ObjectFreezeJS(newRecord);
ObjectInfoEnqueueInternalChangeRecord(objectInfo, newRecord);
}
@@ -488,8 +488,8 @@
addedCount: addedCount
};
- ObjectFreeze(changeRecord);
- ObjectFreeze(changeRecord.removed);
+ ObjectFreezeJS(changeRecord);
+ ObjectFreezeJS(changeRecord.removed);
ObjectInfoEnqueueInternalChangeRecord(objectInfo, changeRecord);
}
@@ -512,7 +512,7 @@
};
}
- ObjectFreeze(changeRecord);
+ ObjectFreezeJS(changeRecord);
ObjectInfoEnqueueInternalChangeRecord(objectInfo, changeRecord);
}
=======================================
--- /branches/bleeding_edge/src/regexp.js Mon May 12 09:18:45 2014 UTC
+++ /branches/bleeding_edge/src/regexp.js Wed May 14 08:51:10 2014 UTC
@@ -80,7 +80,7 @@
// were called again. In SpiderMonkey, this method returns the regexp
object.
// In JSC, it returns undefined. For compatibility with JSC, we match
their
// behavior.
-function RegExpCompile(pattern, flags) {
+function RegExpCompileJS(pattern, flags) {
// Both JSC and SpiderMonkey treat a missing pattern argument as the
// empty subject string, and an actual undefined value passed as the
// pattern as the string 'undefined'. Note that JSC is inconsistent
@@ -381,7 +381,7 @@
"exec", RegExpExec,
"test", RegExpTest,
"toString", RegExpToString,
- "compile", RegExpCompile
+ "compile", RegExpCompileJS
));
// The length of compile is 1 in SpiderMonkey.
=======================================
--- /branches/bleeding_edge/src/runtime.cc Mon May 12 15:30:00 2014 UTC
+++ /branches/bleeding_edge/src/runtime.cc Wed May 14 08:51:10 2014 UTC
@@ -7850,7 +7850,7 @@
}
-RUNTIME_FUNCTION(Runtime_MathExp) {
+RUNTIME_FUNCTION(Runtime_MathExpRT) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
isolate->counters()->math_exp()->Increment();
@@ -7861,7 +7861,7 @@
}
-RUNTIME_FUNCTION(Runtime_MathFloor) {
+RUNTIME_FUNCTION(Runtime_MathFloorRT) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
isolate->counters()->math_floor()->Increment();
@@ -7956,7 +7956,7 @@
}
-RUNTIME_FUNCTION(Runtime_MathSqrt) {
+RUNTIME_FUNCTION(Runtime_MathSqrtRT) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
isolate->counters()->math_sqrt()->Increment();
=======================================
--- /branches/bleeding_edge/src/runtime.h Mon May 12 09:37:26 2014 UTC
+++ /branches/bleeding_edge/src/runtime.h Wed May 14 08:51:10 2014 UTC
@@ -138,9 +138,9 @@
F(MathAcos, 1, 1) \
F(MathAsin, 1, 1) \
F(MathAtan, 1, 1) \
- F(MathFloor, 1, 1) \
+ F(MathFloorRT, 1, 1) \
F(MathAtan2, 2, 1) \
- F(MathExp, 1, 1) \
+ F(MathExpRT, 1, 1) \
F(RoundNumber, 1, 1) \
F(MathFround, 1, 1) \
\
@@ -684,7 +684,7 @@
F(ConstructDouble, 2,
1) \
F(DoubleHi, 1,
1) \
F(DoubleLo, 1,
1) \
- F(MathSqrt, 1,
1) \
+ F(MathSqrtRT, 1,
1) \
F(MathLog, 1,
1) \
/* Debugger
*/ \
F(DebugCallbackSupportsStepping, 1, 1)
=======================================
--- /branches/bleeding_edge/src/string.js Tue May 6 09:28:08 2014 UTC
+++ /branches/bleeding_edge/src/string.js Wed May 14 08:51:10 2014 UTC
@@ -83,7 +83,7 @@
// ECMA-262 section 15.5.4.7
-function StringIndexOf(pattern /* position */) { // length == 1
+function StringIndexOfJS(pattern /* position */) { // length == 1
CHECK_OBJECT_COERCIBLE(this, "String.prototype.indexOf");
var subject = TO_STRING_INLINE(this);
@@ -100,7 +100,7 @@
// ECMA-262 section 15.5.4.8
-function StringLastIndexOf(pat /* position */) { // length == 1
+function StringLastIndexOfJS(pat /* position */) { // length == 1
CHECK_OBJECT_COERCIBLE(this, "String.prototype.lastIndexOf");
var sub = TO_STRING_INLINE(this);
@@ -131,7 +131,7 @@
//
// This function is implementation specific. For now, we do not
// do anything locale specific.
-function StringLocaleCompare(other) {
+function StringLocaleCompareJS(other) {
CHECK_OBJECT_COERCIBLE(this, "String.prototype.localeCompare");
return %StringLocaleCompare(TO_STRING_INLINE(this),
@@ -140,7 +140,7 @@
// ECMA-262 section 15.5.4.10
-function StringMatch(regexp) {
+function StringMatchJS(regexp) {
CHECK_OBJECT_COERCIBLE(this, "String.prototype.match");
var subject = TO_STRING_INLINE(this);
@@ -170,7 +170,7 @@
// For now we do nothing, as proper normalization requires big tables.
// If Intl is enabled, then i18n.js will override it and provide the the
// proper functionality.
-function StringNormalize(form) {
+function StringNormalizeJS(form) {
CHECK_OBJECT_COERCIBLE(this, "String.prototype.normalize");
var form = form ? TO_STRING_INLINE(form) : 'NFC';
@@ -585,7 +585,7 @@
// ECMA-262 section 15.5.4.14
-function StringSplit(separator, limit) {
+function StringSplitJS(separator, limit) {
CHECK_OBJECT_COERCIBLE(this, "String.prototype.split");
var subject = TO_STRING_INLINE(this);
@@ -756,7 +756,7 @@
// ECMA-262, 15.5.4.16
-function StringToLowerCase() {
+function StringToLowerCaseJS() {
CHECK_OBJECT_COERCIBLE(this, "String.prototype.toLowerCase");
return %StringToLowerCase(TO_STRING_INLINE(this));
@@ -772,7 +772,7 @@
// ECMA-262, 15.5.4.18
-function StringToUpperCase() {
+function StringToUpperCaseJS() {
CHECK_OBJECT_COERCIBLE(this, "String.prototype.toUpperCase");
return %StringToUpperCase(TO_STRING_INLINE(this));
@@ -787,7 +787,7 @@
}
// ES5, 15.5.4.20
-function StringTrim() {
+function StringTrimJS() {
CHECK_OBJECT_COERCIBLE(this, "String.prototype.trim");
return %StringTrim(TO_STRING_INLINE(this), true, true);
@@ -935,22 +935,22 @@
"charAt", StringCharAt,
"charCodeAt", StringCharCodeAt,
"concat", StringConcat,
- "indexOf", StringIndexOf,
- "lastIndexOf", StringLastIndexOf,
- "localeCompare", StringLocaleCompare,
- "match", StringMatch,
- "normalize", StringNormalize,
+ "indexOf", StringIndexOfJS,
+ "lastIndexOf", StringLastIndexOfJS,
+ "localeCompare", StringLocaleCompareJS,
+ "match", StringMatchJS,
+ "normalize", StringNormalizeJS,
"replace", StringReplace,
"search", StringSearch,
"slice", StringSlice,
- "split", StringSplit,
+ "split", StringSplitJS,
"substring", StringSubstring,
"substr", StringSubstr,
- "toLowerCase", StringToLowerCase,
+ "toLowerCase", StringToLowerCaseJS,
"toLocaleLowerCase", StringToLocaleLowerCase,
- "toUpperCase", StringToUpperCase,
+ "toUpperCase", StringToUpperCaseJS,
"toLocaleUpperCase", StringToLocaleUpperCase,
- "trim", StringTrim,
+ "trim", StringTrimJS,
"trimLeft", StringTrimLeft,
"trimRight", StringTrimRight,
"link", StringLink,
=======================================
--- /branches/bleeding_edge/src/uri.js Mon May 12 08:43:01 2014 UTC
+++ /branches/bleeding_edge/src/uri.js Wed May 14 08:51:10 2014 UTC
@@ -403,14 +403,14 @@
// ECMA-262 - B.2.1.
-function URIEscape(str) {
+function URIEscapeJS(str) {
var s = ToString(str);
return %URIEscape(s);
}
// ECMA-262 - B.2.2.
-function URIUnescape(str) {
+function URIUnescapeJS(str) {
var s = ToString(str);
return %URIUnescape(s);
}
@@ -424,8 +424,8 @@
// Set up non-enumerable URI functions on the global object and set
// their names.
InstallFunctions(global, DONT_ENUM, $Array(
- "escape", URIEscape,
- "unescape", URIUnescape,
+ "escape", URIEscapeJS,
+ "unescape", URIUnescapeJS,
"decodeURI", URIDecode,
"decodeURIComponent", URIDecodeComponent,
"encodeURI", URIEncode,
=======================================
--- /branches/bleeding_edge/src/v8natives.js Fri May 2 08:00:47 2014 UTC
+++ /branches/bleeding_edge/src/v8natives.js Wed May 14 08:51:10 2014 UTC
@@ -263,7 +263,7 @@
// TODO(rossberg): adjust once there is a story for symbols vs proxies.
if (IS_SYMBOL(V)) return false;
- var desc = GetOwnProperty(this, P);
+ var desc = GetOwnPropertyJS(this, P);
return IS_UNDEFINED(desc) ? false : desc.isEnumerable();
}
return %IsPropertyEnumerable(ToObject(this), P);
@@ -627,7 +627,7 @@
// ES5 section 8.12.1.
-function GetOwnProperty(obj, v) {
+function GetOwnPropertyJS(obj, v) {
var p = ToName(v);
if (%IsJSProxy(obj)) {
// TODO(rossberg): adjust once there is a story for symbols vs proxies.
@@ -659,7 +659,7 @@
// ES5 section 8.12.7.
function Delete(obj, p, should_throw) {
- var desc = GetOwnProperty(obj, p);
+ var desc = GetOwnPropertyJS(obj, p);
if (IS_UNDEFINED(desc)) return true;
if (desc.isConfigurable()) {
%DeleteProperty(obj, p, 0);
@@ -866,7 +866,7 @@
if (new_length != ToNumber(desc.getValue())) {
throw new $RangeError('defineProperty() array length out of range');
}
- var length_desc = GetOwnProperty(obj, "length");
+ var length_desc = GetOwnPropertyJS(obj, "length");
if (new_length != length && !length_desc.isWritable()) {
if (should_throw) {
throw MakeTypeError("redefine_disallowed", [p]);
@@ -888,7 +888,7 @@
while (new_length < length--) {
var index = ToString(length);
if (emit_splice) {
- var deletedDesc = GetOwnProperty(obj, index);
+ var deletedDesc = GetOwnPropertyJS(obj, index);
if (deletedDesc && deletedDesc.hasValue())
removed[length - new_length] = deletedDesc.getValue();
}
@@ -935,7 +935,7 @@
BeginPerformSplice(obj);
}
- var length_desc = GetOwnProperty(obj, "length");
+ var length_desc = GetOwnPropertyJS(obj, "length");
if ((index >= length && !length_desc.isWritable()) ||
!DefineObjectProperty(obj, p, desc, true)) {
if (emit_splice)
@@ -1007,7 +1007,7 @@
throw MakeTypeError("called_on_non_object",
["Object.getOwnPropertyDescriptor"]);
}
- var desc = GetOwnProperty(obj, p);
+ var desc = GetOwnPropertyJS(obj, p);
return FromPropertyDescriptor(desc);
}
@@ -1157,7 +1157,7 @@
for (var i = 0; i < names.length; i++) {
var N = names[i];
if (!(%HasLocalProperty(standardNames, N))) {
- var attr = GetOwnProperty(attributes, N);
+ var attr = GetOwnPropertyJS(attributes, N);
DefineOwnProperty(descObj, N, attr, true);
}
}
@@ -1242,7 +1242,7 @@
var names = ObjectGetOwnPropertyNames(obj);
for (var i = 0; i < names.length; i++) {
var name = names[i];
- var desc = GetOwnProperty(obj, name);
+ var desc = GetOwnPropertyJS(obj, name);
if (desc.isConfigurable()) {
desc.setConfigurable(false);
DefineOwnProperty(obj, name, desc, true);
@@ -1254,7 +1254,7 @@
// ES5 section 15.2.3.9.
-function ObjectFreeze(obj) {
+function ObjectFreezeJS(obj) {
if (!IS_SPEC_OBJECT(obj)) {
throw MakeTypeError("called_on_non_object", ["Object.freeze"]);
}
@@ -1266,7 +1266,7 @@
var names = ObjectGetOwnPropertyNames(obj);
for (var i = 0; i < names.length; i++) {
var name = names[i];
- var desc = GetOwnProperty(obj, name);
+ var desc = GetOwnPropertyJS(obj, name);
if (desc.isWritable() || desc.isConfigurable()) {
if (IsDataDescriptor(desc)) desc.setWritable(false);
desc.setConfigurable(false);
@@ -1310,7 +1310,7 @@
var names = ObjectGetOwnPropertyNames(obj);
for (var i = 0; i < names.length; i++) {
var name = names[i];
- var desc = GetOwnProperty(obj, name);
+ var desc = GetOwnPropertyJS(obj, name);
if (desc.isConfigurable()) return false;
}
return true;
@@ -1331,7 +1331,7 @@
var names = ObjectGetOwnPropertyNames(obj);
for (var i = 0; i < names.length; i++) {
var name = names[i];
- var desc = GetOwnProperty(obj, name);
+ var desc = GetOwnPropertyJS(obj, name);
if (IsDataDescriptor(desc) && desc.isWritable()) return false;
if (desc.isConfigurable()) return false;
}
@@ -1422,7 +1422,7 @@
"create", ObjectCreate,
"defineProperty", ObjectDefineProperty,
"defineProperties", ObjectDefineProperties,
- "freeze", ObjectFreeze,
+ "freeze", ObjectFreezeJS,
"getPrototypeOf", ObjectGetPrototypeOf,
"setPrototypeOf", ObjectSetPrototypeOf,
"getOwnPropertyDescriptor", ObjectGetOwnPropertyDescriptor,
@@ -1554,7 +1554,7 @@
// ECMA-262 section 15.7.4.5
-function NumberToFixed(fractionDigits) {
+function NumberToFixedJS(fractionDigits) {
var x = this;
if (!IS_NUMBER(this)) {
if (!IS_NUMBER_WRAPPER(this)) {
@@ -1579,7 +1579,7 @@
// ECMA-262 section 15.7.4.6
-function NumberToExponential(fractionDigits) {
+function NumberToExponentialJS(fractionDigits) {
var x = this;
if (!IS_NUMBER(this)) {
if (!IS_NUMBER_WRAPPER(this)) {
@@ -1605,7 +1605,7 @@
// ECMA-262 section 15.7.4.7
-function NumberToPrecision(precision) {
+function NumberToPrecisionJS(precision) {
var x = this;
if (!IS_NUMBER(this)) {
if (!IS_NUMBER_WRAPPER(this)) {
@@ -1694,9 +1694,9 @@
"toString", NumberToString,
"toLocaleString", NumberToLocaleString,
"valueOf", NumberValueOf,
- "toFixed", NumberToFixed,
- "toExponential", NumberToExponential,
- "toPrecision", NumberToPrecision
+ "toFixed", NumberToFixedJS,
+ "toExponential", NumberToExponentialJS,
+ "toPrecision", NumberToPrecisionJS
));
// Harmony Number constructor additions
@@ -1823,7 +1823,7 @@
// If the formal parameters string include ) - an illegal
// character - it may make the combined function expression
// compile. We avoid this problem by checking for this early on.
- if (%_CallFunction(p, ')', StringIndexOf) != -1) {
+ if (%_CallFunction(p, ')', StringIndexOfJS) != -1) {
throw MakeSyntaxError('paren_in_arg_string', []);
}
// If the formal parameters include an unbalanced block comment, the
@@ -1870,7 +1870,7 @@
// Eventually, we should move to a real event queue that allows to maintain
// relative ordering of different kinds of tasks.
-function RunMicrotasks() {
+function RunMicrotasksJS() {
while (%SetMicrotaskPending(false)) {
var microtaskState = %GetMicrotaskState();
if (IS_UNDEFINED(microtaskState.queue))
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.