| Index: src/runtime.cc
|
| ===================================================================
|
| --- src/runtime.cc (revision 6095)
|
| +++ src/runtime.cc (working copy)
|
| @@ -614,22 +614,6 @@
|
| }
|
|
|
|
|
| -// Sets the magic number that identifies a function as one of the special
|
| -// math functions that can be inlined.
|
| -static MaybeObject* Runtime_SetMathFunctionId(Arguments args) {
|
| - NoHandleAllocation ha;
|
| - ASSERT(args.length() == 2);
|
| - CONVERT_CHECKED(JSFunction, function, args[0]);
|
| - CONVERT_CHECKED(Smi, id, args[1]);
|
| - RUNTIME_ASSERT(id->value() >= 0);
|
| - RUNTIME_ASSERT(id->value() < SharedFunctionInfo::max_math_id_number());
|
| -
|
| - function->shared()->set_math_function_id(id->value());
|
| -
|
| - return Heap::undefined_value();
|
| -}
|
| -
|
| -
|
| static MaybeObject* Runtime_IsConstructCall(Arguments args) {
|
| NoHandleAllocation ha;
|
| ASSERT(args.length() == 0);
|
| @@ -3516,7 +3500,8 @@
|
| CONVERT_ARG_CHECKED(JSObject, obj, 0);
|
| CONVERT_CHECKED(String, name, args[1]);
|
| CONVERT_CHECKED(Smi, flag_setter, args[2]);
|
| - CONVERT_CHECKED(JSFunction, fun, args[3]);
|
| + Object* fun = args[3];
|
| + RUNTIME_ASSERT(fun->IsJSFunction() || fun->IsUndefined());
|
| CONVERT_CHECKED(Smi, flag_attr, args[4]);
|
| int unchecked = flag_attr->value();
|
| RUNTIME_ASSERT((unchecked & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0);
|
| @@ -3572,7 +3557,7 @@
|
| }
|
|
|
| LookupResult result;
|
| - js_object->LocalLookupRealNamedProperty(*name, &result);
|
| + js_object->LookupRealNamedProperty(*name, &result);
|
|
|
| // Take special care when attributes are different and there is already
|
| // a property. For simplicity we normalize the property which enables us
|
| @@ -3580,7 +3565,8 @@
|
| // map. The current version of SetObjectProperty does not handle attributes
|
| // correctly in the case where a property is a field and is reset with
|
| // new attributes.
|
| - if (result.IsProperty() && attr != result.GetAttributes()) {
|
| + if (result.IsProperty() &&
|
| + (attr != result.GetAttributes() || result.type() == CALLBACKS)) {
|
| // New attributes - normalize to avoid writing to instance descriptor
|
| NormalizeProperties(js_object, CLEAR_INOBJECT_PROPERTIES, 0);
|
| // Use IgnoreAttributes version since a readonly property may be
|
| @@ -6892,12 +6878,17 @@
|
| if (CompileOptimized(function, ast_id) && function->IsOptimized()) {
|
| DeoptimizationInputData* data = DeoptimizationInputData::cast(
|
| function->code()->deoptimization_data());
|
| - if (FLAG_trace_osr) {
|
| - PrintF("[on-stack replacement offset %d in optimized code]\n",
|
| + if (data->OsrPcOffset()->value() >= 0) {
|
| + if (FLAG_trace_osr) {
|
| + PrintF("[on-stack replacement offset %d in optimized code]\n",
|
| data->OsrPcOffset()->value());
|
| + }
|
| + ASSERT(data->OsrAstId()->value() == ast_id);
|
| + } else {
|
| + // We may never generate the desired OSR entry if we emit an
|
| + // early deoptimize.
|
| + succeeded = false;
|
| }
|
| - ASSERT(data->OsrAstId()->value() == ast_id);
|
| - ASSERT(data->OsrPcOffset()->value() >= 0);
|
| } else {
|
| succeeded = false;
|
| }
|
| @@ -7213,7 +7204,7 @@
|
| // extension object itself.
|
| if ((attributes & READ_ONLY) == 0 ||
|
| (context_ext->GetLocalPropertyAttribute(*name) == ABSENT)) {
|
| - Handle<Object> set = SetProperty(context_ext, name, value, attributes);
|
| + Handle<Object> set = SetProperty(context_ext, name, value, NONE);
|
| if (set.is_null()) {
|
| // Failure::Exception is converted to a null handle in the
|
| // handle-based methods such as SetProperty. We therefore need
|
|
|