[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: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#48497}
This commit is contained in:
parent
419578ac4e
commit
aabffe0b7b
@ -641,7 +641,7 @@ Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) {
|
||||
}
|
||||
if (object->IsString()) return isolate->factory()->string_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();
|
||||
return isolate->factory()->object_string();
|
||||
}
|
||||
|
@ -24,8 +24,10 @@ const six = BigInt(6);
|
||||
{
|
||||
assertEquals(typeof zero, "bigint");
|
||||
assertEquals(typeof one, "bigint");
|
||||
}
|
||||
{
|
||||
}{
|
||||
assertEquals(%Typeof(zero), "bigint");
|
||||
assertEquals(%Typeof(one), "bigint");
|
||||
}{
|
||||
// TODO(neis): Enable once --no-opt can be removed.
|
||||
//
|
||||
// function Typeof(x) { return typeof x }
|
||||
|
Loading…
Reference in New Issue
Block a user