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

Unified Diff: src/api.cc

Issue 1306303003: [es6] Implement spec compliant ToPrimitive in the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michis comments. Created 5 years, 4 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/accessors.cc ('k') | src/arm/code-stubs-arm.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 0fb4154b6ed18d952ef5425ac285a3da0ab47c19..42a887582723524f4773847d51cdb2da5f58827a 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2854,7 +2854,7 @@ MaybeLocal<String> Value::ToString(Local<Context> context) const {
PREPARE_FOR_EXECUTION(context, "ToString", String);
Local<String> result;
has_pending_exception =
- !ToLocal<String>(i::Execution::ToString(isolate, obj), &result);
+ !ToLocal<String>(i::Object::ToString(isolate, obj), &result);
RETURN_ON_FAILED_EXECUTION(String);
RETURN_ESCAPED(result);
}
@@ -2920,7 +2920,7 @@ MaybeLocal<Number> Value::ToNumber(Local<Context> context) const {
PREPARE_FOR_EXECUTION(context, "ToNumber", Number);
Local<Number> result;
has_pending_exception =
- !ToLocal<Number>(i::Execution::ToNumber(isolate, obj), &result);
+ !ToLocal<Number>(i::Object::ToNumber(isolate, obj), &result);
RETURN_ON_FAILED_EXECUTION(Number);
RETURN_ESCAPED(result);
}
@@ -3244,7 +3244,7 @@ Maybe<double> Value::NumberValue(Local<Context> context) const {
if (obj->IsNumber()) return Just(obj->Number());
PREPARE_FOR_EXECUTION_PRIMITIVE(context, "NumberValue", double);
i::Handle<i::Object> num;
- has_pending_exception = !i::Execution::ToNumber(isolate, obj).ToHandle(&num);
+ has_pending_exception = !i::Object::ToNumber(isolate, obj).ToHandle(&num);
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(double);
return Just(num->Number());
}
@@ -3334,7 +3334,7 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
PREPARE_FOR_EXECUTION(context, "ToArrayIndex", Uint32);
i::Handle<i::Object> string_obj;
has_pending_exception =
- !i::Execution::ToString(isolate, self).ToHandle(&string_obj);
+ !i::Object::ToString(isolate, self).ToHandle(&string_obj);
RETURN_ON_FAILED_EXECUTION(Uint32);
i::Handle<i::String> str = i::Handle<i::String>::cast(string_obj);
uint32_t index;
@@ -3614,8 +3614,8 @@ Maybe<PropertyAttribute> v8::Object::GetPropertyAttributes(
auto self = Utils::OpenHandle(this);
auto key_obj = Utils::OpenHandle(*key);
if (!key_obj->IsName()) {
- has_pending_exception = !i::Execution::ToString(
- isolate, key_obj).ToHandle(&key_obj);
+ has_pending_exception =
+ !i::Object::ToString(isolate, key_obj).ToHandle(&key_obj);
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(PropertyAttribute);
}
auto key_name = i::Handle<i::Name>::cast(key_obj);
« no previous file with comments | « src/accessors.cc ('k') | src/arm/code-stubs-arm.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698