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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 88043002: Out-of-line constant pool on Arm: Stage 3 - Set Constant Pool Pointer on Function Entry (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix rebase error. Created 7 years 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
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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 is_optimized.End(); 1262 is_optimized.End();
1263 } 1263 }
1264 1264
1265 1265
1266 template<> 1266 template<>
1267 HValue* CodeStubGraphBuilder<FastNewClosureStub>::BuildCodeStub() { 1267 HValue* CodeStubGraphBuilder<FastNewClosureStub>::BuildCodeStub() {
1268 Counters* counters = isolate()->counters(); 1268 Counters* counters = isolate()->counters();
1269 Factory* factory = isolate()->factory(); 1269 Factory* factory = isolate()->factory();
1270 HInstruction* empty_fixed_array = 1270 HInstruction* empty_fixed_array =
1271 Add<HConstant>(factory->empty_fixed_array()); 1271 Add<HConstant>(factory->empty_fixed_array());
1272 HInstruction* empty_constant_pool_array =
1273 Add<HConstant>(factory->empty_constant_pool_array());
1272 HValue* shared_info = GetParameter(0); 1274 HValue* shared_info = GetParameter(0);
1273 1275
1274 AddIncrementCounter(counters->fast_new_closure_total()); 1276 AddIncrementCounter(counters->fast_new_closure_total());
1275 1277
1276 // Create a new closure from the given function info in new space 1278 // Create a new closure from the given function info in new space
1277 HValue* size = Add<HConstant>(JSFunction::kSize); 1279 HValue* size = Add<HConstant>(JSFunction::kSize);
1278 HInstruction* js_function = Add<HAllocate>(size, HType::JSObject(), 1280 HInstruction* js_function = Add<HAllocate>(size, HType::JSObject(),
1279 NOT_TENURED, JS_FUNCTION_TYPE); 1281 NOT_TENURED, JS_FUNCTION_TYPE);
1280 1282
1281 int map_index = Context::FunctionMapIndex(casted_stub()->language_mode(), 1283 int map_index = Context::FunctionMapIndex(casted_stub()->language_mode(),
(...skipping 13 matching lines...) Expand all
1295 empty_fixed_array); 1297 empty_fixed_array);
1296 Add<HStoreNamedField>(js_function, HObjectAccess::ForLiteralsPointer(), 1298 Add<HStoreNamedField>(js_function, HObjectAccess::ForLiteralsPointer(),
1297 empty_fixed_array); 1299 empty_fixed_array);
1298 Add<HStoreNamedField>(js_function, HObjectAccess::ForPrototypeOrInitialMap(), 1300 Add<HStoreNamedField>(js_function, HObjectAccess::ForPrototypeOrInitialMap(),
1299 graph()->GetConstantHole()); 1301 graph()->GetConstantHole());
1300 Add<HStoreNamedField>(js_function, 1302 Add<HStoreNamedField>(js_function,
1301 HObjectAccess::ForSharedFunctionInfoPointer(), 1303 HObjectAccess::ForSharedFunctionInfoPointer(),
1302 shared_info); 1304 shared_info);
1303 Add<HStoreNamedField>(js_function, HObjectAccess::ForFunctionContextPointer(), 1305 Add<HStoreNamedField>(js_function, HObjectAccess::ForFunctionContextPointer(),
1304 context()); 1306 context());
1307 Add<HStoreNamedField>(js_function,
1308 HObjectAccess::ForFunctionConstantPoolPointer(),
1309 empty_constant_pool_array);
1305 1310
1306 // Initialize the code pointer in the function to be the one 1311 // Initialize the code pointer in the function to be the one
1307 // found in the shared function info object. 1312 // found in the shared function info object.
1308 // But first check if there is an optimized version for our context. 1313 // But first check if there is an optimized version for our context.
1309 if (FLAG_cache_optimized_code) { 1314 if (FLAG_cache_optimized_code) {
1310 BuildInstallFromOptimizedCodeMap(js_function, shared_info, native_context); 1315 BuildInstallFromOptimizedCodeMap(js_function, shared_info, native_context);
1311 } else { 1316 } else {
1312 BuildInstallCode(js_function, shared_info); 1317 BuildInstallCode(js_function, shared_info);
1313 } 1318 }
1314 1319
(...skipping 16 matching lines...) Expand all
1331 return BuildUncheckedDictionaryElementLoad(receiver, key); 1336 return BuildUncheckedDictionaryElementLoad(receiver, key);
1332 } 1337 }
1333 1338
1334 1339
1335 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { 1340 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) {
1336 return DoGenerateCode(isolate, this); 1341 return DoGenerateCode(isolate, this);
1337 } 1342 }
1338 1343
1339 1344
1340 } } // namespace v8::internal 1345 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698