| Index: src/x64/stub-cache-x64.cc
|
| ===================================================================
|
| --- src/x64/stub-cache-x64.cc (revision 7031)
|
| +++ src/x64/stub-cache-x64.cc (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2010 the V8 project authors. All rights reserved.
|
| +// Copyright 2011 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -2063,8 +2063,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 two-byte string or a symbol.
|
| @@ -2079,8 +2080,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;
|
| @@ -2099,8 +2101,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;
|
| @@ -2410,12 +2413,13 @@
|
| __ push(rdx); // receiver
|
| __ push(rcx); // name
|
| __ push(rax); // value
|
| + __ Push(Smi::FromInt(strict_mode_));
|
| __ push(rbx); // 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);
|
| @@ -2568,6 +2572,44 @@
|
| }
|
|
|
|
|
| +MaybeObject* KeyedStoreStubCompiler::CompileStorePixelArray(
|
| + JSObject* receiver) {
|
| + // ----------- S t a t e -------------
|
| + // -- rax : value
|
| + // -- rcx : key
|
| + // -- rdx : receiver
|
| + // -- rsp[0] : return address
|
| + // -----------------------------------
|
| + Label miss;
|
| +
|
| + // Check that the map matches.
|
| + __ CheckMap(rdx, Handle<Map>(receiver->map()), &miss, false);
|
| +
|
| + // Do the load.
|
| + GenerateFastPixelArrayStore(masm(),
|
| + rdx,
|
| + rcx,
|
| + rax,
|
| + rdi,
|
| + rbx,
|
| + true,
|
| + false,
|
| + &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) {
|
| @@ -3460,10 +3502,13 @@
|
| __ push(rdx); // receiver
|
| __ push(rcx); // key
|
| __ push(rax); // value
|
| + __ Push(Smi::FromInt(NONE)); // PropertyAttributes
|
| + __ Push(Smi::FromInt(
|
| + Code::ExtractExtraICStateFromFlags(flags) & kStrictMode));
|
| __ push(rbx); // return address
|
|
|
| // Do tail-call to runtime routine.
|
| - __ TailCallRuntime(Runtime::kSetProperty, 3, 1);
|
| + __ TailCallRuntime(Runtime::kSetProperty, 5, 1);
|
|
|
| return GetCode(flags);
|
| }
|
|
|