| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 1122d331a4fd0519799fc6bf2b97ace49889109c..f908036469a07699028bc95517926ba648ef6304 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -1701,7 +1701,6 @@ static Object* Runtime_SetCode(Arguments args) {
|
| RUNTIME_ASSERT(code->IsJSFunction());
|
| Handle<JSFunction> fun = Handle<JSFunction>::cast(code);
|
| Handle<SharedFunctionInfo> shared(fun->shared());
|
| - SetExpectedNofProperties(target, shared->expected_nof_properties());
|
|
|
| if (!EnsureCompiled(shared, KEEP_EXCEPTION)) {
|
| return Failure::Exception();
|
| @@ -1746,6 +1745,17 @@ static Object* Runtime_SetCode(Arguments args) {
|
| }
|
|
|
|
|
| +static Object* Runtime_SetExpectedNumberOfProperties(Arguments args) {
|
| + HandleScope scope;
|
| + ASSERT(args.length() == 2);
|
| + CONVERT_ARG_CHECKED(JSFunction, function, 0);
|
| + CONVERT_SMI_CHECKED(num, args[1]);
|
| + RUNTIME_ASSERT(num >= 0);
|
| + SetExpectedNofProperties(function, num);
|
| + return Heap::undefined_value();
|
| +}
|
| +
|
| +
|
| static Object* CharFromCode(Object* char_code) {
|
| uint32_t code;
|
| if (char_code->ToArrayIndex(&code)) {
|
|
|