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

Side by Side Diff: src/fast-codegen.cc

Issue 339045: Rename the kinds of locations to be consistent with the (codegen)... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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/compiler.cc ('k') | src/ia32/fast-codegen-ia32.cc » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 break; 66 break;
67 default: 67 default:
68 UNREACHABLE(); 68 UNREACHABLE();
69 } 69 }
70 return offset; 70 return offset;
71 } 71 }
72 72
73 73
74 void FastCodeGenerator::Move(Location destination, Location source) { 74 void FastCodeGenerator::Move(Location destination, Location source) {
75 switch (destination.type()) { 75 switch (destination.type()) {
76 case Location::NOWHERE: 76 case Location::UNINITIALIZED:
77 UNREACHABLE();
78
79 case Location::EFFECT:
77 break; 80 break;
78 81
79 case Location::TEMP: 82 case Location::VALUE:
80 switch (source.type()) { 83 switch (source.type()) {
81 case Location::NOWHERE: 84 case Location::UNINITIALIZED: // Fall through.
85 case Location::EFFECT:
82 UNREACHABLE(); 86 UNREACHABLE();
83 case Location::TEMP: 87 case Location::VALUE:
84 break; 88 break;
85 } 89 }
86 break; 90 break;
87 } 91 }
88 } 92 }
89 93
90 94
91 // All platform macro assemblers in {ia32,x64,arm} have a push(Register) 95 // All platform macro assemblers in {ia32,x64,arm} have a push(Register)
92 // function. 96 // function.
93 void FastCodeGenerator::Move(Location destination, Register source) { 97 void FastCodeGenerator::Move(Location destination, Register source) {
94 switch (destination.type()) { 98 switch (destination.type()) {
95 case Location::NOWHERE: 99 case Location::UNINITIALIZED:
100 UNREACHABLE();
101 case Location::EFFECT:
96 break; 102 break;
97 case Location::TEMP: 103 case Location::VALUE:
98 masm_->push(source); 104 masm_->push(source);
99 break; 105 break;
100 } 106 }
101 } 107 }
102 108
103 109
104 // All platform macro assemblers in {ia32,x64,arm} have a pop(Register) 110 // All platform macro assemblers in {ia32,x64,arm} have a pop(Register)
105 // function. 111 // function.
106 void FastCodeGenerator::Move(Register destination, Location source) { 112 void FastCodeGenerator::Move(Register destination, Location source) {
107 switch (source.type()) { 113 switch (source.type()) {
108 case Location::NOWHERE: 114 case Location::UNINITIALIZED: // Fall through.
115 case Location::EFFECT:
109 UNREACHABLE(); 116 UNREACHABLE();
110 case Location::TEMP: 117 case Location::VALUE:
111 masm_->pop(destination); 118 masm_->pop(destination);
112 } 119 }
113 } 120 }
114 121
115 122
116 void FastCodeGenerator::VisitDeclarations( 123 void FastCodeGenerator::VisitDeclarations(
117 ZoneList<Declaration*>* declarations) { 124 ZoneList<Declaration*>* declarations) {
118 int length = declarations->length(); 125 int length = declarations->length();
119 int globals = 0; 126 int globals = 0;
120 for (int i = 0; i < length; i++) { 127 for (int i = 0; i < length; i++) {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 UNREACHABLE(); 372 UNREACHABLE();
366 } 373 }
367 374
368 375
369 void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) { 376 void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) {
370 UNREACHABLE(); 377 UNREACHABLE();
371 } 378 }
372 379
373 380
374 } } // namespace v8::internal 381 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/ia32/fast-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698