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

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

Issue 3291015: Custom call IC for String.fromCharCode. (Closed)
Patch Set: Removed todo Created 10 years, 3 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 : arguments_(argc) 1215 : arguments_(argc)
1216 , in_loop_(in_loop) 1216 , in_loop_(in_loop)
1217 , kind_(kind) 1217 , kind_(kind)
1218 , cache_holder_(cache_holder) { 1218 , cache_holder_(cache_holder) {
1219 } 1219 }
1220 1220
1221 1221
1222 Object* CallStubCompiler::CompileCustomCall(int generator_id, 1222 Object* CallStubCompiler::CompileCustomCall(int generator_id,
1223 Object* object, 1223 Object* object,
1224 JSObject* holder, 1224 JSObject* holder,
1225 JSGlobalPropertyCell* cell,
1225 JSFunction* function, 1226 JSFunction* function,
1226 String* fname, 1227 String* fname) {
1227 CheckType check) { 1228 ASSERT(generator_id >= 0 && generator_id < kNumCallGenerators);
1228 ASSERT(generator_id >= 0 && generator_id < kNumCallGenerators); 1229 switch (generator_id) {
1229 switch (generator_id) { 1230 #define CALL_GENERATOR_CASE(ignored1, ignored2, ignored3, name) \
1230 #define CALL_GENERATOR_CASE(ignored1, ignored2, name) \ 1231 case k##name##CallGenerator: \
1231 case k##name##CallGenerator: \ 1232 return CallStubCompiler::Compile##name##Call(object, \
1232 return CallStubCompiler::Compile##name##Call(object, \ 1233 holder, \
1233 holder, \ 1234 cell, \
1234 function, \ 1235 function, \
1235 fname, \ 1236 fname);
1236 check); 1237 CUSTOM_CALL_IC_GENERATORS(CALL_GENERATOR_CASE)
1237 CUSTOM_CALL_IC_GENERATORS(CALL_GENERATOR_CASE)
1238 #undef CALL_GENERATOR_CASE 1238 #undef CALL_GENERATOR_CASE
1239 } 1239 }
1240 UNREACHABLE(); 1240 UNREACHABLE();
1241 return Heap::undefined_value(); 1241 return Heap::undefined_value();
1242 } 1242 }
1243 1243
1244 1244
1245 Object* CallStubCompiler::GetCode(PropertyType type, String* name) { 1245 Object* CallStubCompiler::GetCode(PropertyType type, String* name) {
1246 int argc = arguments_.immediate(); 1246 int argc = arguments_.immediate();
1247 Code::Flags flags = Code::ComputeMonomorphicFlags(kind_, 1247 Code::Flags flags = Code::ComputeMonomorphicFlags(kind_,
1248 type, 1248 type,
1249 cache_holder_, 1249 cache_holder_,
1250 in_loop_, 1250 in_loop_,
1251 argc); 1251 argc);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 expected_receiver_type_ = 1335 expected_receiver_type_ =
1336 FunctionTemplateInfo::cast(signature->receiver()); 1336 FunctionTemplateInfo::cast(signature->receiver());
1337 } 1337 }
1338 } 1338 }
1339 1339
1340 is_simple_api_call_ = true; 1340 is_simple_api_call_ = true;
1341 } 1341 }
1342 1342
1343 1343
1344 } } // namespace v8::internal 1344 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698