| Index: src/ia32/stub-cache-ia32.cc
|
| ===================================================================
|
| --- src/ia32/stub-cache-ia32.cc (revision 7031)
|
| +++ src/ia32/stub-cache-ia32.cc (working copy)
|
| @@ -2209,8 +2209,9 @@
|
| break;
|
|
|
| case STRING_CHECK:
|
| - if (!function->IsBuiltin()) {
|
| - // Calling non-builtins with a value as receiver requires boxing.
|
| + if (!function->IsBuiltin() && !function_info->strict_mode()) {
|
| + // Calling non-strict non-builtins with a value as the receiver
|
| + // requires boxing.
|
| __ jmp(&miss);
|
| } else {
|
| // Check that the object is a string or a symbol.
|
| @@ -2225,8 +2226,9 @@
|
| break;
|
|
|
| case NUMBER_CHECK: {
|
| - if (!function->IsBuiltin()) {
|
| - // Calling non-builtins with a value as receiver requires boxing.
|
| + if (!function->IsBuiltin() && !function_info->strict_mode()) {
|
| + // Calling non-strict non-builtins with a value as the receiver
|
| + // requires boxing.
|
| __ jmp(&miss);
|
| } else {
|
| Label fast;
|
| @@ -2246,8 +2248,9 @@
|
| }
|
|
|
| case BOOLEAN_CHECK: {
|
| - if (!function->IsBuiltin()) {
|
| - // Calling non-builtins with a value as receiver requires boxing.
|
| + if (!function->IsBuiltin() && !function_info->strict_mode()) {
|
| + // Calling non-strict non-builtins with a value as the receiver
|
| + // requires boxing.
|
| __ jmp(&miss);
|
| } else {
|
| Label fast;
|
| @@ -2556,12 +2559,13 @@
|
| __ push(edx); // receiver
|
| __ push(ecx); // name
|
| __ push(eax); // value
|
| + __ push(Immediate(Smi::FromInt(strict_mode_)));
|
| __ push(ebx); // restore return address
|
|
|
| // Do tail-call to the runtime system.
|
| ExternalReference store_ic_property =
|
| ExternalReference(IC_Utility(IC::kStoreInterceptorProperty));
|
| - __ TailCallExternalReference(store_ic_property, 3, 1);
|
| + __ TailCallExternalReference(store_ic_property, 4, 1);
|
|
|
| // Handle store cache miss.
|
| __ bind(&miss);
|
| @@ -2594,8 +2598,8 @@
|
| // Compute the cell operand to use.
|
| Operand cell_operand = Operand::Cell(Handle<JSGlobalPropertyCell>(cell));
|
| if (Serializer::enabled()) {
|
| - __ mov(ecx, Immediate(Handle<JSGlobalPropertyCell>(cell)));
|
| - cell_operand = FieldOperand(ecx, JSGlobalPropertyCell::kValueOffset);
|
| + __ mov(ebx, Immediate(Handle<JSGlobalPropertyCell>(cell)));
|
| + cell_operand = FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset);
|
| }
|
|
|
| // Check that the value in the cell is not the hole. If it is, this
|
| @@ -2720,6 +2724,43 @@
|
| }
|
|
|
|
|
| +MaybeObject* KeyedStoreStubCompiler::CompileStorePixelArray(
|
| + JSObject* receiver) {
|
| + // ----------- S t a t e -------------
|
| + // -- eax : value
|
| + // -- ecx : key
|
| + // -- edx : receiver
|
| + // -- esp[0] : return address
|
| + // -----------------------------------
|
| + Label miss;
|
| +
|
| + // Check that the map matches.
|
| + __ CheckMap(edx, Handle<Map>(receiver->map()), &miss, false);
|
| +
|
| + // Do the load.
|
| + GenerateFastPixelArrayStore(masm(),
|
| + edx,
|
| + ecx,
|
| + eax,
|
| + edi,
|
| + ebx,
|
| + true,
|
| + &miss,
|
| + &miss,
|
| + NULL,
|
| + &miss);
|
| +
|
| + // Handle store cache miss.
|
| + __ bind(&miss);
|
| + Handle<Code> ic(Isolate::Current()->builtins()->builtin(
|
| + Builtins::KeyedStoreIC_Miss));
|
| + __ jmp(ic, RelocInfo::CODE_TARGET);
|
| +
|
| + // Return the generated code.
|
| + return GetCode(NORMAL, NULL);
|
| +}
|
| +
|
| +
|
| MaybeObject* LoadStubCompiler::CompileLoadNonexistent(String* name,
|
| JSObject* object,
|
| JSObject* last) {
|
| @@ -3686,10 +3727,13 @@
|
| __ push(edx);
|
| __ push(ecx);
|
| __ push(eax);
|
| - __ push(ebx);
|
| + __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes
|
| + __ push(Immediate(Smi::FromInt(
|
| + Code::ExtractExtraICStateFromFlags(flags) & kStrictMode)));
|
| + __ push(ebx); // return address
|
|
|
| // Do tail-call to runtime routine.
|
| - __ TailCallRuntime(Runtime::kSetProperty, 3, 1);
|
| + __ TailCallRuntime(Runtime::kSetProperty, 5, 1);
|
|
|
| return GetCode(flags);
|
| }
|
|
|