Commit aabffe0b authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[bigint] Adapt Object::TypeOf.

R=jkummerow@chromium.org

Bug: v8:6791
Change-Id: I6ebd14d39666e8ebe8af42f6dfe579e3fd375754
Reviewed-on: https://chromium-review.googlesource.com/711843
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48497}
parent 419578ac
...@@ -641,7 +641,7 @@ Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) { ...@@ -641,7 +641,7 @@ Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) {
} }
if (object->IsString()) return isolate->factory()->string_string(); if (object->IsString()) return isolate->factory()->string_string();
if (object->IsSymbol()) return isolate->factory()->symbol_string(); if (object->IsSymbol()) return isolate->factory()->symbol_string();
if (object->IsString()) return isolate->factory()->string_string(); if (object->IsBigInt()) return isolate->factory()->bigint_string();
if (object->IsCallable()) return isolate->factory()->function_string(); if (object->IsCallable()) return isolate->factory()->function_string();
return isolate->factory()->object_string(); return isolate->factory()->object_string();
} }
......
...@@ -24,8 +24,10 @@ const six = BigInt(6); ...@@ -24,8 +24,10 @@ const six = BigInt(6);
{ {
assertEquals(typeof zero, "bigint"); assertEquals(typeof zero, "bigint");
assertEquals(typeof one, "bigint"); assertEquals(typeof one, "bigint");
} }{
{ assertEquals(%Typeof(zero), "bigint");
assertEquals(%Typeof(one), "bigint");
}{
// TODO(neis): Enable once --no-opt can be removed. // TODO(neis): Enable once --no-opt can be removed.
// //
// function Typeof(x) { return typeof x } // function Typeof(x) { return typeof x }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment