Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index b9e199b12596efa793a2991d115d40c2fd9469bc..6c4d72263672666704e7c03eadc77dd16c68386f 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -694,13 +694,19 @@ RUNTIME_FUNCTION(Runtime_DefineDataPropertyInLiteral) { |
RUNTIME_FUNCTION(Runtime_CollectTypeProfile) { |
HandleScope scope(isolate); |
DCHECK_EQ(4, args.length()); |
- CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(Smi, position, 0); |
CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
CONVERT_ARG_HANDLE_CHECKED(FeedbackVector, vector, 2); |
CONVERT_SMI_ARG_CHECKED(index, 3); |
DCHECK(FLAG_type_profile); |
+ Handle<Object> function_name = |
Michael Starzinger
2017/03/20 17:12:32
nit: The {function_name} variable seems to be unus
Franzi
2017/03/20 19:29:37
Seems like I came up with my own pattern instead o
|
+ Handle<Object>(vector->shared_function_info()->name(), isolate); |
+ if (!function_name->IsString()) { |
+ UNREACHABLE(); |
+ } |
+ |
Handle<Name> type = Object::TypeOf(isolate, value); |
if (value->IsJSReceiver()) { |
Handle<JSReceiver> object = Handle<JSReceiver>::cast(value); |
@@ -708,9 +714,9 @@ RUNTIME_FUNCTION(Runtime_CollectTypeProfile) { |
} |
CollectTypeProfileNexus nexus(vector, vector->ToSlot(index)); |
- nexus.Collect(type); |
+ nexus.Collect(type, position->value()); |
- return *name; |
+ return isolate->heap()->undefined_value(); |
} |
// Return property without being observable by accessors or interceptors. |