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

Side by Side Diff: src/codegen.cc

Issue 10746: Track loop nesting across function calls when the function... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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/codegen.h ('k') | src/codegen-arm.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 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 node->expected_property_count()); 235 node->expected_property_count());
236 return function; 236 return function;
237 } 237 }
238 238
239 239
240 Handle<Code> CodeGenerator::ComputeCallInitialize(int argc) { 240 Handle<Code> CodeGenerator::ComputeCallInitialize(int argc) {
241 CALL_HEAP_FUNCTION(StubCache::ComputeCallInitialize(argc), Code); 241 CALL_HEAP_FUNCTION(StubCache::ComputeCallInitialize(argc), Code);
242 } 242 }
243 243
244 244
245 Handle<Code> CodeGenerator::ComputeCallInitializeInLoop(int argc) {
246 // Force the creation of the corresponding stub outside loops,
247 // because it will be used when clearing the ICs later - when we
248 // don't know if we're inside a loop or not.
249 ComputeCallInitialize(argc);
250 CALL_HEAP_FUNCTION(StubCache::ComputeCallInitializeInLoop(argc), Code);
251 }
252
253
245 void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) { 254 void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) {
246 int length = declarations->length(); 255 int length = declarations->length();
247 int globals = 0; 256 int globals = 0;
248 for (int i = 0; i < length; i++) { 257 for (int i = 0; i < length; i++) {
249 Declaration* node = declarations->at(i); 258 Declaration* node = declarations->at(i);
250 Variable* var = node->proxy()->var(); 259 Variable* var = node->proxy()->var();
251 Slot* slot = var->slot(); 260 Slot* slot = var->slot();
252 261
253 // If it was not possible to allocate the variable at compile 262 // If it was not possible to allocate the variable at compile
254 // time, we need to "declare" it at runtime to make sure it 263 // time, we need to "declare" it at runtime to make sure it
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { 476 void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
468 switch (type_) { 477 switch (type_) {
469 case READ_LENGTH: GenerateReadLength(masm); break; 478 case READ_LENGTH: GenerateReadLength(masm); break;
470 case READ_ELEMENT: GenerateReadElement(masm); break; 479 case READ_ELEMENT: GenerateReadElement(masm); break;
471 case NEW_OBJECT: GenerateNewObject(masm); break; 480 case NEW_OBJECT: GenerateNewObject(masm); break;
472 } 481 }
473 } 482 }
474 483
475 484
476 } } // namespace v8::internal 485 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.h ('k') | src/codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698