Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: src/ic/ic.cc

Issue 587203002: ExtendStorageStub added, it is aimed for extending objects backing store when it runs out of space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ic/ic.h ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 Handle<Object> result; 2055 Handle<Object> result;
2056 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 2056 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
2057 isolate, result, ic.Store(receiver, key, args.at<Object>(2))); 2057 isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
2058 return *result; 2058 return *result;
2059 } 2059 }
2060 2060
2061 2061
2062 RUNTIME_FUNCTION(StoreIC_MissFromStubFailure) { 2062 RUNTIME_FUNCTION(StoreIC_MissFromStubFailure) {
2063 TimerEventScope<TimerEventIcMiss> timer(isolate); 2063 TimerEventScope<TimerEventIcMiss> timer(isolate);
2064 HandleScope scope(isolate); 2064 HandleScope scope(isolate);
2065 DCHECK(args.length() == 3); 2065 DCHECK(args.length() == 3 || args.length() == 4);
2066 StoreIC ic(IC::EXTRA_CALL_FRAME, isolate); 2066 StoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
2067 Handle<Object> receiver = args.at<Object>(0); 2067 Handle<Object> receiver = args.at<Object>(0);
2068 Handle<String> key = args.at<String>(1); 2068 Handle<String> key = args.at<String>(1);
2069 ic.UpdateState(receiver, key); 2069 ic.UpdateState(receiver, key);
2070 Handle<Object> result; 2070 Handle<Object> result;
2071 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 2071 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
2072 isolate, result, ic.Store(receiver, key, args.at<Object>(2))); 2072 isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
2073 return *result; 2073 return *result;
2074 } 2074 }
2075 2075
2076 2076
2077 // Extend storage is called in a store inline cache when
2078 // it is necessary to extend the properties array of a
2079 // JSObject.
2080 RUNTIME_FUNCTION(SharedStoreIC_ExtendStorage) {
2081 TimerEventScope<TimerEventIcMiss> timer(isolate);
2082 HandleScope shs(isolate);
2083 DCHECK(args.length() == 3);
2084
2085 // Convert the parameters
2086 Handle<JSObject> object = args.at<JSObject>(0);
2087 Handle<Map> transition = args.at<Map>(1);
2088 Handle<Object> value = args.at<Object>(2);
2089
2090 // Check the object has run out out property space.
2091 DCHECK(object->HasFastProperties());
2092 DCHECK(object->map()->unused_property_fields() == 0);
2093
2094 JSObject::MigrateToNewProperty(object, transition, value);
2095
2096 // Return the stored value.
2097 return *value;
2098 }
2099
2100
2101 // Used from ic-<arch>.cc. 2077 // Used from ic-<arch>.cc.
2102 RUNTIME_FUNCTION(KeyedStoreIC_Miss) { 2078 RUNTIME_FUNCTION(KeyedStoreIC_Miss) {
2103 TimerEventScope<TimerEventIcMiss> timer(isolate); 2079 TimerEventScope<TimerEventIcMiss> timer(isolate);
2104 HandleScope scope(isolate); 2080 HandleScope scope(isolate);
2105 DCHECK(args.length() == 3); 2081 DCHECK(args.length() == 3);
2106 KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate); 2082 KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2107 Handle<Object> receiver = args.at<Object>(0); 2083 Handle<Object> receiver = args.at<Object>(0);
2108 Handle<Object> key = args.at<Object>(1); 2084 Handle<Object> key = args.at<Object>(1);
2109 ic.UpdateState(receiver, key); 2085 ic.UpdateState(receiver, key);
2110 Handle<Object> result; 2086 Handle<Object> result;
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
2648 static const Address IC_utilities[] = { 2624 static const Address IC_utilities[] = {
2649 #define ADDR(name) FUNCTION_ADDR(name), 2625 #define ADDR(name) FUNCTION_ADDR(name),
2650 IC_UTIL_LIST(ADDR) NULL 2626 IC_UTIL_LIST(ADDR) NULL
2651 #undef ADDR 2627 #undef ADDR
2652 }; 2628 };
2653 2629
2654 2630
2655 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 2631 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
2656 } 2632 }
2657 } // namespace v8::internal 2633 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ic.h ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698