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

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

Issue 78023002: Use Type in CheckPrototypes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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/stub-cache.h ('k') | src/types.h » ('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 // 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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 function_index = Context::BOOLEAN_FUNCTION_INDEX; 1161 function_index = Context::BOOLEAN_FUNCTION_INDEX;
1162 } 1162 }
1163 1163
1164 GenerateDirectLoadGlobalFunctionPrototype( 1164 GenerateDirectLoadGlobalFunctionPrototype(
1165 masm(), function_index, scratch1(), miss); 1165 masm(), function_index, scratch1(), miss);
1166 receiver = handle(JSObject::cast(object->GetPrototype(isolate()))); 1166 receiver = handle(JSObject::cast(object->GetPrototype(isolate())));
1167 object_reg = scratch1(); 1167 object_reg = scratch1();
1168 } 1168 }
1169 1169
1170 // Check that the maps starting from the prototype haven't changed. 1170 // Check that the maps starting from the prototype haven't changed.
1171 return CheckPrototypes(receiver, object_reg, holder, 1171 return CheckPrototypes(
1172 scratch1(), scratch2(), scratch3(), 1172 IC::CurrentTypeOf(receiver, isolate()), object_reg, holder,
1173 name, miss, check_type); 1173 scratch1(), scratch2(), scratch3(), name, miss, check_type);
1174 } 1174 }
1175 1175
1176 1176
1177 // HandlerFrontend for store uses the name register. It has to be restored 1177 // HandlerFrontend for store uses the name register. It has to be restored
1178 // before a miss. 1178 // before a miss.
1179 Register StoreStubCompiler::HandlerFrontendHeader( 1179 Register StoreStubCompiler::HandlerFrontendHeader(
1180 Handle<Object> object, 1180 Handle<Object> object,
1181 Register object_reg, 1181 Register object_reg,
1182 Handle<JSObject> holder, 1182 Handle<JSObject> holder,
1183 Handle<Name> name, 1183 Handle<Name> name,
1184 Label* miss) { 1184 Label* miss) {
1185 return CheckPrototypes(Handle<JSObject>::cast(object), object_reg, holder, 1185 return CheckPrototypes(
1186 this->name(), scratch1(), scratch2(), 1186 IC::CurrentTypeOf(object, isolate()), object_reg, holder, this->name(),
1187 name, miss, SKIP_RECEIVER); 1187 scratch1(), scratch2(), name, miss, SKIP_RECEIVER);
1188 } 1188 }
1189 1189
1190 1190
1191 bool BaseLoadStoreStubCompiler::IncludesNumberType(TypeHandleList* types) { 1191 bool BaseLoadStoreStubCompiler::IncludesNumberType(TypeHandleList* types) {
1192 for (int i = 0; i < types->length(); ++i) { 1192 for (int i = 0; i < types->length(); ++i) {
1193 if (types->at(i)->Is(Type::Number())) return true; 1193 if (types->at(i)->Is(Type::Number())) return true;
1194 } 1194 }
1195 return false; 1195 return false;
1196 } 1196 }
1197 1197
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 Handle<FunctionTemplateInfo>( 1828 Handle<FunctionTemplateInfo>(
1829 FunctionTemplateInfo::cast(signature->receiver())); 1829 FunctionTemplateInfo::cast(signature->receiver()));
1830 } 1830 }
1831 } 1831 }
1832 1832
1833 is_simple_api_call_ = true; 1833 is_simple_api_call_ = true;
1834 } 1834 }
1835 1835
1836 1836
1837 } } // namespace v8::internal 1837 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698