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

Side by Side Diff: src/codegen.cc

Issue 14423: Experimental: introduce a helper class to delmite a scope where the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 12 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
« no previous file with comments | « no previous file | src/codegen-ia32.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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 void CodeGenerator::GenerateFastCaseSwitchCases( 406 void CodeGenerator::GenerateFastCaseSwitchCases(
407 SwitchStatement* node, 407 SwitchStatement* node,
408 Vector<JumpTarget> case_labels, 408 Vector<JumpTarget> case_labels,
409 JumpTarget* table_start) { 409 JumpTarget* table_start) {
410 ZoneList<CaseClause*>* cases = node->cases(); 410 ZoneList<CaseClause*>* cases = node->cases();
411 int length = cases->length(); 411 int length = cases->length();
412 412
413 for (int i = 0; i < length; i++) { 413 for (int i = 0; i < length; i++) {
414 Comment cmnt(masm(), "[ Case clause"); 414 Comment cmnt(masm(), "[ Case clause");
415 case_labels[i].Bind(); 415 case_labels[i].Bind();
416 VisitStatements(cases->at(i)->statements()); 416 VisitStatementsAndSpill(cases->at(i)->statements());
417 417
418 // All of the labels match the same expected frame as the table start. 418 // All of the labels match the same expected frame as the table start.
419 // If control flow cannot fall off the end of the case statement, we 419 // If control flow cannot fall off the end of the case statement, we
420 // pick up the expected frame from the table start. Otherwise we have 420 // pick up the expected frame from the table start. Otherwise we have
421 // to generate merge code to match the next label. 421 // to generate merge code to match the next label.
422 if (frame_ == NULL) { 422 if (frame_ == NULL) {
423 frame_ = new VirtualFrame(table_start->expected_frame()); 423 frame_ = new VirtualFrame(table_start->expected_frame());
424 } else { 424 } else {
425 frame_->MergeTo(table_start->expected_frame()); 425 frame_->MergeTo(table_start->expected_frame());
426 } 426 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { 491 void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
492 switch (type_) { 492 switch (type_) {
493 case READ_LENGTH: GenerateReadLength(masm); break; 493 case READ_LENGTH: GenerateReadLength(masm); break;
494 case READ_ELEMENT: GenerateReadElement(masm); break; 494 case READ_ELEMENT: GenerateReadElement(masm); break;
495 case NEW_OBJECT: GenerateNewObject(masm); break; 495 case NEW_OBJECT: GenerateNewObject(masm); break;
496 } 496 }
497 } 497 }
498 498
499 499
500 } } // namespace v8::internal 500 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698