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

Side by Side Diff: src/stub-cache.cc

Issue 25238002: Always cache the original target in a handle on the IC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Return updated target Created 7 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.cc ('k') | no next file » | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 } 1250 }
1251 1251
1252 return isolate->heap()->no_interceptor_result_sentinel(); 1252 return isolate->heap()->no_interceptor_result_sentinel();
1253 } 1253 }
1254 1254
1255 1255
1256 static MaybeObject* ThrowReferenceError(Isolate* isolate, Name* name) { 1256 static MaybeObject* ThrowReferenceError(Isolate* isolate, Name* name) {
1257 // If the load is non-contextual, just return the undefined result. 1257 // If the load is non-contextual, just return the undefined result.
1258 // Note that both keyed and non-keyed loads may end up here, so we 1258 // Note that both keyed and non-keyed loads may end up here, so we
1259 // can't use either LoadIC or KeyedLoadIC constructors. 1259 // can't use either LoadIC or KeyedLoadIC constructors.
1260 HandleScope scope(isolate);
1260 IC ic(IC::NO_EXTRA_FRAME, isolate); 1261 IC ic(IC::NO_EXTRA_FRAME, isolate);
1261 ASSERT(ic.target()->is_load_stub() || ic.target()->is_keyed_load_stub()); 1262 ASSERT(ic.target()->is_load_stub() || ic.target()->is_keyed_load_stub());
1262 if (!ic.SlowIsUndeclaredGlobal()) return isolate->heap()->undefined_value(); 1263 if (!ic.SlowIsUndeclaredGlobal()) return isolate->heap()->undefined_value();
1263 1264
1264 // Throw a reference error. 1265 // Throw a reference error.
1265 HandleScope scope(isolate);
1266 Handle<Name> name_handle(name); 1266 Handle<Name> name_handle(name);
1267 Handle<Object> error = 1267 Handle<Object> error =
1268 isolate->factory()->NewReferenceError("not_defined", 1268 isolate->factory()->NewReferenceError("not_defined",
1269 HandleVector(&name_handle, 1)); 1269 HandleVector(&name_handle, 1));
1270 return isolate->Throw(*error); 1270 return isolate->Throw(*error);
1271 } 1271 }
1272 1272
1273 1273
1274 static MaybeObject* LoadWithInterceptor(Arguments* args, 1274 static MaybeObject* LoadWithInterceptor(Arguments* args,
1275 PropertyAttributes* attrs) { 1275 PropertyAttributes* attrs) {
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
2197 Handle<FunctionTemplateInfo>( 2197 Handle<FunctionTemplateInfo>(
2198 FunctionTemplateInfo::cast(signature->receiver())); 2198 FunctionTemplateInfo::cast(signature->receiver()));
2199 } 2199 }
2200 } 2200 }
2201 2201
2202 is_simple_api_call_ = true; 2202 is_simple_api_call_ = true;
2203 } 2203 }
2204 2204
2205 2205
2206 } } // namespace v8::internal 2206 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698