Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Unified Diff: src/js/v8natives.js

Issue 1695743003: [builtins] Support SameValue and SameValueZero via runtime functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address bug in SameValue and SameValueZero for SIMD types. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/runtime.js ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/v8natives.js
diff --git a/src/js/v8natives.js b/src/js/v8natives.js
index 21cc9b7db22a41671a8f27556eef5acc90af3624..b22a34171adac23d36531f91c82d7814fa93453d 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -24,7 +24,6 @@ var ObjectToString = utils.ImportNow("object_to_string");
var ObserveBeginPerformSplice;
var ObserveEndPerformSplice;
var ObserveEnqueueSpliceRecord;
-var SameValue = utils.ImportNow("SameValue");
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
utils.Import(function(from) {
@@ -545,17 +544,17 @@ function DefineObjectProperty(obj, p, desc, should_throw) {
if ((IsGenericDescriptor(desc) ||
IsDataDescriptor(desc) == IsDataDescriptor(current)) &&
(!desc.hasEnumerable() ||
- SameValue(desc.isEnumerable(), current.isEnumerable())) &&
+ %SameValue(desc.isEnumerable(), current.isEnumerable())) &&
(!desc.hasConfigurable() ||
- SameValue(desc.isConfigurable(), current.isConfigurable())) &&
+ %SameValue(desc.isConfigurable(), current.isConfigurable())) &&
(!desc.hasWritable() ||
- SameValue(desc.isWritable(), current.isWritable())) &&
+ %SameValue(desc.isWritable(), current.isWritable())) &&
(!desc.hasValue() ||
- SameValue(desc.getValue(), current.getValue())) &&
+ %SameValue(desc.getValue(), current.getValue())) &&
(!desc.hasGetter() ||
- SameValue(desc.getGet(), current.getGet())) &&
+ %SameValue(desc.getGet(), current.getGet())) &&
(!desc.hasSetter() ||
- SameValue(desc.getSet(), current.getSet()))) {
+ %SameValue(desc.getSet(), current.getSet()))) {
return true;
}
if (!current.isConfigurable()) {
@@ -594,7 +593,7 @@ function DefineObjectProperty(obj, p, desc, should_throw) {
}
}
if (!currentIsWritable && desc.hasValue() &&
- !SameValue(desc.getValue(), current.getValue())) {
+ !%SameValue(desc.getValue(), current.getValue())) {
if (should_throw) {
throw MakeTypeError(kRedefineDisallowed, p);
} else {
@@ -605,14 +604,14 @@ function DefineObjectProperty(obj, p, desc, should_throw) {
// Step 11
if (IsAccessorDescriptor(desc) && IsAccessorDescriptor(current)) {
if (desc.hasSetter() &&
- !SameValue(desc.getSet(), current.getSet())) {
+ !%SameValue(desc.getSet(), current.getSet())) {
if (should_throw) {
throw MakeTypeError(kRedefineDisallowed, p);
} else {
return false;
}
}
- if (desc.hasGetter() && !SameValue(desc.getGet(),current.getGet())) {
+ if (desc.hasGetter() && !%SameValue(desc.getGet(),current.getGet())) {
if (should_throw) {
throw MakeTypeError(kRedefineDisallowed, p);
} else {
@@ -872,7 +871,7 @@ utils.InstallFunctions(GlobalObject, DONT_ENUM, [
"getPrototypeOf", ObjectGetPrototypeOf,
"setPrototypeOf", ObjectSetPrototypeOf,
// getOwnPropertySymbols is added in symbol.js.
- "is", SameValue, // ECMA-262, Edition 6, section 19.1.2.10
+ // is is added in bootstrapper.cc.
// deliverChangeRecords, getNotifier, observe and unobserve are added
// in object-observe.js.
]);
« no previous file with comments | « src/js/runtime.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698